O slideshow foi denunciado.
Utilizamos seu perfil e dados de atividades no LinkedIn para personalizar e exibir anúncios mais relevantes. Altere suas preferências de anúncios quando desejar.

Jakarta EE Meets NoSQL at the Cloud Age

69 visualizações

Publicada em

Let’s be honest: the amount of data collected by applications nowadays is growing at a scary pace. Many of them need to handle billions of users generating and consuming data at an incredible speed. Maybe you are wondering how to create an application like this? What is needed? What benefits can you take from this reality to your project? This session shows how Jakarta EE can meet these needs when you’re working with NoSQL databases in the cloud. It’s the same approach used by some of the biggest companies in the world to store, analyze, and get results from really crazy amounts of data. No matter your project size, you can take it to the next level today.

Publicada em: Tecnologia
  • Seja o primeiro a comentar

  • Seja a primeira pessoa a gostar disto

Jakarta EE Meets NoSQL at the Cloud Age

  1. 1. Jakarta EE Meets NoSQL in the Cloud Age Otavio Santana @otaviojava
  2. 2. NoSQL
  3. 3. NoSQL » Database » Doesn't use structure » Not Transaction » Base » Five different types
  4. 4. Key Value » AmazonDynamo » AmazonS3 » Redis » Hazelcast Apollo Ares Aphrodite Sun War Love Beauty
  5. 5. Column Family » HBase » Cassandra » Clouddata » DynamoDB Apollo Aphrodite Ares Kratos Duty Duty Duty Dead Gods Love, happy Sun War 13 Color weapon Sword Row-key Columns
  6. 6. Document » ApacheCouchDB » MongoDB » Couchbase { "name":"Diana", "duty":[ "Hunt", "Moon", "Nature" ], "siblings":{ "Apollo":"brother" } }
  7. 7. Graph » Neo4J » InfoGrid » Sones » HyperGraphDB Apollo Ares Kratos was killed by was killed by killed killed
  8. 8. Applications
  9. 9. Relational Application Logic Tier DAO JPAJPAJPAJPA JDBC JDBCJDBCJDBC Data Tier NoSQL Application Logic Tier DAO APIAPI API Data Tier
  10. 10. JPA problem for NoSQL ● Async Callback ● Time to Live (TTL) ● Consistency Level ● SQL based ● Diversity in NoSQL
  11. 11. Jakarta NoSQL DIANA ARTEMIS JNoSQL DAO Mapping Communication Column Documents Key Graph Data Tier
  12. 12. 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);
  13. 13. Communication DocumentEntity entity = DocumentEntity.of("collection"); entity.add(name, value);
  14. 14. Communication DocumentEntity entity = ...; manager.insert(entity); manager.update(entity); List<DocumentEntity> entities = select().from("god") .where("power").eq("hunt").execute(manager); delete().from("god").where("power").eq("hunt").execute(manager);
  15. 15. Diversity List<ColumnEntity> entities = managerCassandra .cql("select * from greece.good where id=10;"); managerCassandra.insert(entity, ConsistencyLevel.ALL);
  16. 16. Mapping
  17. 17. Annotations @Entity("god") public class God { @Id private String id; @Column private String name; @Column private long age; @Column private Set<String> powers; } » Mapped Superclass » Id » Entity » Column
  18. 18. Templates God artemis = ...; DocumentTemplate template = …; template.insert(artemis); template.update(artemis); DocumentQuery query = ... List<God> gods = template.select(query);
  19. 19. Repository interface GodRepository extends Repository<God, String> { Optional<God> findByName(String name); Stream<God> findAll(); }
  20. 20. Diversity @Entity("god") public class God { @Column private String name; @UDT("weapon") @Column private Weapon weapon; }
  21. 21. Diversity interface GodRepository extends CassandraRepository<God, String> { @CQL("select * from God where name = ?") List<God> findByName(String name); }
  22. 22. Queries documentTemplate.query("select * from God where name = 'Diana'"); columnTemplate.query("select * from God where age = 25"); keyValueTemplate.query("get 'Diana'"); graphTemplate.query("g.V().hasLabel('God')");
  23. 23. Queries PreparedStatement statement = template.prepare("select * from God where name = @name"); preparedStatement.bind("name", "Diana"); List<God> adas = statement.getResultList();
  24. 24. Queries interface GodRepository extends Repository<God, Long> { @Query("select * from God") List<God> findAll(); @Query("select * from God where id = @id") Optional<God> findById(@Param("id") String id); }
  25. 25. Providers
  26. 26. Demo Time
  27. 27. Platform.sh was built on the idea that your application comes first It’s what your customers care about. It’s what drives you and your team. We handle the rest.
  28. 28. Deploy anytime (even Fridays) git merge packages your fully tested build, and our continuous deployment process sends those containers to production. Because every change is being tested on a byte-for-byte clone of your production application, deployments become non-events.
  29. 29. What 1,000s of E-commerce, Life Sciences, Government, Education, Media and Entertainment, and High Tech customers $47MM invested by top-tier international partners Platform.sh at a glance
  30. 30. Johnson & Johnson launches its brands into new markets worldwide with confidence and consistency. WITH PLATFORM.SH
  31. 31. Arsenal doesn’t worry about innovating for their fans - even on game day. WITH PLATFORM.SH
  32. 32. Inviqa focuses on client work that engages and impresses, with unprecedented speed. WITH PLATFORM.SH
  33. 33. Unity serves its community of innovators with the performance they expect. WITH PLATFORM.SH
  34. 34. Languages
  35. 35. Services
  36. 36. Java
  37. 37. Thank you Jakarta EE Meets NoSQL in the Cloud Age Otavio Santana @otaviojava @platformsh

×