Wednesday, June 29, 2011

Vacation

Been on vacation the last week so no updates. Its been nice to unplug. We went to NYC which isn't really a great place to unwind but its a great place and I had a great time. Its a great town for technology too - no matter what your gadget fetish is you see loads of it on the streets and subways. I like to see how Tablets have really integrated into people's lives - and not just people who work in IT but just regular folks who were using an IPad to surf the web on the train. I even saw one guy use his IPad as a camcorder on top of the Empire State Building. I don't know what type of results he got but I hope it worked out for him.



This isn't the best picture but its of several hundred people who are all participating in a group yoga exercise in Time Square. Something about it just screamed 'Modern Existence' to me. On one hand Time Square is the worst place to do yoga - much less in a huge group, but on the other hand it seemed ok. And to steal a phrase - 'If you can do yoga in New York you can do yoga anywhere'.

Another thing I did while on vacation was catch up on some fun sci-fi reading by starting The Windup Girl by Paolo Bacigalupi.


Its a really good book if you like sci-fi - especially cyberpunk like William Gibson. It won the Hugo and Nebula awards last year. While reading it I had a couple of ideas for my NoSql blog. One idea centers around the use of using the neo4j graph db to create a nice association graph amongst all the characters you meet in the beginning of the Novel as well as who they work for. The book takes place in Thailand and there are Thai, Chinese, Japanese, and American characters. There are enough characters introduced early on that it would be useful to have a resource showing how they are all linked. This is where neo4j fits in. On the neo4j website they show an example of a similar graph for the Matrix movies which looks like:


Until Next Time
Cheers,
TheSortedProgrammer

Thursday, June 16, 2011

Optimizing MongoDb talk

There are a lot of good presentations from MongoNYC 2011 Conference. One of them that you can check out the slides from is: Optimizing MongoDb by Andrew Rollins. 




  One of the things you have to get used to about NoSQL is that its such a new topic that there aren't many resources out there for there - O'Reilly books, classes, etc. Its getting better all the time but its still a subject in its infancy. One great source of information you can tap into a couple times a year are the conferences that are put on for NoSQL. In fact, my first real exposure to the technology was at the NoSql East 2009 Conference. I highly recommend checking out the site for - its still got logs of relevant videos and slideshows showing how some of the biggest companies (Twitter, Facebook, Microsoft, etc.) are using NoSql to handle their needs.

Cheers,
TheSortedProgrammer

Tuesday, June 14, 2011

Mongo Db

I started working on a new pet project -  creating a blogging system using PHP and mongoDb. I have a keen interest in NoSQL and I've been wanting to get my hands dirty with mongoDb for sometime now and this seems like as good a project as any to put the db through its paces.

I thought I would document the process here until my new mongo powered blog is working.

So far so good - I installed the mongoDb with no problem and went through the start-up guide on the mongoDb site.

Next I installed the php half of the equation - MongoDB database driver for php.
Unfortunately I didn't have pecl installed on my new MacBook Pro -  Curses A Road Block!
Running the commands:
curl http://pear.php.net/go-pear.phar > go-pear.php
php -d detect_unicode=0 go-pear.phar
got me the pear/pecl packages I needed.

Now I just ran:
pecl install mongo
and boom I had the drivers installed. All that was left was to update the php.ini file and restart Apache.

As a final step I created 2 pages.
postCreator.php - a page with a form that allows the user to create a new blog entry and insert it (blog it) into their collection. The page creates mongo records that consist of a few fields (username, timestamp, title, text, label, etc.)
view.php - a page which displays the blog entries.

So thats where I've gotten to. All matters of formatting and style sheets have to be worked out. As well as a commenting system and lots of other issues. Still, I'm impressed by how quickly I was able to get up and running with mongoDb.

Cheers,
TheSortedProgrammer