Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Spring Data and In-Memory Data Management in Action


Published on

SpringOne Platform 2016
Speakers: John Blum; Spring Data Team, Pivotal. Luke Shannon; Field Engineer, Pivotal

In this session we will be presenting and coding a live Spring Boot-based application powered by Apache Geode (a.k.a. Pivotal GemFire) running on CloudFoundry. Attendees will learn in-memory computing and data management concepts including data access and querying using Spring Data Repositories and GemFire OQL, complex/real-time event processing with GemFire CQs, data affinity using GemFire Functions conveniently implemented and executed with Spring Data GemFire Function annotation support and finally effective testing strategies and techniques for testing highly-concurrent, distributed applications using Spring's test framework along with JUnit, Mockito and MultithreadedTC.

Published in: Technology
  • Be the first to comment

Spring Data and In-Memory Data Management in Action

  1. 1. Spring Data and In-Memory Data Management in Action John Blum • Luke Shannon @john_blum • @lukewshannon
  2. 2. Agenda • Brief Apache Geode Overview • Apache Geode in Spring • Spring with Apache Geode in Action: • Caching in [Pivotal] CloudFoundry • Events with Continuous Query • Data Access with Repositories • New Improvements • Roadmap • *Bonus Feature • QA 3
  3. 3. Apache Geode Pivotal GemFire 4 ~
  4. 4. 5 Distributed Linearly Scalable High Throughput Low/Predictable Latency Highly Available Consistent Durable In-Memory Resilient/Fault Tolerant Shared Nothing Architecture Partitioned Real-Time Big/Fast Data Events/Continuous Query Functions Transactions Queries/Indexes Multi-Cluster Client/Server P2P Persistent Replication Cloud Secure Serialization
  5. 5. Spring Data GemFire / Geode 7 1. Use the Spring Framework’s powerful, non-invasive programming model and concepts to simplify the configuration and development of highly- scalable, distributed Spring applications based on Pivotal GemFire or Apache Geode. 1. Integration with the Spring portfolio… Purpose
  6. 6. Spring Data GemFire / Geode 8 + + Using Pivotal GemFire or Apache Geode With Spring’s Transaction Management and Spring Data GemFire/Geode To support both Local (Cache) & Global (JTA) Transactions Spring Framework
  7. 7. Spring Data GemFire / Geode 9 + + Using Pivotal GemFire or Apache Geode With Spring’s Cache Abstraction and Spring Data GemFire/Geode To serve as a JCache (JSR-107) caching provider Spring Framework
  8. 8. Spring Data GemFire / Geode 10 Spring Data Commons + Using Pivotal GemFire or Apache Geode With SD Commons Repository Infrastructure and SD GemFire/Geode To rapidly build Data Access Objects (CRUD + Mapping + Querying) |
  9. 9. Spring Data GemFire / Geode 11 Spring Data REST & Spring HATEOAS + Using Pivotal GemFire or Apache Geode With SDC Repositories, Spring Data REST and Spring HATEAOS To easily create mature, hypermedia-driven REST web services | +
  10. 10. Spring Data GemFire 12 Spring Integration + Using Pivotal GemFire with Spring Integration For Inbound (Cache Events & CQ) and Outbound Channel Adapters, Message Store, Lock Registry, Metadata Store
  11. 11. Spring Data GemFire 13 Spring XD + Using Pivotal GemFire with Spring XD (CQ, source & sink) To simplify Big Data applications Performing Ingest, Analytics, Batch Jobs and Data Export
  12. 12. Spring Data GemFire 14 Spring Session + Using Pivotal GemFire with Spring Session (Data GemFire) To simplify (HTTP) Session State Management +
  13. 13. Spring Data GemFire 15 Spring Boot + Using Pivotal GemFire with Spring Boot To get up and running as quickly as possible +
  14. 14. Spring Data GemFire 16 Spring Cloud + Use Spring Cloud (Connectors) To build Cloud Native Applications and Microservices Using Pivotal GemFire
  15. 15. Examples 17
  16. 16. Spring Data GemFire / Geode 18 Spring Data GemFire <dependency> <groupId></groupId> <artifactId>spring-data-gemfire</artifactId> <version>1.8.2.RELEASE</version> </dependency> Spring Data Geode <dependency> <groupId></groupId> <artifactId>spring-data-geode</artifactId> <version>1.0.0.APACHE-GEODE-INCUBATING-M2</version> </dependency> Pivotal GemFire Maven Artifacts gemfire%7C1.8.2.RELEASE%7Cjar geode%7C1.0.0.APACHE-GEODE-INCUBATING-M2%7Cjar
  17. 17. Spring Data GemFire / Geode 19 Spring Data GemFire <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-gemfire</artifactId> <version>1.4.0.RELEASE</version> </dependency> Pivotal GemFire Spring Boot Maven Artifact gemfire%7C1.8.2.RELEASE%7Cjar
  18. 18. Roadmap – Annotation Support for Callbacks 20 @Component public class ExampleApplicationCallbacks { @CacheListener(region = “EventSource”) public void afterCreate(EntryEvent<K, V> event) { .. } @CacheLoader(region = “DataSink”) public void load(LoaderHelper<K, V> helper) { .. } @CacheWriter(region = “DataSource”) public void beforeUpdate(EntryEvent<K, V> event) { .. } }
  19. 19. Spring Data GemFire / Geode  Spring Data GemFire 2.0  Java 8  Spring Framework 5.0  GemFire 9.0  Projections; Java 8 Types (Optional<T>, Stream<T>); Reactive Support (?)  Codebase re-organization  Test Framework support 21 Just around the corner…
  20. 20. Spring Boot 22 PR #6224 – Auto-configuration support for SDG Repositories interface CustomerRepository extends Repository<Customer, Long> { } @Region(“Customers”) class Customer { } compile “org.springframework.boot:spring-boot-starter-data-gemfire:1.5.0.M1” No longer necessary… @SpringBootApplication @EnableGemfireRepositories class ExampleSpringBootApplication { }
  21. 21. Spring Boot 23 PR #5445 – Spring Boot Starter Data Geode <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-geode</artifactId> <version>???</version> </dependency>`
  22. 22. Spring Session 24 PR #366 – Spring Session Data Geode <dependency> <groupId>org.springframework.session</groupId> <artifactId>spring-session-data-geode</artifactId> <version>???</version> </dependency>`
  23. 23. References 25  Spring Data GemFire (SDG) project page  SDG GitHub source code  SDG Reference Guide  SDG API  SDG Wiki page  SDG Examples  SDG JIRA Issue Tracking  SDG StackOverflow spring-data-gemfire tag  spring-data Gitter IM Channel
  24. 24. Learn More. Stay Connected. Oliver Gierke Advanced Spring Data REST 11:00 – 12:15 PM @springcentral @pivotal @pivotalcf
  25. 25. Questions 27 Answers
  26. 26. Thank You 28
  27. 27. Safe Harbor Statement • The following is intended to outline the general direction of Pivotal's offerings. It is intended for information purposes only and may not be incorporated into any contract. Any information regarding pre-release of Pivotal offerings, future updates or other planned modifications is subject to ongoing evaluation by Pivotal and is subject to change. This information is provided without warranty or any kind, express or implied, and is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions regarding Pivotal's offerings. These purchasing decisions should only be based on features currently available. The development, release, and timing of any features or functionality described for Pivotal's offerings in this presentation remain at the sole discretion of Pivotal. Pivotal has no obligation to update forward looking information in this presentation. 29