SlideShare uma empresa Scribd logo
1 de 38
2© 2014 Pivotal Software, Inc. All rights reserved. 2© 2014 Pivotal Software, Inc. All rights reserved.
Building Effective Apache Geode
Applications with Spring Data GemFire
John Blum - @john_blum
© 2015 - Pivotal Software, Inc.
3© 2014 Pivotal Software, Inc. All rights reserved.
Presenter
John Blum
Spring Data GemFire Project Lead
Apache Geode Committer
GemFire Engineer/Technical Lead
Responsibilities…
• Management & Monitoring (Gfsh)
• Management REST API
• Developer REST API
• Spring Data GemFire (v1.3.3 – current)
4© 2014 Pivotal Software, Inc. All rights reserved.
Agenda
 Quick Overview of Apache Geode
 Spring Data GemFire
– Configuration / Bootstrapping
– Data Access (DAO patterns)
– Function Execution
– Caching (JSR-107)
 Conclusion
 QA
5© 2014 Pivotal Software, Inc. All rights reserved.
Why Apache Geode?
Motivation…
1. Volume of Data (Big Data)
2. Rate of Data (Fast Data)
3. Verity of Data (Data Accuracy)
Enables new and existing Java applications to operate at cloud-scale in a
consistent, highly-available and predictable manner in order to transact and
analyze big, fast data in real-time thereby achieving meaningful and impactful
business results.
6© 2014 Pivotal Software, Inc. All rights reserved.
What is Apache Geode?
“A distributed, in-memory compute and
data management platform that
elastically scales to achieve high-
throughput, low-latency access to big,
fast data powering business critical,
analytical applications in real-time.”
– John Blum
Elastic capacity +/-
Nodes
Ops /
SecLinear scalability
Latency optimized
data distribution
7© 2014 Pivotal Software, Inc. All rights reserved.
How Apache Geode Works?
 Stores data In-Memory
– JVM Heap + Off-Heap
 Functions as a Distributed System, In-Memory Data Grid (IMDG)
– Pools system resources across multiple nodes in a cluster to manage both
application state and behavior
– Includes: Memory, CPU, Network & (optionally) Disk
8© 2014 Pivotal Software, Inc. All rights reserved.
Characteristics of Apache Geode
 Open Source
 In-Memory
 Distributed
 Scalable (scale-out)
 High Throughput & Low/Predictable Latency
 Highly Available
 Consistent
 Durable
 Fault Tolerant (resilient)
 Data-Aware / Parallel Compute
9© 2014 Pivotal Software, Inc. All rights reserved.
Apache Geode Use Cases
 Persistent, OLTP/OLAP Database (System of Record)
 JSR-107 Cache Provider (Key/Value Store)
 HTTP Session State Management
 Distributed L2 Caching for Hibernate
 Memcached Server (Gemcached)
 Glorified version of ConcurrentHashMap
 Message Bus with guaranteed message delivery
10© 2014 Pivotal Software, Inc. All rights reserved. 10© 2014 Pivotal Software, Inc. All rights reserved.
Spring Data GemFire
For Apache Geode
http://projects.spring.io/spring-data-gemfire/
11© 2014 Pivotal Software, Inc. All rights reserved.
“Simple things should be simple;
complex things should be possible”
– Alan Kay
12© 2014 Pivotal Software, Inc. All rights reserved.
Spring Data GemFire (SDG)
Applies Spring's powerful, non-invasive programming model in a consistent
fashion to simplify configuration and development of Apache Geode applications.
Spring Ecosystem Integration…
– Spring Cache Abstraction / Transaction Management
– Spring Data Commons + REST
– Spring Integration (Inbound/Outbound Channel Adapters)
– Spring Session (coming soon…)
– Spring XD (Sources & Sinks)
13© 2014 Pivotal Software, Inc. All rights reserved.
+ +
Apache Geode with Spring Data GemFire and Spring’s Cache
Abstraction is a JSR-107 (JCache) caching provider
14© 2014 Pivotal Software, Inc. All rights reserved.
GRAILS
Full-stack, Web
XD
Stream, Taps, Jobs
BOOT
Bootable, Minimal, Ops-Ready
Big,
Fast,
Flexible
Data Web,
Integration,
Batch
WEB
Controllers, REST,
WebSocket
INTEGRATION
Channels, Adapters,
Filters, Transformers
BATCH
Jobs, Steps,
Readers, Writers
BIG DATA
Ingestion, Export,
Orchestration, Hadoop
DATA
NON-RELATIONALRELATIONAL
CORE
GROOVYFRAMEWORK SECURITY REACTOR
15© 2014 Pivotal Software, Inc. All rights reserved.
Spring Data GemFire Use Cases
 Configure & Bootstrap Apache Geode
– Replacement for cache.xml; Can be used with Cluster Configuration
 Build an Application Peer Cache (Cache)
– Embedded Cache
 Build an Application Cache Client (ClientCache)
– Client/Server
16© 2014 Pivotal Software, Inc. All rights reserved.
Spring Data GemFire / Apache Geode Coordinates
<repository>
<id>spring-libs-snapshot</id>
<name>Spring Maven libs-snapshot Repository</name>
<url>https://repo.spring.io/libs-snapshot</url>
</repository>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-gemfire</artifactId>
<version>1.7.0.APACHE-GEODE-EA-SNAPSHOT</version>
</dependency>
17© 2014 Pivotal Software, Inc. All rights reserved.
Spring-based Configuration
XML Java-based Configuration
18© 2014 Pivotal Software, Inc. All rights reserved.
Bootstrapping Apache Geode with Spring
@SpringBootApplication
@ImportResource("/spring-gemfire-context.xml")
public class SpringGemFireApplication {
public static void main(String[] args) {
SpringApplication.run(SpringGemFireApplication.class, args);
}
}
gfsh>start server -–name=Example --spring-xml-location=
<classpath-to-spring-application-context.xml>
19© 2014 Pivotal Software, Inc. All rights reserved.
Example
20© 2014 Pivotal Software, Inc. All rights reserved.
Data Access with Spring
Basic (Region) Data Access Object (DAO)…
@Repository
public class GolferDao extends DaoSupport {
@Resource(name = “Golfers”)
private Region<Long, Golfer> golfers;
…
}
21© 2014 Pivotal Software, Inc. All rights reserved.
Data Access with SDG GemfireTemplate
Advantages
 Simple, Convenient Data Access API (CRUD, OQL, Function)
 Protects developer from GemFire/Geode API changes
 Exception Translation into Spring DAO Exception Hierarchy
 Transaction Management
<bean id=“golfersTemplate” class=“org.springframework.data.gemfire.GemfireTemplate”
p:region-ref=“Golfers”/>
22© 2014 Pivotal Software, Inc. All rights reserved.
Data Access with Spring Data Repositories
Advantages
 Simple, interface-based, Spring Data Repository definition (CRUD, Querying)
 Convention over Configuration (Querying)
 Portable
 Exception Translation & Transaction Management Support
public interface GolferRepository extends CrudRepository<Golfer, Long> {
List<Golfer> findByName(String name);
}
23© 2014 Pivotal Software, Inc. All rights reserved.
Example
24© 2014 Pivotal Software, Inc. All rights reserved.
Annotation-based Function Support
Spring Data GemFire introduces annotation support for Function implementation
and execution.
 Functions are implemented as POJO methods
 Functions are invoked using Object-Oriented method invocation.
SDG supports…
 @OnServer / @OnServers (from client only)
 @OnMember / @OnMembers (from peer only)
 @OnRegion (from either client or peer)
25© 2014 Pivotal Software, Inc. All rights reserved.
Annotation-based Function Implementation
package example.app.function;
@Component
class CustomerFunctions {
@GemfireFunction
public Customer update(Address address, PhoneNumber phoneNumber) { … }
@GemfireFunction(id = “MyFunction” HA=true)
public List<?> functionTwo(FunctionContext funcCtx, @Filter Set<?> keys, …) { … }
}
<gfe:annotation-driven/>
<!– optional when using <context:annotation-config> or <context:component-scan> -->
<bean class=“example.app.function.CustomerFunctions”/>
26© 2014 Pivotal Software, Inc. All rights reserved.
Annotation-based Function Execution
package example.app.function.executions;
@OnRegion(“Customers”)
interface CustomersFunctionExecution {
Customer update(Address address, PhoneNumber phoneNumber);
}
<gfe-data:function-executions base-package=“example.app.function.executions”/>
@Component
class ApplicationComponent {
@Autowired
private CustomersFunctionExecution customersFunction;
public Customer someMethod(Address address, PhoneNumber phoneNumber) {
return customersFunction.update(address, phoneNumber);
}
27© 2014 Pivotal Software, Inc. All rights reserved.
Example
28© 2014 Pivotal Software, Inc. All rights reserved.
Spring Cache Abstraction
Caching is useful in cases when an “expensive” operation (i.e. CPU, IO bound)
produces the same output given identical input; results can be reused.
Spring enables Declarative, Annotation-based Caching…
 @Cacheable – triggers cache population
 @CacheEvict – triggers cache eviction
 @CachePut – updates cache without interfering with method execution
 @Caching – groups multiple cache operations per method
 @CacheConfig – class-level cache-related settings
29© 2014 Pivotal Software, Inc. All rights reserved.
Spring Supports JSR-107 (JCache)
Spring JCache
@Cacheable @CacheResult
@CachePut @CachePut
@CacheEvict @CacheRemove
@CacheEvict(allEntries=true) @CacheRemoveAll
@CacheConfig @CacheDefaults
http://docs.spring.io/spring/docs/current/spring-framework-reference/htmlsingle/#cache-jsr-107
30© 2014 Pivotal Software, Inc. All rights reserved.
Apache Geode Caching Provider
@Configuration
@EnableCaching
@Import(GemFireConfiguration.class)
class ApplicationConfiguration {
@Bean
public CacheManager cacheManager(
Cache gemfireCache) {
GemfireCacheManager cacheManager =
new GemfireCacheManager();
cacheManager.setCache(gemfireCache);
return cacheManager;
}
}
<beans …
xmlns:cache=“http://www.springframework.org/schema/cach
e”…>
<gfe:cache properties-
ref="gemfireProperties"/>
<cache:annotation-driven/>
<bean id="cacheManager" class=
”o.s.data.gemfire.support.GemfireCacheManager"
p:cache-ref="gemfireCache"/>
31© 2014 Pivotal Software, Inc. All rights reserved.
Example
32© 2014 Pivotal Software, Inc. All rights reserved.
Conclusion
33© 2014 Pivotal Software, Inc. All rights reserved.
Apache Geode References
 Project Page - http://geode.incubator.apache.org/contribute/
 Contribute - http://geode.incubator.apache.org/contribute/
– Ideas - https://cwiki.apache.org/confluence/display/GEODE/How+to+Contribute
 Community Events - http://geode.incubator.apache.org/community/
 Documentation - http://geode.incubator.apache.org/docs/
– Docs Project - https://github.com/project-geode/docs
 Source Code - https://github.com/apache/incubator-geode
 JIRA - https://issues.apache.org/jira/browse/GEODE
 StackOverflow - http://stackoverflow.com/questions/tagged/gemfire+and+geode
34© 2014 Pivotal Software, Inc. All rights reserved.
Spring Data GemFire References
 Project Page - http://projects.spring.io/spring-data/
 Documentation –
– Reference Guide - http://docs.spring.io/spring-data-gemfire/docs/current/reference/html/
– API - http://docs.spring.io/spring-data-gemfire/docs/current/api/
– Spring IO Guides - http://spring.io/guides
– Spring GemFire Examples –
 Source Code - https://github.com/spring-projects/spring-data-gemfire
 Examples - https://github.com/spring-projects/spring-gemfire-examples
 JIRA – https://jira.spring.io/browse/SGF
 StackOverflow - http://stackoverflow.com/questions/tagged/spring-data-gemfire
35© 2014 Pivotal Software, Inc. All rights reserved. 3
Building High-Scalable Spring Applications with In-Memory Data Grids
September 15th, 2015 – 10:30 am – 12 pm
Learn More. Stay Connected.
@springcentral Spring.io/video
https://2015.event.springone2gx.com/schedule/sessions/building_highly_scalable_spring_applications_with_in_memory_distribute
d_data_grids.html
36© 2014 Pivotal Software, Inc. All rights reserved. 36© 2014 Pivotal Software, Inc. All rights reserved.
Q&A
Any questions…
37© 2014 Pivotal Software, Inc. All rights reserved. 37© 2014 Pivotal Software, Inc. All rights reserved.
Thank You
Building Effective Apache Geode Applications with Spring Data GemFire

Mais conteúdo relacionado

Mais procurados

Scale Out Your Big Data Apps: The Latest on Pivotal GemFire and GemFire XD
Scale Out Your Big Data Apps: The Latest on Pivotal GemFire and GemFire XDScale Out Your Big Data Apps: The Latest on Pivotal GemFire and GemFire XD
Scale Out Your Big Data Apps: The Latest on Pivotal GemFire and GemFire XDVMware Tanzu
 
GemFire In Memory Data Grid
GemFire In Memory Data GridGemFire In Memory Data Grid
GemFire In Memory Data GridDmitry Buzdin
 
YARN Containerized Services: Fading The Lines Between On-Prem And Cloud
YARN Containerized Services: Fading The Lines Between On-Prem And CloudYARN Containerized Services: Fading The Lines Between On-Prem And Cloud
YARN Containerized Services: Fading The Lines Between On-Prem And CloudDataWorks Summit
 
SpringCamp 2016 - Apache Geode 와 Spring Data Gemfire
SpringCamp 2016 - Apache Geode 와 Spring Data GemfireSpringCamp 2016 - Apache Geode 와 Spring Data Gemfire
SpringCamp 2016 - Apache Geode 와 Spring Data GemfireJay Lee
 
Build your first Internet of Things app today with Open Source
Build your first Internet of Things app today with Open SourceBuild your first Internet of Things app today with Open Source
Build your first Internet of Things app today with Open SourceApache Geode
 
Apache Geode Meetup, Cork, Ireland at CIT
Apache Geode Meetup, Cork, Ireland at CITApache Geode Meetup, Cork, Ireland at CIT
Apache Geode Meetup, Cork, Ireland at CITApache Geode
 
Cloud Native PostgreSQL
Cloud Native PostgreSQLCloud Native PostgreSQL
Cloud Native PostgreSQLEDB
 
Hive LLAP: A High Performance, Cost-effective Alternative to Traditional MPP ...
Hive LLAP: A High Performance, Cost-effective Alternative to Traditional MPP ...Hive LLAP: A High Performance, Cost-effective Alternative to Traditional MPP ...
Hive LLAP: A High Performance, Cost-effective Alternative to Traditional MPP ...DataWorks Summit
 
Building Apps with Distributed In-Memory Computing Using Apache Geode
Building Apps with Distributed In-Memory Computing Using Apache GeodeBuilding Apps with Distributed In-Memory Computing Using Apache Geode
Building Apps with Distributed In-Memory Computing Using Apache GeodePivotalOpenSourceHub
 
Apache Geode - The First Six Months
Apache Geode -  The First Six MonthsApache Geode -  The First Six Months
Apache Geode - The First Six MonthsAnthony Baker
 
Hadoop {Submarine} Project: Running Deep Learning Workloads on YARN
Hadoop {Submarine} Project: Running Deep Learning Workloads on YARNHadoop {Submarine} Project: Running Deep Learning Workloads on YARN
Hadoop {Submarine} Project: Running Deep Learning Workloads on YARNDataWorks Summit
 
Running Enterprise Workloads in the Cloud
Running Enterprise Workloads in the CloudRunning Enterprise Workloads in the Cloud
Running Enterprise Workloads in the CloudDataWorks Summit
 
Not all open source is the same
Not all open source is the sameNot all open source is the same
Not all open source is the sameEDB
 
Apache Geode (incubating) Introduction with Docker
Apache Geode (incubating) Introduction with DockerApache Geode (incubating) Introduction with Docker
Apache Geode (incubating) Introduction with DockerWilliam Markito Oliveira
 
Next Generation Scheduling for YARN and K8s: For Hybrid Cloud/On-prem Environ...
Next Generation Scheduling for YARN and K8s: For Hybrid Cloud/On-prem Environ...Next Generation Scheduling for YARN and K8s: For Hybrid Cloud/On-prem Environ...
Next Generation Scheduling for YARN and K8s: For Hybrid Cloud/On-prem Environ...DataWorks Summit
 
Apache Geode Meetup, London
Apache Geode Meetup, LondonApache Geode Meetup, London
Apache Geode Meetup, LondonApache Geode
 
How to Design for Database High Availability
How to Design for Database High AvailabilityHow to Design for Database High Availability
How to Design for Database High AvailabilityEDB
 
Deep Dive - Usage of on premises data gateway for hybrid integration scenarios
Deep Dive - Usage of on premises data gateway for hybrid integration scenariosDeep Dive - Usage of on premises data gateway for hybrid integration scenarios
Deep Dive - Usage of on premises data gateway for hybrid integration scenariosSajith C P Nair
 

Mais procurados (20)

Scale Out Your Big Data Apps: The Latest on Pivotal GemFire and GemFire XD
Scale Out Your Big Data Apps: The Latest on Pivotal GemFire and GemFire XDScale Out Your Big Data Apps: The Latest on Pivotal GemFire and GemFire XD
Scale Out Your Big Data Apps: The Latest on Pivotal GemFire and GemFire XD
 
GemFire In Memory Data Grid
GemFire In Memory Data GridGemFire In Memory Data Grid
GemFire In Memory Data Grid
 
YARN Containerized Services: Fading The Lines Between On-Prem And Cloud
YARN Containerized Services: Fading The Lines Between On-Prem And CloudYARN Containerized Services: Fading The Lines Between On-Prem And Cloud
YARN Containerized Services: Fading The Lines Between On-Prem And Cloud
 
SpringCamp 2016 - Apache Geode 와 Spring Data Gemfire
SpringCamp 2016 - Apache Geode 와 Spring Data GemfireSpringCamp 2016 - Apache Geode 와 Spring Data Gemfire
SpringCamp 2016 - Apache Geode 와 Spring Data Gemfire
 
Build your first Internet of Things app today with Open Source
Build your first Internet of Things app today with Open SourceBuild your first Internet of Things app today with Open Source
Build your first Internet of Things app today with Open Source
 
Geode Meetup Apachecon
Geode Meetup ApacheconGeode Meetup Apachecon
Geode Meetup Apachecon
 
Apache Geode Meetup, Cork, Ireland at CIT
Apache Geode Meetup, Cork, Ireland at CITApache Geode Meetup, Cork, Ireland at CIT
Apache Geode Meetup, Cork, Ireland at CIT
 
ApexMeetup Geode - Talk1 2016-03-17
ApexMeetup Geode - Talk1 2016-03-17ApexMeetup Geode - Talk1 2016-03-17
ApexMeetup Geode - Talk1 2016-03-17
 
Cloud Native PostgreSQL
Cloud Native PostgreSQLCloud Native PostgreSQL
Cloud Native PostgreSQL
 
Hive LLAP: A High Performance, Cost-effective Alternative to Traditional MPP ...
Hive LLAP: A High Performance, Cost-effective Alternative to Traditional MPP ...Hive LLAP: A High Performance, Cost-effective Alternative to Traditional MPP ...
Hive LLAP: A High Performance, Cost-effective Alternative to Traditional MPP ...
 
Building Apps with Distributed In-Memory Computing Using Apache Geode
Building Apps with Distributed In-Memory Computing Using Apache GeodeBuilding Apps with Distributed In-Memory Computing Using Apache Geode
Building Apps with Distributed In-Memory Computing Using Apache Geode
 
Apache Geode - The First Six Months
Apache Geode -  The First Six MonthsApache Geode -  The First Six Months
Apache Geode - The First Six Months
 
Hadoop {Submarine} Project: Running Deep Learning Workloads on YARN
Hadoop {Submarine} Project: Running Deep Learning Workloads on YARNHadoop {Submarine} Project: Running Deep Learning Workloads on YARN
Hadoop {Submarine} Project: Running Deep Learning Workloads on YARN
 
Running Enterprise Workloads in the Cloud
Running Enterprise Workloads in the CloudRunning Enterprise Workloads in the Cloud
Running Enterprise Workloads in the Cloud
 
Not all open source is the same
Not all open source is the sameNot all open source is the same
Not all open source is the same
 
Apache Geode (incubating) Introduction with Docker
Apache Geode (incubating) Introduction with DockerApache Geode (incubating) Introduction with Docker
Apache Geode (incubating) Introduction with Docker
 
Next Generation Scheduling for YARN and K8s: For Hybrid Cloud/On-prem Environ...
Next Generation Scheduling for YARN and K8s: For Hybrid Cloud/On-prem Environ...Next Generation Scheduling for YARN and K8s: For Hybrid Cloud/On-prem Environ...
Next Generation Scheduling for YARN and K8s: For Hybrid Cloud/On-prem Environ...
 
Apache Geode Meetup, London
Apache Geode Meetup, LondonApache Geode Meetup, London
Apache Geode Meetup, London
 
How to Design for Database High Availability
How to Design for Database High AvailabilityHow to Design for Database High Availability
How to Design for Database High Availability
 
Deep Dive - Usage of on premises data gateway for hybrid integration scenarios
Deep Dive - Usage of on premises data gateway for hybrid integration scenariosDeep Dive - Usage of on premises data gateway for hybrid integration scenarios
Deep Dive - Usage of on premises data gateway for hybrid integration scenarios
 

Destaque

Using Apache Calcite for Enabling SQL and JDBC Access to Apache Geode and Oth...
Using Apache Calcite for Enabling SQL and JDBC Access to Apache Geode and Oth...Using Apache Calcite for Enabling SQL and JDBC Access to Apache Geode and Oth...
Using Apache Calcite for Enabling SQL and JDBC Access to Apache Geode and Oth...Christian Tzolov
 
#GeodeSummit - Off-Heap Storage Current and Future Design
#GeodeSummit - Off-Heap Storage Current and Future Design#GeodeSummit - Off-Heap Storage Current and Future Design
#GeodeSummit - Off-Heap Storage Current and Future DesignPivotalOpenSourceHub
 
#GeodeSummit - Redis to Geode Adaptor
#GeodeSummit - Redis to Geode Adaptor#GeodeSummit - Redis to Geode Adaptor
#GeodeSummit - Redis to Geode AdaptorPivotalOpenSourceHub
 
#GeodeSummit - Large Scale Fraud Detection using GemFire Integrated with Gree...
#GeodeSummit - Large Scale Fraud Detection using GemFire Integrated with Gree...#GeodeSummit - Large Scale Fraud Detection using GemFire Integrated with Gree...
#GeodeSummit - Large Scale Fraud Detection using GemFire Integrated with Gree...PivotalOpenSourceHub
 
Open Sourcing GemFire - Apache Geode
Open Sourcing GemFire - Apache GeodeOpen Sourcing GemFire - Apache Geode
Open Sourcing GemFire - Apache GeodeApache Geode
 
Introduction to Apache Calcite
Introduction to Apache CalciteIntroduction to Apache Calcite
Introduction to Apache CalciteJordan Halterman
 
IoT Architecture - are traditional architectures good enough?
IoT Architecture - are traditional architectures good enough?IoT Architecture - are traditional architectures good enough?
IoT Architecture - are traditional architectures good enough?Guido Schmutz
 
Matthew Hartman cv.docx (1)
Matthew Hartman cv.docx (1)Matthew Hartman cv.docx (1)
Matthew Hartman cv.docx (1)matthew hartman
 

Destaque (11)

Using Apache Calcite for Enabling SQL and JDBC Access to Apache Geode and Oth...
Using Apache Calcite for Enabling SQL and JDBC Access to Apache Geode and Oth...Using Apache Calcite for Enabling SQL and JDBC Access to Apache Geode and Oth...
Using Apache Calcite for Enabling SQL and JDBC Access to Apache Geode and Oth...
 
#GeodeSummit - Off-Heap Storage Current and Future Design
#GeodeSummit - Off-Heap Storage Current and Future Design#GeodeSummit - Off-Heap Storage Current and Future Design
#GeodeSummit - Off-Heap Storage Current and Future Design
 
#GeodeSummit - Redis to Geode Adaptor
#GeodeSummit - Redis to Geode Adaptor#GeodeSummit - Redis to Geode Adaptor
#GeodeSummit - Redis to Geode Adaptor
 
#GeodeSummit - Large Scale Fraud Detection using GemFire Integrated with Gree...
#GeodeSummit - Large Scale Fraud Detection using GemFire Integrated with Gree...#GeodeSummit - Large Scale Fraud Detection using GemFire Integrated with Gree...
#GeodeSummit - Large Scale Fraud Detection using GemFire Integrated with Gree...
 
Open Sourcing GemFire - Apache Geode
Open Sourcing GemFire - Apache GeodeOpen Sourcing GemFire - Apache Geode
Open Sourcing GemFire - Apache Geode
 
Introduction to Apache Calcite
Introduction to Apache CalciteIntroduction to Apache Calcite
Introduction to Apache Calcite
 
IoT Architecture - are traditional architectures good enough?
IoT Architecture - are traditional architectures good enough?IoT Architecture - are traditional architectures good enough?
IoT Architecture - are traditional architectures good enough?
 
Connections
ConnectionsConnections
Connections
 
La memoria
La memoriaLa memoria
La memoria
 
cv..eg -
cv..eg -cv..eg -
cv..eg -
 
Matthew Hartman cv.docx (1)
Matthew Hartman cv.docx (1)Matthew Hartman cv.docx (1)
Matthew Hartman cv.docx (1)
 

Semelhante a Building Effective Apache Geode Applications with Spring Data GemFire

#GeodeSummit - Spring Data GemFire API Current and Future
#GeodeSummit - Spring Data GemFire API Current and Future#GeodeSummit - Spring Data GemFire API Current and Future
#GeodeSummit - Spring Data GemFire API Current and FuturePivotalOpenSourceHub
 
Part 4: Custom Buildpacks and Data Services (Pivotal Cloud Platform Roadshow)
Part 4: Custom Buildpacks and Data Services (Pivotal Cloud Platform Roadshow)Part 4: Custom Buildpacks and Data Services (Pivotal Cloud Platform Roadshow)
Part 4: Custom Buildpacks and Data Services (Pivotal Cloud Platform Roadshow)VMware Tanzu
 
Building and managing applications fast for IBM i
Building and managing applications fast for IBM iBuilding and managing applications fast for IBM i
Building and managing applications fast for IBM iZend by Rogue Wave Software
 
Custom Buildpacks and Data Services
Custom Buildpacks and Data ServicesCustom Buildpacks and Data Services
Custom Buildpacks and Data ServicesTom Kranz
 
PaaS on Openstack
PaaS on OpenstackPaaS on Openstack
PaaS on OpenstackOpen Stack
 
Building microservice for api with helidon and cicd pipeline
Building microservice for api with helidon and cicd pipelineBuilding microservice for api with helidon and cicd pipeline
Building microservice for api with helidon and cicd pipelineDonghuKIM2
 
SAP Inside Track Singapore 2014
SAP Inside Track Singapore 2014SAP Inside Track Singapore 2014
SAP Inside Track Singapore 2014mharkus
 
Spring Data and In-Memory Data Management in Action
Spring Data and In-Memory Data Management in ActionSpring Data and In-Memory Data Management in Action
Spring Data and In-Memory Data Management in ActionJohn Blum
 
Micro services vs hadoop
Micro services vs hadoopMicro services vs hadoop
Micro services vs hadoopGergely Devenyi
 
Oracle Coherence Strategy and Roadmap (OpenWorld, September 2014)
Oracle Coherence Strategy and Roadmap (OpenWorld, September 2014)Oracle Coherence Strategy and Roadmap (OpenWorld, September 2014)
Oracle Coherence Strategy and Roadmap (OpenWorld, September 2014)jeckels
 
Apigee deploy grunt plugin.1.0
Apigee deploy grunt plugin.1.0Apigee deploy grunt plugin.1.0
Apigee deploy grunt plugin.1.0Diego Zuluaga
 
Timings API: Performance Assertion during the functional testing
 Timings API: Performance Assertion during the functional testing Timings API: Performance Assertion during the functional testing
Timings API: Performance Assertion during the functional testingPetrosPlakogiannis
 
SAP Kapsel Plugins For Cordova
SAP Kapsel Plugins For CordovaSAP Kapsel Plugins For Cordova
SAP Kapsel Plugins For CordovaChris Whealy
 
Next gen tech from QuickXpert Infotech
Next gen tech   from QuickXpert InfotechNext gen tech   from QuickXpert Infotech
Next gen tech from QuickXpert InfotechNarendra Jakhotia
 
Java 9 New Features | Java Tutorial | What’s New in Java 9 | Java 9 Features ...
Java 9 New Features | Java Tutorial | What’s New in Java 9 | Java 9 Features ...Java 9 New Features | Java Tutorial | What’s New in Java 9 | Java 9 Features ...
Java 9 New Features | Java Tutorial | What’s New in Java 9 | Java 9 Features ...Edureka!
 

Semelhante a Building Effective Apache Geode Applications with Spring Data GemFire (20)

#GeodeSummit - Spring Data GemFire API Current and Future
#GeodeSummit - Spring Data GemFire API Current and Future#GeodeSummit - Spring Data GemFire API Current and Future
#GeodeSummit - Spring Data GemFire API Current and Future
 
Part 4: Custom Buildpacks and Data Services (Pivotal Cloud Platform Roadshow)
Part 4: Custom Buildpacks and Data Services (Pivotal Cloud Platform Roadshow)Part 4: Custom Buildpacks and Data Services (Pivotal Cloud Platform Roadshow)
Part 4: Custom Buildpacks and Data Services (Pivotal Cloud Platform Roadshow)
 
Building and managing applications fast for IBM i
Building and managing applications fast for IBM iBuilding and managing applications fast for IBM i
Building and managing applications fast for IBM i
 
Custom Buildpacks and Data Services
Custom Buildpacks and Data ServicesCustom Buildpacks and Data Services
Custom Buildpacks and Data Services
 
PaaS on Openstack
PaaS on OpenstackPaaS on Openstack
PaaS on Openstack
 
Building microservice for api with helidon and cicd pipeline
Building microservice for api with helidon and cicd pipelineBuilding microservice for api with helidon and cicd pipeline
Building microservice for api with helidon and cicd pipeline
 
Sst hackathon express
Sst hackathon expressSst hackathon express
Sst hackathon express
 
SAP Inside Track Singapore 2014
SAP Inside Track Singapore 2014SAP Inside Track Singapore 2014
SAP Inside Track Singapore 2014
 
Spring Data and In-Memory Data Management in Action
Spring Data and In-Memory Data Management in ActionSpring Data and In-Memory Data Management in Action
Spring Data and In-Memory Data Management in Action
 
Micro services vs hadoop
Micro services vs hadoopMicro services vs hadoop
Micro services vs hadoop
 
Oracle Coherence Strategy and Roadmap (OpenWorld, September 2014)
Oracle Coherence Strategy and Roadmap (OpenWorld, September 2014)Oracle Coherence Strategy and Roadmap (OpenWorld, September 2014)
Oracle Coherence Strategy and Roadmap (OpenWorld, September 2014)
 
Apigee deploy grunt plugin.1.0
Apigee deploy grunt plugin.1.0Apigee deploy grunt plugin.1.0
Apigee deploy grunt plugin.1.0
 
Ramji
RamjiRamji
Ramji
 
Timings API: Performance Assertion during the functional testing
 Timings API: Performance Assertion during the functional testing Timings API: Performance Assertion during the functional testing
Timings API: Performance Assertion during the functional testing
 
SAP Kapsel Plugins For Cordova
SAP Kapsel Plugins For CordovaSAP Kapsel Plugins For Cordova
SAP Kapsel Plugins For Cordova
 
Next gen tech from QuickXpert Infotech
Next gen tech   from QuickXpert InfotechNext gen tech   from QuickXpert Infotech
Next gen tech from QuickXpert Infotech
 
DavidWible_res
DavidWible_resDavidWible_res
DavidWible_res
 
JAX-RS.next
JAX-RS.nextJAX-RS.next
JAX-RS.next
 
Java 9 New Features | Java Tutorial | What’s New in Java 9 | Java 9 Features ...
Java 9 New Features | Java Tutorial | What’s New in Java 9 | Java 9 Features ...Java 9 New Features | Java Tutorial | What’s New in Java 9 | Java 9 Features ...
Java 9 New Features | Java Tutorial | What’s New in Java 9 | Java 9 Features ...
 
Google App Engine
Google App EngineGoogle App Engine
Google App Engine
 

Último

Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 

Último (20)

Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 

Building Effective Apache Geode Applications with Spring Data GemFire

  • 1.
  • 2. 2© 2014 Pivotal Software, Inc. All rights reserved. 2© 2014 Pivotal Software, Inc. All rights reserved. Building Effective Apache Geode Applications with Spring Data GemFire John Blum - @john_blum © 2015 - Pivotal Software, Inc.
  • 3. 3© 2014 Pivotal Software, Inc. All rights reserved. Presenter John Blum Spring Data GemFire Project Lead Apache Geode Committer GemFire Engineer/Technical Lead Responsibilities… • Management & Monitoring (Gfsh) • Management REST API • Developer REST API • Spring Data GemFire (v1.3.3 – current)
  • 4. 4© 2014 Pivotal Software, Inc. All rights reserved. Agenda  Quick Overview of Apache Geode  Spring Data GemFire – Configuration / Bootstrapping – Data Access (DAO patterns) – Function Execution – Caching (JSR-107)  Conclusion  QA
  • 5. 5© 2014 Pivotal Software, Inc. All rights reserved. Why Apache Geode? Motivation… 1. Volume of Data (Big Data) 2. Rate of Data (Fast Data) 3. Verity of Data (Data Accuracy) Enables new and existing Java applications to operate at cloud-scale in a consistent, highly-available and predictable manner in order to transact and analyze big, fast data in real-time thereby achieving meaningful and impactful business results.
  • 6. 6© 2014 Pivotal Software, Inc. All rights reserved. What is Apache Geode? “A distributed, in-memory compute and data management platform that elastically scales to achieve high- throughput, low-latency access to big, fast data powering business critical, analytical applications in real-time.” – John Blum Elastic capacity +/- Nodes Ops / SecLinear scalability Latency optimized data distribution
  • 7. 7© 2014 Pivotal Software, Inc. All rights reserved. How Apache Geode Works?  Stores data In-Memory – JVM Heap + Off-Heap  Functions as a Distributed System, In-Memory Data Grid (IMDG) – Pools system resources across multiple nodes in a cluster to manage both application state and behavior – Includes: Memory, CPU, Network & (optionally) Disk
  • 8. 8© 2014 Pivotal Software, Inc. All rights reserved. Characteristics of Apache Geode  Open Source  In-Memory  Distributed  Scalable (scale-out)  High Throughput & Low/Predictable Latency  Highly Available  Consistent  Durable  Fault Tolerant (resilient)  Data-Aware / Parallel Compute
  • 9. 9© 2014 Pivotal Software, Inc. All rights reserved. Apache Geode Use Cases  Persistent, OLTP/OLAP Database (System of Record)  JSR-107 Cache Provider (Key/Value Store)  HTTP Session State Management  Distributed L2 Caching for Hibernate  Memcached Server (Gemcached)  Glorified version of ConcurrentHashMap  Message Bus with guaranteed message delivery
  • 10. 10© 2014 Pivotal Software, Inc. All rights reserved. 10© 2014 Pivotal Software, Inc. All rights reserved. Spring Data GemFire For Apache Geode http://projects.spring.io/spring-data-gemfire/
  • 11. 11© 2014 Pivotal Software, Inc. All rights reserved. “Simple things should be simple; complex things should be possible” – Alan Kay
  • 12. 12© 2014 Pivotal Software, Inc. All rights reserved. Spring Data GemFire (SDG) Applies Spring's powerful, non-invasive programming model in a consistent fashion to simplify configuration and development of Apache Geode applications. Spring Ecosystem Integration… – Spring Cache Abstraction / Transaction Management – Spring Data Commons + REST – Spring Integration (Inbound/Outbound Channel Adapters) – Spring Session (coming soon…) – Spring XD (Sources & Sinks)
  • 13. 13© 2014 Pivotal Software, Inc. All rights reserved. + + Apache Geode with Spring Data GemFire and Spring’s Cache Abstraction is a JSR-107 (JCache) caching provider
  • 14. 14© 2014 Pivotal Software, Inc. All rights reserved. GRAILS Full-stack, Web XD Stream, Taps, Jobs BOOT Bootable, Minimal, Ops-Ready Big, Fast, Flexible Data Web, Integration, Batch WEB Controllers, REST, WebSocket INTEGRATION Channels, Adapters, Filters, Transformers BATCH Jobs, Steps, Readers, Writers BIG DATA Ingestion, Export, Orchestration, Hadoop DATA NON-RELATIONALRELATIONAL CORE GROOVYFRAMEWORK SECURITY REACTOR
  • 15. 15© 2014 Pivotal Software, Inc. All rights reserved. Spring Data GemFire Use Cases  Configure & Bootstrap Apache Geode – Replacement for cache.xml; Can be used with Cluster Configuration  Build an Application Peer Cache (Cache) – Embedded Cache  Build an Application Cache Client (ClientCache) – Client/Server
  • 16. 16© 2014 Pivotal Software, Inc. All rights reserved. Spring Data GemFire / Apache Geode Coordinates <repository> <id>spring-libs-snapshot</id> <name>Spring Maven libs-snapshot Repository</name> <url>https://repo.spring.io/libs-snapshot</url> </repository> <dependency> <groupId>org.springframework.data</groupId> <artifactId>spring-data-gemfire</artifactId> <version>1.7.0.APACHE-GEODE-EA-SNAPSHOT</version> </dependency>
  • 17. 17© 2014 Pivotal Software, Inc. All rights reserved. Spring-based Configuration XML Java-based Configuration
  • 18. 18© 2014 Pivotal Software, Inc. All rights reserved. Bootstrapping Apache Geode with Spring @SpringBootApplication @ImportResource("/spring-gemfire-context.xml") public class SpringGemFireApplication { public static void main(String[] args) { SpringApplication.run(SpringGemFireApplication.class, args); } } gfsh>start server -–name=Example --spring-xml-location= <classpath-to-spring-application-context.xml>
  • 19. 19© 2014 Pivotal Software, Inc. All rights reserved. Example
  • 20. 20© 2014 Pivotal Software, Inc. All rights reserved. Data Access with Spring Basic (Region) Data Access Object (DAO)… @Repository public class GolferDao extends DaoSupport { @Resource(name = “Golfers”) private Region<Long, Golfer> golfers; … }
  • 21. 21© 2014 Pivotal Software, Inc. All rights reserved. Data Access with SDG GemfireTemplate Advantages  Simple, Convenient Data Access API (CRUD, OQL, Function)  Protects developer from GemFire/Geode API changes  Exception Translation into Spring DAO Exception Hierarchy  Transaction Management <bean id=“golfersTemplate” class=“org.springframework.data.gemfire.GemfireTemplate” p:region-ref=“Golfers”/>
  • 22. 22© 2014 Pivotal Software, Inc. All rights reserved. Data Access with Spring Data Repositories Advantages  Simple, interface-based, Spring Data Repository definition (CRUD, Querying)  Convention over Configuration (Querying)  Portable  Exception Translation & Transaction Management Support public interface GolferRepository extends CrudRepository<Golfer, Long> { List<Golfer> findByName(String name); }
  • 23. 23© 2014 Pivotal Software, Inc. All rights reserved. Example
  • 24. 24© 2014 Pivotal Software, Inc. All rights reserved. Annotation-based Function Support Spring Data GemFire introduces annotation support for Function implementation and execution.  Functions are implemented as POJO methods  Functions are invoked using Object-Oriented method invocation. SDG supports…  @OnServer / @OnServers (from client only)  @OnMember / @OnMembers (from peer only)  @OnRegion (from either client or peer)
  • 25. 25© 2014 Pivotal Software, Inc. All rights reserved. Annotation-based Function Implementation package example.app.function; @Component class CustomerFunctions { @GemfireFunction public Customer update(Address address, PhoneNumber phoneNumber) { … } @GemfireFunction(id = “MyFunction” HA=true) public List<?> functionTwo(FunctionContext funcCtx, @Filter Set<?> keys, …) { … } } <gfe:annotation-driven/> <!– optional when using <context:annotation-config> or <context:component-scan> --> <bean class=“example.app.function.CustomerFunctions”/>
  • 26. 26© 2014 Pivotal Software, Inc. All rights reserved. Annotation-based Function Execution package example.app.function.executions; @OnRegion(“Customers”) interface CustomersFunctionExecution { Customer update(Address address, PhoneNumber phoneNumber); } <gfe-data:function-executions base-package=“example.app.function.executions”/> @Component class ApplicationComponent { @Autowired private CustomersFunctionExecution customersFunction; public Customer someMethod(Address address, PhoneNumber phoneNumber) { return customersFunction.update(address, phoneNumber); }
  • 27. 27© 2014 Pivotal Software, Inc. All rights reserved. Example
  • 28. 28© 2014 Pivotal Software, Inc. All rights reserved. Spring Cache Abstraction Caching is useful in cases when an “expensive” operation (i.e. CPU, IO bound) produces the same output given identical input; results can be reused. Spring enables Declarative, Annotation-based Caching…  @Cacheable – triggers cache population  @CacheEvict – triggers cache eviction  @CachePut – updates cache without interfering with method execution  @Caching – groups multiple cache operations per method  @CacheConfig – class-level cache-related settings
  • 29. 29© 2014 Pivotal Software, Inc. All rights reserved. Spring Supports JSR-107 (JCache) Spring JCache @Cacheable @CacheResult @CachePut @CachePut @CacheEvict @CacheRemove @CacheEvict(allEntries=true) @CacheRemoveAll @CacheConfig @CacheDefaults http://docs.spring.io/spring/docs/current/spring-framework-reference/htmlsingle/#cache-jsr-107
  • 30. 30© 2014 Pivotal Software, Inc. All rights reserved. Apache Geode Caching Provider @Configuration @EnableCaching @Import(GemFireConfiguration.class) class ApplicationConfiguration { @Bean public CacheManager cacheManager( Cache gemfireCache) { GemfireCacheManager cacheManager = new GemfireCacheManager(); cacheManager.setCache(gemfireCache); return cacheManager; } } <beans … xmlns:cache=“http://www.springframework.org/schema/cach e”…> <gfe:cache properties- ref="gemfireProperties"/> <cache:annotation-driven/> <bean id="cacheManager" class= ”o.s.data.gemfire.support.GemfireCacheManager" p:cache-ref="gemfireCache"/>
  • 31. 31© 2014 Pivotal Software, Inc. All rights reserved. Example
  • 32. 32© 2014 Pivotal Software, Inc. All rights reserved. Conclusion
  • 33. 33© 2014 Pivotal Software, Inc. All rights reserved. Apache Geode References  Project Page - http://geode.incubator.apache.org/contribute/  Contribute - http://geode.incubator.apache.org/contribute/ – Ideas - https://cwiki.apache.org/confluence/display/GEODE/How+to+Contribute  Community Events - http://geode.incubator.apache.org/community/  Documentation - http://geode.incubator.apache.org/docs/ – Docs Project - https://github.com/project-geode/docs  Source Code - https://github.com/apache/incubator-geode  JIRA - https://issues.apache.org/jira/browse/GEODE  StackOverflow - http://stackoverflow.com/questions/tagged/gemfire+and+geode
  • 34. 34© 2014 Pivotal Software, Inc. All rights reserved. Spring Data GemFire References  Project Page - http://projects.spring.io/spring-data/  Documentation – – Reference Guide - http://docs.spring.io/spring-data-gemfire/docs/current/reference/html/ – API - http://docs.spring.io/spring-data-gemfire/docs/current/api/ – Spring IO Guides - http://spring.io/guides – Spring GemFire Examples –  Source Code - https://github.com/spring-projects/spring-data-gemfire  Examples - https://github.com/spring-projects/spring-gemfire-examples  JIRA – https://jira.spring.io/browse/SGF  StackOverflow - http://stackoverflow.com/questions/tagged/spring-data-gemfire
  • 35. 35© 2014 Pivotal Software, Inc. All rights reserved. 3 Building High-Scalable Spring Applications with In-Memory Data Grids September 15th, 2015 – 10:30 am – 12 pm Learn More. Stay Connected. @springcentral Spring.io/video https://2015.event.springone2gx.com/schedule/sessions/building_highly_scalable_spring_applications_with_in_memory_distribute d_data_grids.html
  • 36. 36© 2014 Pivotal Software, Inc. All rights reserved. 36© 2014 Pivotal Software, Inc. All rights reserved. Q&A Any questions…
  • 37. 37© 2014 Pivotal Software, Inc. All rights reserved. 37© 2014 Pivotal Software, Inc. All rights reserved. Thank You

Notas do Editor

  1. Key is to manage large quantities of data under extreme load with accuracy and resilience reliably. Big Data == data lake (any and all data) Fast Data == processing streams of events in real-time All about… Data Access
  2. Scale Out rather than Scale Up Throughput (or number of operations) increases as more nodes are added to the cluster Data is stored in distributed, highly-concurrent, in-memory data structures to minimize context switching and contention Data is replicated & partitioned for fast, predictable read/write throughput
  3. In a nutshell… under-the-hood Apache Geode is implemented… Stores data in-memory with puts. Stores data to disk (synchronously (default) or asynchronously) on persistence and overflow Oplogs are append-only; compaction is necessary HDFS is new and Geode can feed Apache Spark processing streams.
  4. 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… Open Standards (OSS) Apache Geode is a complex technology… Too many configuration options and settings. Inconsistent behavior between XML configuration (i.e. cache.xml) and API.