SlideShare uma empresa Scribd logo
1 de 26
Powering Your Application with XAP
(Using payment processing as an example)
“Don’t call me cache”
Short Intro to Caching Evolution
Cache
In process caching
of Key->Value data
structure
Distribute Cache
Partitioned cache
nodes
IMDG
Partitioned system
of record
In Memory
Application Platform
Collocated IMDG and
Processing
Cache
Cache is good for repetitive data reads
But it is limited in capacity
It also doesn’t handle write-heavy scenarios
Short Intro to Caching Evolution
Cache
In process caching
of Key->Value data
structure
Distribute Cache
Partitioned cache
nodes
IMDG
Partitioned system
of record
In Memory
Application Platform
Collocated IMDG and
Processing
Distribute Cache
Allows you to distribute your cache over numerous machines so you get
Increased Capacity
But it doesn’t support write heavy scenarios
It’s also Limited to query by Id
What about the rest of your app? - Business logic & messaging??
Short Intro to Caching Evolution
Cache
In process caching
of Key->Value data
structure
Distribute Cache
Partitioned cache
nodes
IMDG
Partitioned system
of record
In Memory
Application Platform
Collocated IMDG and
Processing
IMDG solves these problems!
You get increased capacity
IMDG is also a System of Record with:
Query APIs
Optimized data access
Data integrity
It solves your write scalability problem
.
Short Intro to Caching Evolution
Cache
In process caching
of Key->Value data
structure
Distribute Cache
Partitioned cache
nodes
IMDG
Partitioned system
of record
In Memory
Application Platform
Collocated IMDG and
Processing
In Memory Application Platform
XAP for end to end scaling
Its an IMDG that hosts your Business
logic & has messaging services!
It Provides Parallel processing of data
You get linear scalability
You get high availability
How does XAP work?
Here’s What a Payment Authorization Process Looks Like
Payment
Authorization
Request
Basic Validation User Profile Check
Merchant
Profile Check
Payment
Authorization
Approved
Write the Payment Object to XAP
Cash Register
Application Payment
User payment Cluster
@SpaceId()
public Long getId() {
return id;
}
@SpaceRouting
public Long getUserId() {
return userId;
}
}
@SpaceIndex
public Long getCardId() {
return cardId;
}
}
The primary key of this object in the grid
The grid will use this attribute to route
the object to a particular partition
Payment object
A secondary index for query optimization
Write the Payment Object to XAP
Cash Register
Application
User payment Cluster
Payment
@SpaceId()
public Long getId() {
return id;
}
@SpaceRouting
public Long getUserId() {
return userId;
}
}
@SpaceIndex
public Long getCardId() {
return cardId;
}
}
The primary key of this object in the grid
The grid will use this attribute to route
the object to a particular partition
Payment object
A Secondary index for query optimization
Write the Payment Object to XAP
Cash Register
Application
User payment Cluster
Payment
Index
A Secondary index for query optimization
@SpaceId()
public Long getId() {
return id;
}
@SpaceRouting
public Long getUserId() {
return userId;
}
}
@SpaceIndex
public Long getCardId() {
return cardId;
}
}
The primary key of this object in the grid
The grid will use this attribute to route
the object to a particular partition
Payment object
Let's Talk About Data Model for a Second
User Id (Routing)| User Name|…
Card Id| Card Data | UserID (Routing)…
Transaction ID | CardId | User ID (Routing)…
1  *
1  *
Data Model
Let's Get Back to the Process
Payment Validation
@EventTemplate
public SQLQuery<Payment> newPayment()
{
SQLQuery<Payment> query = new SQLQuery(“ status = ? ”)
query.setParameter(1,”New”)
return query;
}
Queue
Payment
Validator
Payment Validation
@SpaceDataEvent
Payment authorizePayment(Payment payment) {
space.read(new User(payment.getUserId())
space.read(new Card(payment.getCardId())
if (paymentIsValid(payment) {
Space.write(new UserPaymentMsg(payment,getUserId()));
Space.write(new VendorPaymentMsg(payment,getUserId()));
space.write(new PaymentAutorization(paymentId,Initial))
} else {
space.write(new PaymentAutorization(paymentId,Rejected))
}
}
Queue
Payment
Class PaymentAuthorization{
Status status;
Boolean userCheck;
Boolean vendorCheck;
}
Validator
Payment Authorization
Basic Validation
if (validatePayment(payment,user,card)) {
gigaSpace.write(userPaymentMsg);
gigaSpace.write(vendorPaymentMsg);
gigaSpace.write(paymentAuthorization);
payment.setPaymentStatus(Payment.PaymentStatus.Processing);
} else {
payment.setPaymentStatus(Payment.PaymentStatus.SuspectedFraud);
}
Class PaymentAutorization {
Status status;
Boolean userCheck;
Boolean vendorCheck;
}
User
Validation
Vendor
Validation
Payment
Authorization
Queue
Queue
Queue Validator
User Validation
@SpaceDataEvent
void processUserPaymentValidation() {
space.readMultiple(new Card(userId))
space.readMultiple(new Payment(userId))
if (valid()) {
IdQuery<PaymentAutjorzation> idQuery = new
IdQuery<PaymentAuthorization>(PaymentAuthorization.class, paymentId);
space.change(idQuery, new ChangeSet().set(“userCheck", true));
} else { ... }
}
Class PaymentAuthorization{
Enum Status
Boolean userCheck
Boolean vendorCheck
}
Read
Message
Process
Queue
UserCreditCardPayment
Querying
User Validation
@SpaceDataEvent
void processUserPaymentValidation() {
space.readMultiple(new Card(userId))
space.readMultiple(new Payment(userId))
if (valid()) {
IdQuery<PaymentAuthoirzation> idQuery = new
IdQuery<PaymentAuthorization>(PaymentAuthorization.class, paymentId);
space.change(idQuery, new ChangeSet().set(“userCheck", true));
} else { ... }
}
Read
Message
Process
Queue
UserCreditCardPayment
Class PaymentAuthorization {
Status status;
Boolean userCheck;
Boolean vendorCheck;
}
Querying
User Validation
Read
Message
Process
Queue
UserCreditCardPayment
@SpaceDataEvent
void processUserPaymentValidation() {
space.readMultiple(new Card(userId))
space.readMultiple(new Payment(userId))
if (valid()) {
IdQuery<PaymentAutjorzation> idQuery = new
IdQuery<PaymentAuthorization>(PaymentAuthoirzation.class, paymentId);
space.change(idQuery, new ChangeSet().set(“userCheck", true));
} else { ... }
}
Class PaymentAuthorization {
Status status;
Boolean userCheck;
Boolean vendorCheck;
}
Querying
Vendor Validation
public void validateVendor(VendorPaymentMsg vendorPaymentMsg,
GigaSpace gigaSpace) {
AsyncFuture<Boolean> future = vendorGigaSpace.execute(
new VendorValidationTask(vendorPaymentMsg),
vendorPaymentMsg.getMerchant());
IdQuery<PaymentAuthorization> idQuery = new
IdQuery<PaymentAuthorization>(PaymentAuthorization.class,
vendorPaymentMsg.getPaymentId());
if (future.get()) gigaSpace.change(idQuery, new ChangeSet().
set("vendorCheck", true));
else gigaSpace.change(idQuery, new ChangeSet().
set("vendorCheck”, false));
}
Read
Message
Process
Queue
Task
class PaymentAuthoirzation {
Status status;
Boolean userCheck;
Boolean vendorCheck;
}
Vendor Validation
@SpaceDataEvent
public void processVendorPaymentValidation() {
AsyncFuture<Boolean> result= space.execute(
new DistributedTask(new VendorValidationTask(Payment)))
if (result.get()) {
IdQuery<PaymentAutjorzation> idQuery = new
IdQuery<PaymentAuthorization>(PaymentAuthorization.class,
paymentId);
space.change(idQuery, new ChangeSet().set(“vendorCheck”, true));
} else { ... }
}
Payment Cluster
Task
Vendor Cluster
Class PaymentAuthorization {
Status status;
Boolean userCheck;
Boolean vendorCheck;
}
Vendor Validation
public void validateVendor(VendorPaymentMsg vendorPaymentMsg,
GigaSpace gigaSpace) {
AsyncFuture<Boolean> future = vendorGigaSpace.execute(new
VendorValidationTask(vendorPaymentMsg),
vendorPaymentMsg.getMerchant());
IdQuery<PaymentAuthorization> idQuery = new
IdQuery<PaymentAuthorization>(PaymentAuthorization.class,
vendorPaymentMsg.getPaymentId());
if (future.get()) gigaSpace.change(idQuery, new
ChangeSet().set("vendorCheck", true));
else gigaSpace.change(idQuery, new ChangeSet().set("vendorCheck", false));
}
Payment Cluster Vendor Cluster
Task
Class PaymentAuthorization {
Status status;
Boolean userCheck;
Boolean vendorCheck;
}
Vendor Validation
Payment Cluster Vendor Cluster
Task
public void validateVendor(VendorPaymentMsg vendorPaymentMsg,
GigaSpace gigaSpace) {
AsyncFuture<Boolean> future = vendorGigaSpace.execute(new
VendorValidationTask(vendorPaymentMsg),
vendorPaymentMsg.getMerchant());
IdQuery<PaymentAuthorization> idQuery = new
IdQuery<PaymentAuthorization>(PaymentAuthorization.class,
vendorPaymentMsg.getPaymentId());
if (future.get()) gigaSpace.change(idQuery, new
ChangeSet().set("vendorCheck", true));
else gigaSpace.change(idQuery, new ChangeSet().set("vendorCheck", false));
}
Class PaymentAuthorization {
Status status;
Boolean userCheck;
Boolean vendorCheck;
}
Vendor Validation Check
@Override
public Boolean execute() throws Exception {
return validatePayment(vendorPaymentMsg);
}
Task
DealsMerchant
Class PaymentAuthorization {
Status status;
Boolean userCheck;
Boolean vendorCheck;
}
Querying
Vendor Validation Check
Task
DealsMerchant
@Override
public Boolean execute() throws Exception {
return validatePayment(vendorPaymentMsg);
}
Class PaymentAuthorization {
Status status;
Boolean userCheck;
Boolean vendorCheck;
}
Querying
Vendor Validation
Payment Cluster Vendor Cluster
Callback Task
public void validateVendor(VendorPaymentMsg vendorPaymentMsg,
GigaSpace gigaSpace) {
AsyncFuture<Boolean> future = vendorGigaSpace.execute(new
VendorValidationTask(vendorPaymentMsg),
vendorPaymentMsg.getMerchant());
IdQuery<PaymentAuthorization> idQuery = new
IdQuery<PaymentAuthorization>(PaymentAuthorization.class,
vendorPaymentMsg.getPaymentId());
if (future.get()) gigaSpace.change(idQuery, new
ChangeSet().set("vendorCheck", true));
else gigaSpace.change(idQuery, new ChangeSet().set("vendorCheck", false));
}
Class PaymentAuthorization {
Status status;
Boolean userCheck;
Boolean vendorCheck;
}
Yey! Payment Has Been Authorized
@EventTemplate
public PaymentAuthorization getNewPayment() {
return new PaymentAuthorization(null, true, true, PaymentAuthorizationStatus.New);
}
Queue
Payment
Authorization

Mais conteúdo relacionado

Mais procurados

Implementing lockbox
Implementing lockboxImplementing lockbox
Implementing lockboxsri1srinu2
 
Java Persistence API 2.0: An Overview
Java Persistence API 2.0: An OverviewJava Persistence API 2.0: An Overview
Java Persistence API 2.0: An OverviewSanjeeb Sahoo
 
Entity Persistence with JPA
Entity Persistence with JPAEntity Persistence with JPA
Entity Persistence with JPASubin Sugunan
 
09 data storage, backup and roaming
09   data storage, backup and roaming09   data storage, backup and roaming
09 data storage, backup and roamingWindowsPhoneRocks
 
Jasig Cas High Availability - Yale University
Jasig Cas High Availability -  Yale UniversityJasig Cas High Availability -  Yale University
Jasig Cas High Availability - Yale UniversityJasig CAS
 

Mais procurados (8)

Java persistence api 2.1
Java persistence api 2.1Java persistence api 2.1
Java persistence api 2.1
 
JavaEE Spring Seam
JavaEE Spring SeamJavaEE Spring Seam
JavaEE Spring Seam
 
Implementing lockbox
Implementing lockboxImplementing lockbox
Implementing lockbox
 
Jpa 2.1 Application Development
Jpa 2.1 Application DevelopmentJpa 2.1 Application Development
Jpa 2.1 Application Development
 
Java Persistence API 2.0: An Overview
Java Persistence API 2.0: An OverviewJava Persistence API 2.0: An Overview
Java Persistence API 2.0: An Overview
 
Entity Persistence with JPA
Entity Persistence with JPAEntity Persistence with JPA
Entity Persistence with JPA
 
09 data storage, backup and roaming
09   data storage, backup and roaming09   data storage, backup and roaming
09 data storage, backup and roaming
 
Jasig Cas High Availability - Yale University
Jasig Cas High Availability -  Yale UniversityJasig Cas High Availability -  Yale University
Jasig Cas High Availability - Yale University
 

Destaque

Disaster Recovery on Demand on the Cloud
Disaster Recovery on Demand on the CloudDisaster Recovery on Demand on the Cloud
Disaster Recovery on Demand on the CloudNati Shalom
 
Installing centos on xenserver
Installing centos on xenserverInstalling centos on xenserver
Installing centos on xenserverNati Shalom
 
Case Studies for moving apps to the cloud - DLD 2013
Case Studies for moving apps to the cloud - DLD 2013Case Studies for moving apps to the cloud - DLD 2013
Case Studies for moving apps to the cloud - DLD 2013Nati Shalom
 
Software Defined Operator
Software Defined OperatorSoftware Defined Operator
Software Defined OperatorNati Shalom
 
Application Centric DevOps
Application Centric DevOpsApplication Centric DevOps
Application Centric DevOpsNati Shalom
 
Amdocs on giga spaces selction and usage
Amdocs on giga spaces selction and  usageAmdocs on giga spaces selction and  usage
Amdocs on giga spaces selction and usageNati Shalom
 
Cloudify Open PaaS Stack for DevOps
Cloudify Open PaaS Stack for DevOps  Cloudify Open PaaS Stack for DevOps
Cloudify Open PaaS Stack for DevOps Nati Shalom
 

Destaque (7)

Disaster Recovery on Demand on the Cloud
Disaster Recovery on Demand on the CloudDisaster Recovery on Demand on the Cloud
Disaster Recovery on Demand on the Cloud
 
Installing centos on xenserver
Installing centos on xenserverInstalling centos on xenserver
Installing centos on xenserver
 
Case Studies for moving apps to the cloud - DLD 2013
Case Studies for moving apps to the cloud - DLD 2013Case Studies for moving apps to the cloud - DLD 2013
Case Studies for moving apps to the cloud - DLD 2013
 
Software Defined Operator
Software Defined OperatorSoftware Defined Operator
Software Defined Operator
 
Application Centric DevOps
Application Centric DevOpsApplication Centric DevOps
Application Centric DevOps
 
Amdocs on giga spaces selction and usage
Amdocs on giga spaces selction and  usageAmdocs on giga spaces selction and  usage
Amdocs on giga spaces selction and usage
 
Cloudify Open PaaS Stack for DevOps
Cloudify Open PaaS Stack for DevOps  Cloudify Open PaaS Stack for DevOps
Cloudify Open PaaS Stack for DevOps
 

Semelhante a Dont call me cache april 17

Spring Data JPA in detail with spring boot
Spring Data JPA in detail with spring bootSpring Data JPA in detail with spring boot
Spring Data JPA in detail with spring bootrinky1234
 
Spring Data JPA USE FOR CREATING DATA JPA
Spring Data JPA USE FOR CREATING DATA  JPASpring Data JPA USE FOR CREATING DATA  JPA
Spring Data JPA USE FOR CREATING DATA JPAmichaelaaron25322
 
Jasigsakai12 columbia-customizes-cas
Jasigsakai12 columbia-customizes-casJasigsakai12 columbia-customizes-cas
Jasigsakai12 columbia-customizes-casellentuck
 
Domain-Driven Design with SeedStack
Domain-Driven Design with SeedStackDomain-Driven Design with SeedStack
Domain-Driven Design with SeedStackSeedStack
 
GraphQL Bangkok Meetup 2.0
GraphQL Bangkok Meetup 2.0GraphQL Bangkok Meetup 2.0
GraphQL Bangkok Meetup 2.0Tobias Meixner
 
Giga Spaces Data Grid / Data Caching Overview
Giga Spaces Data Grid / Data Caching OverviewGiga Spaces Data Grid / Data Caching Overview
Giga Spaces Data Grid / Data Caching Overviewjimliddle
 
Integrate Sas With Google Maps
Integrate Sas With Google MapsIntegrate Sas With Google Maps
Integrate Sas With Google Mapsvineetkaul
 
The Next Generation Application Server – How Event Based Processing yields s...
The Next Generation  Application Server – How Event Based Processing yields s...The Next Generation  Application Server – How Event Based Processing yields s...
The Next Generation Application Server – How Event Based Processing yields s...Guy Korland
 
GraphQL, Redux, and React
GraphQL, Redux, and ReactGraphQL, Redux, and React
GraphQL, Redux, and ReactKeon Kim
 
Dependency injection - the right way
Dependency injection - the right wayDependency injection - the right way
Dependency injection - the right wayThibaud Desodt
 
Evolving your Data Access with MongoDB Stitch - Drew Di Palma
Evolving your Data Access with MongoDB Stitch - Drew Di PalmaEvolving your Data Access with MongoDB Stitch - Drew Di Palma
Evolving your Data Access with MongoDB Stitch - Drew Di PalmaMongoDB
 
[WSO2Con EU 2017] Streaming Analytics Patterns for Your Digital Enterprise
[WSO2Con EU 2017] Streaming Analytics Patterns for Your Digital Enterprise[WSO2Con EU 2017] Streaming Analytics Patterns for Your Digital Enterprise
[WSO2Con EU 2017] Streaming Analytics Patterns for Your Digital EnterpriseWSO2
 
An Introduction To CQRS
An Introduction To CQRSAn Introduction To CQRS
An Introduction To CQRSNeil Robbins
 
Dublin Ireland Spark Meetup October 15, 2015
Dublin Ireland Spark Meetup October 15, 2015Dublin Ireland Spark Meetup October 15, 2015
Dublin Ireland Spark Meetup October 15, 2015eddiebaggott
 
LJC Conference 2014 Cassandra for Java Developers
LJC Conference 2014 Cassandra for Java DevelopersLJC Conference 2014 Cassandra for Java Developers
LJC Conference 2014 Cassandra for Java DevelopersChristopher Batey
 

Semelhante a Dont call me cache april 17 (20)

Spring Data JPA in detail with spring boot
Spring Data JPA in detail with spring bootSpring Data JPA in detail with spring boot
Spring Data JPA in detail with spring boot
 
CDI @javaonehyderabad
CDI @javaonehyderabadCDI @javaonehyderabad
CDI @javaonehyderabad
 
Spring Data JPA USE FOR CREATING DATA JPA
Spring Data JPA USE FOR CREATING DATA  JPASpring Data JPA USE FOR CREATING DATA  JPA
Spring Data JPA USE FOR CREATING DATA JPA
 
Jasigsakai12 columbia-customizes-cas
Jasigsakai12 columbia-customizes-casJasigsakai12 columbia-customizes-cas
Jasigsakai12 columbia-customizes-cas
 
Domain-Driven Design with SeedStack
Domain-Driven Design with SeedStackDomain-Driven Design with SeedStack
Domain-Driven Design with SeedStack
 
GraphQL Bangkok Meetup 2.0
GraphQL Bangkok Meetup 2.0GraphQL Bangkok Meetup 2.0
GraphQL Bangkok Meetup 2.0
 
JPA 2.0
JPA 2.0JPA 2.0
JPA 2.0
 
Giga Spaces Data Grid / Data Caching Overview
Giga Spaces Data Grid / Data Caching OverviewGiga Spaces Data Grid / Data Caching Overview
Giga Spaces Data Grid / Data Caching Overview
 
Integrate Sas With Google Maps
Integrate Sas With Google MapsIntegrate Sas With Google Maps
Integrate Sas With Google Maps
 
The Next Generation Application Server – How Event Based Processing yields s...
The Next Generation  Application Server – How Event Based Processing yields s...The Next Generation  Application Server – How Event Based Processing yields s...
The Next Generation Application Server – How Event Based Processing yields s...
 
70562 (1)
70562 (1)70562 (1)
70562 (1)
 
GraphQL, Redux, and React
GraphQL, Redux, and ReactGraphQL, Redux, and React
GraphQL, Redux, and React
 
Siddhi - cloud-native stream processor
Siddhi - cloud-native stream processorSiddhi - cloud-native stream processor
Siddhi - cloud-native stream processor
 
Dependency injection - the right way
Dependency injection - the right wayDependency injection - the right way
Dependency injection - the right way
 
Yii Introduction
Yii IntroductionYii Introduction
Yii Introduction
 
Evolving your Data Access with MongoDB Stitch - Drew Di Palma
Evolving your Data Access with MongoDB Stitch - Drew Di PalmaEvolving your Data Access with MongoDB Stitch - Drew Di Palma
Evolving your Data Access with MongoDB Stitch - Drew Di Palma
 
[WSO2Con EU 2017] Streaming Analytics Patterns for Your Digital Enterprise
[WSO2Con EU 2017] Streaming Analytics Patterns for Your Digital Enterprise[WSO2Con EU 2017] Streaming Analytics Patterns for Your Digital Enterprise
[WSO2Con EU 2017] Streaming Analytics Patterns for Your Digital Enterprise
 
An Introduction To CQRS
An Introduction To CQRSAn Introduction To CQRS
An Introduction To CQRS
 
Dublin Ireland Spark Meetup October 15, 2015
Dublin Ireland Spark Meetup October 15, 2015Dublin Ireland Spark Meetup October 15, 2015
Dublin Ireland Spark Meetup October 15, 2015
 
LJC Conference 2014 Cassandra for Java Developers
LJC Conference 2014 Cassandra for Java DevelopersLJC Conference 2014 Cassandra for Java Developers
LJC Conference 2014 Cassandra for Java Developers
 

Mais de Nati Shalom

Cloudify and terraform integration
Cloudify and terraform integrationCloudify and terraform integration
Cloudify and terraform integrationNati Shalom
 
Why NFV and Digital Transformation Projects Fail!
Why NFV and Digital Transformation Projects Fail! Why NFV and Digital Transformation Projects Fail!
Why NFV and Digital Transformation Projects Fail! Nati Shalom
 
Cloudify and terraform integration
Cloudify and terraform integrationCloudify and terraform integration
Cloudify and terraform integrationNati Shalom
 
1 cloud, 2 clouds, 3 clouds, tons...
1 cloud, 2 clouds, 3 clouds, tons...1 cloud, 2 clouds, 3 clouds, tons...
1 cloud, 2 clouds, 3 clouds, tons...Nati Shalom
 
Open Stack Days israel Keynote 2017
Open Stack Days israel Keynote 2017Open Stack Days israel Keynote 2017
Open Stack Days israel Keynote 2017Nati Shalom
 
What A No Compromises Hybrid Cloud Looks Like
What A No Compromises Hybrid Cloud Looks Like What A No Compromises Hybrid Cloud Looks Like
What A No Compromises Hybrid Cloud Looks Like Nati Shalom
 
Running OpenStack in Production
Running OpenStack in Production Running OpenStack in Production
Running OpenStack in Production Nati Shalom
 
Orchestration tool roundup kubernetes vs. docker vs. heat vs. terra form vs...
Orchestration tool roundup   kubernetes vs. docker vs. heat vs. terra form vs...Orchestration tool roundup   kubernetes vs. docker vs. heat vs. terra form vs...
Orchestration tool roundup kubernetes vs. docker vs. heat vs. terra form vs...Nati Shalom
 
Real World Example of Orchestrating Docker, Node JS, NFV on OpenStack
Real World Example of Orchestrating Docker, Node JS, NFV on OpenStackReal World Example of Orchestrating Docker, Node JS, NFV on OpenStack
Real World Example of Orchestrating Docker, Node JS, NFV on OpenStackNati Shalom
 
Real World Application Orchestration Made Easy on VMware vCloud Air, vSphere ...
Real World Application Orchestration Made Easy on VMware vCloud Air, vSphere ...Real World Application Orchestration Made Easy on VMware vCloud Air, vSphere ...
Real World Application Orchestration Made Easy on VMware vCloud Air, vSphere ...Nati Shalom
 
OpenStack Juno The Complete Lowdown and Tales from the Summit
OpenStack Juno The Complete Lowdown and Tales from the SummitOpenStack Juno The Complete Lowdown and Tales from the Summit
OpenStack Juno The Complete Lowdown and Tales from the SummitNati Shalom
 
Application and Network Orchestration using Heat & Tosca
Application and Network Orchestration using Heat & ToscaApplication and Network Orchestration using Heat & Tosca
Application and Network Orchestration using Heat & ToscaNati Shalom
 
Introduction to Cloudify for OpenStack users
Introduction to Cloudify for OpenStack users Introduction to Cloudify for OpenStack users
Introduction to Cloudify for OpenStack users Nati Shalom
 
Complex Analytics with NoSQL Data Store in Real Time
Complex Analytics with NoSQL Data Store in Real TimeComplex Analytics with NoSQL Data Store in Real Time
Complex Analytics with NoSQL Data Store in Real TimeNati Shalom
 
Is Orchestration the Next Big Thing in DevOps
Is Orchestration the Next Big Thing in DevOpsIs Orchestration the Next Big Thing in DevOps
Is Orchestration the Next Big Thing in DevOpsNati Shalom
 
When networks meets apps (open stack atlanta)
When networks meets apps (open stack atlanta)When networks meets apps (open stack atlanta)
When networks meets apps (open stack atlanta)Nati Shalom
 
Application Centric Approach to Devops
Application Centric Approach to DevopsApplication Centric Approach to Devops
Application Centric Approach to DevopsNati Shalom
 
Real-Time Big Data at In-Memory Speed, Using Storm
Real-Time Big Data at In-Memory Speed, Using StormReal-Time Big Data at In-Memory Speed, Using Storm
Real-Time Big Data at In-Memory Speed, Using StormNati Shalom
 
Disaster recovery on demand on the cloud
Disaster recovery on demand on the cloudDisaster recovery on demand on the cloud
Disaster recovery on demand on the cloudNati Shalom
 
Giga spaces cloudify road map-3 (citi)
Giga spaces cloudify road map-3 (citi)Giga spaces cloudify road map-3 (citi)
Giga spaces cloudify road map-3 (citi)Nati Shalom
 

Mais de Nati Shalom (20)

Cloudify and terraform integration
Cloudify and terraform integrationCloudify and terraform integration
Cloudify and terraform integration
 
Why NFV and Digital Transformation Projects Fail!
Why NFV and Digital Transformation Projects Fail! Why NFV and Digital Transformation Projects Fail!
Why NFV and Digital Transformation Projects Fail!
 
Cloudify and terraform integration
Cloudify and terraform integrationCloudify and terraform integration
Cloudify and terraform integration
 
1 cloud, 2 clouds, 3 clouds, tons...
1 cloud, 2 clouds, 3 clouds, tons...1 cloud, 2 clouds, 3 clouds, tons...
1 cloud, 2 clouds, 3 clouds, tons...
 
Open Stack Days israel Keynote 2017
Open Stack Days israel Keynote 2017Open Stack Days israel Keynote 2017
Open Stack Days israel Keynote 2017
 
What A No Compromises Hybrid Cloud Looks Like
What A No Compromises Hybrid Cloud Looks Like What A No Compromises Hybrid Cloud Looks Like
What A No Compromises Hybrid Cloud Looks Like
 
Running OpenStack in Production
Running OpenStack in Production Running OpenStack in Production
Running OpenStack in Production
 
Orchestration tool roundup kubernetes vs. docker vs. heat vs. terra form vs...
Orchestration tool roundup   kubernetes vs. docker vs. heat vs. terra form vs...Orchestration tool roundup   kubernetes vs. docker vs. heat vs. terra form vs...
Orchestration tool roundup kubernetes vs. docker vs. heat vs. terra form vs...
 
Real World Example of Orchestrating Docker, Node JS, NFV on OpenStack
Real World Example of Orchestrating Docker, Node JS, NFV on OpenStackReal World Example of Orchestrating Docker, Node JS, NFV on OpenStack
Real World Example of Orchestrating Docker, Node JS, NFV on OpenStack
 
Real World Application Orchestration Made Easy on VMware vCloud Air, vSphere ...
Real World Application Orchestration Made Easy on VMware vCloud Air, vSphere ...Real World Application Orchestration Made Easy on VMware vCloud Air, vSphere ...
Real World Application Orchestration Made Easy on VMware vCloud Air, vSphere ...
 
OpenStack Juno The Complete Lowdown and Tales from the Summit
OpenStack Juno The Complete Lowdown and Tales from the SummitOpenStack Juno The Complete Lowdown and Tales from the Summit
OpenStack Juno The Complete Lowdown and Tales from the Summit
 
Application and Network Orchestration using Heat & Tosca
Application and Network Orchestration using Heat & ToscaApplication and Network Orchestration using Heat & Tosca
Application and Network Orchestration using Heat & Tosca
 
Introduction to Cloudify for OpenStack users
Introduction to Cloudify for OpenStack users Introduction to Cloudify for OpenStack users
Introduction to Cloudify for OpenStack users
 
Complex Analytics with NoSQL Data Store in Real Time
Complex Analytics with NoSQL Data Store in Real TimeComplex Analytics with NoSQL Data Store in Real Time
Complex Analytics with NoSQL Data Store in Real Time
 
Is Orchestration the Next Big Thing in DevOps
Is Orchestration the Next Big Thing in DevOpsIs Orchestration the Next Big Thing in DevOps
Is Orchestration the Next Big Thing in DevOps
 
When networks meets apps (open stack atlanta)
When networks meets apps (open stack atlanta)When networks meets apps (open stack atlanta)
When networks meets apps (open stack atlanta)
 
Application Centric Approach to Devops
Application Centric Approach to DevopsApplication Centric Approach to Devops
Application Centric Approach to Devops
 
Real-Time Big Data at In-Memory Speed, Using Storm
Real-Time Big Data at In-Memory Speed, Using StormReal-Time Big Data at In-Memory Speed, Using Storm
Real-Time Big Data at In-Memory Speed, Using Storm
 
Disaster recovery on demand on the cloud
Disaster recovery on demand on the cloudDisaster recovery on demand on the cloud
Disaster recovery on demand on the cloud
 
Giga spaces cloudify road map-3 (citi)
Giga spaces cloudify road map-3 (citi)Giga spaces cloudify road map-3 (citi)
Giga spaces cloudify road map-3 (citi)
 

Último

Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 

Último (20)

Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 

Dont call me cache april 17

  • 1. Powering Your Application with XAP (Using payment processing as an example) “Don’t call me cache”
  • 2. Short Intro to Caching Evolution Cache In process caching of Key->Value data structure Distribute Cache Partitioned cache nodes IMDG Partitioned system of record In Memory Application Platform Collocated IMDG and Processing Cache Cache is good for repetitive data reads But it is limited in capacity It also doesn’t handle write-heavy scenarios
  • 3. Short Intro to Caching Evolution Cache In process caching of Key->Value data structure Distribute Cache Partitioned cache nodes IMDG Partitioned system of record In Memory Application Platform Collocated IMDG and Processing Distribute Cache Allows you to distribute your cache over numerous machines so you get Increased Capacity But it doesn’t support write heavy scenarios It’s also Limited to query by Id What about the rest of your app? - Business logic & messaging??
  • 4. Short Intro to Caching Evolution Cache In process caching of Key->Value data structure Distribute Cache Partitioned cache nodes IMDG Partitioned system of record In Memory Application Platform Collocated IMDG and Processing IMDG solves these problems! You get increased capacity IMDG is also a System of Record with: Query APIs Optimized data access Data integrity It solves your write scalability problem .
  • 5. Short Intro to Caching Evolution Cache In process caching of Key->Value data structure Distribute Cache Partitioned cache nodes IMDG Partitioned system of record In Memory Application Platform Collocated IMDG and Processing In Memory Application Platform XAP for end to end scaling Its an IMDG that hosts your Business logic & has messaging services! It Provides Parallel processing of data You get linear scalability You get high availability How does XAP work?
  • 6. Here’s What a Payment Authorization Process Looks Like Payment Authorization Request Basic Validation User Profile Check Merchant Profile Check Payment Authorization Approved
  • 7. Write the Payment Object to XAP Cash Register Application Payment User payment Cluster @SpaceId() public Long getId() { return id; } @SpaceRouting public Long getUserId() { return userId; } } @SpaceIndex public Long getCardId() { return cardId; } } The primary key of this object in the grid The grid will use this attribute to route the object to a particular partition Payment object A secondary index for query optimization
  • 8. Write the Payment Object to XAP Cash Register Application User payment Cluster Payment @SpaceId() public Long getId() { return id; } @SpaceRouting public Long getUserId() { return userId; } } @SpaceIndex public Long getCardId() { return cardId; } } The primary key of this object in the grid The grid will use this attribute to route the object to a particular partition Payment object A Secondary index for query optimization
  • 9. Write the Payment Object to XAP Cash Register Application User payment Cluster Payment Index A Secondary index for query optimization @SpaceId() public Long getId() { return id; } @SpaceRouting public Long getUserId() { return userId; } } @SpaceIndex public Long getCardId() { return cardId; } } The primary key of this object in the grid The grid will use this attribute to route the object to a particular partition Payment object
  • 10. Let's Talk About Data Model for a Second
  • 11. User Id (Routing)| User Name|… Card Id| Card Data | UserID (Routing)… Transaction ID | CardId | User ID (Routing)… 1  * 1  * Data Model
  • 12. Let's Get Back to the Process
  • 13. Payment Validation @EventTemplate public SQLQuery<Payment> newPayment() { SQLQuery<Payment> query = new SQLQuery(“ status = ? ”) query.setParameter(1,”New”) return query; } Queue Payment Validator
  • 14. Payment Validation @SpaceDataEvent Payment authorizePayment(Payment payment) { space.read(new User(payment.getUserId()) space.read(new Card(payment.getCardId()) if (paymentIsValid(payment) { Space.write(new UserPaymentMsg(payment,getUserId())); Space.write(new VendorPaymentMsg(payment,getUserId())); space.write(new PaymentAutorization(paymentId,Initial)) } else { space.write(new PaymentAutorization(paymentId,Rejected)) } } Queue Payment Class PaymentAuthorization{ Status status; Boolean userCheck; Boolean vendorCheck; } Validator Payment Authorization
  • 15. Basic Validation if (validatePayment(payment,user,card)) { gigaSpace.write(userPaymentMsg); gigaSpace.write(vendorPaymentMsg); gigaSpace.write(paymentAuthorization); payment.setPaymentStatus(Payment.PaymentStatus.Processing); } else { payment.setPaymentStatus(Payment.PaymentStatus.SuspectedFraud); } Class PaymentAutorization { Status status; Boolean userCheck; Boolean vendorCheck; } User Validation Vendor Validation Payment Authorization Queue Queue Queue Validator
  • 16. User Validation @SpaceDataEvent void processUserPaymentValidation() { space.readMultiple(new Card(userId)) space.readMultiple(new Payment(userId)) if (valid()) { IdQuery<PaymentAutjorzation> idQuery = new IdQuery<PaymentAuthorization>(PaymentAuthorization.class, paymentId); space.change(idQuery, new ChangeSet().set(“userCheck", true)); } else { ... } } Class PaymentAuthorization{ Enum Status Boolean userCheck Boolean vendorCheck } Read Message Process Queue UserCreditCardPayment Querying
  • 17. User Validation @SpaceDataEvent void processUserPaymentValidation() { space.readMultiple(new Card(userId)) space.readMultiple(new Payment(userId)) if (valid()) { IdQuery<PaymentAuthoirzation> idQuery = new IdQuery<PaymentAuthorization>(PaymentAuthorization.class, paymentId); space.change(idQuery, new ChangeSet().set(“userCheck", true)); } else { ... } } Read Message Process Queue UserCreditCardPayment Class PaymentAuthorization { Status status; Boolean userCheck; Boolean vendorCheck; } Querying
  • 18. User Validation Read Message Process Queue UserCreditCardPayment @SpaceDataEvent void processUserPaymentValidation() { space.readMultiple(new Card(userId)) space.readMultiple(new Payment(userId)) if (valid()) { IdQuery<PaymentAutjorzation> idQuery = new IdQuery<PaymentAuthorization>(PaymentAuthoirzation.class, paymentId); space.change(idQuery, new ChangeSet().set(“userCheck", true)); } else { ... } } Class PaymentAuthorization { Status status; Boolean userCheck; Boolean vendorCheck; } Querying
  • 19. Vendor Validation public void validateVendor(VendorPaymentMsg vendorPaymentMsg, GigaSpace gigaSpace) { AsyncFuture<Boolean> future = vendorGigaSpace.execute( new VendorValidationTask(vendorPaymentMsg), vendorPaymentMsg.getMerchant()); IdQuery<PaymentAuthorization> idQuery = new IdQuery<PaymentAuthorization>(PaymentAuthorization.class, vendorPaymentMsg.getPaymentId()); if (future.get()) gigaSpace.change(idQuery, new ChangeSet(). set("vendorCheck", true)); else gigaSpace.change(idQuery, new ChangeSet(). set("vendorCheck”, false)); } Read Message Process Queue Task class PaymentAuthoirzation { Status status; Boolean userCheck; Boolean vendorCheck; }
  • 20. Vendor Validation @SpaceDataEvent public void processVendorPaymentValidation() { AsyncFuture<Boolean> result= space.execute( new DistributedTask(new VendorValidationTask(Payment))) if (result.get()) { IdQuery<PaymentAutjorzation> idQuery = new IdQuery<PaymentAuthorization>(PaymentAuthorization.class, paymentId); space.change(idQuery, new ChangeSet().set(“vendorCheck”, true)); } else { ... } } Payment Cluster Task Vendor Cluster Class PaymentAuthorization { Status status; Boolean userCheck; Boolean vendorCheck; }
  • 21. Vendor Validation public void validateVendor(VendorPaymentMsg vendorPaymentMsg, GigaSpace gigaSpace) { AsyncFuture<Boolean> future = vendorGigaSpace.execute(new VendorValidationTask(vendorPaymentMsg), vendorPaymentMsg.getMerchant()); IdQuery<PaymentAuthorization> idQuery = new IdQuery<PaymentAuthorization>(PaymentAuthorization.class, vendorPaymentMsg.getPaymentId()); if (future.get()) gigaSpace.change(idQuery, new ChangeSet().set("vendorCheck", true)); else gigaSpace.change(idQuery, new ChangeSet().set("vendorCheck", false)); } Payment Cluster Vendor Cluster Task Class PaymentAuthorization { Status status; Boolean userCheck; Boolean vendorCheck; }
  • 22. Vendor Validation Payment Cluster Vendor Cluster Task public void validateVendor(VendorPaymentMsg vendorPaymentMsg, GigaSpace gigaSpace) { AsyncFuture<Boolean> future = vendorGigaSpace.execute(new VendorValidationTask(vendorPaymentMsg), vendorPaymentMsg.getMerchant()); IdQuery<PaymentAuthorization> idQuery = new IdQuery<PaymentAuthorization>(PaymentAuthorization.class, vendorPaymentMsg.getPaymentId()); if (future.get()) gigaSpace.change(idQuery, new ChangeSet().set("vendorCheck", true)); else gigaSpace.change(idQuery, new ChangeSet().set("vendorCheck", false)); } Class PaymentAuthorization { Status status; Boolean userCheck; Boolean vendorCheck; }
  • 23. Vendor Validation Check @Override public Boolean execute() throws Exception { return validatePayment(vendorPaymentMsg); } Task DealsMerchant Class PaymentAuthorization { Status status; Boolean userCheck; Boolean vendorCheck; } Querying
  • 24. Vendor Validation Check Task DealsMerchant @Override public Boolean execute() throws Exception { return validatePayment(vendorPaymentMsg); } Class PaymentAuthorization { Status status; Boolean userCheck; Boolean vendorCheck; } Querying
  • 25. Vendor Validation Payment Cluster Vendor Cluster Callback Task public void validateVendor(VendorPaymentMsg vendorPaymentMsg, GigaSpace gigaSpace) { AsyncFuture<Boolean> future = vendorGigaSpace.execute(new VendorValidationTask(vendorPaymentMsg), vendorPaymentMsg.getMerchant()); IdQuery<PaymentAuthorization> idQuery = new IdQuery<PaymentAuthorization>(PaymentAuthorization.class, vendorPaymentMsg.getPaymentId()); if (future.get()) gigaSpace.change(idQuery, new ChangeSet().set("vendorCheck", true)); else gigaSpace.change(idQuery, new ChangeSet().set("vendorCheck", false)); } Class PaymentAuthorization { Status status; Boolean userCheck; Boolean vendorCheck; }
  • 26. Yey! Payment Has Been Authorized @EventTemplate public PaymentAuthorization getNewPayment() { return new PaymentAuthorization(null, true, true, PaymentAuthorizationStatus.New); } Queue Payment Authorization