Busy is a good thing, right?
Aug0
I’ve been incredibly busy lately, the incredibly is an understatement! To give a recap, here’s what I’m up to:
- Working a full time contract position with ActiGraph through CED Technical Services.
- Alas, this is the end of CWA Consulting for the foreseeable future.
- Developing a couple of websites with CED Technical Services.
- Actively developing three iPhone games and applications with Wirehead Labs, with seven (yes, seven!) more in queue.
- Trying to get Wirehead Labs’ web presence off the ground as well.
- Helping out with ITGulfCoast and finishing up their iPhone Application.
- Re-learning more Visual Basic 6 than I ever wanted to know!
- Attending area technical groups and meetings to promote Wirehead Labs.
I doubt anyone will be particularly hurt by it (or even notice), but I won’t be posting much in the near future. It’s good to be busy, so without further ado I’m head down and working my butt off!
CentOS 5.3 RoR Apache Install
Aug0
I promised this addendum to my previous post CentOS 5.3 RoR Install. Sorry for the wait! Please execute everything in the previous post (from a totally clean install), then continue with these commands:
yum -y install httpd httpd-devel apr apr-devel apr-util apr-util-devel gem install passenger passenger-install-apache2-module
Press enter a few times and you should have all the software installed, so now it’s time to configure Apache:
nano /etc/httpd/conf/httpd.conf
Search for the last LoadModule line (there’s a large block of them), and insert the following after it:
LoadModule passenger_module /usr/lib/ruby/gems/1.8/gems/passenger-2.2.4/ext/apache2/mod_passenger.so PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-2.2.4 PassengerRuby /usr/bin/ruby
Apache can now host Ruby on Rails apps, but you’ll need to create a virtual host directive to link it to an application. I prefer to use small standalone configurations to configure each app separately, here is how:
nano /etc/httpd/conf.d/rails.conf
Replace “rails.conf” with something appropriate (such as “rails_appname.conf”, but make sure it ends with “.conf” so Apache will see it. In this file, paste the following (change to suit) then exit and save:
<VirtualHost *:80>
ServerName yourdomain.com
DocumentRoot /opt/application/public
</VirtualHost>
Be sure to change “yourdomain.com” to the domain you want to listen on, otherwise it will answer all HTTP requests to the server. You can also delete the ServerName line if you want that. I prefer to put applications in my “/opt/” folder, but the above DocumentRoot should point to the “public” folder of your RoR application, wherever it may be.
Almost done! Issue the following command to restart Apache:
service httpd restart
Visit your configured domain (or server) and voila, that’s all there is to it! Certain applications don’t work so well with Passenger, but the majority do. Let me know if you have any trouble with specific ones and I’ll help you through it.
p.s. restarting Apache using the above command will restart your application(s), too.
CodebaseHQ.com
Aug1
I’m not one for advertising (especially other people’s stuff) usually, but today I found a stellar replacement for GitHub and immediately switched over all my projects to it. As you might have guessed from the title, it’s CodebaseHQ.com, and it’s so far ahead of the curve that I can’t imagine anyone ever using that clunky old piece of crap called GitHub (sorry GitHub guys, you’ve got some serious catching up to do, especially on uptime and performance!).
They’re set up much the same way as GitHub, except that repos are owned by projects and the cost is calculated by projects (rather than repos and collaborators like GitHub). They don’t have anything exactly equivalent to GitHub for that reason, but for $8 a month more I get 5 more projects/repos, the same storage quota, unlimited collaborators, and far fewer headaches waiting 5 seconds per page refresh. An added bonus is a much more complete project management toolset that includes tickets (rather than issues), milestones, and time tracking.
I won’t miss the pretty graphs that GitHub produces from your branches and merges, but if you love them you’ll have to look for something else. So far the only issue I’ve had with CodebaseHQ (and I suggested they step up their marketing to compensate) was that it took me so long to hear about them! Thanks to Wes R. for another excellent recommendation!
Wirehead Labs News
Aug0
So I’ve been busy over at Wirehead Labs, and today we had some great news. Check it out:
Be sure to check out the iPhone Workshop, too…it’s promising to be a lot of fun and very informative to boot!
iPhone Ecosystem Presentation
Jul1
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.
Technological Singularity – Today Only $500M!
Jul2
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!
Cloud vs. Mesh (and Google Wave)
Jul0
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?
Vista DNS Suffix Fix
Jul0
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:
- Open Control Panel, click on Network and Internet, then click on Network and Sharing Center to get to the networking center.
- Click on Manage network connections (in Tasks on the left) to open the network connections folder.
- Right click on Local Area Connection (or another network device) and click on Properties to bring up the connection properties dialog.
- Double click on Internet Protocol Version 4 (TCP/IPv4) to bring up the protocol properties dialog.
- Click the Advanced… button to bring up the advanced protocol settings dialog, then select the DNS tab to switch to advanced DNS settings.
- Select the Append these DNS suffixes (in order): option, then click on Add… to bring up the domain suffix dialog.
- Type in a single period (.), then click on Add to create the null domain suffix (which actually tricks windows into appending nothing).
- 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
Jul0
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
Jul0
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!