Getting started with Ruby and Sinatra

I’ve been doing a little work with Ruby , starting with some XHTML parsing with Nokogiri . I’ve just created my first web page using Sinatra . While the instructions makes it look simple, it was a little more complex due a package dependency error.

Read more

Upcoming Conferences with dedicated MySQL content

We recently held a dedicated MySQL Track at ODTUG Kaleidoscope 2010 conference for 4 days. This is the first of many Oracle events that will begin to include dedicated MySQL content.

Read more

Improving MySQL Productivity – From Design to Implementation

My closing presentation at the dedicated MySQL track at ODTUG Kaleidoscope 2010 discussed various techniques and best practices for improving the ROI of developer resources using MySQL. Included in the sections on Design, Security, Development, Testing, Implementation, Instrumentation and Support were also a number of horror stories of not what to do, combined with practical examples of improving productivity.

Read more

MySQL Idiosyncrasies That Bite

The following are my slides that I presented at ODTUG Kaleidoscope 2010 . This presentation talks about the MySQL defaults including a non-transactional state, silent data truncations, date management, and transaction isolation options.

Read more

Getting Nokogiri working under Mac OS X

The official Installation documentation states: sudo port install libxml2 libxslt sudo gem install nokogiri however I found this not to work for me. The following did work. $ sudo port install libxml2 libxslt $ sudo gem install nokogiri ERROR: could not find nokogiri locally or in a repository $ sudo gem sources -a http://gems.

Read more

Still room at Kaleidoscope for MySQL attendees

Today I received notice that next week’s Velocity conference is at maximum capacity. With just under 2 weeks before the start of ODTUG Kaleidoscope in Washington DC we still have room for late registrations.

Read more

MongoDB Experience: Server logging

By default the mongod process sends all output to stdout. You can also specify the daemon to log to file which is necessary for any production implementation. For example: $ mongod --logpath=`pwd`/mongo.

Read more

MongoDB Experience: Key/Value Store

MongoDB is categorized as a schema-less, schema-free or a document orientated data store. Another category of NoSQL product is the key/value store. It had not dawned on me until a discussion with some of the 10gen employees that MongoDB is also a key/value store, this is just a subset of features.

Read more

MongoDB Experience: Stats Example App

The best way to learn any new product is to a) read the manual, and b) start using the product. I created a simple sample application so I could understand the various functions including adding data, searching as well as management functions etc.

Read more

MongoDB Experience: Replication 101

After successfully installing and testing mongoDB it’s very easy to create a replication environment. $ mkdir -p data/{master,slave} $ mongod --dbpath=`pwd`/data/master --master --port 28011 > master.log 2>&1 & # Always check your log file $ cat master.

Read more

MongoDB Experience: Gotcha with collection names

In my earlier tests I bulk loaded data with the following command. mongoimport -d olympics -c olympic_event -type tsv --headerline -f name,id,sport,demonstration_competitions,olympic_games_contested,competitions,contested_as_demonstration_event --drop olympic_event.tsv connected to: 127.0.0.1 dropping: olympics.olympic_event imported 775 objects As you can see I imported 775 objects, however when I went to review them via the mongo interactive shell I found no data.

Read more

MongoDB Experience: What’s running in the DB

You can very easily find out the running threads in the database (e.g. like a MySQL SHOW PROCESSLIST) with db.currentOp . > db.currentOp(); { "inprog" : [ ] } No much happening, however under some load you can see

Read more

MongoDB Experience: Bulk Loading Data

mongoDB has a mongoimport command. The docs only shows the usage but not any examples. here are my first examples. data1.csv 1 2 3 4 5 6 7 8 9 0 You need to specify your database (-d) and collection (-c) for importing.

Read more

MongoDB Experience: Online Resources

Following the initial Quickstart docs you will find a lot of online documentation. The following are good places to start. Tutorial The Interactive Shell Manual Admin Zone Starting and Stopping Monitoring and Diagnostics Backups There is also a Getting Started however I found this a duplication of the Quickstart.

Read more