Migrations in NoSQL databases

Database migrations in schema-less databases

Read more

Share

10 node mongodb ReplicaSet on a Single Machine

While doing evalauation of NoSQL databases, we had a 10 node riak cluster and wanted check how a similar setup would work with mongodb. So started to setup a 10 node mongodb cluster. Since this was for initial spikes, we decided to set this up on a single machine as with the other test setup using Riak. Before I explain how we setup 10 node mongodb ReplicaSet, let me talk about replica sets.

Read more

Share

Moved my blog to octopress

Its been about a month since my blog moved to octopress, wanted to write about my experience. I had been running my blog for a some time now using Movable Type upgrading as and when new versions where released. Over time I realized that upgrading was fraught with errors as lot of steps had to be done manually. Customizing the layout was risky as there was no way to preview your changes and commit only when I was comfortable. With the release of Movable Type 6 there is no longer a free version to download. There had been a a surge is usage of static html to write blogs. I was thinking about moving to a static blogging platform like Octopress. One of the major problems of this move was to extract existing blog entries along with their published dates, categories and blog txt from the Movable Text blog. The I read Neal Sheeran’s blog about using templates to export the data.

Read more

Share

Usage of mixed case database object names is dangerous

Do not used mixed case database object names

Read more

Share

10 node Riak cluster on a single machine

When trying to evaluate NoSQL databases, its usually better to try them out. While trying them out, its better to use them with multiple node configurations instead of running single node. Such as clusters in Riak or Replica-set in mongodb maybe even a sharded setup. On our project we evaluated a 10 node Riak cluster so that we could experiment with N, R and W values and decide which values where optimal for us.

Read more

Share

Transactions using Groovy.SQL with Spring annotations and connection pools

When using Groovy with Spring framework, interacting with the database can be done using the Groovy.SQL class which provides a easy to use interface. When using Groovy.SQL, if we have a need to do transactions, we have the .withTransaction method that accepts a closure, to which we can pass in code to execute within the transaction. In our project since we were using spring already, using annotations to define transactions would be a great.

Read more

Share

Backup in mongodb replica-set configurations

Database backup in MongoDB

Read more

Share

Back to blogging

Return to blogging after book project

Read more

Share

MSSQL JDBC Driver behavior

My latest project involves talking to MS-SQL Server using the JDBC driver and Java. While doing this we setup the database connection and had a simple SQL to get the first_name and last_name for a unique user_id from the application_user table in the database. SELECT first_name,last_name FROM application_user WHERE user_id = ? Given the above SQL, we did not think too much about performance as the user_id was indexed. The java code as below was used to run the SQL.

Read more

Share

With so much pain, why are stored procedures used so much

I keep encountering situations where all the business logic for the applications is in stored procedures and the application layer is just calling the stored procedures to get the work done and return the data. There are many problems with this approach some of them are. Writing stored procedure code is fraught with danger as there are no modern IDE’s that support refactoring, provide code smells like “variable not used”, “variable out of scope”.

Read more

Share