Reactive microservices with play and akka

12
Reactive Microservices Making Microservices Reactive using Play & Akka Scala Matsuri Christopher Hunt @huntchr

Transcript of Reactive microservices with play and akka

Page 1: Reactive microservices with play and akka

Reactive Microservices Making Microservices Reactive using Play & Akka

Scala Matsuri

Christopher Hunt @huntchr

Page 2: Reactive microservices with play and akka

5 Minute Microservices 2

Reactive Microservices

http://www.reactivemanifesto.org/It’s for Developers AND Operations

• Resiliency• The system stays responsive in the face of failure

• Elasticity• The system stays responsive under varying

workload

Page 3: Reactive microservices with play and akka

5 Minute Microservices 3

Example Problem

• Customer Microservice• Create• Retrieve

• Persisting to Datastore• Local Caching

Page 4: Reactive microservices with play and akka

Let’s Do This!

Page 5: Reactive microservices with play and akka

It’s a Microservice!

Page 6: Reactive microservices with play and akka

5 Minute Microservices 6

But is it Reactive?

• Resilient• What happens if/when our Datastore fails?

• Elastic• How do we scale out?

• Cache Management• How to maintain the cache across multiple nodes?

Page 7: Reactive microservices with play and akka

5 Minute Microservices 7

Solution• Cluster our Datastore

• Postgres BDR• https://github.com/huntc/postgres-bdr

• Run on multiple nodes• Deploy to ConductR• https://conductr.typesafe.com/

• Signal for cache updates• Akka Data Replication• https://github.com/patriknw/akka-data-replication

Page 8: Reactive microservices with play and akka

5 Minute Microservices 8

What is ConductR?ConductR is a solution for deploying and managing reactive applications across a cluster of machines.

Page 9: Reactive microservices with play and akka

Make This Reactive!

Page 10: Reactive microservices with play and akka

5 Minute Microservices 10

Reactive Solution Checklist

✓ Resilient✓ Postgres node failure

✓ Elastic✓ Scale out Customer and Postgres✓ Blue/Green Rolling Upgrade

✓ Cache Management✓ Replicate across nodes

Page 11: Reactive microservices with play and akka

Questions?

Page 12: Reactive microservices with play and akka

Thank you!

Christopher Hunt @huntchr