Saturday, March 23, 2013


Third gird science project links


http://www.education.com/activity/third-grade/science/?page=1

Approaching Math

Thursday, June 14, 2012

Groovy issues / things to learn - Keys of a map containing variable values

We are into developing groovy scripts these days and I have pondered about how to make the key a variable and today, I have come across a use case and a way to do this.

If you have a Map of [name : value], the name here itself is a literal, but if you would like the name to be a variable, you would have to enclose it within a paranthesis. For instance, this map would become [(name) : value]. Let us day, if we have defined name as

def name = "test", the output of the map will be {"test" : value}, instead of {name: value}. Here since the name is enclosed within a paranthesis, essentially it acts like a bind variable and replaces the derived value of "name", which turns out to be "test" in this case.

Tuesday, January 31, 2012

Cassandra

Here are some of the Cassandra terminologies:

1. Keyspaces are similar to schemas/databases.
Here is an example of how to create a keyspace.


create keyspace endpoint_scripts
with placement_strategy = 'org.apache.cassandra.locator.NetworkTopologyStrategy'
and strategy_options=[{eu-west:3, us-east:3}];


2. Column families are similar to tables.


create column family scripts
with comparator = 'UTF8Type'
and key_validation_class = 'UTF8Type'
and default_validation_class = 'BytesType'
and column_metadata=[
{column_name: uri, validation_class: UTF8Type, index_type: 0},
{column_name: revision, validation_class: LongType, index_type: 0},
{column_name: active, validation_class: BooleanType, index_type: 0},
{column_name: user_authentication_required, validation_class: BooleanType, index_type: 0},
{column_name: creation_date, validation_class: DateType, index_type: 0}
]
and rows_cached = 10000
and row_cache_provider = SerializingCacheProvider
and keys_cached = 1.0
and memtable_flush_after = 120
and memtable_operations = 2
and memtable_throughput = 256
and read_repair_chance = 0.0;

Tuesday, December 20, 2011

Topics for the blog

Attribute vs Identity
Red black pushes
AutoScaling

Tuesday, November 29, 2011

Relational DBs vs NoSQL vs OLAP(Hadoop) - When to use What

There are hundreds of database technologies and there are more and more evolving day by day - generally, they could be classified into these three categories -

Relational DBs
These are our old school relational dbs that have worked for us wonderfully for the last 3 or more decades.

Oracle,
MySQL,
SQL Server,
Informix

are under this category. These dbs are meant mainly for transactional processing (OLTP). Although, a few years ago, people largely used one of these according to their needs, with the evolution of NoSQL databases, there needs to be all the more reason to differentiate when to use relational DBs vs the NoSQL DBs. If your business need is to involve transactional processing/processing credit cards, customer accounts which are highly sensitive, relational DB is still the best way to go. The ACID properties (Atomicity, consistency, isolation, durability) draws main attention here since this guarantees that data is processed reliably.

NoSQL DBs
This is the new kid in town and so is drawing a lot of attention during the past few years. Some of the names that you might have heard in this category are -
- Cassandra
- MongoDB
- Apache Couch DB
- Simple DB (from Amazon's cloud offering)
- MarkLogic
- Riak

Most of these DBs mainly are implemented with the CAP (Consistency, Availability, Partition Tolerance) theorem in mind. And what is the need for a NoSQL db? This comes in handy when you need to process volumes of data efficiently without caring about the transactional aspect of the business. The data in these systems are for the most part stored in the form of key-value pairs.
One interesting thing that is noticeable is that all of these dbs call their table-equivalents using different names.

In Cassandra, the table-equivalent is called a column family. Names are always intriguing. May be it is a family of columns and that is why it is being called as a column family. In that case, why not a row family?:-)

OLAP (Hadoop)
These days, it is all about Big data/Hadoop. More on this soon.

Friday, November 18, 2011

Building an API

Why do need them
Evaluating Technologies
Design
Feedback loop
Versioning
Supporting the customers
Best Practices
Scaling your system
Consumers