Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Boosting your applications with distributed caches/datagrids

Boosting your applications with distributed caches/datagrids

Voxxed Days Milan, Infinispan presentation
http://infinispan.org/

Vert.x and Infinispan Embedded demo:
https://github.com/karesti/harry-potter-vertx

Quarkus and Infinispan Client/Server demo:
https://github.com/infinispan-demos/harry-potter-quarkus

Katia Aresti

April 13, 2019
Tweet

More Decks by Katia Aresti

Other Decks in Programming

Transcript

  1. D A T A G R I D 2019 -

    Infinispan 10
  2. D A T A G R I D 2019 -

    Infinispan 10 Open-Source, Apache License 2.0
  3. 1, Lumos 3, Reducto 1, Lumos Infinispan - Embedded Potter-1

    Spells Potter-2 Spells Potter-3 Spells Local Local Local
  4. 1, Lumos 2, Inflatus 3, Reducto 1, Lumos 2, Inflatus

    3, Reducto 1, Lumos 2, Inflatus 3, Reducto Infinispan - Embedded Potter-1 Spells Potter-2 Spells Potter-3 Spells Replicated
  5. 1, Lumos 2, Inflatus 3, Reducto Distributed Infinispan - Embedded

    Potter-1 Spells Potter-2 Spells Potter-3 Spells
  6. 1, Lumos 2, Inflatus 2, Inflatus 3, Reducto 1, Lumos

    3, Reducto Distributed Infinispan - Embedded Potter-1 Spells Potter-2 Spells Potter-3 Spells
  7. 1, Lumos 2, Inflatus 4, Protego 2, Inflatus 3, Reducto

    4, Protego 1, Lumos 3, Reducto Distributed Infinispan - Embedded Potter-4 Spells Potter-1 Spells Potter-2 Spells Potter-3 Spells
  8. Potter-1 Spells 1, Lumos 2, Inflatus 4, Protego 2, Inflatus

    3, Reducto 4, Protego 1, Lumos 3, Reducto Infinispan - Embedded Potter-3 Spells Potter-2 Spells Potter-4 Spells CH
  9. Potter-1 Spells 1, Lumos 4, Protego 2, Inflatus 3, Reducto

    1, Lumos 3, Reducto Infinispan - Embedded 2, Inflatus 4, Protego Potter-3 Spells Potter-2 Spells Potter-4 Spells CH
  10. Potter-1 Spells 1, Lumos 4, Protego 2, Inflatus 3, Reducto

    1, Lumos 3, Reducto Infinispan - Embedded 2, Inflatus 4, Protego Potter-3 Spells Potter-2 Spells Potter-4 Spells CH
  11. Event Bus Voldemort Taboo Curse Wizard 1. Sends to address

    NAMED Death Eater 2. Consumes from address NAMED
  12. Event Bus Voldemort Taboo Curse Wizard 1. Sends to address

    NAMED Death Eater 2. Consumes from address NAMED 3. Sends to address ADAVA_KEDAVRA
  13. Wizard Death Eater Dark Lord (aka Voldemort) Event Bus 2.

    Consumes from address NAMED 4. Consumes from address ADAVA_KEDAVRA 3. Sends to address ADAVA_KEDAVRA 1. Sends to address NAMED Voldemort Taboo Curse
  14. Infinispan Client/Server Microservice 1 Microservice 2 hotrod Rest memcache ...

    Microservice 3 MagicData Infinispan Server Cluster
  15. Benefits Data Center 1 Data Center 2 Load Balancer APP

    APP Microservice APP APP Microservice Shared State Shared State Shared State Shared State Young Wizards Old Wizards MagicData MagicData
  16. Hogwarts Magic Creator Hogwarts Magic WebSocket Hogwarts Magic Monitoring Put

    Every 3‘ Magic Store Infinispan Server Cluster Continuous Query Magic Store Characters performing magic in Hogwarts
  17. Hogwarts Magic Creator Hogwarts Magic WebSocket Hogwarts Magic Monitoring Potter

    Web Put Every 3‘ Magic Store Infinispan Server Cluster Continuous Query Magic Store Characters performing magic in Hogwarts WebSocket
  18. Infinispan 10 - New API InfinispanClient infinispan = InfinispanClient.newInfinispan(); KeyValueStore<String,

    Wizard> wizards = infinispan.getKeyValueStore(WIZARDS); CompletionStage<String, Wizard > futureWizard = wizards.get(“xfjd5d”);
  19. Infinispan 10 - New API InfinispanClient infinispan = InfinispanClient.newInfinispan(); KeyValueStore<String,

    Wizard> wizards = infinispan.getKeyValueStore(WIZARDS); CompletionStage<String, Wizard > futureWizard = wizards.get(“xfjd5d”);
  20. Infinispan 10 - Reactive API ContinuousQueryPublisher<String, Person> continuousQueryPublisher = store.findContinuously();

    continuousQueryPublisher.query("FROM org.infinispan.Wizard p where p.address.number = :number") .withQueryParameter("number", "12"); continuousQueryPublisher.subscribe(wizardsSubscriber); List<String> potters = wizardsSubscriber.values().stream() .filter(name -> name.contains(harryPotter.lastName)) .collect(Collectors.toList());
  21. Infinispan 10 - Reactive API ContinuousQueryPublisher<String, Person> continuousQueryPublisher = store.findContinuously();

    continuousQueryPublisher.query("FROM org.infinispan.Wizard p where p.address.number = :number") .withQueryParameter("number", "12"); continuousQueryPublisher.subscribe(wizardsSubscriber); List<String> potters = wizardsSubscriber.values().stream() .filter(name -> name.contains(harryPotter.lastName)) .collect(Collectors.toList());