16 July 2013

NoSQL - MongoDB

Key / Valye (HashMap)
Tabular (BigTable)
Document Oriented

no Joins
no Complex Transactions
no SQL

databasse -> database
table -> collection
row -> document

JSON style document (BSON on the mongoDB servers)

no predefined schema
table has schema
collection does not have schema

we do not need to pre-create the collection, first insertion will create the collection

_id : timestamp+machine id+process id+counter

$gt : greater than

index ensureindex comments.author 1

11 July 2013

Simple Wait / Notify Thread Example

This is a simple Wait / Notify example. I am utilizing an Object for synchronization purpose. You can synchronize on This or any other object. However, a dedicated object that you use only for synchronization will give you a better understanding of code and eases debugging.