"We Made You Because We Could" - Charlie Holloway. Prometheus, 2012
ICanDB is a NoSQL document-oriented storage written in Java.
ICanDB doesn't set a goal to be better than other databases. It isn't going to be most efficient DB in the world or have ideal code and documentation. It is a project where I can play with some technologies or learn some algorithms by implementing and applying it in "real" project.
To compile and start working with database you need to have installed JDK 8.
$ ./gradlew build
$ ./gradlew client-shell:shell
$ ./gradlew app:execute
$ ./gradlew client-shell:shell -Dconnect=net://<host>:8978/
Client shell is just a regular groovy shell with predefined set of objects and functions.
groovy:000> db.insert("w", [name:'N1', age:26])
===> 7003a1b3-4633-40e2-b9fe-2ca00a0b0f05
groovy:000> db.insert("w", [name:'N2', age:27])
===> d90ffa96-d578-40fe-be56-8b785778d57b
groovy:000> db.insert("w", [name:'N3', age:27])
===> 99c968b8-238b-42ea-acc2-851afedf08a4
groovy:000> db.insert("w", [name:'N4', age:28])
===> 88cb6add-7635-447a-ae20-f517ed6b8112
groovy:000> db.find("w",[$or:[[name:'N2'],[age:28]]])
===> [[name:N2, age:27, _id:d90ffa96-d578-40fe-be56-8b785778d57b], [name:N4, age:28, _id:88cb6add-7635-447a-ae20-f517ed6b8112]]
I defined set of global goals to achieve and features to implement, but over time I can change it:
-
Phase #1:
- Implement basic components of database:
- Networking sub-system
- In-memory storage
- Application launcher
- Implement in-memory embedded and network drivers
- Create set of basic operations with limited query language
- Implement basic components of database:
-
Phase #2:
- Indexes
- Extend query language
-
Phase #3:
- Persistent storage
-
Phase #4:
- Transactions
- Rich query language (joins, aggregations, etc.)
Yes, in NoSQL database
Future: sharding, replication, geohash, etc.
- Java 8 - because I like Java, and just released Java 8 has lambdas, method references, and higher-order functions (features I waited so long, sometimes I will use them even where it is unnecessary, because I want to play with it)
- Gradle - this building tool is gaining popularity in Java projects, but I still not tried it yet
- Springframework - latest version I used was 3.0, now it is 4.0. Don't want to fall behind