JNoSQL
Daniel Cunha Marcelo Vieira
@dvlc_ @uaicelo
dcunha@tomitribe.com marcelo.vieira@involves.com.br
NoSQL
● Database
● Doesn't use structure
● Not Transaction
● BASE
● Five different types
Key Value
● AmazonDynamo
● AmazonS3
● Redis
● Scalaris
● Voldemort
● Couchbase
valuekey
valuekey
valuekey
Document
● AmazonSimpleD
● ApacheCouchdb
● MongoDb
● Riak
● Couchbase
Column
● Hbase
● Cassandra
● Scylla
● Clouddata
● SimpleDb
● DynamoDB
Row-key Columns...
Apollo
Aphrodite
Ares
Sun
Duty
{Love, happy}
Duty
War
Duty
Sword
weapon
Color
Kratos
Dead Gods
13
Graph
● Neo4j
● InfoGrid
● Sones
● HyperGraphDB
Apollo Ares
Kratoswas killed by was killed by
Is brother
killed killed
Multi-model
● OrientDB
● Couchbase
● Elasticsearch
● Cassandra
SQL Key-value Document Column Graph
Table Bucket Collection Column
Family
Vertex and
Edge
Row Key/value
pair
Document Column Vertex
Column Key/value
pair
Key/value
pair
Vertex and
Edge property
Relationship Link Edge
Relational Application
DAO
API
API API
Data Tier
Logic Tier
DAO
Logic Tier
Data Tier
JPA
JDBC
JPA
JDBC
JPA
JDBC
NoSQL Application
The Current solution
● Spring Data
● Hibernate OGM
● TopLink
DAO
Solution Solution
JPA problem for NoSQL
● Saves Async
● Async Callback
● Time to Live (TTL)
● Consistency Level
● SQL based
● Diversity in NoSQL
The Challenge
● 4 Types
● Differents goals
● Differents behaviors
JNoSQL
● Mapping API
● Communication API
● No lock-in
● Divide and conquer
DAO
Mapping
Communication
Document
Key
Column
Graph
DIANA
ARTEMIS
JNoSQL
Data Tier
JNoSQL
● Eclipse Foundation
● Apache + Eclipse License
● API to each NoSQL type
● Configurable
● Extensible
Mapping
Communication DIANA
ARTEMIS
Why Diana?
● Goddess of the hunt, nature and
moon
● Fought in Troy
● brave warrior and hunter
● Diana Rome = Artemis Greek
Diana
● API Communication layer
● Document, key-value, Column,
Graph
● Standard
Communication Issue
ODocument document = new ODocument(“collection”);
document.field(name, value);
Document document = new Document();
document.append(name, value);
JsonObject jsonObject = JsonObject.create();
jsonObject.put(name, value);
BaseDocument baseDocument = new
BaseDocument();
baseDocument.addAttribute(name, value);
Communication Issue
ODocument document = new ODocument(“collection”);
document.field(name, value);
Document document = new Document();
document.append(name, value);
JsonObject jsonObject = JsonObject.create();
jsonObject.put(name, value);
BaseDocument baseDocument = new BaseDocument();
baseDocument.addAttribute(name, value);
Communication Issue
DocumentEntity entity = DocumentEntity.of("documentCollection");
Document document = Document.of(name, value);
entity.add(document);
Issues
● insert vs save
● delete vs remove
● update vs merge
● find vs. search
● callback interface to
asynchronous callback
long to seconds
int to seconds
long to milliseconds
int to milliseconds
Diana Project
● Document API
● Graph API
● Key-value API
● Column API
● Four TCKs
Database
API
Implementation
TCK
NoSQL Providers
JUGs/Communities
Road Map
✓ Draft and code Proposal
✓ Community Feedback
✓ Involve NoSQL Vendors
✓ Involve Solution
Vendors
✓ Eclipse Project
✓ Development
✓ JSR
JNoSQL
Thank you
Daniel Cunha Marcelo Vieira
@dvlc_ @uaicelo
dcunha@tomitribe.com marcelo.vieira@involves.com.br

Palestra Java + NoSQL = Iniciativa JNoSQL no TDC Florianópolis