The Blog: February 2010
Watching Trees
As a SysAdmin, my job more-or-less exists by knowing miscellaneous arcana that most software engineers aren’t aware of.
When a particular co-worker here at Agora has a problem with his Linux machine, I provide advice and show him how to fix it. Some months after he had joined Agora, I discovered that after each troubleshooting session, he copy-and-pastes the entire text terminal log into a text file that he keeps on his desktop. He has dozens of transcripts at this point; I bet if I were to look through it, it would read something like the Tao te Ching or Bhagavad Gita, only concerning UNIX instead of right living.
(Of course, there’s not much of a difference between UNIX and right living, but that’s a topic for another day.)
In the spirit of allowing you to build your own little collection, here is a simple trick that came in handy to me yesterday.
Experimenting with Redis
Yesterday I started looking at ways to do inter-application communication. In a number of projects we’ve done here at Agora Games, we’ve used queues to make that happen. Redis has been on my radar for awhile now, but yesterday I drove my Chevy to the levee and guess what? The levee is NOT dry people. I mean, who drinks rye anyway these days? Old people.
And now for some couchdb
I had occasion tonight to give a quick demo of CouchDB. This is so simple its almost not worth blogging about, but hey, good software is supposed to be simple.
Install
On your Mac:
sudo port install couchdb sudo launchctl load -w /Library/LaunchDaemons/org.apache.couchdb.plist
On Ubuntu:
sudo apt-get install couchdb
You’re done; now to play.
Futon Admin Interface
This allows you to create a DB, create records, etc.
- Open http://localhost:5984/_utils/
- …
- Prosper
Using our old friend curl
curl -X PUT http://localhost:5984/mlg/ #create a db
curl -X GET http://localhost:5984/mlg/ #get a whole bunch of info about the db
curl -X POST http://localhost:5984/mlg/ -H "Content-Type:application/json" -d '{"body": "Here is a paragraph"}' #create a record






