SlideShare a Scribd company logo
Simplifying Apache Geode
with Spring Data
By John Blum
@john_blum
1
Unless otherwise indicated, these slides are © 2013 -2016 Piv otal Software, Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
History
April 2015
SD GemFire 1.7
Branch for
*Apache Geode
June 2015
1.7.0.APACHE-
GEODE-EA-M1
1.0.0-
incubating.M1
April 2016
1.0.0.APACHE-
GEODE-
INCUBATING-M2
1.0.0-
incubating.M2
October 2016
1.0.0.APACHE-
GEODE-
INCUBATING-M3
1.0.0-
incubating.M3
November 2016
1.0.0.APACHE-
GEODE-
INCUBATING-
RELEASE
*1.0.0-incubating
April 2017
SD Geode Kay
2.0.x
1.2.1
2
Unless otherwise indicated, these slides are © 2013 -2016 Piv otal Software, Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
3
Spring Data for
Apache Geode
Kay
“Simple things should be simple;
complex things should be possible”
– Alan Kay
Unless otherwise indicated, these slides are © 2013 -2016 Piv otal Software, Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Core Themes in SDG - 2017
 Get Up & Running as Quickly and Easily as possible
 Using
 Make the Journey to the Cloud as Simple as possible
 On
5
Spring
Data
Blog Post: $ diff –q spring-data-gemfire spring-data-geode
Unless otherwise indicated, these slides are © 2013 -2016 Piv otal Software, Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-gemfire</artifactId>
<version>2.0.2.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-geode</artifactId>
<version>2.0.2.RELEASE</version>
</dependency>
6
Unless otherwise indicated, these slides are © 2013 -2016 Piv otal Software, Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Spring Data Geode 2.0 (Kay)
Apache Geode 1.2.1
7
Spring Data GemFire 2.0 (Kay)
Pivotal GemFire 9.1.1
Apache Geode 1.2.1
Kay
Unless otherwise indicated, these slides are © 2013 -2016 Piv otal Software, Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
8
Spring
Cloud
Unless otherwise indicated, these slides are © 2013 -2016 Piv otal Software, Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
How does it work?
New Annotation-based Configuration
 Convention over Configuration
 Use sensible defaults for all configuration parameters OOTB
 Enable users to get up and running, quickly and easily (no hassle).
 Allow user to override and customize the default, provided configuration
https://docs.spring.io/spring-data/geode/docs/current/reference/html/#bootstrap-annotation-config
9
Unless otherwise indicated, these slides are © 2013 -2016 Piv otal Software, Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
@Demo
11
https://docs.spring.io/spring-data/geode/docs/current/reference/html/#bootstrap-annotation-config
Unless otherwise indicated, these slides are © 2013 -2016 Piv otal Software, Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Client Annotations
14
@SpringBootApplication
@ClientCacheApplication
public class MySpringBootApacheGeodeClient { .. }
Unless otherwise indicated, these slides are © 2013 -2016 Piv otal Software, Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Client Annotations: Pools
15
@SpringBootApplication
@ClientCacheApplication
@EnablePools(pools = { @EnablePool(host = “hostname”, port = 1234), … })
public class MySpringBootApacheGeodeClient { .. }
Unless otherwise indicated, these slides are © 2013 -2016 Piv otal Software, Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Client Annotations: Entity-defined Regions
16
@SpringBootApplication
@ClientCacheApplication
@EnableGemfireRepositories(basePackageClasses = EntityRepository.class)
@EnableEntityDefinedRegions(basePackageClasses = EntityType.class)
@EnableIndexing(..)
public class MySpringBootApacheGeodeClient { .. }
@Region(name = “Customers”)
class Customer {
@Id Long id;
@Indexed(..) String name;
@LuceneIndexed(..) String title;
}
Unless otherwise indicated, these slides are © 2013 -2016 Piv otal Software, Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Client Annotations: Caching-defined Regions
17
@SpringBootApplication
@ClientCacheApplication
@EnableGemfireCaching
@EnableCachingDefinedRegions(..)
public class MySpringBootApacheGeodeClient { .. }
@Service
class CustomerService {
@Cacheable(“Accounts”)
Account getAccount(Customer customer) { .. }
}
Unless otherwise indicated, these slides are © 2013 -2016 Piv otal Software, Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Client Annotations: Cluster Configuration*
18
@SpringBootApplication
@ClientCacheApplication
@EnableClusterConfiguration(useHttp = true)
public class MySpringBootApacheGeodeClient { .. }
Unless otherwise indicated, these slides are © 2013 -2016 Piv otal Software, Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Client Annotations: CQ
19
@SpringBootApplication
@ClientCacheApplication
@EnableContinuousQueries(..)
public class MySpringBootApacheGeodeClient { .. }
@Service
class CustomerService {
@ContinuousQuery(name = “CreditScoreUpdates”,
query = “SELECT * FROM /Customers WHERE …”)
void creditScoreChange(CqEvent event) { .. }
}
Unless otherwise indicated, these slides are © 2013 -2016 Piv otal Software, Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Client Annotations: Serialization
20
@SpringBootApplication
@ClientCacheApplication
@EnablePdx(..)
public class MySpringBootApacheGeodeClient { .. }
Registers the SDG o.s.d.g.mapping.MappingPdxSerializer by default
Unless otherwise indicated, these slides are © 2013 -2016 Piv otal Software, Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Client Annotations: Security
21
@SpringBootApplication
@ClientCacheApplication
@EnableSecurity(..)
@EnableSsl(..)
public class MySpringBootApacheGeodeClient { .. }
# application.properties
spring.data.gemfire.security.username = jblum
spring.data.gemfire.security.password = secret
Unless otherwise indicated, these slides are © 2013 -2016 Piv otal Software, Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Client Annotations: Other
22
@SpringBootApplication
@ClientCacheApplication
@EnableGemFireProperties(..)
@EnableLogging(logLevel = “info”, …)
public class MySpringBootApacheGeodeClient { .. }
Unless otherwise indicated, these slides are © 2013 -2016 Piv otal Software, Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Server Annotations
24
@SpringBootApplication
@CacheServerApplication(name = “MySpringBootApacheGeodeServer”)
public class MySpringBootApacheGeodeServer { .. }
Unless otherwise indicated, these slides are © 2013 -2016 Piv otal Software, Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Server Annotations: CacheServers
25
@SpringBootApplication
@CacheServerApplication(name = “MySpringBootApacheGeodeServer”)
@EnableCacheServers(servers = { @EnableCacheServer(..), … })
public class MySpringBootApacheGeodeServer { .. }
Unless otherwise indicated, these slides are © 2013 -2016 Piv otal Software, Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Server Annotations: Processes
26
@SpringBootApplication
@CacheServerApplication(name = “MySpringBootApacheGeodeServer”)
@EnableLocator(port = 11235)
@EnableManager(port = 1199)
public class MySpringBootApacheGeodeServer { .. }
Unless otherwise indicated, these slides are © 2013 -2016 Piv otal Software, Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Server Annotations: Services
27
@SpringBootApplication
@CacheServerApplication(name = “MySpringBootApacheGeodeServer”)
@EnableHttpService(..)
@EnableMemcachedServer(..)
@EnableRedisServer(..)
public class MySpringBootApacheGeodeServer { .. }
Unless otherwise indicated, these slides are © 2013 -2016 Piv otal Software, Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Server Annotations: Regions
28
@SpringBootApplication
@CacheServerApplication(name = “MySpringBootApacheGeodeServer”)
@EnableCompression(..)
@EnableDiskStores(diskStores = { @EnableDiskStore(..), … })
@EnableEntityDefinedRegions(basePackageClasses = EntityType.class)
@EnableEviction(..)
@EnableExpiration(..)
@EnableOffHeap(memorySize = “1024g”)
public class MySpringBootApacheGeodeServer { .. }
Unless otherwise indicated, these slides are © 2013 -2016 Piv otal Software, Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Server Annotations: Expiration
29
@SpringBootApplication
@CacheServerApplication(name = “MySpringBootApacheGeodeServer”)
@EnableExpiration(..)
…
public class MySpringBootApacheGeodeServer { .. }
@Region(”Customers”)
@TimeToLiveExpiration(timeout = “600”, action = “LOCAL_DESTROY”)
@IdleTimeoutExpiration(timeout = “120”, action = “INVALIDATE”)
@Expiration(..)
class Customer { .. }
https://docs.spring.io/spring-data/geode/docs/current/reference/html/#bootstrap-annotation-config-region-expiration
https://docs.spring.io/spring-data/geode/docs/current/reference/html/#bootstrap:region:expiration:annotation
Unless otherwise indicated, these slides are © 2013 -2016 Piv otal Software, Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Server Annotations: Security
30
@SpringBootApplication
@CacheServerApplication(name = “MySpringBootApacheGeodeServer”)
@EnableSecurity(..)
@EnableSsl(..)
public class MySpringBootApacheGeodeServer {
@Bean
AuthorizingRealm ldapRealm(LdapContextFactory contextFactory) {
DefaultLdapRealm ldapRealm = new DefaultLdapRealm();
ldapRealm.setContextFactory(contextFactory);
return ldapRealm;
}
https://spring.io/blog/2016/11/10/spring-data-geode-1-0-0-incubating-release-released#apache-shiro-realms
Unless otherwise indicated, these slides are © 2013 -2016 Piv otal Software, Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Server Annotations: Other
31
@SpringBootApplication
@CacheServerApplication(name = “MySpringBootApacheGeodeServer”)
@EnableGemFireProperties(remoteLocators = “..”, …)
@EnableLogging(logLevel = “warning”, …)
@EnableStatistics(..)
public class MySpringBootApacheGeodeServer { .. }
Configuration @Runtime
Unless otherwise indicated, these slides are © 2013 -2016 Piv otal Software, Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Annotations: Properties Configuration
33
@SpringBootApplication
@ClientCacheApplication(locators = {
@Locator(host = “HostnameOne”, port = 1111),
@Locator(host = “HostnameTwo”, port = 2222),
…
})
public class MySpringBootApacheGeodeClient { .. }
Unless otherwise indicated, these slides are © 2013 -2016 Piv otal Software, Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Annotations: Properties Configuration
34
@SpringBootApplication
@ClientCacheApplication
public class MySpringBootApacheGeodeClient { .. }
# application.properties
spring.data.gemfire.pool.locators=HostnameOne[1111],HostnameTwo[2222], …
spring.data.gemfire.pool.default.locators=…
spring.data.gemfire.pool.swimming.locators=…
…
Unless otherwise indicated, these slides are © 2013 -2016 Piv otal Software, Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Annotations: Properties Configuration
35
public @interface ClientCacheApplication {
/**
* Configures the GemFire {@link org.apache.geode.distributed.Locator Locators} to which
* this cache client will connect.
*
* Use either the {@literal spring.data.gemfire.pool.default.locators} property
* or the {@literal spring.data.gemfire.pool.locators} property in {@literal application.properties}.
*/
Locator[] locators() default {};
…
}
https://docs.spring.io/spring-data/geode/docs/current/api/org/springframework/data/gemfire/config/annotation/ClientCacheApplication.html
Unless otherwise indicated, these slides are © 2013 -2016 Piv otal Software, Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Annotations: Configurers
36
@SpringBootApplication
@ClientCacheApplication
public class MySpringBootApacheGeodeClient {
@Bean
ClientCacheConfigurer locatorsConfigurer(
@Value(“${geode.locators.hostsPorts:localhost[10334]}”)
String hostsPorts) {
return (beanName, clientCacheFactoryBean) ->
clientCacheFactoryBean.setLocators(
ConnectionEndpointList.parse(10334, hostsPorts));
}
}
Unless otherwise indicated, these slides are © 2013 -2016 Piv otal Software, Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
What’s Next?
• Function Executions from Repository
• Paging support in Repository
• Query Projections
• Reactive Repository extensions for CQ
• Spring Security support
• Annotation support for CacheCallbacks
• Auto-generated IDs (Region keys)
• New Spring-driven Test (Context) Framework
37
Unless otherwise indicated, these slides are © 2013 -2016 Piv otal Software, Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Function Executions from Repository
38
public interface CustomerRepository
implements CrudRepository<Customer, Long> {
@Function(..)
CreditScore calculateCreditScore(Customer customer);
}
Customer jonDoe = …
CreditScore creditScore = customerRepository.calculateCreditScore(jonDoe);
Unless otherwise indicated, these slides are © 2013 -2016 Piv otal Software, Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Paging (& Sorting) Support
39
public interface CustomerRepository
implements CrudRepository<Customer, Long> {
List<Customer> findByLastNameOrderByCustomerFirstNameAsc(
String firstName);
List<Customer> findByLastName(String lastName, Sort sort);
// NEW!
Page<Customer> findTop100ByCreditScoreGreaterThan(CreditScore score,
Pageable pageable);
}
Unless otherwise indicated, these slides are © 2013 -2016 Piv otal Software, Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Query Projections (DTO)
40
public interface CustomerRepository
implements CrudRepository<Customer, Long> {
Iterable<CustomerNameProjection> findByLastName(String lastName);
}
@Region(“Customers”)
class Customer {
@Id Long id;
String firstName, lastName;
String getName() {
return String.format(“%1$s %2$s”,
firstName, lastName);
}
class CustomerNameProjection {
String name;
}
Unless otherwise indicated, these slides are © 2013 -2016 Piv otal Software, Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Reactive Repository Extensions for CQ
41
public interface CustomerRepository
implements CrudRepository<Customer, Long> {
@ContinuousQuery(..)
Flux<Customer> findByCreditScoreGreaterThanAndCreditScoreLessThan(
CreditScore low, CreditScore high);
}
Unless otherwise indicated, these slides are © 2013 -2016 Piv otal Software, Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Annotation-based CacheCallbacks Support
42
@Component
public class MyCallbacks {
@CacheListener(regions = { “Customers”, “Accounts” })
public <K, V> void afterCreate(EntryEvent<K, V> event) { .. }
@CacheWriter(region = “Customers”)
public <K, V> void beforeCreate(EntryEvent(K, V> event) { .. }
. . .
}
Unless otherwise indicated, these slides are © 2013 -2016 Piv otal Software, Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Unit Testing Apache Geode with Spring
With Integration Testing support in-progress…
@TestDemo
43
https://github.com/jxblum/spring-data-tests-4-gemfire
Unless otherwise indicated, these slides are © 2013 -2016 Piv otal Software, Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Spring Data Geode 2.1 (Lovelace)
Apache Geode 1.3.0
44
Spring Data GemFire 2.1 (Lovelace)
Pivotal GemFire 9.2.0
Apache Geode 1.3.0
Unless otherwise indicated, these slides are © 2013 -2016 Piv otal Software, Inc. and licensed under a
Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
References
• Reference Documentation: https://docs.spring.io/spring-data/geode/docs/current/reference/html/
• Javadoc: https://docs.spring.io/spring-data/geode/docs/current/api/
• GitHub: https://github.com/spring-projects/spring-data-geode
• JIRA: https://jira.spring.io/browse/DATAGEODE
• StackOverflow: https://stackoverflow.com/questions/tagged/spring-data-gemfire
• Presentation Examples: https://github.com/jxblum/simple-spring-geode-application
• Examples: https://github.com/jxblum/contacts-application
Me: @john_blum (Twitter) https://spring.io/team/jxblum (GitHub)
Questions
Answers
47© 2014 Pivotal Software, Inc. All rights reserved.
Thank You
Learn More. Stay Connected.
Refactoring to a System of Systems - Oliver Gierke
Thursday @ 11:50 AM – Room #2008
48
#springone@s1p

More Related Content

What's hot (20)

PDF
Oracle Code in Seoul: Provisioning of Cloud Resource
Taewan Kim
 
PPT
GlassFish BOF
glassfish
 
PDF
JavaOne 2014 BOF4241 What's Next for JSF?
Edward Burns
 
PDF
Serverless Java: JJUG CCC 2019
Shaun Smith
 
PDF
Spring MVC 4.2: New and Noteworthy
Rossen Stoyanchev
 
PDF
JVMs in Containers
David Delabassee
 
PDF
CON5898 What Servlet 4.0 Means To You
Edward Burns
 
PDF
Java API for WebSocket 1.0: Java EE 7 and GlassFish
Arun Gupta
 
PDF
Java EE, What's Next? by Anil Gaur
Takashi Ito
 
PPTX
Is An Agile Standard Possible For Java?
Simon Ritter
 
PPTX
JDK 9: Mission Accomplished. What Next For Java?
Simon Ritter
 
PDF
Serverless Java - Challenges and Triumphs
David Delabassee
 
PDF
MVC 1.0 / JSR 371
David Delabassee
 
PPTX
GlassFish Roadmap
glassfish
 
PDF
Intro To Reactive Programming
Rossen Stoyanchev
 
PPTX
JDK 9: The Start of a New Future for Java
Simon Ritter
 
PDF
EclipseLink: Beyond Relational and NoSQL to Polyglot and HTML5
Shaun Smith
 
PDF
Running Kubernetes Workloads on Oracle Cloud Infrastructure
Oracle Developers
 
PDF
Adopt-a-JSR for JSON Processing 1.1, JSR 374
Heather VanCura
 
PDF
Burns jsf-confess-2015
Edward Burns
 
Oracle Code in Seoul: Provisioning of Cloud Resource
Taewan Kim
 
GlassFish BOF
glassfish
 
JavaOne 2014 BOF4241 What's Next for JSF?
Edward Burns
 
Serverless Java: JJUG CCC 2019
Shaun Smith
 
Spring MVC 4.2: New and Noteworthy
Rossen Stoyanchev
 
JVMs in Containers
David Delabassee
 
CON5898 What Servlet 4.0 Means To You
Edward Burns
 
Java API for WebSocket 1.0: Java EE 7 and GlassFish
Arun Gupta
 
Java EE, What's Next? by Anil Gaur
Takashi Ito
 
Is An Agile Standard Possible For Java?
Simon Ritter
 
JDK 9: Mission Accomplished. What Next For Java?
Simon Ritter
 
Serverless Java - Challenges and Triumphs
David Delabassee
 
MVC 1.0 / JSR 371
David Delabassee
 
GlassFish Roadmap
glassfish
 
Intro To Reactive Programming
Rossen Stoyanchev
 
JDK 9: The Start of a New Future for Java
Simon Ritter
 
EclipseLink: Beyond Relational and NoSQL to Polyglot and HTML5
Shaun Smith
 
Running Kubernetes Workloads on Oracle Cloud Infrastructure
Oracle Developers
 
Adopt-a-JSR for JSON Processing 1.1, JSR 374
Heather VanCura
 
Burns jsf-confess-2015
Edward Burns
 

Similar to Simplifying Apache Geode with Spring Data (20)

PPTX
Getting Started with Apache Geode
John Blum
 
POTX
Building Effective Apache Geode Applications with Spring Data GemFire
John Blum
 
PPTX
The Past Year in Spring for Apache Geode
VMware Tanzu
 
PDF
Session State Caching with Spring
VMware Tanzu
 
PPTX
#GeodeSummit - Spring Data GemFire API Current and Future
PivotalOpenSourceHub
 
PPTX
Building Highly Scalable Spring Applications using In-Memory Data Grids
John Blum
 
PPTX
Spring Data and In-Memory Data Management in Action
John Blum
 
PDF
Spring Data (GemFire) Overview
John Blum
 
PPTX
Introducing Apache Geode and Spring Data GemFire
John Blum
 
PDF
Using Apache Calcite for Enabling SQL and JDBC Access to Apache Geode and Oth...
Christian Tzolov
 
PPTX
Scaling Spring Boot Applications in Real-Time
VMware Tanzu
 
PDF
Apache Geode Meetup, London
Apache Geode
 
PDF
Geode is Not a Cache, it's an Analytics Engine
VMware Tanzu
 
PPTX
Geode Meetup Apachecon
upthewaterspout
 
PDF
Apache Geode Meetup, Cork, Ireland at CIT
Apache Geode
 
PDF
Introduction to Spring Boot.pdf
ShaiAlmog1
 
PPTX
From Zero to Cloud using Spring with Cloud-Native Data Technologies - John Blum
VMware Tanzu
 
PPTX
Building a Stock Prediction system with Machine Learning using Geode, SpringX...
William Markito Oliveira
 
PDF
Spring 3 - An Introduction
Thorsten Kamann
 
PDF
Introduction to Apache Geode (Cork, Ireland)
Anthony Baker
 
Getting Started with Apache Geode
John Blum
 
Building Effective Apache Geode Applications with Spring Data GemFire
John Blum
 
The Past Year in Spring for Apache Geode
VMware Tanzu
 
Session State Caching with Spring
VMware Tanzu
 
#GeodeSummit - Spring Data GemFire API Current and Future
PivotalOpenSourceHub
 
Building Highly Scalable Spring Applications using In-Memory Data Grids
John Blum
 
Spring Data and In-Memory Data Management in Action
John Blum
 
Spring Data (GemFire) Overview
John Blum
 
Introducing Apache Geode and Spring Data GemFire
John Blum
 
Using Apache Calcite for Enabling SQL and JDBC Access to Apache Geode and Oth...
Christian Tzolov
 
Scaling Spring Boot Applications in Real-Time
VMware Tanzu
 
Apache Geode Meetup, London
Apache Geode
 
Geode is Not a Cache, it's an Analytics Engine
VMware Tanzu
 
Geode Meetup Apachecon
upthewaterspout
 
Apache Geode Meetup, Cork, Ireland at CIT
Apache Geode
 
Introduction to Spring Boot.pdf
ShaiAlmog1
 
From Zero to Cloud using Spring with Cloud-Native Data Technologies - John Blum
VMware Tanzu
 
Building a Stock Prediction system with Machine Learning using Geode, SpringX...
William Markito Oliveira
 
Spring 3 - An Introduction
Thorsten Kamann
 
Introduction to Apache Geode (Cork, Ireland)
Anthony Baker
 
Ad

More from VMware Tanzu (20)

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

Recently uploaded (20)

PDF
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
PDF
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
PDF
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
PDF
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
PDF
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
PDF
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
PPTX
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
PDF
Biography of Daniel Podor.pdf
Daniel Podor
 
PPTX
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
PDF
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
PDF
“NPU IP Hardware Shaped Through Software and Use-case Analysis,” a Presentati...
Edge AI and Vision Alliance
 
PPTX
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
PDF
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
PDF
What Makes Contify’s News API Stand Out: Key Features at a Glance
Contify
 
PDF
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PPTX
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
PPTX
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
PDF
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
PDF
IoT-Powered Industrial Transformation – Smart Manufacturing to Connected Heal...
Rejig Digital
 
PDF
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
Biography of Daniel Podor.pdf
Daniel Podor
 
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
“NPU IP Hardware Shaped Through Software and Use-case Analysis,” a Presentati...
Edge AI and Vision Alliance
 
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
What Makes Contify’s News API Stand Out: Key Features at a Glance
Contify
 
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
IoT-Powered Industrial Transformation – Smart Manufacturing to Connected Heal...
Rejig Digital
 
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 

Simplifying Apache Geode with Spring Data

  • 1. Simplifying Apache Geode with Spring Data By John Blum @john_blum 1
  • 2. Unless otherwise indicated, these slides are © 2013 -2016 Piv otal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ History April 2015 SD GemFire 1.7 Branch for *Apache Geode June 2015 1.7.0.APACHE- GEODE-EA-M1 1.0.0- incubating.M1 April 2016 1.0.0.APACHE- GEODE- INCUBATING-M2 1.0.0- incubating.M2 October 2016 1.0.0.APACHE- GEODE- INCUBATING-M3 1.0.0- incubating.M3 November 2016 1.0.0.APACHE- GEODE- INCUBATING- RELEASE *1.0.0-incubating April 2017 SD Geode Kay 2.0.x 1.2.1 2
  • 3. Unless otherwise indicated, these slides are © 2013 -2016 Piv otal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ 3 Spring Data for Apache Geode Kay
  • 4. “Simple things should be simple; complex things should be possible” – Alan Kay
  • 5. Unless otherwise indicated, these slides are © 2013 -2016 Piv otal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Core Themes in SDG - 2017  Get Up & Running as Quickly and Easily as possible  Using  Make the Journey to the Cloud as Simple as possible  On 5 Spring Data Blog Post: $ diff –q spring-data-gemfire spring-data-geode
  • 6. Unless otherwise indicated, these slides are © 2013 -2016 Piv otal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ <dependency> <groupId>org.springframework.data</groupId> <artifactId>spring-data-gemfire</artifactId> <version>2.0.2.RELEASE</version> </dependency> <dependency> <groupId>org.springframework.data</groupId> <artifactId>spring-data-geode</artifactId> <version>2.0.2.RELEASE</version> </dependency> 6
  • 7. Unless otherwise indicated, these slides are © 2013 -2016 Piv otal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Spring Data Geode 2.0 (Kay) Apache Geode 1.2.1 7 Spring Data GemFire 2.0 (Kay) Pivotal GemFire 9.1.1 Apache Geode 1.2.1 Kay
  • 8. Unless otherwise indicated, these slides are © 2013 -2016 Piv otal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ 8 Spring Cloud
  • 9. Unless otherwise indicated, these slides are © 2013 -2016 Piv otal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ How does it work? New Annotation-based Configuration  Convention over Configuration  Use sensible defaults for all configuration parameters OOTB  Enable users to get up and running, quickly and easily (no hassle).  Allow user to override and customize the default, provided configuration https://docs.spring.io/spring-data/geode/docs/current/reference/html/#bootstrap-annotation-config 9
  • 10. Unless otherwise indicated, these slides are © 2013 -2016 Piv otal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ @Demo 11 https://docs.spring.io/spring-data/geode/docs/current/reference/html/#bootstrap-annotation-config
  • 11. Unless otherwise indicated, these slides are © 2013 -2016 Piv otal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Client Annotations 14 @SpringBootApplication @ClientCacheApplication public class MySpringBootApacheGeodeClient { .. }
  • 12. Unless otherwise indicated, these slides are © 2013 -2016 Piv otal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Client Annotations: Pools 15 @SpringBootApplication @ClientCacheApplication @EnablePools(pools = { @EnablePool(host = “hostname”, port = 1234), … }) public class MySpringBootApacheGeodeClient { .. }
  • 13. Unless otherwise indicated, these slides are © 2013 -2016 Piv otal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Client Annotations: Entity-defined Regions 16 @SpringBootApplication @ClientCacheApplication @EnableGemfireRepositories(basePackageClasses = EntityRepository.class) @EnableEntityDefinedRegions(basePackageClasses = EntityType.class) @EnableIndexing(..) public class MySpringBootApacheGeodeClient { .. } @Region(name = “Customers”) class Customer { @Id Long id; @Indexed(..) String name; @LuceneIndexed(..) String title; }
  • 14. Unless otherwise indicated, these slides are © 2013 -2016 Piv otal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Client Annotations: Caching-defined Regions 17 @SpringBootApplication @ClientCacheApplication @EnableGemfireCaching @EnableCachingDefinedRegions(..) public class MySpringBootApacheGeodeClient { .. } @Service class CustomerService { @Cacheable(“Accounts”) Account getAccount(Customer customer) { .. } }
  • 15. Unless otherwise indicated, these slides are © 2013 -2016 Piv otal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Client Annotations: Cluster Configuration* 18 @SpringBootApplication @ClientCacheApplication @EnableClusterConfiguration(useHttp = true) public class MySpringBootApacheGeodeClient { .. }
  • 16. Unless otherwise indicated, these slides are © 2013 -2016 Piv otal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Client Annotations: CQ 19 @SpringBootApplication @ClientCacheApplication @EnableContinuousQueries(..) public class MySpringBootApacheGeodeClient { .. } @Service class CustomerService { @ContinuousQuery(name = “CreditScoreUpdates”, query = “SELECT * FROM /Customers WHERE …”) void creditScoreChange(CqEvent event) { .. } }
  • 17. Unless otherwise indicated, these slides are © 2013 -2016 Piv otal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Client Annotations: Serialization 20 @SpringBootApplication @ClientCacheApplication @EnablePdx(..) public class MySpringBootApacheGeodeClient { .. } Registers the SDG o.s.d.g.mapping.MappingPdxSerializer by default
  • 18. Unless otherwise indicated, these slides are © 2013 -2016 Piv otal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Client Annotations: Security 21 @SpringBootApplication @ClientCacheApplication @EnableSecurity(..) @EnableSsl(..) public class MySpringBootApacheGeodeClient { .. } # application.properties spring.data.gemfire.security.username = jblum spring.data.gemfire.security.password = secret
  • 19. Unless otherwise indicated, these slides are © 2013 -2016 Piv otal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Client Annotations: Other 22 @SpringBootApplication @ClientCacheApplication @EnableGemFireProperties(..) @EnableLogging(logLevel = “info”, …) public class MySpringBootApacheGeodeClient { .. }
  • 20. Unless otherwise indicated, these slides are © 2013 -2016 Piv otal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Server Annotations 24 @SpringBootApplication @CacheServerApplication(name = “MySpringBootApacheGeodeServer”) public class MySpringBootApacheGeodeServer { .. }
  • 21. Unless otherwise indicated, these slides are © 2013 -2016 Piv otal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Server Annotations: CacheServers 25 @SpringBootApplication @CacheServerApplication(name = “MySpringBootApacheGeodeServer”) @EnableCacheServers(servers = { @EnableCacheServer(..), … }) public class MySpringBootApacheGeodeServer { .. }
  • 22. Unless otherwise indicated, these slides are © 2013 -2016 Piv otal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Server Annotations: Processes 26 @SpringBootApplication @CacheServerApplication(name = “MySpringBootApacheGeodeServer”) @EnableLocator(port = 11235) @EnableManager(port = 1199) public class MySpringBootApacheGeodeServer { .. }
  • 23. Unless otherwise indicated, these slides are © 2013 -2016 Piv otal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Server Annotations: Services 27 @SpringBootApplication @CacheServerApplication(name = “MySpringBootApacheGeodeServer”) @EnableHttpService(..) @EnableMemcachedServer(..) @EnableRedisServer(..) public class MySpringBootApacheGeodeServer { .. }
  • 24. Unless otherwise indicated, these slides are © 2013 -2016 Piv otal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Server Annotations: Regions 28 @SpringBootApplication @CacheServerApplication(name = “MySpringBootApacheGeodeServer”) @EnableCompression(..) @EnableDiskStores(diskStores = { @EnableDiskStore(..), … }) @EnableEntityDefinedRegions(basePackageClasses = EntityType.class) @EnableEviction(..) @EnableExpiration(..) @EnableOffHeap(memorySize = “1024g”) public class MySpringBootApacheGeodeServer { .. }
  • 25. Unless otherwise indicated, these slides are © 2013 -2016 Piv otal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Server Annotations: Expiration 29 @SpringBootApplication @CacheServerApplication(name = “MySpringBootApacheGeodeServer”) @EnableExpiration(..) … public class MySpringBootApacheGeodeServer { .. } @Region(”Customers”) @TimeToLiveExpiration(timeout = “600”, action = “LOCAL_DESTROY”) @IdleTimeoutExpiration(timeout = “120”, action = “INVALIDATE”) @Expiration(..) class Customer { .. } https://docs.spring.io/spring-data/geode/docs/current/reference/html/#bootstrap-annotation-config-region-expiration https://docs.spring.io/spring-data/geode/docs/current/reference/html/#bootstrap:region:expiration:annotation
  • 26. Unless otherwise indicated, these slides are © 2013 -2016 Piv otal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Server Annotations: Security 30 @SpringBootApplication @CacheServerApplication(name = “MySpringBootApacheGeodeServer”) @EnableSecurity(..) @EnableSsl(..) public class MySpringBootApacheGeodeServer { @Bean AuthorizingRealm ldapRealm(LdapContextFactory contextFactory) { DefaultLdapRealm ldapRealm = new DefaultLdapRealm(); ldapRealm.setContextFactory(contextFactory); return ldapRealm; } https://spring.io/blog/2016/11/10/spring-data-geode-1-0-0-incubating-release-released#apache-shiro-realms
  • 27. Unless otherwise indicated, these slides are © 2013 -2016 Piv otal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Server Annotations: Other 31 @SpringBootApplication @CacheServerApplication(name = “MySpringBootApacheGeodeServer”) @EnableGemFireProperties(remoteLocators = “..”, …) @EnableLogging(logLevel = “warning”, …) @EnableStatistics(..) public class MySpringBootApacheGeodeServer { .. }
  • 29. Unless otherwise indicated, these slides are © 2013 -2016 Piv otal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Annotations: Properties Configuration 33 @SpringBootApplication @ClientCacheApplication(locators = { @Locator(host = “HostnameOne”, port = 1111), @Locator(host = “HostnameTwo”, port = 2222), … }) public class MySpringBootApacheGeodeClient { .. }
  • 30. Unless otherwise indicated, these slides are © 2013 -2016 Piv otal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Annotations: Properties Configuration 34 @SpringBootApplication @ClientCacheApplication public class MySpringBootApacheGeodeClient { .. } # application.properties spring.data.gemfire.pool.locators=HostnameOne[1111],HostnameTwo[2222], … spring.data.gemfire.pool.default.locators=… spring.data.gemfire.pool.swimming.locators=… …
  • 31. Unless otherwise indicated, these slides are © 2013 -2016 Piv otal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Annotations: Properties Configuration 35 public @interface ClientCacheApplication { /** * Configures the GemFire {@link org.apache.geode.distributed.Locator Locators} to which * this cache client will connect. * * Use either the {@literal spring.data.gemfire.pool.default.locators} property * or the {@literal spring.data.gemfire.pool.locators} property in {@literal application.properties}. */ Locator[] locators() default {}; … } https://docs.spring.io/spring-data/geode/docs/current/api/org/springframework/data/gemfire/config/annotation/ClientCacheApplication.html
  • 32. Unless otherwise indicated, these slides are © 2013 -2016 Piv otal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Annotations: Configurers 36 @SpringBootApplication @ClientCacheApplication public class MySpringBootApacheGeodeClient { @Bean ClientCacheConfigurer locatorsConfigurer( @Value(“${geode.locators.hostsPorts:localhost[10334]}”) String hostsPorts) { return (beanName, clientCacheFactoryBean) -> clientCacheFactoryBean.setLocators( ConnectionEndpointList.parse(10334, hostsPorts)); } }
  • 33. Unless otherwise indicated, these slides are © 2013 -2016 Piv otal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ What’s Next? • Function Executions from Repository • Paging support in Repository • Query Projections • Reactive Repository extensions for CQ • Spring Security support • Annotation support for CacheCallbacks • Auto-generated IDs (Region keys) • New Spring-driven Test (Context) Framework 37
  • 34. Unless otherwise indicated, these slides are © 2013 -2016 Piv otal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Function Executions from Repository 38 public interface CustomerRepository implements CrudRepository<Customer, Long> { @Function(..) CreditScore calculateCreditScore(Customer customer); } Customer jonDoe = … CreditScore creditScore = customerRepository.calculateCreditScore(jonDoe);
  • 35. Unless otherwise indicated, these slides are © 2013 -2016 Piv otal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Paging (& Sorting) Support 39 public interface CustomerRepository implements CrudRepository<Customer, Long> { List<Customer> findByLastNameOrderByCustomerFirstNameAsc( String firstName); List<Customer> findByLastName(String lastName, Sort sort); // NEW! Page<Customer> findTop100ByCreditScoreGreaterThan(CreditScore score, Pageable pageable); }
  • 36. Unless otherwise indicated, these slides are © 2013 -2016 Piv otal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Query Projections (DTO) 40 public interface CustomerRepository implements CrudRepository<Customer, Long> { Iterable<CustomerNameProjection> findByLastName(String lastName); } @Region(“Customers”) class Customer { @Id Long id; String firstName, lastName; String getName() { return String.format(“%1$s %2$s”, firstName, lastName); } class CustomerNameProjection { String name; }
  • 37. Unless otherwise indicated, these slides are © 2013 -2016 Piv otal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Reactive Repository Extensions for CQ 41 public interface CustomerRepository implements CrudRepository<Customer, Long> { @ContinuousQuery(..) Flux<Customer> findByCreditScoreGreaterThanAndCreditScoreLessThan( CreditScore low, CreditScore high); }
  • 38. Unless otherwise indicated, these slides are © 2013 -2016 Piv otal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Annotation-based CacheCallbacks Support 42 @Component public class MyCallbacks { @CacheListener(regions = { “Customers”, “Accounts” }) public <K, V> void afterCreate(EntryEvent<K, V> event) { .. } @CacheWriter(region = “Customers”) public <K, V> void beforeCreate(EntryEvent(K, V> event) { .. } . . . }
  • 39. Unless otherwise indicated, these slides are © 2013 -2016 Piv otal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Unit Testing Apache Geode with Spring With Integration Testing support in-progress… @TestDemo 43 https://github.com/jxblum/spring-data-tests-4-gemfire
  • 40. Unless otherwise indicated, these slides are © 2013 -2016 Piv otal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Spring Data Geode 2.1 (Lovelace) Apache Geode 1.3.0 44 Spring Data GemFire 2.1 (Lovelace) Pivotal GemFire 9.2.0 Apache Geode 1.3.0
  • 41. Unless otherwise indicated, these slides are © 2013 -2016 Piv otal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ References • Reference Documentation: https://docs.spring.io/spring-data/geode/docs/current/reference/html/ • Javadoc: https://docs.spring.io/spring-data/geode/docs/current/api/ • GitHub: https://github.com/spring-projects/spring-data-geode • JIRA: https://jira.spring.io/browse/DATAGEODE • StackOverflow: https://stackoverflow.com/questions/tagged/spring-data-gemfire • Presentation Examples: https://github.com/jxblum/simple-spring-geode-application • Examples: https://github.com/jxblum/contacts-application Me: @john_blum (Twitter) https://spring.io/team/jxblum (GitHub)
  • 43. 47© 2014 Pivotal Software, Inc. All rights reserved. Thank You
  • 44. Learn More. Stay Connected. Refactoring to a System of Systems - Oliver Gierke Thursday @ 11:50 AM – Room #2008 48 #springone@s1p

Editor's Notes

  • #4: Spring Data for Apache Geode joins the Spring Data Kay Release Train as of RC1 Regular, predictable release cadence
  • #5: Misconceptions about Spring… Spring is a Web Application Framework Spring’s programming model is unique and Spring uses it’s own conventions Built on fundamental OO principles (POJO) Software Design Patterns (IoC/DI, AOP) and… Builds on Standards Open Source (OSS)
  • #7: No Code Changes No Import Statement Changes No Class Name Changes (Geode -> GemFire; Geode -> GemFire) Pivotal GemFire uses the org.apache.geode package namespace Apache Geode uses Pivotal GemFire class names… org.apache.geode.cache.GemFireCacheImpl
  • #9: To the Cloud (from the IDE) and back again
  • #14: SDG Repository infrastructure and extension already supports Sorting https://docs.spring.io/spring-data/commons/docs/current/reference/html/#repositories.special-parameters
  • #15: SDG Repository infrastructure and extension already supports Sorting https://docs.spring.io/spring-data/commons/docs/current/reference/html/#repositories.special-parameters
  • #16: SDG Repository infrastructure and extension already supports Sorting https://docs.spring.io/spring-data/commons/docs/current/reference/html/#repositories.special-parameters
  • #17: SDG Repository infrastructure and extension already supports Sorting https://docs.spring.io/spring-data/commons/docs/current/reference/html/#repositories.special-parameters
  • #18: SDG Repository infrastructure and extension already supports Sorting https://docs.spring.io/spring-data/commons/docs/current/reference/html/#repositories.special-parameters
  • #19: SDG Repository infrastructure and extension already supports Sorting https://docs.spring.io/spring-data/commons/docs/current/reference/html/#repositories.special-parameters
  • #20: SDG Repository infrastructure and extension already supports Sorting https://docs.spring.io/spring-data/commons/docs/current/reference/html/#repositories.special-parameters
  • #21: SDG Repository infrastructure and extension already supports Sorting https://docs.spring.io/spring-data/commons/docs/current/reference/html/#repositories.special-parameters
  • #22: SDG Repository infrastructure and extension already supports Sorting https://docs.spring.io/spring-data/commons/docs/current/reference/html/#repositories.special-parameters
  • #23: SDG Repository infrastructure and extension already supports Sorting https://docs.spring.io/spring-data/commons/docs/current/reference/html/#repositories.special-parameters
  • #31: Define multiple Apache Shiro Realms; Order them.
  • #33: Annotation attributes are strongly-typed
  • #34: SDG Repository infrastructure and extension already supports Sorting https://docs.spring.io/spring-data/commons/docs/current/reference/html/#repositories.special-parameters
  • #35: SDG Repository infrastructure and extension already supports Sorting https://docs.spring.io/spring-data/commons/docs/current/reference/html/#repositories.special-parameters
  • #36: SDG Repository infrastructure and extension already supports Sorting https://docs.spring.io/spring-data/commons/docs/current/reference/html/#repositories.special-parameters
  • #37: SDG Repository infrastructure and extension already supports Sorting https://docs.spring.io/spring-data/commons/docs/current/reference/html/#repositories.special-parameters
  • #39: Similar to SDG’s Function Execution support with @OnRegion today. https://docs.spring.io/spring-data/geode/docs/current/reference/html/#function-annotations https://docs.spring.io/spring-data/geode/docs/current/reference/html/#function-execution
  • #40: SDG Repository infrastructure and extension already supports Sorting https://docs.spring.io/spring-data/commons/docs/current/reference/html/#repositories.special-parameters
  • #41: The Value-Type DTO https://docs.spring.io/spring-data/commons/docs/current/reference/html/#projections.dtos