SlideShare a Scribd company logo
The Past Year in
Spring for Apache Geode
September 2–3, 2020
springone.io
John Blum
Lead…
for (P project : Spring for Apache Geode) {
manage(project);
}
@john_blum
…
Spring for Apache GeodeAll things…
What things?
Spring Boot
Spring Data Spring Session
Spring Test
Spring Boot
Spring Data Spring Session
Spring Test
Spring Boot Spring Data Spring Session Spring Test
TDP
(Test-Driven Presentation)
Spring Test for Apache Geode <STDG/>
 Fine-grained control over GemFire/Geode Mock Object Lifecycle [doc]
 Mocking Unsupported Cache Operations [doc]
 New @EnableGemFireResourceCollector [doc]
GemFire/Geode Mock Object Lifecycle
@EnableGemFireMockObjects(destroyOnEvents = { … })
class TestGeodeConfiguration {
…
}
Any event class in package org.springframework.test.context.event
 E.g. AfterTestMethodEvent
 Defaults to AfterTestClassEvent
EXAMPLE
Mocking Unsupported Cache Operations & @EnableGemFireResourceCollector
How To Use Spring Test with Apache Geode
 Generate Spring Boot [SBDG] project at start.spring.io
 Include spring-geode-starter-test module
<dependencies>
<dependency>
<groupId>org.springframework.geode</groupId>
<artifactId>spring-geode-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
Spring Boot Spring Data Spring Session Spring Test
Spring Data for Apache Geode <SDG/>
 DATAGEODE-238 – spring-data-gemfire module
 DATAGEODE-272 – TransactionListener event publishing
 DATAGEODE-152 [Doc]
 WIP: DATAGEODE-263 – Paging
 WIP: DATAGEODE-262 – Projections
 WIP: DATAGEODE-258 – Function Executions on Region from Repository
The Past Year in Spring for Apache Geode
Manual Transaction Event Publishing
@Service
class MyTransactionalService {
@Autowired
ApplicationEventPublisher publisher;
@Transactional
public void someTransactionalMethod() {
try {
// do transaction
publisher.publish(new CommitEvent());
} catch (DataAccessException e) {
publisher.publish(new RollbackEvent(e));
throw e;
}
}
@Component
class MyTransactionEventListeners {
@TransactionalEventListener(phase =
TransactionPhase.AFTER_COMMIT)
public void onCommit(CommitEvent event) {
// handle commit
}
@TransactionalEventListener(phase =
TransactionPhase.AFTER_ROLLBACK)
public void onRollback(RollbackEvent event) {
// handle rollback
}
}
https://spring.io/blog/2015/02/11/better-application-events-in-spring-framework-4-2
@Configuration
@EnableGemfireCacheTransactions
class GeodeConfiguration { }
Auto Transaction Event Publishing
@Service
class MyTransactionalService {
@Transactional
public void someTransactionalMethod() {
// do transaction
}
}
@Component
class MyTransactionEventListeners {
@TransactionalEventListener(phase =
TransactionPhase.AFTER_COMMIT)
public void onCommit(
TransactionApplicationEvent event) {
// handle commit
}
@TransactionalEventListener(phase =
TransactionPhase.AFTER_ROLLBACK)
public void onRollback(
TransactionApplicationEvent event) {
// handle rollback
}
}
https://docs.spring.io/spring-data/geode/docs/current/reference/html/#apis:auto-transaction-event-publishing
@Configuration
@EnableGemfireCacheTransactions(
enableAutoTransactionEventPublishing =
true)
class GeodeConfiguration { }
Projections, Paging & OnRegion Function Executions
interface UserRepository extends CrudRepository<User, String> {
// Projection (User -> UserView)
UserView findByNameLike(String wildcardName, Sort orderBy);
// Paging (Page number, Page size & Sort)
List<User> findByNameLike(String wildcardName, Pageable pageRequest);
Page<UserView> findByNameLike(String wildcardName, Pageable pageRequest);
@Function
boolean grant(Set<Long> userIds, Role role);
}
https://docs.spring.io/spring-data/data-commons/docs/current/reference/html/#repositories.paging-and-sorting
@Region(“Users”)
class User {
@Id
Long id;
String name;
Role role;
LocalDateTime lastAccessTime;
boolean active;
}
class UserView {
String name;
LocalDateTime lastAccessTime;
}
OnRegion Function Execution
interface UserRepository extends CrudRepository<User, Long> {
@Function
boolean grant(Set<Long> userIds, Role role);
}
@OnRegion(region = “Users”)
interface UserFunctions {
boolean grant(Set<Long> ids, Role role);
}
~=
How To Use Spring Data with Apache Geode
 Generate Spring Boot [SBDG] project at start.spring.io
 spring-geode-starter module (provided)
<dependencies>
<dependency>
<groupId>org.springframework.geode</groupId>
<artifactId>spring-geode-starter</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
Spring Boot Spring Data Spring Session Spring Test
Spring Session for Apache Geode <SSDG/>
 New Spring Profile to disable OQL Indexes created by SSDG
 “disable-spring-session-data-gemfire-indexes”
 Principle Name & Session Attributes Indexes
 HASH OQL Indexes changed to RANGE/FUNCTION OQL Indexes
 Marks identity field (id) of Session object when using PDX Serialization
How To Use Spring Session with Apache Geode
 Generate Spring Boot [SBDG] project at start.spring.io
 Include spring-geode-starter-session module
<dependencies>
<dependency>
<groupId>org.springframework.geode</groupId>
<artifactId>spring-geode-starter-session</artifactId>
</dependency>
</dependencies>
Spring Boot Spring Data Spring Session Spring Test
Spring Boot for Apache Geode <SBDG/>
 Asynchronous (Write-Behind) Inline Caching [doc]
 Cache Initialization, i.e. loading Data using JSON [doc]
 Support for gemfire.properties in Spring Boot
application.properties [doc]
Patterns of Caching
 Look-Aside Caching *
 Inline Caching
 Sync or Async
 Near Caching
 Multi-Site Caching
 Active-Active or Active-Passive
Patterns of Caching
 Look-Aside Caching *
 Inline Caching
 Sync or Async
 Near Caching
 Multi-Site Caching
 Active-Active or Active-Passive
Use Cases of Caching
 (HTTP) Session Caching
 Hibernate L2 Caching
 Etc.
Inline Caching
Inline Caching
CREATE/UPDATE
Cache Put
Write-Through [sync]
Write-Behind [async]
READ
Cache Get
Read-Through [sync]
.
.
.
.
.
.
.
.
.
.
.
.
Inline Caching
Write-Through [sync]
Write-Behind [async]
Read-Through [sync]
Inline Caching
CacheWriter
CacheLoader
Read-Through [sync]
Write-Through [sync]
Write-Behind [async]
Inline Caching
Write-Through [sync]
Write-Behind [async]
Read-Through [sync]
CacheLoaderAsyncEventListener
Inline Caching Applied
@Service
class UserService {
@Cacheable(“UsersByName”)
User findBy(String name) {
…
}
}
Synchronous (Read/Write-Through) Inline Caching
@Configuration
@EnableCachingDefinedRegions
class GeodeConfiguration {
@Bean
InlineCachingRegionConfigurer<User, Long> syncInlineCachingConfigurer(
UserRepository userRepository) {
return new InlineCachingRegionConfigurer(userRepository, “Users”);
}
}
Asynchronous (Write-Behind) Inline Caching
@Configuration
@EnableCachingDefinedRegions
class GeodeConfiguration {
@Bean
AsyncInlineCachingRegionConfigurer<User, Long> asyncInlineCachingConfigurer(
UserRepository userRepository) {
return AsyncInlineCachingRegionConfigurer.create(userRepository, “Users”)
.withQueueBatchConflationEnabled()
.withQueueBatchSize(50)
.withQueueBatchTimeInterval(Duration.ofSeconds(30))
}
} @Bean
RepositoryCacheLoaderRegionConfigurer<User, Long> syncInlineCachingConfigurer(
UserRepository userRepository) {
return new RepositoryCacheLoaderRegionConfigurer(userRepository, “Users”)
}
}
// Write-Behind
// Read-Through
gemfire.properties in application.properties
# Spring Boot application.properties
server.port=8181
spring.application.name=SpringGeodeApplication
gemfire.durable-client-id=123
gemfire.enable-time-statistics=${external-enable-stats:true}
spring.data.gemfire.cache.client.durable-client-id=987
https://docs.spring.io/spring-boot-data-geode-build/1.4.x/reference/html5/index.html#geode-configuration-
gemfire-properties
EXAMPLE
Cache Initialization
Spring Boot for Apache Geode <SBDG/>
 New Multi-Site Caching Example & Guide [doc / source]
 New Security Example & Guide [doc / source]
 Auto-configuration for TLS/SSL On-platform [doc]
 PCF/PCC  VMware Tanzu GemFire for VMs (BOSH)
 New Using Apache Geode with Docker chapter [doc]
 New Apache Geode API Extensions chapter [doc]
 New spring-geode-starter-logging module [doc]
 New spring-geode-bom module [Issue #93]
How To Use Spring Boot with Apache Geode
 Generate Spring Boot [SBDG] project at start.spring.io
 spring-geode-starter module (provided)
<dependencies>
<dependency>
<groupId>org.springframework.geode</groupId>
<artifactId>spring-geode-starter</artifactId>
</dependency>
</dependencies>
References
 Spring Data for Apache Geode (SDG) [ Project | Source | JIRA | PR ]
 Spring Test for Apache Geode (STDG) [ | Source | Issues | PR ]
 Spring Session for Apache Geode (SSDG) [ Project | Source | Issues | PR ]
 Spring Boot for Apache Geode (SBDG) [ | Source | Issues | PR ]
 StackOverflow
 Examples
Stay Connected.
A Deep Dive into Spring Application Events
By Oliver Drotbohm
Wed, Sept 2 @ 1:05 PM PDT
#springone@s1p
The Past Year in Spring for Apache Geode
Safe Harbor Statement
ThefollowingisintendedtooutlinethegeneraldirectionofVMware'sofferings.Itisintendedforinformationpurposesonlyandmay notbeincorporated
intoanycontract. Anyinformationregardingpre-releaseofVMwareofferings,futureupdatesorotherplannedmodificationsis subjecttoongoing
evaluationbyVMwareandissubjecttochange.Thisinformationisprovidedwithoutwarrantyoranykind, expressorimplied, and isnotacommitmentto
deliveranymaterial,code,orfunctionality,and shouldnotberelieduponin makingpurchasingdecisionsregardingVMware's offerings.Thesepurchasing
decisionsshould onlybebasedon featurescurrentlyavailable. Thedevelopment,release,and timingofanyfeaturesorfunctionalitydescribedfor
VMware'sofferingsin thispresentationremainatthesolediscretionofPivotal. Pivotalhasnoobligationtoupdateforwardlookinginformationin this
presentation.
4
2
Ad

More Related Content

What's hot (20)

JavaCro'14 - Building interactive web applications with Vaadin – Peter Lehto
JavaCro'14 - Building interactive web applications with Vaadin – Peter LehtoJavaCro'14 - Building interactive web applications with Vaadin – Peter Lehto
JavaCro'14 - Building interactive web applications with Vaadin – Peter Lehto
HUJAK - Hrvatska udruga Java korisnika / Croatian Java User Association
 
Dropwizard and Friends
Dropwizard and FriendsDropwizard and Friends
Dropwizard and Friends
Yun Zhi Lin
 
Introduction to Spring Boot
Introduction to Spring BootIntroduction to Spring Boot
Introduction to Spring Boot
Purbarun Chakrabarti
 
Springboot Microservices
Springboot MicroservicesSpringboot Microservices
Springboot Microservices
NexThoughts Technologies
 
Spring boot Introduction
Spring boot IntroductionSpring boot Introduction
Spring boot Introduction
Jeevesh Pandey
 
Spring Boot
Spring BootSpring Boot
Spring Boot
Jiayun Zhou
 
Dropwizard Spring - the perfect Java REST server stack
Dropwizard Spring - the perfect Java REST server stackDropwizard Spring - the perfect Java REST server stack
Dropwizard Spring - the perfect Java REST server stack
Jacek Furmankiewicz
 
Spring boot for buidling microservices
Spring boot for buidling microservicesSpring boot for buidling microservices
Spring boot for buidling microservices
Nilanjan Roy
 
Managing user's data with Spring Session
Managing user's data with Spring SessionManaging user's data with Spring Session
Managing user's data with Spring Session
David Gómez García
 
Spring Boot & WebSocket
Spring Boot & WebSocketSpring Boot & WebSocket
Spring Boot & WebSocket
Ming-Ying Wu
 
Spring Boot and Microservices
Spring Boot and MicroservicesSpring Boot and Microservices
Spring Boot and Microservices
seges
 
Microservices/dropwizard
Microservices/dropwizardMicroservices/dropwizard
Microservices/dropwizard
FKM Naimul Huda, PMP
 
Java REST API Framework Comparison - UberConf 2021
Java REST API Framework Comparison - UberConf 2021Java REST API Framework Comparison - UberConf 2021
Java REST API Framework Comparison - UberConf 2021
Matt Raible
 
PUC SE Day 2019 - SpringBoot
PUC SE Day 2019 - SpringBootPUC SE Day 2019 - SpringBoot
PUC SE Day 2019 - SpringBoot
Josué Neis
 
Design & Development of Web Applications using SpringMVC
Design & Development of Web Applications using SpringMVC Design & Development of Web Applications using SpringMVC
Design & Development of Web Applications using SpringMVC
Naresh Chintalcheru
 
Introduction to spring boot
Introduction to spring bootIntroduction to spring boot
Introduction to spring boot
Santosh Kumar Kar
 
Spring boot - an introduction
Spring boot - an introductionSpring boot - an introduction
Spring boot - an introduction
Jonathan Holloway
 
Spring4 whats up doc?
Spring4 whats up doc?Spring4 whats up doc?
Spring4 whats up doc?
David Gómez García
 
How to customize Spring Boot?
How to customize Spring Boot?How to customize Spring Boot?
How to customize Spring Boot?
GilWon Oh
 
Microservices - java ee vs spring boot and spring cloud
Microservices - java ee vs spring boot and spring cloudMicroservices - java ee vs spring boot and spring cloud
Microservices - java ee vs spring boot and spring cloud
Ben Wilcock
 
Dropwizard and Friends
Dropwizard and FriendsDropwizard and Friends
Dropwizard and Friends
Yun Zhi Lin
 
Spring boot Introduction
Spring boot IntroductionSpring boot Introduction
Spring boot Introduction
Jeevesh Pandey
 
Dropwizard Spring - the perfect Java REST server stack
Dropwizard Spring - the perfect Java REST server stackDropwizard Spring - the perfect Java REST server stack
Dropwizard Spring - the perfect Java REST server stack
Jacek Furmankiewicz
 
Spring boot for buidling microservices
Spring boot for buidling microservicesSpring boot for buidling microservices
Spring boot for buidling microservices
Nilanjan Roy
 
Managing user's data with Spring Session
Managing user's data with Spring SessionManaging user's data with Spring Session
Managing user's data with Spring Session
David Gómez García
 
Spring Boot & WebSocket
Spring Boot & WebSocketSpring Boot & WebSocket
Spring Boot & WebSocket
Ming-Ying Wu
 
Spring Boot and Microservices
Spring Boot and MicroservicesSpring Boot and Microservices
Spring Boot and Microservices
seges
 
Java REST API Framework Comparison - UberConf 2021
Java REST API Framework Comparison - UberConf 2021Java REST API Framework Comparison - UberConf 2021
Java REST API Framework Comparison - UberConf 2021
Matt Raible
 
PUC SE Day 2019 - SpringBoot
PUC SE Day 2019 - SpringBootPUC SE Day 2019 - SpringBoot
PUC SE Day 2019 - SpringBoot
Josué Neis
 
Design & Development of Web Applications using SpringMVC
Design & Development of Web Applications using SpringMVC Design & Development of Web Applications using SpringMVC
Design & Development of Web Applications using SpringMVC
Naresh Chintalcheru
 
Spring boot - an introduction
Spring boot - an introductionSpring boot - an introduction
Spring boot - an introduction
Jonathan Holloway
 
How to customize Spring Boot?
How to customize Spring Boot?How to customize Spring Boot?
How to customize Spring Boot?
GilWon Oh
 
Microservices - java ee vs spring boot and spring cloud
Microservices - java ee vs spring boot and spring cloudMicroservices - java ee vs spring boot and spring cloud
Microservices - java ee vs spring boot and spring cloud
Ben Wilcock
 

Similar to The Past Year in Spring for Apache Geode (20)

RESTEasy
RESTEasyRESTEasy
RESTEasy
Massimiliano Dessì
 
Boost Development With Java EE7 On EAP7 (Demitris Andreadis)
Boost Development With Java EE7 On EAP7 (Demitris Andreadis)Boost Development With Java EE7 On EAP7 (Demitris Andreadis)
Boost Development With Java EE7 On EAP7 (Demitris Andreadis)
Red Hat Developers
 
May 2010 - RestEasy
May 2010 - RestEasyMay 2010 - RestEasy
May 2010 - RestEasy
JBug Italy
 
Codemotion appengine
Codemotion appengineCodemotion appengine
Codemotion appengine
Ignacio Coloma
 
Spring boot
Spring boot Spring boot
Spring boot
Vinay Prajapati
 
Ejb3 Dan Hinojosa
Ejb3 Dan HinojosaEjb3 Dan Hinojosa
Ejb3 Dan Hinojosa
Dan Hinojosa
 
Overview of Android Infrastructure
Overview of Android InfrastructureOverview of Android Infrastructure
Overview of Android Infrastructure
Alexey Buzdin
 
Overview of Android Infrastructure
Overview of Android InfrastructureOverview of Android Infrastructure
Overview of Android Infrastructure
C.T.Co
 
Annotation processing and code gen
Annotation processing and code genAnnotation processing and code gen
Annotation processing and code gen
koji lin
 
DWR, Hibernate and Dojo.E - A Tutorial
DWR, Hibernate and Dojo.E - A TutorialDWR, Hibernate and Dojo.E - A Tutorial
DWR, Hibernate and Dojo.E - A Tutorial
jbarciauskas
 
Groovy - Grails as a modern scripting language for Web applications
Groovy - Grails as a modern scripting language for Web applicationsGroovy - Grails as a modern scripting language for Web applications
Groovy - Grails as a modern scripting language for Web applications
IndicThreads
 
Android best practices
Android best practicesAndroid best practices
Android best practices
Jose Manuel Ortega Candel
 
比XML更好用的Java Annotation
比XML更好用的Java Annotation比XML更好用的Java Annotation
比XML更好用的Java Annotation
javatwo2011
 
Overview of RESTful web services
Overview of RESTful web servicesOverview of RESTful web services
Overview of RESTful web services
nbuddharaju
 
Dropwizard
DropwizardDropwizard
Dropwizard
Scott Leberknight
 
GraphTour - Utilizing Powerful Extensions for Analytics & Operations
GraphTour - Utilizing Powerful Extensions for Analytics & OperationsGraphTour - Utilizing Powerful Extensions for Analytics & Operations
GraphTour - Utilizing Powerful Extensions for Analytics & Operations
Neo4j
 
Android and the Seven Dwarfs from Devox'15
Android and the Seven Dwarfs from Devox'15Android and the Seven Dwarfs from Devox'15
Android and the Seven Dwarfs from Devox'15
Murat Yener
 
Neo4j GraphTour: Utilizing Powerful Extensions for Analytics and Operations
Neo4j GraphTour: Utilizing Powerful Extensions for Analytics and OperationsNeo4j GraphTour: Utilizing Powerful Extensions for Analytics and Operations
Neo4j GraphTour: Utilizing Powerful Extensions for Analytics and Operations
Mark Needham
 
REST made simple with Java
REST made simple with JavaREST made simple with Java
REST made simple with Java
elliando dias
 
REST made simple with Java
REST made simple with JavaREST made simple with Java
REST made simple with Java
Niklas Gustavsson
 
Boost Development With Java EE7 On EAP7 (Demitris Andreadis)
Boost Development With Java EE7 On EAP7 (Demitris Andreadis)Boost Development With Java EE7 On EAP7 (Demitris Andreadis)
Boost Development With Java EE7 On EAP7 (Demitris Andreadis)
Red Hat Developers
 
May 2010 - RestEasy
May 2010 - RestEasyMay 2010 - RestEasy
May 2010 - RestEasy
JBug Italy
 
Overview of Android Infrastructure
Overview of Android InfrastructureOverview of Android Infrastructure
Overview of Android Infrastructure
Alexey Buzdin
 
Overview of Android Infrastructure
Overview of Android InfrastructureOverview of Android Infrastructure
Overview of Android Infrastructure
C.T.Co
 
Annotation processing and code gen
Annotation processing and code genAnnotation processing and code gen
Annotation processing and code gen
koji lin
 
DWR, Hibernate and Dojo.E - A Tutorial
DWR, Hibernate and Dojo.E - A TutorialDWR, Hibernate and Dojo.E - A Tutorial
DWR, Hibernate and Dojo.E - A Tutorial
jbarciauskas
 
Groovy - Grails as a modern scripting language for Web applications
Groovy - Grails as a modern scripting language for Web applicationsGroovy - Grails as a modern scripting language for Web applications
Groovy - Grails as a modern scripting language for Web applications
IndicThreads
 
比XML更好用的Java Annotation
比XML更好用的Java Annotation比XML更好用的Java Annotation
比XML更好用的Java Annotation
javatwo2011
 
Overview of RESTful web services
Overview of RESTful web servicesOverview of RESTful web services
Overview of RESTful web services
nbuddharaju
 
GraphTour - Utilizing Powerful Extensions for Analytics & Operations
GraphTour - Utilizing Powerful Extensions for Analytics & OperationsGraphTour - Utilizing Powerful Extensions for Analytics & Operations
GraphTour - Utilizing Powerful Extensions for Analytics & Operations
Neo4j
 
Android and the Seven Dwarfs from Devox'15
Android and the Seven Dwarfs from Devox'15Android and the Seven Dwarfs from Devox'15
Android and the Seven Dwarfs from Devox'15
Murat Yener
 
Neo4j GraphTour: Utilizing Powerful Extensions for Analytics and Operations
Neo4j GraphTour: Utilizing Powerful Extensions for Analytics and OperationsNeo4j GraphTour: Utilizing Powerful Extensions for Analytics and Operations
Neo4j GraphTour: Utilizing Powerful Extensions for Analytics and Operations
Mark Needham
 
REST made simple with Java
REST made simple with JavaREST made simple with Java
REST made simple with Java
elliando dias
 
Ad

More from VMware Tanzu (20)

Spring into AI presented by Dan Vega 5/14
Spring into AI presented by Dan Vega 5/14Spring into AI presented by Dan Vega 5/14
Spring into AI presented by Dan Vega 5/14
VMware Tanzu
 
What AI Means For Your Product Strategy And What To Do About It
What AI Means For Your Product Strategy And What To Do About ItWhat AI Means For Your Product Strategy And What To Do About It
What AI Means For Your Product Strategy And What To Do About It
VMware Tanzu
 
Make the Right Thing the Obvious Thing at Cardinal Health 2023
Make the Right Thing the Obvious Thing at Cardinal Health 2023Make the Right Thing the Obvious Thing at Cardinal Health 2023
Make the Right Thing the Obvious Thing at Cardinal Health 2023
VMware Tanzu
 
Enhancing DevEx and Simplifying Operations at Scale
Enhancing DevEx and Simplifying Operations at ScaleEnhancing DevEx and Simplifying Operations at Scale
Enhancing DevEx and Simplifying Operations at Scale
VMware Tanzu
 
Spring Update | July 2023
Spring Update | July 2023Spring Update | July 2023
Spring Update | July 2023
VMware Tanzu
 
Platforms, Platform Engineering, & Platform as a Product
Platforms, Platform Engineering, & Platform as a ProductPlatforms, Platform Engineering, & Platform as a Product
Platforms, Platform Engineering, & Platform as a Product
VMware Tanzu
 
Building Cloud Ready Apps
Building Cloud Ready AppsBuilding Cloud Ready Apps
Building Cloud Ready Apps
VMware Tanzu
 
Spring Boot 3 And Beyond
Spring Boot 3 And BeyondSpring Boot 3 And Beyond
Spring Boot 3 And Beyond
VMware Tanzu
 
Spring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdf
Spring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdfSpring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdf
Spring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdf
VMware Tanzu
 
Simplify and Scale Enterprise Apps in the Cloud | Boston 2023
Simplify and Scale Enterprise Apps in the Cloud | Boston 2023Simplify and Scale Enterprise Apps in the Cloud | Boston 2023
Simplify and Scale Enterprise Apps in the Cloud | Boston 2023
VMware Tanzu
 
Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023
Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023
Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023
VMware Tanzu
 
tanzu_developer_connect.pptx
tanzu_developer_connect.pptxtanzu_developer_connect.pptx
tanzu_developer_connect.pptx
VMware Tanzu
 
Tanzu Virtual Developer Connect Workshop - French
Tanzu Virtual Developer Connect Workshop - FrenchTanzu Virtual Developer Connect Workshop - French
Tanzu Virtual Developer Connect Workshop - French
VMware Tanzu
 
Tanzu Developer Connect Workshop - English
Tanzu Developer Connect Workshop - EnglishTanzu Developer Connect Workshop - English
Tanzu Developer Connect Workshop - English
VMware Tanzu
 
Virtual Developer Connect Workshop - English
Virtual Developer Connect Workshop - EnglishVirtual Developer Connect Workshop - English
Virtual Developer Connect Workshop - English
VMware Tanzu
 
Tanzu Developer Connect - French
Tanzu Developer Connect - FrenchTanzu Developer Connect - French
Tanzu Developer Connect - French
VMware Tanzu
 
Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023
Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023
Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023
VMware Tanzu
 
SpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring Boot
SpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring BootSpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring Boot
SpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring Boot
VMware Tanzu
 
SpringOne Tour: The Influential Software Engineer
SpringOne Tour: The Influential Software EngineerSpringOne Tour: The Influential Software Engineer
SpringOne Tour: The Influential Software Engineer
VMware Tanzu
 
SpringOne Tour: Domain-Driven Design: Theory vs Practice
SpringOne Tour: Domain-Driven Design: Theory vs PracticeSpringOne Tour: Domain-Driven Design: Theory vs Practice
SpringOne Tour: Domain-Driven Design: Theory vs Practice
VMware Tanzu
 
Spring into AI presented by Dan Vega 5/14
Spring into AI presented by Dan Vega 5/14Spring into AI presented by Dan Vega 5/14
Spring into AI presented by Dan Vega 5/14
VMware Tanzu
 
What AI Means For Your Product Strategy And What To Do About It
What AI Means For Your Product Strategy And What To Do About ItWhat AI Means For Your Product Strategy And What To Do About It
What AI Means For Your Product Strategy And What To Do About It
VMware Tanzu
 
Make the Right Thing the Obvious Thing at Cardinal Health 2023
Make the Right Thing the Obvious Thing at Cardinal Health 2023Make the Right Thing the Obvious Thing at Cardinal Health 2023
Make the Right Thing the Obvious Thing at Cardinal Health 2023
VMware Tanzu
 
Enhancing DevEx and Simplifying Operations at Scale
Enhancing DevEx and Simplifying Operations at ScaleEnhancing DevEx and Simplifying Operations at Scale
Enhancing DevEx and Simplifying Operations at Scale
VMware Tanzu
 
Spring Update | July 2023
Spring Update | July 2023Spring Update | July 2023
Spring Update | July 2023
VMware Tanzu
 
Platforms, Platform Engineering, & Platform as a Product
Platforms, Platform Engineering, & Platform as a ProductPlatforms, Platform Engineering, & Platform as a Product
Platforms, Platform Engineering, & Platform as a Product
VMware Tanzu
 
Building Cloud Ready Apps
Building Cloud Ready AppsBuilding Cloud Ready Apps
Building Cloud Ready Apps
VMware Tanzu
 
Spring Boot 3 And Beyond
Spring Boot 3 And BeyondSpring Boot 3 And Beyond
Spring Boot 3 And Beyond
VMware Tanzu
 
Spring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdf
Spring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdfSpring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdf
Spring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdf
VMware Tanzu
 
Simplify and Scale Enterprise Apps in the Cloud | Boston 2023
Simplify and Scale Enterprise Apps in the Cloud | Boston 2023Simplify and Scale Enterprise Apps in the Cloud | Boston 2023
Simplify and Scale Enterprise Apps in the Cloud | Boston 2023
VMware Tanzu
 
Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023
Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023
Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023
VMware Tanzu
 
tanzu_developer_connect.pptx
tanzu_developer_connect.pptxtanzu_developer_connect.pptx
tanzu_developer_connect.pptx
VMware Tanzu
 
Tanzu Virtual Developer Connect Workshop - French
Tanzu Virtual Developer Connect Workshop - FrenchTanzu Virtual Developer Connect Workshop - French
Tanzu Virtual Developer Connect Workshop - French
VMware Tanzu
 
Tanzu Developer Connect Workshop - English
Tanzu Developer Connect Workshop - EnglishTanzu Developer Connect Workshop - English
Tanzu Developer Connect Workshop - English
VMware Tanzu
 
Virtual Developer Connect Workshop - English
Virtual Developer Connect Workshop - EnglishVirtual Developer Connect Workshop - English
Virtual Developer Connect Workshop - English
VMware Tanzu
 
Tanzu Developer Connect - French
Tanzu Developer Connect - FrenchTanzu Developer Connect - French
Tanzu Developer Connect - French
VMware Tanzu
 
Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023
Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023
Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023
VMware Tanzu
 
SpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring Boot
SpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring BootSpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring Boot
SpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring Boot
VMware Tanzu
 
SpringOne Tour: The Influential Software Engineer
SpringOne Tour: The Influential Software EngineerSpringOne Tour: The Influential Software Engineer
SpringOne Tour: The Influential Software Engineer
VMware Tanzu
 
SpringOne Tour: Domain-Driven Design: Theory vs Practice
SpringOne Tour: Domain-Driven Design: Theory vs PracticeSpringOne Tour: Domain-Driven Design: Theory vs Practice
SpringOne Tour: Domain-Driven Design: Theory vs Practice
VMware Tanzu
 
Ad

Recently uploaded (20)

The Significance of Hardware in Information Systems.pdf
The Significance of Hardware in Information Systems.pdfThe Significance of Hardware in Information Systems.pdf
The Significance of Hardware in Information Systems.pdf
drewplanas10
 
PDF Reader Pro Crack Latest Version FREE Download 2025
PDF Reader Pro Crack Latest Version FREE Download 2025PDF Reader Pro Crack Latest Version FREE Download 2025
PDF Reader Pro Crack Latest Version FREE Download 2025
mu394968
 
Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...
Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...
Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...
Lionel Briand
 
Top 10 Client Portal Software Solutions for 2025.docx
Top 10 Client Portal Software Solutions for 2025.docxTop 10 Client Portal Software Solutions for 2025.docx
Top 10 Client Portal Software Solutions for 2025.docx
Portli
 
Revolutionizing Residential Wi-Fi PPT.pptx
Revolutionizing Residential Wi-Fi PPT.pptxRevolutionizing Residential Wi-Fi PPT.pptx
Revolutionizing Residential Wi-Fi PPT.pptx
nidhisingh691197
 
Avast Premium Security Crack FREE Latest Version 2025
Avast Premium Security Crack FREE Latest Version 2025Avast Premium Security Crack FREE Latest Version 2025
Avast Premium Security Crack FREE Latest Version 2025
mu394968
 
Exploring Wayland: A Modern Display Server for the Future
Exploring Wayland: A Modern Display Server for the FutureExploring Wayland: A Modern Display Server for the Future
Exploring Wayland: A Modern Display Server for the Future
ICS
 
Secure Test Infrastructure: The Backbone of Trustworthy Software Development
Secure Test Infrastructure: The Backbone of Trustworthy Software DevelopmentSecure Test Infrastructure: The Backbone of Trustworthy Software Development
Secure Test Infrastructure: The Backbone of Trustworthy Software Development
Shubham Joshi
 
WinRAR Crack for Windows (100% Working 2025)
WinRAR Crack for Windows (100% Working 2025)WinRAR Crack for Windows (100% Working 2025)
WinRAR Crack for Windows (100% Working 2025)
sh607827
 
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Dele Amefo
 
Kubernetes_101_Zero_to_Platform_Engineer.pptx
Kubernetes_101_Zero_to_Platform_Engineer.pptxKubernetes_101_Zero_to_Platform_Engineer.pptx
Kubernetes_101_Zero_to_Platform_Engineer.pptx
CloudScouts
 
Download Wondershare Filmora Crack [2025] With Latest
Download Wondershare Filmora Crack [2025] With LatestDownload Wondershare Filmora Crack [2025] With Latest
Download Wondershare Filmora Crack [2025] With Latest
tahirabibi60507
 
Scaling GraphRAG: Efficient Knowledge Retrieval for Enterprise AI
Scaling GraphRAG:  Efficient Knowledge Retrieval for Enterprise AIScaling GraphRAG:  Efficient Knowledge Retrieval for Enterprise AI
Scaling GraphRAG: Efficient Knowledge Retrieval for Enterprise AI
danshalev
 
What Do Contribution Guidelines Say About Software Testing? (MSR 2025)
What Do Contribution Guidelines Say About Software Testing? (MSR 2025)What Do Contribution Guidelines Say About Software Testing? (MSR 2025)
What Do Contribution Guidelines Say About Software Testing? (MSR 2025)
Andre Hora
 
EASEUS Partition Master Crack + License Code
EASEUS Partition Master Crack + License CodeEASEUS Partition Master Crack + License Code
EASEUS Partition Master Crack + License Code
aneelaramzan63
 
How Valletta helped healthcare SaaS to transform QA and compliance to grow wi...
How Valletta helped healthcare SaaS to transform QA and compliance to grow wi...How Valletta helped healthcare SaaS to transform QA and compliance to grow wi...
How Valletta helped healthcare SaaS to transform QA and compliance to grow wi...
Egor Kaleynik
 
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Andre Hora
 
Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...
Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...
Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...
Eric D. Schabell
 
Adobe Master Collection CC Crack Advance Version 2025
Adobe Master Collection CC Crack Advance Version 2025Adobe Master Collection CC Crack Advance Version 2025
Adobe Master Collection CC Crack Advance Version 2025
kashifyounis067
 
How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?
How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?
How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?
steaveroggers
 
The Significance of Hardware in Information Systems.pdf
The Significance of Hardware in Information Systems.pdfThe Significance of Hardware in Information Systems.pdf
The Significance of Hardware in Information Systems.pdf
drewplanas10
 
PDF Reader Pro Crack Latest Version FREE Download 2025
PDF Reader Pro Crack Latest Version FREE Download 2025PDF Reader Pro Crack Latest Version FREE Download 2025
PDF Reader Pro Crack Latest Version FREE Download 2025
mu394968
 
Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...
Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...
Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...
Lionel Briand
 
Top 10 Client Portal Software Solutions for 2025.docx
Top 10 Client Portal Software Solutions for 2025.docxTop 10 Client Portal Software Solutions for 2025.docx
Top 10 Client Portal Software Solutions for 2025.docx
Portli
 
Revolutionizing Residential Wi-Fi PPT.pptx
Revolutionizing Residential Wi-Fi PPT.pptxRevolutionizing Residential Wi-Fi PPT.pptx
Revolutionizing Residential Wi-Fi PPT.pptx
nidhisingh691197
 
Avast Premium Security Crack FREE Latest Version 2025
Avast Premium Security Crack FREE Latest Version 2025Avast Premium Security Crack FREE Latest Version 2025
Avast Premium Security Crack FREE Latest Version 2025
mu394968
 
Exploring Wayland: A Modern Display Server for the Future
Exploring Wayland: A Modern Display Server for the FutureExploring Wayland: A Modern Display Server for the Future
Exploring Wayland: A Modern Display Server for the Future
ICS
 
Secure Test Infrastructure: The Backbone of Trustworthy Software Development
Secure Test Infrastructure: The Backbone of Trustworthy Software DevelopmentSecure Test Infrastructure: The Backbone of Trustworthy Software Development
Secure Test Infrastructure: The Backbone of Trustworthy Software Development
Shubham Joshi
 
WinRAR Crack for Windows (100% Working 2025)
WinRAR Crack for Windows (100% Working 2025)WinRAR Crack for Windows (100% Working 2025)
WinRAR Crack for Windows (100% Working 2025)
sh607827
 
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Dele Amefo
 
Kubernetes_101_Zero_to_Platform_Engineer.pptx
Kubernetes_101_Zero_to_Platform_Engineer.pptxKubernetes_101_Zero_to_Platform_Engineer.pptx
Kubernetes_101_Zero_to_Platform_Engineer.pptx
CloudScouts
 
Download Wondershare Filmora Crack [2025] With Latest
Download Wondershare Filmora Crack [2025] With LatestDownload Wondershare Filmora Crack [2025] With Latest
Download Wondershare Filmora Crack [2025] With Latest
tahirabibi60507
 
Scaling GraphRAG: Efficient Knowledge Retrieval for Enterprise AI
Scaling GraphRAG:  Efficient Knowledge Retrieval for Enterprise AIScaling GraphRAG:  Efficient Knowledge Retrieval for Enterprise AI
Scaling GraphRAG: Efficient Knowledge Retrieval for Enterprise AI
danshalev
 
What Do Contribution Guidelines Say About Software Testing? (MSR 2025)
What Do Contribution Guidelines Say About Software Testing? (MSR 2025)What Do Contribution Guidelines Say About Software Testing? (MSR 2025)
What Do Contribution Guidelines Say About Software Testing? (MSR 2025)
Andre Hora
 
EASEUS Partition Master Crack + License Code
EASEUS Partition Master Crack + License CodeEASEUS Partition Master Crack + License Code
EASEUS Partition Master Crack + License Code
aneelaramzan63
 
How Valletta helped healthcare SaaS to transform QA and compliance to grow wi...
How Valletta helped healthcare SaaS to transform QA and compliance to grow wi...How Valletta helped healthcare SaaS to transform QA and compliance to grow wi...
How Valletta helped healthcare SaaS to transform QA and compliance to grow wi...
Egor Kaleynik
 
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Andre Hora
 
Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...
Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...
Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...
Eric D. Schabell
 
Adobe Master Collection CC Crack Advance Version 2025
Adobe Master Collection CC Crack Advance Version 2025Adobe Master Collection CC Crack Advance Version 2025
Adobe Master Collection CC Crack Advance Version 2025
kashifyounis067
 
How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?
How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?
How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?
steaveroggers
 

The Past Year in Spring for Apache Geode

  • 1. The Past Year in Spring for Apache Geode September 2–3, 2020 springone.io
  • 2. John Blum Lead… for (P project : Spring for Apache Geode) { manage(project); } @john_blum
  • 3. … Spring for Apache GeodeAll things… What things?
  • 4. Spring Boot Spring Data Spring Session Spring Test
  • 5. Spring Boot Spring Data Spring Session Spring Test
  • 6. Spring Boot Spring Data Spring Session Spring Test TDP (Test-Driven Presentation)
  • 7. Spring Test for Apache Geode <STDG/>  Fine-grained control over GemFire/Geode Mock Object Lifecycle [doc]  Mocking Unsupported Cache Operations [doc]  New @EnableGemFireResourceCollector [doc]
  • 8. GemFire/Geode Mock Object Lifecycle @EnableGemFireMockObjects(destroyOnEvents = { … }) class TestGeodeConfiguration { … } Any event class in package org.springframework.test.context.event  E.g. AfterTestMethodEvent  Defaults to AfterTestClassEvent
  • 9. EXAMPLE Mocking Unsupported Cache Operations & @EnableGemFireResourceCollector
  • 10. How To Use Spring Test with Apache Geode  Generate Spring Boot [SBDG] project at start.spring.io  Include spring-geode-starter-test module <dependencies> <dependency> <groupId>org.springframework.geode</groupId> <artifactId>spring-geode-starter-test</artifactId> <scope>test</scope> </dependency> </dependencies>
  • 11. Spring Boot Spring Data Spring Session Spring Test
  • 12. Spring Data for Apache Geode <SDG/>  DATAGEODE-238 – spring-data-gemfire module  DATAGEODE-272 – TransactionListener event publishing  DATAGEODE-152 [Doc]  WIP: DATAGEODE-263 – Paging  WIP: DATAGEODE-262 – Projections  WIP: DATAGEODE-258 – Function Executions on Region from Repository
  • 14. Manual Transaction Event Publishing @Service class MyTransactionalService { @Autowired ApplicationEventPublisher publisher; @Transactional public void someTransactionalMethod() { try { // do transaction publisher.publish(new CommitEvent()); } catch (DataAccessException e) { publisher.publish(new RollbackEvent(e)); throw e; } } @Component class MyTransactionEventListeners { @TransactionalEventListener(phase = TransactionPhase.AFTER_COMMIT) public void onCommit(CommitEvent event) { // handle commit } @TransactionalEventListener(phase = TransactionPhase.AFTER_ROLLBACK) public void onRollback(RollbackEvent event) { // handle rollback } } https://spring.io/blog/2015/02/11/better-application-events-in-spring-framework-4-2 @Configuration @EnableGemfireCacheTransactions class GeodeConfiguration { }
  • 15. Auto Transaction Event Publishing @Service class MyTransactionalService { @Transactional public void someTransactionalMethod() { // do transaction } } @Component class MyTransactionEventListeners { @TransactionalEventListener(phase = TransactionPhase.AFTER_COMMIT) public void onCommit( TransactionApplicationEvent event) { // handle commit } @TransactionalEventListener(phase = TransactionPhase.AFTER_ROLLBACK) public void onRollback( TransactionApplicationEvent event) { // handle rollback } } https://docs.spring.io/spring-data/geode/docs/current/reference/html/#apis:auto-transaction-event-publishing @Configuration @EnableGemfireCacheTransactions( enableAutoTransactionEventPublishing = true) class GeodeConfiguration { }
  • 16. Projections, Paging & OnRegion Function Executions interface UserRepository extends CrudRepository<User, String> { // Projection (User -> UserView) UserView findByNameLike(String wildcardName, Sort orderBy); // Paging (Page number, Page size & Sort) List<User> findByNameLike(String wildcardName, Pageable pageRequest); Page<UserView> findByNameLike(String wildcardName, Pageable pageRequest); @Function boolean grant(Set<Long> userIds, Role role); } https://docs.spring.io/spring-data/data-commons/docs/current/reference/html/#repositories.paging-and-sorting @Region(“Users”) class User { @Id Long id; String name; Role role; LocalDateTime lastAccessTime; boolean active; } class UserView { String name; LocalDateTime lastAccessTime; }
  • 17. OnRegion Function Execution interface UserRepository extends CrudRepository<User, Long> { @Function boolean grant(Set<Long> userIds, Role role); } @OnRegion(region = “Users”) interface UserFunctions { boolean grant(Set<Long> ids, Role role); } ~=
  • 18. How To Use Spring Data with Apache Geode  Generate Spring Boot [SBDG] project at start.spring.io  spring-geode-starter module (provided) <dependencies> <dependency> <groupId>org.springframework.geode</groupId> <artifactId>spring-geode-starter</artifactId> <scope>test</scope> </dependency> </dependencies>
  • 19. Spring Boot Spring Data Spring Session Spring Test
  • 20. Spring Session for Apache Geode <SSDG/>  New Spring Profile to disable OQL Indexes created by SSDG  “disable-spring-session-data-gemfire-indexes”  Principle Name & Session Attributes Indexes  HASH OQL Indexes changed to RANGE/FUNCTION OQL Indexes  Marks identity field (id) of Session object when using PDX Serialization
  • 21. How To Use Spring Session with Apache Geode  Generate Spring Boot [SBDG] project at start.spring.io  Include spring-geode-starter-session module <dependencies> <dependency> <groupId>org.springframework.geode</groupId> <artifactId>spring-geode-starter-session</artifactId> </dependency> </dependencies>
  • 22. Spring Boot Spring Data Spring Session Spring Test
  • 23. Spring Boot for Apache Geode <SBDG/>  Asynchronous (Write-Behind) Inline Caching [doc]  Cache Initialization, i.e. loading Data using JSON [doc]  Support for gemfire.properties in Spring Boot application.properties [doc]
  • 24. Patterns of Caching  Look-Aside Caching *  Inline Caching  Sync or Async  Near Caching  Multi-Site Caching  Active-Active or Active-Passive
  • 25. Patterns of Caching  Look-Aside Caching *  Inline Caching  Sync or Async  Near Caching  Multi-Site Caching  Active-Active or Active-Passive Use Cases of Caching  (HTTP) Session Caching  Hibernate L2 Caching  Etc. Inline Caching
  • 26. Inline Caching CREATE/UPDATE Cache Put Write-Through [sync] Write-Behind [async] READ Cache Get Read-Through [sync] . . . . . . . . . . . .
  • 29. Inline Caching Write-Through [sync] Write-Behind [async] Read-Through [sync] CacheLoaderAsyncEventListener
  • 30. Inline Caching Applied @Service class UserService { @Cacheable(“UsersByName”) User findBy(String name) { … } }
  • 31. Synchronous (Read/Write-Through) Inline Caching @Configuration @EnableCachingDefinedRegions class GeodeConfiguration { @Bean InlineCachingRegionConfigurer<User, Long> syncInlineCachingConfigurer( UserRepository userRepository) { return new InlineCachingRegionConfigurer(userRepository, “Users”); } }
  • 32. Asynchronous (Write-Behind) Inline Caching @Configuration @EnableCachingDefinedRegions class GeodeConfiguration { @Bean AsyncInlineCachingRegionConfigurer<User, Long> asyncInlineCachingConfigurer( UserRepository userRepository) { return AsyncInlineCachingRegionConfigurer.create(userRepository, “Users”) .withQueueBatchConflationEnabled() .withQueueBatchSize(50) .withQueueBatchTimeInterval(Duration.ofSeconds(30)) } } @Bean RepositoryCacheLoaderRegionConfigurer<User, Long> syncInlineCachingConfigurer( UserRepository userRepository) { return new RepositoryCacheLoaderRegionConfigurer(userRepository, “Users”) } } // Write-Behind // Read-Through
  • 33. gemfire.properties in application.properties # Spring Boot application.properties server.port=8181 spring.application.name=SpringGeodeApplication gemfire.durable-client-id=123 gemfire.enable-time-statistics=${external-enable-stats:true} spring.data.gemfire.cache.client.durable-client-id=987 https://docs.spring.io/spring-boot-data-geode-build/1.4.x/reference/html5/index.html#geode-configuration- gemfire-properties
  • 35. Spring Boot for Apache Geode <SBDG/>  New Multi-Site Caching Example & Guide [doc / source]  New Security Example & Guide [doc / source]  Auto-configuration for TLS/SSL On-platform [doc]  PCF/PCC  VMware Tanzu GemFire for VMs (BOSH)  New Using Apache Geode with Docker chapter [doc]  New Apache Geode API Extensions chapter [doc]  New spring-geode-starter-logging module [doc]  New spring-geode-bom module [Issue #93]
  • 36. How To Use Spring Boot with Apache Geode  Generate Spring Boot [SBDG] project at start.spring.io  spring-geode-starter module (provided) <dependencies> <dependency> <groupId>org.springframework.geode</groupId> <artifactId>spring-geode-starter</artifactId> </dependency> </dependencies>
  • 37. References  Spring Data for Apache Geode (SDG) [ Project | Source | JIRA | PR ]  Spring Test for Apache Geode (STDG) [ | Source | Issues | PR ]  Spring Session for Apache Geode (SSDG) [ Project | Source | Issues | PR ]  Spring Boot for Apache Geode (SBDG) [ | Source | Issues | PR ]  StackOverflow  Examples
  • 38. Stay Connected. A Deep Dive into Spring Application Events By Oliver Drotbohm Wed, Sept 2 @ 1:05 PM PDT #springone@s1p
  • 40. Safe Harbor Statement ThefollowingisintendedtooutlinethegeneraldirectionofVMware'sofferings.Itisintendedforinformationpurposesonlyandmay notbeincorporated intoanycontract. Anyinformationregardingpre-releaseofVMwareofferings,futureupdatesorotherplannedmodificationsis subjecttoongoing evaluationbyVMwareandissubjecttochange.Thisinformationisprovidedwithoutwarrantyoranykind, expressorimplied, and isnotacommitmentto deliveranymaterial,code,orfunctionality,and shouldnotberelieduponin makingpurchasingdecisionsregardingVMware's offerings.Thesepurchasing decisionsshould onlybebasedon featurescurrentlyavailable. Thedevelopment,release,and timingofanyfeaturesorfunctionalitydescribedfor VMware'sofferingsin thispresentationremainatthesolediscretionofPivotal. Pivotalhasnoobligationtoupdateforwardlookinginformationin this presentation. 4 2

Editor's Notes

  • #3: I am a member of the Spring Data Team and My responsibilities lie at the intersection of all things Spring for Apache Geode here at VMware. We will be covering a lot of content during this session and moving really fast in a short amount of time (25 minutes). I assume you know the basic Spring and Apache Geode concepts.
  • #5: All Things… Spring for Apache Geode
  • #7: STDG
  • #10: Example of Mocking Unsupported Cache/Region Operations & @EnableGemFireResourceCollector
  • #12: SDG
  • #19: SELECT entry.key FROM /Users.entries entry WHERE name LIKE ‘%doe’ ORDER BY entry.value.lastAccessTime DESC Execute OQL Query in Function for PARTITION Region usersRegions.getAll(keys);
  • #20: Perform basic CRUD, simple (OQL) Queries and Function Executions all conveniently from the Repository OnRegion vs. [OnServer(s) | OnMember(s)]
  • #22: SSDG
  • #25: SBDG
  • #36: GemFire/Geode Properties must be prefixed with “gemfire.” Property precedence… last definition wins! Warns user for invalid & unset properties Use with Spring Profiles
  • #37: Cache Initialization – loading Data using JSON