iPhone Ecosystem Presentation

24
Jul
1

I had the opportunity to give a presentation on the iPhone Ecosystem earlier this week for a local group called IT Gulf Coast, and wanted to share.  It’s fairly comprehensive from a high level, and is an excellent introduction to the different players and processes you might encounter while doing iPhone App development.  While most of the information is specific to native applications, I do touch on HTML 5.0 and its future in iPhone development.

Check out the slides here, and be sure to check out Wirehead Labs, Inc. too!  I’ll try to post up a video as soon as possible.

Filed under: Professional

Technological Singularity – Today Only $500M!

11
Jul
2

This morning I read a great article from New Scientist on memristors and their biological equivalents, and boy did I get excited.  I’ve been following the convergence of biology and technology for quite some time as I’m interested in bringing about the singularity.  When the two fields converge enough, we’ll have the ability to fully simulate the biological computers that we’re so fond of (brains), and hence we’ll have a proper playing ground for true artificial intelligence.

Current leading research in this matter tops out at around 10 thousand neurons and 30 million synapses, which is a far cry from the 100 billion neurons and 150 trillion synapses in a human brain.  That computer is a 22.8 TFLOP machine, while the fastest supercomputer in the world currently is around 1100 TFLOPs.  That still only provides enough computing horsepower to handle simulation of 500 thousand neurons and 150 million synapses.  We’re a long, long way off.

Or are we?  Those systems are not designed from the ground up to simulate such things.  They use global memory and thread models, run in software rather than hardware, and are generally unsuited to the distributed computation that neuron simulation requires.  The physical capacity (scaling) isn’t too terrible either, as long as you’ve got large eyes.  Here are a few assumptions (based on this page) for calculations (please correct me if I’m off base here!):

  • A neuron can be represented by 3 floats – 1 excitation threshold, 1 excitation state, and 1 cooling factor
  • A synapse can be represented by 2 addresses and 2 floats – 1 source, 1 destination, 1 memory (per memristors), and 1 efficiency factor
  • The human brain contains some 100 billion (1.0E11) neurons.
  • The human brain contains some 150 trillion (1.5E14) synapses.

A float is either 32b or 64b, and an address in this context would most certainly be 64b.

With these numbers we can ascertain the memory requirements of a brain simulation system, and those would be:

  • 100 billion neurons at 12 bytes each is 1.2E12 bytes, or 1.2 terabytes.
  • 150 trillion synapses at 24 bytes each is 3.6E15 bytes, or 3.6 petabytes.

Let’s ignore the cost of processing and updating all this information for now, and see what it might cost to put together such a memory subsystem:

  • Commodity pricing for DRAM is around $10/GB for the fast stuff (DDR3).
  • You’d need around 4 million of these sticks (includes some wiggle room).  Can be had for about $40M.
  • Commodity pricing for HDDs is around $0.10/GB for the big stuff, say 2TB drives.
  • You’d need around 2000 of these HDDs (includes some wiggle room) for persistance.  Can be had for about $400K.

So we’re at a little over $40M just in memory.  Obviously you’d get better rates at these volumes, though!  Let’s double this price for backplanes and power supply, to a cool $80M in memory, power, cooling, and interconnects.  Remember that our interconnects are just passing synapse data over a 3D mesh like our brain, nothing toroidal or otherwise, and they benefit from extreme locality.

Now let’s investigate processing at 100Hz (suggested by many studies as the maximum neural firing rate) with the use of FPGA chips (so they can still be reprogrammed, but run in hardware):

  • Xilinx Virtex-6 FPGAs run at (up to) 1.6Ghz and are suitable for stream processing on up to 8 DRAM modules at once.
  • A 512Mbit memory module/chip with a 64 bit (or larger) interface could read and write its entire contents about 100 times a second.
  • I don’t have pricing for the Virtex-6 chips, but let’s assume that with their 75% off volume pricing they’d cost around $100 each.
  • You’d need about 4 million Virtex-6 chips to process all 4 petabytes of state 100 times per second.  Can be had for $400M (or just build a fab).

So there you have it, it’s possible to do brain simulation at the human brain scale for about $500 million dollars, $600 million if you decide you must have a synchronized clock system (which requires double the state memory for buffering.  If anyone has this kind of cash lying around, let me know and I’ll make it happen!*

If not, don’t worry!  I’m sure the government already has ten – these are a bargain compared to Stealth Bombers, and why build one when you can build ten at ten times the cost?

* I can’t be held responsible if a $500M machine just sits there and blinks a lot, I’m sure there are many secrets to the brain we haven’t discovered!

Filed under: Professional

Cloud vs. Mesh (and Google Wave)

9
Jul
0

Lately I’ve been reading a lot of news about fairly high profile datacenters and cloud platforms suffering failures, even Google’s App Engine.  It made me wonder if it’s time to re-visit the idea of a mesh cloud, which for some reason seems to be stymied in “impossible” land.  To be precise, we need something to get App Engine (or Google Docs, etc) off their cloud and onto an unbreakable distributed system.

Just the term “mesh cloud” would probably make a venture capitalist drool with anticipation, but the basic technology required for such a system is just a distributed data store.  If you haven’t yet heard of Wuala, check out their site and service.  I think they’re on the forefront of a viable technology for a mesh cloud computing, and boy do I wish they’d hire me (yes, I applied)!  Given Wuala’s decentralized and distributed data store (with proper servers as well as a mesh backing your data), the issue becomes one of bandwidth.

Since bandwidth-constrained applications do poorly in meshes, my thoughts centered on collaboration and communication software like Google Wave rather than data-intense applications like video encoding or real time simulation.  It’s really unfortunate that Google Wave requires a centralized server for locking and updates, as that breaks the technology for distributed platforms that lack locking semantics.  Of course, that may not be the case as information about Wave is hard to come by (shame on Google)!

So the real holy grail would be a cloud-based wave-like application with free, perpetual persistence.  I’ve put some thought into such platforms and would really like to dig in, but to get started I’d need to implement the very basics for a secure platform – a trust hierarchy.  While I could roll my own PKI system, I’m looking for something more like OpenID with a PKI component.  Is there any such beast?  Should there be?

Filed under: Professional

Vista DNS Suffix Fix

7
Jul
0

I was having trouble with Vista on my laptop occasionally failing to resolve a hostname (very likely over wireless), at which point it would append its local DNS suffix before re-trying.  Since my DNS suffix is a real domain with a catch-all sub-domain, I was having a lot of trouble with websites and the like resolving to my router rather than their proper addresses.  This is in part due to my DHCP config, which specifies the domain-name option.

Amazingly, I could find no guidance online except mentions of changing your Active Directory Domain or using the Hosts file for certain systems you need to reach.  These solutions did not apply nor appeal to me, so I set out to figure out a way to get Vista properly resolving.  Here are instructions that will disable local domain suffix resolution on Vista, tested with Vista Ultimate x64:

  1. Open Control Panel, click on Network and Internet, then click on Network and Sharing Center to get to the networking center.
  2. Click on Manage network connections (in Tasks on the left) to open the network connections folder.
  3. Right click on Local Area Connection (or another network device) and click on Properties to bring up the connection properties dialog.
  4. Double click on Internet Protocol Version 4 (TCP/IPv4) to bring up the protocol properties dialog.
  5. Click the Advanced… button to bring up the advanced protocol settings dialog, then select the DNS tab to switch to advanced DNS settings.
  6. Select the Append these DNS suffixes (in order): option, then click on Add… to bring up the domain suffix dialog.
  7. Type in a single period (.), then click on Add to create the null domain suffix (which actually tricks windows into appending nothing).
  8. Click Ok, Ok, Ok, and close out the rest of the windows.  Changes should take effect after closing the connection properties dialog.

I’m fairly sure others have encountered this issue, so let me know how this works out for you.

Plaything to Product

6
Jul
0

Trivial is not the word that comes to mind when I consider my development and management skill sets.  I’ve successfully managed million dollar projects and developed software for huge clusters of machines, so the progression on iLostMyMarbles has come as a surprise.  I narrowed the problem down to my mindset, where I consider games trivial applications. Nothing is further from the truth, and game development is much, much less forgiving!

As much as I hate to admit it, this is a repeating trend for me, as the first time I go down a new avenue of programming I’m much more apt to throw something together than to take the time to plan everything out.  This is more or less how I learn, and has always served me well as those learning projects never get off my hard drive.  iLostMyMarbles is a different beast since I’ve allowed it to cross the threshold from plaything to product, and has reminded me in no uncertain terms that nothing should be developed without a solid architecture and at least some documentation.

This comes up because I’ve now been hacking (in the literary sense), rather than programming, more functionality into the game.  My original intent was to get familiar with game graphics on the iPhone, and now I’ve gotten myself into acceleration, databases, networking, and a whole host of performance tweaks.  I’ll end up spending at least as much time condensing and cleaning my code as writing it took, and that time will all be wasted for want of a properly conceived architecture.

DD-WRT Wins

6
Jul
0

After receiving my new laptop, I was dismayed to find that it would not keep a connection to my wireless router for more than a few minutes at a time.  After confirming the issue was with the router (a Netgear WNR834B) by using a few other devices, I decided to upgrade its firmware.  Lo and behold, it’s at the latest version, which came out quite awhile ago (early 2008) .  Since re-flashing with the latest firmware didn’t help, I decided to take the plunge and Flash the router with DD-WRT.

The WNR834B is quite like a few Linksys models, but is hard to find info for.  After finding installation notes here, then finding the proper images here (v2.4sp1) or here (v2.4), the Tftpd32 software refused to upload the image.  It turns out that the Tftpd32 software would not work in Vista, but the other Windows software listed here (download) works great.  While there is a bit of cord jiggling and prayer involved, it was a painless and fairly simple process once I had the proper tools.

I now enjoy a faster, stabler wireless router that supports VPN functions, has nice data graphs and logging, and even allows me to SSH into it!

Filed under: Professional