Ce diaporama a bien été signalé.
Nous utilisons votre profil LinkedIn et vos données d’activité pour vous proposer des publicités personnalisées et pertinentes. Vous pouvez changer vos préférences de publicités à tout moment.
JNoSQL
Otávio Santana
@otaviojava
otaviojava@apache.org
NoSQL
● Database
● Doesn't use structure
● Not Transaction
● BASE
● Five different types
Key Value
● AmazonDynamo
● AmazonS3
● Redis
● Scalaris
● Voldemort
● Couchbase
● Hazelcast
valuekey
valuekey
valuekey
Document
● AmazonSimpleD
● ApacheCouchdb
● MongoDb
● Riak
● Couchbase
Column Family
● Hbase
● Cassandra
● Scylla
● Clouddata
● SimpleDb
● DynamoDB
Row-key Columns...
Apollo
Aphrodite
Ares
Sun
...
Graph
● Neo4j
● InfoGrid
● Sones
● HyperGraphDB
Apollo Ares
Kratoswas killed by was killed by
Is brother
killed killed
Multi-Model
● OrientDB (graph, document)
● Couchbase (key value, document)
● Elasticsearch (document, graph)
● Cassandra (...
SQL Key-value Document Column Graph
Table Bucket Collection Column
Family
Vertex and
Edge
Row Key/value
pair
Document Colu...
Relational Application
DAO
API API API
Data Tier
Logic Tier
DAO
Logic Tier
Data Tier
JPA
JDBC
JPA
JDBC
JPA
JDBC
NoSQL Appl...
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 N...
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
G...
JNoSQL
● Eclipse Foundation
● Apache + Eclipse License
● API to each NoSQL type
● Configurable
● Extensible
Mapping
Commun...
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
● Universal Adapter
● Standard
Communication Issue
ODocument document = new ODocument(“collection”);
document.field(name, value);
JsonObject jsonObject =...
Communication Issue
ODocument document = new ODocument(“collection”);
document.field(name, value);
JsonObject jsonObject =...
Communication Issue
DocumentEntity entity =
DocumentEntity.of("documentCollection");
Document document = Document.of(name,...
Issues
● insert vs save
● delete vs remove
● update vs merge
● find vs. search
● callback interface to
asynchronous callba...
Diana Project
● Document API
● Graph API
● Key-value API
● Column API
● Four TCKs
Database
API
Implementation
TCK
Nomenclature
● Configuration
● Factory
● Manager
● Entity
● Value
Diversity
ColumnEntity entity = ColumnEntity.of(COLUMN_FAMILY);
Column id = Column.of("id", 10L);
entity.add(id);
entity.a...
NoSQL Providers
JUGs/Communities
Artemis● CDI Based
● Diana Based
● Annotation Based
● Events to insert, delete, update
● Supports to Bean Validation
● Con...
Annotations
● MappedSuperclass
● Entity
● Column
@Entity("movie")
public class Movie {
@Column
private String name;
@Colum...
interface PersonRepository extends Repository<Person> {
Person findByName(String name);
void deleteByName(String name);
Op...
Events
Movie
firePreEntity firePreAPI firePostAPI firePostEntity
Interceptor
Configurable and
extensible
● EventManager
● CrudOperation
● ClassRepresentations
● Converter
● Decorate
● Replace
@Entity("person")
public class Person {
@Column
private String name;
@Column
private Integer age;
@UDT("address")
@Column
...
Road Map
✓ Draft and code proposal
✓ Community Feedback
✓ Involve NoSQL Vendors
✓ Involve Solution
Vendors
✓ Eclipse Proje...
Site
http://jnosql.org/
Code
https://github.com/JNOSQL
Mailing List
https://dev.eclipse.org/mailman/listinfo/jnosql-dev
Gitter
https://gitter.im/JNOSQL/developers
Wiki
https://wiki.eclipse.org/JNoSQL
Thank you
Otávio Santana
@otaviojava
osantana@tomitribe.com
otaviojava@apache.org
Prochain SlideShare
Chargement dans…5
×

NoSQL, no Limits, lots of Fun!

438 vues

Publié le

Use the best open source NoSQL technologies to create powerful and scalable solutions

Publié dans : Technologie
  • Soyez le premier à commenter

NoSQL, no Limits, lots of Fun!

  1. 1. JNoSQL Otávio Santana @otaviojava otaviojava@apache.org
  2. 2. NoSQL ● Database ● Doesn't use structure ● Not Transaction ● BASE ● Five different types
  3. 3. Key Value ● AmazonDynamo ● AmazonS3 ● Redis ● Scalaris ● Voldemort ● Couchbase ● Hazelcast valuekey valuekey valuekey
  4. 4. Document ● AmazonSimpleD ● ApacheCouchdb ● MongoDb ● Riak ● Couchbase
  5. 5. Column Family ● 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
  6. 6. Graph ● Neo4j ● InfoGrid ● Sones ● HyperGraphDB Apollo Ares Kratoswas killed by was killed by Is brother killed killed
  7. 7. Multi-Model ● OrientDB (graph, document) ● Couchbase (key value, document) ● Elasticsearch (document, graph) ● Cassandra (column family, graph - in progress)
  8. 8. 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
  9. 9. Relational Application DAO API API API Data Tier Logic Tier DAO Logic Tier Data Tier JPA JDBC JPA JDBC JPA JDBC NoSQL Application
  10. 10. The Current Solution ● Spring Data ● Hibernate OGM ● TopLink DAO Solution Solution
  11. 11. JPA problem for NoSQL ● Saves Async ● Async Callback ● Time to Live (TTL) ● Consistency Level ● SQL based ● Diversity in NoSQL
  12. 12. The Challenge ● 4 Types ● Differents goals ● Differents behaviors
  13. 13. JNoSQL ● Mapping API ● Communication API ● No lock-in ● Divide and conquer DAO Mapping Communication Document Key Column Graph DIANA ARTEMIS JNoSQL Data Tier
  14. 14. JNoSQL ● Eclipse Foundation ● Apache + Eclipse License ● API to each NoSQL type ● Configurable ● Extensible Mapping Communication DIANA ARTEMIS
  15. 15. Why Diana? ● Goddess of the hunt, nature and moon ● Fought in Troy ● Brave warrior and hunter ● Diana Rome = Artemis Greek
  16. 16. Diana ● API Communication layer ● Document, key-value, Column, Graph ● Universal Adapter ● Standard
  17. 17. Communication Issue ODocument document = new ODocument(“collection”); document.field(name, value); JsonObject jsonObject = JsonObject.create(); jsonObject.put(name, value); BaseDocument baseDocument = new BaseDocument(); baseDocument.addAttribute(name, value); Document document = new Document(); document.append(name, value);
  18. 18. Communication Issue ODocument document = new ODocument(“collection”); document.field(name, value); JsonObject jsonObject = JsonObject.create(); jsonObject.put(name, value); BaseDocument baseDocument = new BaseDocument(); baseDocument.addAttribute(name, value); Document document = new Document(); document.append(name, value);
  19. 19. Communication Issue DocumentEntity entity = DocumentEntity.of("documentCollection"); Document document = Document.of(name, value); entity.add(document);
  20. 20. 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
  21. 21. Diana Project ● Document API ● Graph API ● Key-value API ● Column API ● Four TCKs Database API Implementation TCK
  22. 22. Nomenclature ● Configuration ● Factory ● Manager ● Entity ● Value
  23. 23. Diversity ColumnEntity entity = ColumnEntity.of(COLUMN_FAMILY); Column id = Column.of("id", 10L); entity.add(id); entity.add(Column.of("version", 0.001)); entity.add(Column.of("name", "Diana")); entity.add(Column.of("options", Arrays.asList(1, 2, 3))); //mutiple implementation columnEntityManager.save(entity); ColumnQuery query = ColumnQuery.of(COLUMN_FAMILY); query.addCondition(ColumnCondition.eq(id)); Optional<ColumnEntity> result = columnEntityManager.singleResult(query); //cassandra only List<ColumnEntity> entities = columnEntityManagerCassandra .cql("select * from newKeySpace.newColumnFamily where id=10;"); columnEntityManagerCassandra.save(entity, ConsistencyLevel.ALL);
  24. 24. NoSQL Providers
  25. 25. JUGs/Communities
  26. 26. Artemis● CDI Based ● Diana Based ● Annotation Based ● Events to insert, delete, update ● Supports to Bean Validation ● Configurable and Extensible ● Query Method
  27. 27. Annotations ● MappedSuperclass ● Entity ● Column @Entity("movie") public class Movie { @Column private String name; @Column private long year; @Column private Set<String> actors;
  28. 28. interface PersonRepository extends Repository<Person> { Person findByName(String name); void deleteByName(String name); Optional<Person> findByAge(Integer age); List<Person> findByNameAndAge(String name, Integer age); Set<Person> findByAgeAndName(Integer age, String name); Stream<Person> findByNameAndAgeOrderByName(String name, Integer age); Queue<Person> findByNameAndAgeOrderByAge(String name, Integer age); } Dynamic Query
  29. 29. Events Movie firePreEntity firePreAPI firePostAPI firePostEntity Interceptor
  30. 30. Configurable and extensible ● EventManager ● CrudOperation ● ClassRepresentations ● Converter ● Decorate ● Replace
  31. 31. @Entity("person") public class Person { @Column private String name; @Column private Integer age; @UDT("address") @Column private Address home; } interface PersonRepository extends CassandraRepository<Person> { Person findByName(String name, ConsistencyLevel level); void deleteByName(String name, ConsistencyLevel level); @CQL("select * from Person") List<Person> findAll(); @CQL("select * from Person where name = ?") List<Person> findByName(String name); }
  32. 32. Road Map ✓ Draft and code proposal ✓ Community Feedback ✓ Involve NoSQL Vendors ✓ Involve Solution Vendors ✓ Eclipse Project ✓ Development ✓ JSR
  33. 33. Site http://jnosql.org/
  34. 34. Code https://github.com/JNOSQL
  35. 35. Mailing List https://dev.eclipse.org/mailman/listinfo/jnosql-dev
  36. 36. Gitter https://gitter.im/JNOSQL/developers
  37. 37. Wiki https://wiki.eclipse.org/JNoSQL
  38. 38. Thank you Otávio Santana @otaviojava osantana@tomitribe.com otaviojava@apache.org

×