SlideShare a Scribd company logo
1 of 42
Download to read offline
2015/09/17
SOA on Steroids
David Bolene
in
collaboration
with
2015 - David Bolene
TOC
Architecture for Cloud Services
SOA on Akka
2
4
24
Demo 35
What is (was) SOA? 20
Why Akka? 7
2015 - David Bolene
TOC
Architecture for Cloud Services
SOA on Akka
3
4
24
Demo 35
What is (was) SOA? 20
Why Akka? 7
2015 - David Bolene
Architecture Motivators for Cloud Services
- Elastic / Scalable
- Modular
- Simple
- Low Latency
- Service Integratable
- Resilient
- High Throughput
4
2015 - David Bolene
Architecture Anti-Patterns for Cloud Services
- Transaction Locking in the Database
- Locked/Synchronized Mutable Objects
- Database Joins
- Thread Blocking Method Calls
- Thread Blocking Service Calls
5
2015 - David Bolene
TOC
Architecture for Cloud Services
SOA on Akka
6
4
24
Demo 35
What is (was) SOA? 20
Why Akka? 7
2015 - David Bolene
Akka Actors
Inbox
Message
Actor or
Future
Async
Send
Enqueue
Actor
“one at a time”Dispatcher
Threads
Cores
7
How They Work
2015 - David Bolene
Akka
Actor
Actor
Actor
Supervises
Actor
Actor
Actor
Exception
Actor
Actor
Actor
re-start
Self Healing
8
2015 - David Bolene
Akka Akka Persistence
Actor
Journal
Store
(e.g. Cassandra)
Snapshot
Store
(e.g. Cassandra)
Event
Event
Event
snapshotIncremental Periodic
async
writes
Message
Actor Durability - An Event Sourced Approach
9
2015 - David Bolene
Akka Akka Persistence
Actor
Event
Event
Event
snapshot
Actor State Recovery
latest replay
1 2
Journal
Store
(e.g.
Cassandra)
Snapshot
Store
(e.g.
Cassandra)
10
then
Disk
Sequential
Scans
Message
2015 - David Bolene
REST
based on Akka
Socket
Handler
ActorTCP
Packets
socket
REST
Route
Handler
Actor
HTTP
Requests
11
Spray / Akka HTTP
2015 - David Bolene
Spray / Akka HTTP
REST
based on Akka
Socket
Handler
ActorTCP
Packets
socket
REST
Route
Handler
Actor
HTTP
Requests
Business
Domain
ActorMessage
Context
Continuation
12
2015 - David Bolene
Spray / Akka HTTP
REST
based on Akka
Socket
Handler
ActorTCP
Packets
socket
REST
Route
Handler
Actor
HTTP
Requests
Business
Domain
ActorMessage
Context
Continuation
Socket
Handler
ActorTCP
Packets
socket
HTTP
Response
Context
Business
Domain
ActorMessage
time
13
2015 - David Bolene
Async from Top
to Bottom
Domain
Actors
Cassandra
Akka.IO
HTTP Toolkit
Socket
Packets
Spray
REST Toolkit
HTTP
Commands /
Events
Turtles All the Way Down
Async Writes
14
2015 - David Bolene 15
Async from
Front to Back
Domain
Actors
Akka.IO
HTTP Toolkit
Socket
Spray
REST Toolkit
Turtles All the Way Through
Socket
Spray
Client
Akka.IO
HTTP Toolkit
Frontend (REST Client Calls)
Backend (External Service Calls)
2015 - David Bolene
Akka Clustering
Actor
Hosting
Cluster
Node
Actor
Hosting
Cluster
Node
Actor
Hosting
Cluster
Node
Actor
Hosting
Cluster
Node
Actor
Hosting
Cluster
Node
Actor
Hosting
Cluster
Node
Scaling Actors…
Message
Akka
16
Akka Protocol
2015 - David Bolene
Akka
FrontEnd
(Spray)
Virtualizing Actor Placement
Backend
Node
Backend
Node
Backend
Node
Cluster Sharding
Akka Cluster Sharding
Message
Shard Proxy
(e.g.)
Cassandra
Re-hydrate
on Demand
Passivate
on Inactivity
Message
17
2015 - David Bolene
Akka Look Ma! No Transactions
Shopping
Cart
Actor
Cassandra
18
Live state is here
NOT here
2015 - David Bolene
TOC
Architecture for Cloud Services
SOA on Akka
19
4
24
Demo 35
What is (was) SOA? 20
Why Akka? 7
2015 - David Bolene
Akka What is (was) SOA
20
(fat)
Web
Services
Web
Service
Web
Service
Web
Service
Web
Service
Web
Service
XML / JSON XML / JSON XML / JSON XML / JSON XML / JSON
2015 - David Bolene
Akka What is (was) SOA
21
Process
Orchestration
(e.g. BPEL)
Receive
Order
Request
Credit
Score
Receive
Credit
Score
Send
Order
Status
Credit Service
Customer Order Placement Process
Seller Order Capture Process
Customer
Order
Order
Status
Credit
Request
Credit
Response
2015 - David Bolene
Akka What is (was) SOA
22
Choreography
Choreography
Contract
Buyer Seller
RFQ
RFI
Clarification
Decline
Quote
P.O.
DecisionStatusRequest
DecisionStatus
Negotiation
Channel
PostNegotiation
Channel
valid-until
-dateTime
expired
Acceptance
Channel
LossNotification
2015 - David Bolene
TOC
Architecture for Cloud Services
SOA on Akka
23
4
24
Demo 35
What is (was) SOA? 20
Why Akka? 7
2015 - David Bolene
Akka What is a Service in Akka?
24
Web
Service
XML / JSON
Micro
service
Actor
JSON
2015 - David Bolene
Akka Akka Cluster Service Architecture
FrontEnd
(Spray)
Backend
Orchestration
Actors
FrontEnd
(Spray)
Backend
Orchestration
Actors
FrontEnd
(Spray)
Backend
Orchestration
Actors
Load
Balancer
Microservice
Actors
1,2
Microservice
Actors
3,4,5…
Cluster Sharding
(e.g. Fulfillment Process)
External
Web Services
Spray Client
State State
3
Message
Cassandra
Cassandra
Cassandra
25
2015 - David Bolene
Akka Akka Cluster Service Architecture
FrontEnd
(Spray)
Backend
Orchestration
Actors
FrontEnd
(Spray)
Backend
Orchestration
Actors
FrontEnd
(Spray)
Backend
Orchestration
Actors
Load
Balancer
Microservice
Actors
1,2
Microservice
Actors
3,4,5…
Cluster Sharding
(e.g. Fulfillment Process)
Can be dynamically added/removed
for scale
Can be scaled horizontally
with Akka Actor Routers
1
26
2015 - David Bolene and Comcast
Akka Service Registry for Akka
Discovery and Dependency Resolution of Service Actors…
A
B
C
D
E
Service
Registry
for
Akka
Microservice
Actors
1
2
3
Subscribe
to E Publish
E
Deliver
E
Microservice
Actors
Microservice
Actors
4
Publish
A
27
Actor Service Registry for Akka
is a Comcast artifact
soon to be open sourced
2015 - David Bolene and Comcast
Akka Service Registry for Akka
Cluster-Wide Circuit Breaker Coordinator for Service Actors…
A
B
C
Service
Registry
for
Akka
Microservice
Actors
3
1
2
UnPublish
A Death
Watch
E
E
Unavailable
Microservice
Actors
Microservice
Actors
E
D
28
Actor Service Registry for Akka
is a Comcast artifact
soon to be open sourced
2015 - David Bolene
Akka Microservice Actors
FSM Circuit Breaker
29
B
Offline Online
B [available]
B [unavailable]
A
depends
on
Overseer
supervises
2015 - David Bolene
Akka Akka Clustering
Docker
Container
Docker
Container
Perfect with Docker
RUN java -jar FrontEnd.jar 2551
RUN java -jar BackEnd.jar 2552
30
2015 - David Bolene
Akka
Docker Runtime Provides Cluster Node Resiliency
Docker
Container
Docker
Container
Docker
Container
Docker
Container
Docker
Container
Docker
Container
Container Restart Policy: always or on-failure
Recovery
31
2015 - David Bolene and Comcast
Akka Service Registry for Akka
Provides Microservice Dependency Recovery/Resiliency
A
B
C
D
E
Service
Registry
for
Akka
Microservice
Actors
1
2
3
Subscribe
to E Publish
E
Deliver
E
Microservice
Actors
Microservice
Actors
4
Publish
A
32
2015 - David Bolene
Akka
Actor
Actor
Actor
Supervises
Actor
Actor
Actor
Exception
Actor
Actor
Actor
re-start
Akka systems
are
fault-tolerant
(self-healing)
33
2015 - David Bolene
TOC
Architecture for Cloud Services
SOA on Akka
34
4
24
Demo 35
What is (was) SOA? 20
Why Akka? 7
2015 - David Bolene 35
Bob Wilson’s Garage
We repair your car
(if our staff showed up today)
and
we detail it for free!
2015 - David Bolene 36
FrontEnd
(Spray)
Client
Backend
Orchestration
Actors
Backend
Orchestration
Actors
Staffing
Microservice
Car Detailing
Microservice
Sharded Order Fulfillment Processes
Cassandra
Cassandra
Cassandra
Car Repair
Microservice
Service
Registry
for Akka
Bob Wilson’s Garage
Cluster
Depends On
Depends On
2015 - David Bolene 37
Initial
State
Car
Repairing
State
Car
Detailing
State
Finished
Service
Unavailable
BobWilsonsGarage
ServiceRequest
Car Repair Microservice Car Detailing Microservice
Staffing Microservice
BobWilsonsGarage
ServiceResponse
REST Client
Car
Service
Request
Car
Service
Response
Staffing
Request
Staffing
Request
Staffing
Response
Staffing
Response
Car
Detail
Request
Car
Detail
Response
Fulfillment Process
Bob Wilson’s
Garage
in
BPMN
[Car Repair & Car Detailing Offline]
[Car Detailing Offline]
POST GET
2015/09/17
dbolene@letsdox.com
twitter: dbolene
https://github.com/dbolene/BobWilsonsGarage
SOA on Steroids
David Bolene
in
collaboration
with
https://github.com/Comcast/ActorServiceRegistry
2015 - David Bolene
Cassandra
Why Cassandra
Cassandra
Node
Cassandra
Node
Cassandra
Node
Cassandra
Node
Cassandra
Node
eventually
consistent
replication
eventually
consistent
replication
Akka Actor-based
in-memory state approach
allows for use of eventually
consistent NoSQL
persistence.
39
Cassandra is the
best write-optimized
scalable and
production maintainable
NoSQL system
on the market
(fits Akka perfectly).
2015 - David Bolene
Cassandra
Why Cassandra
Cassandra
Node
Cassandra
Node
Cassandra
Node
Cassandra
Node
Cassandra
Node
40
Client
Write
Consistency
Tunable
Read
Consistency
Tunable
2015 - David Bolene
Why Cassandra
Cassandra
Node
Cassandra
Node
Cassandra
Node
Cassandra
Node
Cassandra
Node
Cassandra
Node
Cassandra
Node
Cassandra
Node
Cassandra
Node
Cassandra
Node
Data Center
Replication
41
Reporting & Analytics
Online
Cluster
Reporting
Cluster
2015 - David Bolene
Materialized Views
How to Use Cassandra
42
Actor
Journal
Store
Snapshot
Store
Event
Event
Event
snapshot
Fulfillment
(Actor)
State
Property
2
Mutate
Party
(Actor)
Fulfillment
(Actor)
Property
1
Property
2
Materialized View - Party Vs Fulfillment Materialized View - Party Vs FuflillmentState
Designed
for sequential scans
Designed
for sequential scans
Side-EffectSide-Effect
Party
(Actor)

More Related Content

Similar to SOA on Steroids

User-friendly Multimeda Authoring with Pachyderm
User-friendly Multimeda Authoring with PachydermUser-friendly Multimeda Authoring with Pachyderm
User-friendly Multimeda Authoring with Pachyderm
scottsayre
 
DevOps and Continuous Delivery with Visual Studio 2015 and VSTS
DevOps and Continuous Delivery with Visual Studio 2015 and VSTSDevOps and Continuous Delivery with Visual Studio 2015 and VSTS
DevOps and Continuous Delivery with Visual Studio 2015 and VSTS
Solidify
 

Similar to SOA on Steroids (20)

Select Star: Flink SQL for Pulsar Folks - Pulsar Summit NA 2021
Select Star: Flink SQL for Pulsar Folks - Pulsar Summit NA 2021Select Star: Flink SQL for Pulsar Folks - Pulsar Summit NA 2021
Select Star: Flink SQL for Pulsar Folks - Pulsar Summit NA 2021
 
Introducing Windows Azure BizTalk Services
Introducing Windows Azure BizTalk ServicesIntroducing Windows Azure BizTalk Services
Introducing Windows Azure BizTalk Services
 
AtlasCamp 2015 Keynote
AtlasCamp 2015 KeynoteAtlasCamp 2015 Keynote
AtlasCamp 2015 Keynote
 
User-friendly Multimeda Authoring with Pachyderm
User-friendly Multimeda Authoring with PachydermUser-friendly Multimeda Authoring with Pachyderm
User-friendly Multimeda Authoring with Pachyderm
 
MySQL 5.7 Replication News
MySQL 5.7 Replication News MySQL 5.7 Replication News
MySQL 5.7 Replication News
 
CA Service Virtualization 9.0—What's the Latest and Greatest
CA Service Virtualization 9.0—What's the Latest and GreatestCA Service Virtualization 9.0—What's the Latest and Greatest
CA Service Virtualization 9.0—What's the Latest and Greatest
 
MySQL 5.7: Focus on Replication
MySQL 5.7: Focus on ReplicationMySQL 5.7: Focus on Replication
MySQL 5.7: Focus on Replication
 
MySQL user camp march 11th 2016
MySQL user camp march 11th 2016MySQL user camp march 11th 2016
MySQL user camp march 11th 2016
 
Softchoice: 20 Tough Questions on Office 365 & Cloud
Softchoice: 20 Tough Questions on Office 365 & CloudSoftchoice: 20 Tough Questions on Office 365 & Cloud
Softchoice: 20 Tough Questions on Office 365 & Cloud
 
KubeBoot - Spring Boot deployment on Kubernetes
KubeBoot - Spring Boot deployment on KubernetesKubeBoot - Spring Boot deployment on Kubernetes
KubeBoot - Spring Boot deployment on Kubernetes
 
Webex APIs for Administrators - CL20B - DEVNET-2610
Webex APIs for Administrators - CL20B - DEVNET-2610Webex APIs for Administrators - CL20B - DEVNET-2610
Webex APIs for Administrators - CL20B - DEVNET-2610
 
DevOps and Continuous Delivery with Visual Studio 2015 and VSTS
DevOps and Continuous Delivery with Visual Studio 2015 and VSTSDevOps and Continuous Delivery with Visual Studio 2015 and VSTS
DevOps and Continuous Delivery with Visual Studio 2015 and VSTS
 
KUBEBOOT - SPRING BOOT DEPLOYMENT ON KUBERNETES
KUBEBOOT - SPRING BOOT DEPLOYMENT ON KUBERNETESKUBEBOOT - SPRING BOOT DEPLOYMENT ON KUBERNETES
KUBEBOOT - SPRING BOOT DEPLOYMENT ON KUBERNETES
 
Soasta | CloudBees webinar 11/12/2015
Soasta | CloudBees webinar 11/12/2015Soasta | CloudBees webinar 11/12/2015
Soasta | CloudBees webinar 11/12/2015
 
DEVNET-1147 Energizing Your Career with Cloud Technologies
DEVNET-1147	Energizing Your Career with Cloud TechnologiesDEVNET-1147	Energizing Your Career with Cloud Technologies
DEVNET-1147 Energizing Your Career with Cloud Technologies
 
WSO2 Guest Webinar - ESB meets IoT, a Primer on WSO2 Enterprise Service Bus (...
WSO2 Guest Webinar - ESB meets IoT, a Primer on WSO2 Enterprise Service Bus (...WSO2 Guest Webinar - ESB meets IoT, a Primer on WSO2 Enterprise Service Bus (...
WSO2 Guest Webinar - ESB meets IoT, a Primer on WSO2 Enterprise Service Bus (...
 
Microservice 4.0 Journey - From Spring NetFlix OSS to Istio Service Mesh and ...
Microservice 4.0 Journey - From Spring NetFlix OSS to Istio Service Mesh and ...Microservice 4.0 Journey - From Spring NetFlix OSS to Istio Service Mesh and ...
Microservice 4.0 Journey - From Spring NetFlix OSS to Istio Service Mesh and ...
 
Select Star: Unified Batch & Streaming with Flink SQL & Pulsar
Select Star: Unified Batch & Streaming with Flink SQL & PulsarSelect Star: Unified Batch & Streaming with Flink SQL & Pulsar
Select Star: Unified Batch & Streaming with Flink SQL & Pulsar
 
DevOps for a 10-Year-Old (Codebase)
DevOps for a 10-Year-Old (Codebase)DevOps for a 10-Year-Old (Codebase)
DevOps for a 10-Year-Old (Codebase)
 
Git - A better source control
Git - A better source controlGit - A better source control
Git - A better source control
 

Recently uploaded

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Recently uploaded (20)

Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire 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
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
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
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
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...
 

SOA on Steroids

  • 1. 2015/09/17 SOA on Steroids David Bolene in collaboration with
  • 2. 2015 - David Bolene TOC Architecture for Cloud Services SOA on Akka 2 4 24 Demo 35 What is (was) SOA? 20 Why Akka? 7
  • 3. 2015 - David Bolene TOC Architecture for Cloud Services SOA on Akka 3 4 24 Demo 35 What is (was) SOA? 20 Why Akka? 7
  • 4. 2015 - David Bolene Architecture Motivators for Cloud Services - Elastic / Scalable - Modular - Simple - Low Latency - Service Integratable - Resilient - High Throughput 4
  • 5. 2015 - David Bolene Architecture Anti-Patterns for Cloud Services - Transaction Locking in the Database - Locked/Synchronized Mutable Objects - Database Joins - Thread Blocking Method Calls - Thread Blocking Service Calls 5
  • 6. 2015 - David Bolene TOC Architecture for Cloud Services SOA on Akka 6 4 24 Demo 35 What is (was) SOA? 20 Why Akka? 7
  • 7. 2015 - David Bolene Akka Actors Inbox Message Actor or Future Async Send Enqueue Actor “one at a time”Dispatcher Threads Cores 7 How They Work
  • 8. 2015 - David Bolene Akka Actor Actor Actor Supervises Actor Actor Actor Exception Actor Actor Actor re-start Self Healing 8
  • 9. 2015 - David Bolene Akka Akka Persistence Actor Journal Store (e.g. Cassandra) Snapshot Store (e.g. Cassandra) Event Event Event snapshotIncremental Periodic async writes Message Actor Durability - An Event Sourced Approach 9
  • 10. 2015 - David Bolene Akka Akka Persistence Actor Event Event Event snapshot Actor State Recovery latest replay 1 2 Journal Store (e.g. Cassandra) Snapshot Store (e.g. Cassandra) 10 then Disk Sequential Scans Message
  • 11. 2015 - David Bolene REST based on Akka Socket Handler ActorTCP Packets socket REST Route Handler Actor HTTP Requests 11 Spray / Akka HTTP
  • 12. 2015 - David Bolene Spray / Akka HTTP REST based on Akka Socket Handler ActorTCP Packets socket REST Route Handler Actor HTTP Requests Business Domain ActorMessage Context Continuation 12
  • 13. 2015 - David Bolene Spray / Akka HTTP REST based on Akka Socket Handler ActorTCP Packets socket REST Route Handler Actor HTTP Requests Business Domain ActorMessage Context Continuation Socket Handler ActorTCP Packets socket HTTP Response Context Business Domain ActorMessage time 13
  • 14. 2015 - David Bolene Async from Top to Bottom Domain Actors Cassandra Akka.IO HTTP Toolkit Socket Packets Spray REST Toolkit HTTP Commands / Events Turtles All the Way Down Async Writes 14
  • 15. 2015 - David Bolene 15 Async from Front to Back Domain Actors Akka.IO HTTP Toolkit Socket Spray REST Toolkit Turtles All the Way Through Socket Spray Client Akka.IO HTTP Toolkit Frontend (REST Client Calls) Backend (External Service Calls)
  • 16. 2015 - David Bolene Akka Clustering Actor Hosting Cluster Node Actor Hosting Cluster Node Actor Hosting Cluster Node Actor Hosting Cluster Node Actor Hosting Cluster Node Actor Hosting Cluster Node Scaling Actors… Message Akka 16 Akka Protocol
  • 17. 2015 - David Bolene Akka FrontEnd (Spray) Virtualizing Actor Placement Backend Node Backend Node Backend Node Cluster Sharding Akka Cluster Sharding Message Shard Proxy (e.g.) Cassandra Re-hydrate on Demand Passivate on Inactivity Message 17
  • 18. 2015 - David Bolene Akka Look Ma! No Transactions Shopping Cart Actor Cassandra 18 Live state is here NOT here
  • 19. 2015 - David Bolene TOC Architecture for Cloud Services SOA on Akka 19 4 24 Demo 35 What is (was) SOA? 20 Why Akka? 7
  • 20. 2015 - David Bolene Akka What is (was) SOA 20 (fat) Web Services Web Service Web Service Web Service Web Service Web Service XML / JSON XML / JSON XML / JSON XML / JSON XML / JSON
  • 21. 2015 - David Bolene Akka What is (was) SOA 21 Process Orchestration (e.g. BPEL) Receive Order Request Credit Score Receive Credit Score Send Order Status Credit Service Customer Order Placement Process Seller Order Capture Process Customer Order Order Status Credit Request Credit Response
  • 22. 2015 - David Bolene Akka What is (was) SOA 22 Choreography Choreography Contract Buyer Seller RFQ RFI Clarification Decline Quote P.O. DecisionStatusRequest DecisionStatus Negotiation Channel PostNegotiation Channel valid-until -dateTime expired Acceptance Channel LossNotification
  • 23. 2015 - David Bolene TOC Architecture for Cloud Services SOA on Akka 23 4 24 Demo 35 What is (was) SOA? 20 Why Akka? 7
  • 24. 2015 - David Bolene Akka What is a Service in Akka? 24 Web Service XML / JSON Micro service Actor JSON
  • 25. 2015 - David Bolene Akka Akka Cluster Service Architecture FrontEnd (Spray) Backend Orchestration Actors FrontEnd (Spray) Backend Orchestration Actors FrontEnd (Spray) Backend Orchestration Actors Load Balancer Microservice Actors 1,2 Microservice Actors 3,4,5… Cluster Sharding (e.g. Fulfillment Process) External Web Services Spray Client State State 3 Message Cassandra Cassandra Cassandra 25
  • 26. 2015 - David Bolene Akka Akka Cluster Service Architecture FrontEnd (Spray) Backend Orchestration Actors FrontEnd (Spray) Backend Orchestration Actors FrontEnd (Spray) Backend Orchestration Actors Load Balancer Microservice Actors 1,2 Microservice Actors 3,4,5… Cluster Sharding (e.g. Fulfillment Process) Can be dynamically added/removed for scale Can be scaled horizontally with Akka Actor Routers 1 26
  • 27. 2015 - David Bolene and Comcast Akka Service Registry for Akka Discovery and Dependency Resolution of Service Actors… A B C D E Service Registry for Akka Microservice Actors 1 2 3 Subscribe to E Publish E Deliver E Microservice Actors Microservice Actors 4 Publish A 27 Actor Service Registry for Akka is a Comcast artifact soon to be open sourced
  • 28. 2015 - David Bolene and Comcast Akka Service Registry for Akka Cluster-Wide Circuit Breaker Coordinator for Service Actors… A B C Service Registry for Akka Microservice Actors 3 1 2 UnPublish A Death Watch E E Unavailable Microservice Actors Microservice Actors E D 28 Actor Service Registry for Akka is a Comcast artifact soon to be open sourced
  • 29. 2015 - David Bolene Akka Microservice Actors FSM Circuit Breaker 29 B Offline Online B [available] B [unavailable] A depends on Overseer supervises
  • 30. 2015 - David Bolene Akka Akka Clustering Docker Container Docker Container Perfect with Docker RUN java -jar FrontEnd.jar 2551 RUN java -jar BackEnd.jar 2552 30
  • 31. 2015 - David Bolene Akka Docker Runtime Provides Cluster Node Resiliency Docker Container Docker Container Docker Container Docker Container Docker Container Docker Container Container Restart Policy: always or on-failure Recovery 31
  • 32. 2015 - David Bolene and Comcast Akka Service Registry for Akka Provides Microservice Dependency Recovery/Resiliency A B C D E Service Registry for Akka Microservice Actors 1 2 3 Subscribe to E Publish E Deliver E Microservice Actors Microservice Actors 4 Publish A 32
  • 33. 2015 - David Bolene Akka Actor Actor Actor Supervises Actor Actor Actor Exception Actor Actor Actor re-start Akka systems are fault-tolerant (self-healing) 33
  • 34. 2015 - David Bolene TOC Architecture for Cloud Services SOA on Akka 34 4 24 Demo 35 What is (was) SOA? 20 Why Akka? 7
  • 35. 2015 - David Bolene 35 Bob Wilson’s Garage We repair your car (if our staff showed up today) and we detail it for free!
  • 36. 2015 - David Bolene 36 FrontEnd (Spray) Client Backend Orchestration Actors Backend Orchestration Actors Staffing Microservice Car Detailing Microservice Sharded Order Fulfillment Processes Cassandra Cassandra Cassandra Car Repair Microservice Service Registry for Akka Bob Wilson’s Garage Cluster Depends On Depends On
  • 37. 2015 - David Bolene 37 Initial State Car Repairing State Car Detailing State Finished Service Unavailable BobWilsonsGarage ServiceRequest Car Repair Microservice Car Detailing Microservice Staffing Microservice BobWilsonsGarage ServiceResponse REST Client Car Service Request Car Service Response Staffing Request Staffing Request Staffing Response Staffing Response Car Detail Request Car Detail Response Fulfillment Process Bob Wilson’s Garage in BPMN [Car Repair & Car Detailing Offline] [Car Detailing Offline] POST GET
  • 38. 2015/09/17 dbolene@letsdox.com twitter: dbolene https://github.com/dbolene/BobWilsonsGarage SOA on Steroids David Bolene in collaboration with https://github.com/Comcast/ActorServiceRegistry
  • 39. 2015 - David Bolene Cassandra Why Cassandra Cassandra Node Cassandra Node Cassandra Node Cassandra Node Cassandra Node eventually consistent replication eventually consistent replication Akka Actor-based in-memory state approach allows for use of eventually consistent NoSQL persistence. 39 Cassandra is the best write-optimized scalable and production maintainable NoSQL system on the market (fits Akka perfectly).
  • 40. 2015 - David Bolene Cassandra Why Cassandra Cassandra Node Cassandra Node Cassandra Node Cassandra Node Cassandra Node 40 Client Write Consistency Tunable Read Consistency Tunable
  • 41. 2015 - David Bolene Why Cassandra Cassandra Node Cassandra Node Cassandra Node Cassandra Node Cassandra Node Cassandra Node Cassandra Node Cassandra Node Cassandra Node Cassandra Node Data Center Replication 41 Reporting & Analytics Online Cluster Reporting Cluster
  • 42. 2015 - David Bolene Materialized Views How to Use Cassandra 42 Actor Journal Store Snapshot Store Event Event Event snapshot Fulfillment (Actor) State Property 2 Mutate Party (Actor) Fulfillment (Actor) Property 1 Property 2 Materialized View - Party Vs Fulfillment Materialized View - Party Vs FuflillmentState Designed for sequential scans Designed for sequential scans Side-EffectSide-Effect Party (Actor)