SlideShare a Scribd company logo
ITERATORSI T E R A T O R S @luksow
Microservices in Scala
theory & practice
Łukasz Sowa, Warsaw Scala Enthusiasts 2015-07-08
ITERATORSI T E R A T O R S @luksow
Hi, I'm Łukasz
●
Co-founder, engineer @ Iterators (https://iterato.rs)
●
ScalaWAW organizer (http://meetup.com/ScalaWAW)
●
Specializes in: highly concurrent & distributed systems
●
Pizza, beer & football lover
●
http://luksow.com (soon!)
●
contact@luksow.com
●
@luksow
ITERATORSI T E R A T O R S @luksow
What's in it for you?
●
Learn
– What are microservices?
– How to implement them using Scala
●
Takeaways
– Feel enthusiastic but cautious about microservices
– Be able to design your next project using microservices and Scala
– Experience with (almost) production-ready system designed with MSA
●
Nope
– Yet another REST microframework showcase
– 'Microservices will solve all your problems'-type bullshit marketing
ITERATORSI T E R A T O R S @luksow
Theory
In a nutshell
ITERATORSI T E R A T O R S @luksow
What are microservices?
●
Architectural style (MSA)
●
System is composed of multiple services
– Small*
– Independently deployed
– Communicate using (lightweight) protocols
– Organized around business capabilities
●
Bounded Context (DDD) or Single Responsibility
Principle (OO) implemented in architecture
ITERATORSI T E R A T O R S @luksow
Practice
For the next ~45 minutes
ITERATORSI T E R A T O R S @luksow
Let's design!
Design a system that allows users to login/register using FB, email-password or
codecard. Authenticated user can subscribe to different events from BTC
markets (ex. rate changed, volume over N, ask below M etc.) and get real-time alerts
about them. Make sure to gather relevant business metrics.
auth-fb auth-pass auth-codes
btc-users
btc-ws
identity
metrics
session
token
frontend
btc-market
load balancer
ITERATORSI T E R A T O R S @luksow
Demo
In the meanwhile, please download the Internet...
$ git clone https://github.com/theiterators/reactive-microservices.git
$ cd reactive-microservices
$ sbt compile
$ # import into your favourite IDE
ITERATORSI T E R A T O R S @luksow
Private data stores
auth-fb auth-pass auth-codes
btc-users
btc-ws
identity
metrics
session
token
btc-market
MongoDB
Redis PostgreSQL PostgreSQL
PostgreSQL
MongoDB
Event journal
ITERATORSI T E R A T O R S @luksow
Shared data stores
auth-fb auth-pass auth-codes
btc-users
btc-ws
metrics
session
btc-market
MongoDB
token
Redis PostgreSQL PostgreSQL
PostgreSQL
identity
MongoDB
Event journal
ITERATORSI T E R A T O R S @luksow
Metrics flow
ITERATORSI T E R A T O R S @luksow
BTC WS state machine
ITERATORSI T E R A T O R S @luksow
Summary
●
Scala's toolbelt (Akka, Play) is ready for MSA
●
Lots of problems and dilemmas on MSA way
●
Monoliths are easy :-)
●
There are more fine tools for Scala, ex. Finagle
●
Production code is only half story, the other is
operations, which are extremely hard in MSA
ITERATORSI T E R A T O R S @luksow
Hacking time!
Yay!
ITERATORSI T E R A T O R S @luksow
How to spend next 60 minutes?
●
Ideas
1. SPA frontend (Scala.js?)
2. SBT – add Play projects to runAll, clean garbage
3. Metrics – add to other projects
4. Rewrite Play websockets to Akka HTTP websockets
5. Add more BTC markets, update actor protocol
6. Bump dependencies version (migrate to Slick 3, Play 2.4)
7. Simplify streams logic (error handling)
8. Modify business logic (ex. add different authorization levels)
9. Change gateways to use reconnection and/or long-running connections
10. Add new authentication method (ex. G+, SMS)
11. Propose a deployment method (ex. integrate with sbt-assembly or sbt-native-packager)
12. Build deployment environment
13. Integrate with service discovery & configuration management service (ex. ZooKeeper)
14. Think about contract management (ex. integrate with Swagger)
15. Integrate with centralized logging solution (ex. integrate with Logstash) and implement tracing (ex. Correlation-id)
16. Invent a way of testing – single services, subsets or whole solution
17. Your cool idea goes here!
●
Subscribe now to http://meetup.com/ScalaWAW to be notified about microservices hackathon in July or August
●
Ask me anything! (about ideas, this activator, ScalaWAW, running a software company, ...)
ITERATORSI T E R A T O R S @luksow
Thanks!
●
Łukasz Sowa
●
http://luksow.com
●
https://iterato.rs (yes, hiring!)
●
contact@luksow.com
●
@luksow

More Related Content

What's hot

Simple Solutions for Complex Problems
Simple Solutions for Complex Problems Simple Solutions for Complex Problems
Simple Solutions for Complex Problems
Apcera
 
Kafka Connect: Operational Lessons Learned from the Trenches (Elizabeth Benne...
Kafka Connect: Operational Lessons Learned from the Trenches (Elizabeth Benne...Kafka Connect: Operational Lessons Learned from the Trenches (Elizabeth Benne...
Kafka Connect: Operational Lessons Learned from the Trenches (Elizabeth Benne...
confluent
 
Tracing Micro Services with OpenTracing
Tracing Micro Services with OpenTracingTracing Micro Services with OpenTracing
Tracing Micro Services with OpenTracing
Hemant Kumar
 
Implementing Microservices with NATS
Implementing Microservices with NATSImplementing Microservices with NATS
Implementing Microservices with NATS
Apcera
 
NATS vs HTTP
NATS vs HTTPNATS vs HTTP
NATS vs HTTP
Apcera
 
A New Way of Thinking | NATS 2.0 & Connectivity
A New Way of Thinking | NATS 2.0 & ConnectivityA New Way of Thinking | NATS 2.0 & Connectivity
A New Way of Thinking | NATS 2.0 & Connectivity
NATS
 
NATS for Modern Messaging and Microservices
NATS for Modern Messaging and MicroservicesNATS for Modern Messaging and Microservices
NATS for Modern Messaging and Microservices
Apcera
 
Delivering: from Kafka to WebSockets | Adam Warski, SoftwareMill
Delivering: from Kafka to WebSockets | Adam Warski, SoftwareMillDelivering: from Kafka to WebSockets | Adam Warski, SoftwareMill
Delivering: from Kafka to WebSockets | Adam Warski, SoftwareMill
HostedbyConfluent
 
Dynamic routing in microservice oriented architecture
Dynamic routing in microservice oriented architectureDynamic routing in microservice oriented architecture
Dynamic routing in microservice oriented architecture
Daniel Leon
 
From on premises monolith to cloud microservices
From on premises monolith to cloud microservicesFrom on premises monolith to cloud microservices
From on premises monolith to cloud microservices
Albert Lombarte
 
Gluecon - Kafka and the service mesh
Gluecon - Kafka and the service meshGluecon - Kafka and the service mesh
Gluecon - Kafka and the service mesh
Gwen (Chen) Shapira
 
"Fintech inside of a SaaS powered by 2000+ Microservices", Volodymyr Malyk
"Fintech inside of a SaaS powered by 2000+ Microservices", Volodymyr Malyk"Fintech inside of a SaaS powered by 2000+ Microservices", Volodymyr Malyk
"Fintech inside of a SaaS powered by 2000+ Microservices", Volodymyr Malyk
Fwdays
 
Strimzi - Where Apache Kafka meets OpenShift - OpenShift Spain MeetUp
Strimzi - Where Apache Kafka meets OpenShift - OpenShift Spain MeetUpStrimzi - Where Apache Kafka meets OpenShift - OpenShift Spain MeetUp
Strimzi - Where Apache Kafka meets OpenShift - OpenShift Spain MeetUp
José Román Martín Gil
 
GopherCon 2017 - Writing Networking Clients in Go: The Design & Implementati...
GopherCon 2017 -  Writing Networking Clients in Go: The Design & Implementati...GopherCon 2017 -  Writing Networking Clients in Go: The Design & Implementati...
GopherCon 2017 - Writing Networking Clients in Go: The Design & Implementati...
wallyqs
 
Apache Kafka - Event Sourcing, Monitoring, Librdkafka, Scaling & Partitioning
Apache Kafka - Event Sourcing, Monitoring, Librdkafka, Scaling & PartitioningApache Kafka - Event Sourcing, Monitoring, Librdkafka, Scaling & Partitioning
Apache Kafka - Event Sourcing, Monitoring, Librdkafka, Scaling & Partitioning
Guido Schmutz
 
Flexible Authentication Strategies with SASL/OAUTHBEARER (Michael Kaminski, T...
Flexible Authentication Strategies with SASL/OAUTHBEARER (Michael Kaminski, T...Flexible Authentication Strategies with SASL/OAUTHBEARER (Michael Kaminski, T...
Flexible Authentication Strategies with SASL/OAUTHBEARER (Michael Kaminski, T...
confluent
 
Introduction to the Nancy Framework
Introduction to the Nancy FrameworkIntroduction to the Nancy Framework
Introduction to the Nancy Framework
Tim Bourguignon
 
Hello Lambda - How to call Lambdas on AWS
Hello Lambda - How to call Lambdas on AWSHello Lambda - How to call Lambdas on AWS
Hello Lambda - How to call Lambdas on AWS
David Roberts
 

What's hot (18)

Simple Solutions for Complex Problems
Simple Solutions for Complex Problems Simple Solutions for Complex Problems
Simple Solutions for Complex Problems
 
Kafka Connect: Operational Lessons Learned from the Trenches (Elizabeth Benne...
Kafka Connect: Operational Lessons Learned from the Trenches (Elizabeth Benne...Kafka Connect: Operational Lessons Learned from the Trenches (Elizabeth Benne...
Kafka Connect: Operational Lessons Learned from the Trenches (Elizabeth Benne...
 
Tracing Micro Services with OpenTracing
Tracing Micro Services with OpenTracingTracing Micro Services with OpenTracing
Tracing Micro Services with OpenTracing
 
Implementing Microservices with NATS
Implementing Microservices with NATSImplementing Microservices with NATS
Implementing Microservices with NATS
 
NATS vs HTTP
NATS vs HTTPNATS vs HTTP
NATS vs HTTP
 
A New Way of Thinking | NATS 2.0 & Connectivity
A New Way of Thinking | NATS 2.0 & ConnectivityA New Way of Thinking | NATS 2.0 & Connectivity
A New Way of Thinking | NATS 2.0 & Connectivity
 
NATS for Modern Messaging and Microservices
NATS for Modern Messaging and MicroservicesNATS for Modern Messaging and Microservices
NATS for Modern Messaging and Microservices
 
Delivering: from Kafka to WebSockets | Adam Warski, SoftwareMill
Delivering: from Kafka to WebSockets | Adam Warski, SoftwareMillDelivering: from Kafka to WebSockets | Adam Warski, SoftwareMill
Delivering: from Kafka to WebSockets | Adam Warski, SoftwareMill
 
Dynamic routing in microservice oriented architecture
Dynamic routing in microservice oriented architectureDynamic routing in microservice oriented architecture
Dynamic routing in microservice oriented architecture
 
From on premises monolith to cloud microservices
From on premises monolith to cloud microservicesFrom on premises monolith to cloud microservices
From on premises monolith to cloud microservices
 
Gluecon - Kafka and the service mesh
Gluecon - Kafka and the service meshGluecon - Kafka and the service mesh
Gluecon - Kafka and the service mesh
 
"Fintech inside of a SaaS powered by 2000+ Microservices", Volodymyr Malyk
"Fintech inside of a SaaS powered by 2000+ Microservices", Volodymyr Malyk"Fintech inside of a SaaS powered by 2000+ Microservices", Volodymyr Malyk
"Fintech inside of a SaaS powered by 2000+ Microservices", Volodymyr Malyk
 
Strimzi - Where Apache Kafka meets OpenShift - OpenShift Spain MeetUp
Strimzi - Where Apache Kafka meets OpenShift - OpenShift Spain MeetUpStrimzi - Where Apache Kafka meets OpenShift - OpenShift Spain MeetUp
Strimzi - Where Apache Kafka meets OpenShift - OpenShift Spain MeetUp
 
GopherCon 2017 - Writing Networking Clients in Go: The Design & Implementati...
GopherCon 2017 -  Writing Networking Clients in Go: The Design & Implementati...GopherCon 2017 -  Writing Networking Clients in Go: The Design & Implementati...
GopherCon 2017 - Writing Networking Clients in Go: The Design & Implementati...
 
Apache Kafka - Event Sourcing, Monitoring, Librdkafka, Scaling & Partitioning
Apache Kafka - Event Sourcing, Monitoring, Librdkafka, Scaling & PartitioningApache Kafka - Event Sourcing, Monitoring, Librdkafka, Scaling & Partitioning
Apache Kafka - Event Sourcing, Monitoring, Librdkafka, Scaling & Partitioning
 
Flexible Authentication Strategies with SASL/OAUTHBEARER (Michael Kaminski, T...
Flexible Authentication Strategies with SASL/OAUTHBEARER (Michael Kaminski, T...Flexible Authentication Strategies with SASL/OAUTHBEARER (Michael Kaminski, T...
Flexible Authentication Strategies with SASL/OAUTHBEARER (Michael Kaminski, T...
 
Introduction to the Nancy Framework
Introduction to the Nancy FrameworkIntroduction to the Nancy Framework
Introduction to the Nancy Framework
 
Hello Lambda - How to call Lambdas on AWS
Hello Lambda - How to call Lambdas on AWSHello Lambda - How to call Lambdas on AWS
Hello Lambda - How to call Lambdas on AWS
 

Viewers also liked

Microservices in Scala: Play Framework
Microservices in Scala: Play FrameworkMicroservices in Scala: Play Framework
Microservices in Scala: Play Framework
Łukasz Sowa
 
Building Micro-Services with Scala
Building Micro-Services with ScalaBuilding Micro-Services with Scala
Building Micro-Services with Scala
Yardena Meymann
 
Microservices 101: opportunities, dilemmas and problems
Microservices 101: opportunities, dilemmas and problemsMicroservices 101: opportunities, dilemmas and problems
Microservices 101: opportunities, dilemmas and problems
Łukasz Sowa
 
Practical Akka HTTP - introduction
Practical Akka HTTP - introductionPractical Akka HTTP - introduction
Practical Akka HTTP - introduction
Łukasz Sowa
 
Truly agile company
Truly agile companyTruly agile company
Truly agile company
Marek Kirejczyk
 
Microservices - opportunities, dilemmas and problems
Microservices - opportunities, dilemmas and problemsMicroservices - opportunities, dilemmas and problems
Microservices - opportunities, dilemmas and problems
Łukasz Sowa
 
Microservices in the Apache Kafka Ecosystem
Microservices in the Apache Kafka EcosystemMicroservices in the Apache Kafka Ecosystem
Microservices in the Apache Kafka Ecosystem
confluent
 

Viewers also liked (7)

Microservices in Scala: Play Framework
Microservices in Scala: Play FrameworkMicroservices in Scala: Play Framework
Microservices in Scala: Play Framework
 
Building Micro-Services with Scala
Building Micro-Services with ScalaBuilding Micro-Services with Scala
Building Micro-Services with Scala
 
Microservices 101: opportunities, dilemmas and problems
Microservices 101: opportunities, dilemmas and problemsMicroservices 101: opportunities, dilemmas and problems
Microservices 101: opportunities, dilemmas and problems
 
Practical Akka HTTP - introduction
Practical Akka HTTP - introductionPractical Akka HTTP - introduction
Practical Akka HTTP - introduction
 
Truly agile company
Truly agile companyTruly agile company
Truly agile company
 
Microservices - opportunities, dilemmas and problems
Microservices - opportunities, dilemmas and problemsMicroservices - opportunities, dilemmas and problems
Microservices - opportunities, dilemmas and problems
 
Microservices in the Apache Kafka Ecosystem
Microservices in the Apache Kafka EcosystemMicroservices in the Apache Kafka Ecosystem
Microservices in the Apache Kafka Ecosystem
 

Similar to Microservices in Scala - theory & practice

Introduction to OData
Introduction to ODataIntroduction to OData
Introduction to OData
Mindfire Solutions
 
IRJET- Proof of Document using Multichain and Ethereum
IRJET- Proof of Document using Multichain and EthereumIRJET- Proof of Document using Multichain and Ethereum
IRJET- Proof of Document using Multichain and Ethereum
IRJET Journal
 
Building Event-Driven (Micro) Services with Apache Kafka
Building Event-Driven (Micro) Services with Apache KafkaBuilding Event-Driven (Micro) Services with Apache Kafka
Building Event-Driven (Micro) Services with Apache Kafka
Guido Schmutz
 
Blockchin Architecture on Azure-Part-3
Blockchin Architecture on Azure-Part-3Blockchin Architecture on Azure-Part-3
Blockchin Architecture on Azure-Part-3
Mohammad Asif
 
Using Node-RED for building IoT workflows
Using Node-RED for building IoT workflowsUsing Node-RED for building IoT workflows
Using Node-RED for building IoT workflows
Aniruddha Chakrabarti
 
HKOSCON 2020 - Open by default
HKOSCON 2020 - Open by defaultHKOSCON 2020 - Open by default
HKOSCON 2020 - Open by default
William Chong
 
Best of barcelona symposium experience
Best of barcelona symposium experienceBest of barcelona symposium experience
Best of barcelona symposium experience
The Reference
 
MuleSoft Surat Virtual Meetup#28 - Exposing and Consuming SOAP Service - SOAP...
MuleSoft Surat Virtual Meetup#28 - Exposing and Consuming SOAP Service - SOAP...MuleSoft Surat Virtual Meetup#28 - Exposing and Consuming SOAP Service - SOAP...
MuleSoft Surat Virtual Meetup#28 - Exposing and Consuming SOAP Service - SOAP...
Jitendra Bafna
 
Putting microservices on a diet with Istio
Putting microservices on a diet with IstioPutting microservices on a diet with Istio
Putting microservices on a diet with Istio
QAware GmbH
 
Why and How SmartNews uses SaaS?
Why and How SmartNews uses SaaS?Why and How SmartNews uses SaaS?
Why and How SmartNews uses SaaS?
Takumi Sakamoto
 
OGCE Project Overview
OGCE Project OverviewOGCE Project Overview
OGCE Project Overview
marpierc
 
Putting Microservices on a Diet: with Istio!
Putting Microservices on a Diet: with Istio!Putting Microservices on a Diet: with Istio!
Putting Microservices on a Diet: with Istio!
QAware GmbH
 
Monitoring as an entry point for collaboration
Monitoring as an entry point for collaborationMonitoring as an entry point for collaboration
Monitoring as an entry point for collaboration
Julien Pivotto
 
Cloud Control Access: From Hack to Reality
Cloud Control Access: From Hack to RealityCloud Control Access: From Hack to Reality
Cloud Control Access: From Hack to Reality
Alan Quayle
 
Shindig in 2 hours
Shindig in 2 hoursShindig in 2 hours
Shindig in 2 hours
hanhvi
 
OCCIware presentation at EclipseDay in Lyon, November 2017, by Marc Dutoo, Smile
OCCIware presentation at EclipseDay in Lyon, November 2017, by Marc Dutoo, SmileOCCIware presentation at EclipseDay in Lyon, November 2017, by Marc Dutoo, Smile
OCCIware presentation at EclipseDay in Lyon, November 2017, by Marc Dutoo, Smile
OCCIware
 
Model and pilot all cloud layers with OCCIware - Eclipse Day Lyon 2017
Model and pilot all cloud layers with OCCIware - Eclipse Day Lyon 2017Model and pilot all cloud layers with OCCIware - Eclipse Day Lyon 2017
Model and pilot all cloud layers with OCCIware - Eclipse Day Lyon 2017
Marc Dutoo
 
События, шины и интеграция данных в непростом мире микросервисов / Валентин Г...
События, шины и интеграция данных в непростом мире микросервисов / Валентин Г...События, шины и интеграция данных в непростом мире микросервисов / Валентин Г...
События, шины и интеграция данных в непростом мире микросервисов / Валентин Г...
Ontico
 
Docker Internet Money Gateway
Docker Internet Money GatewayDocker Internet Money Gateway
Docker Internet Money Gateway
Mathieu Buffenoir
 
Docker img-no-disclosure
Docker img-no-disclosureDocker img-no-disclosure
Docker img-no-disclosure
Mathieu Buffenoir
 

Similar to Microservices in Scala - theory & practice (20)

Introduction to OData
Introduction to ODataIntroduction to OData
Introduction to OData
 
IRJET- Proof of Document using Multichain and Ethereum
IRJET- Proof of Document using Multichain and EthereumIRJET- Proof of Document using Multichain and Ethereum
IRJET- Proof of Document using Multichain and Ethereum
 
Building Event-Driven (Micro) Services with Apache Kafka
Building Event-Driven (Micro) Services with Apache KafkaBuilding Event-Driven (Micro) Services with Apache Kafka
Building Event-Driven (Micro) Services with Apache Kafka
 
Blockchin Architecture on Azure-Part-3
Blockchin Architecture on Azure-Part-3Blockchin Architecture on Azure-Part-3
Blockchin Architecture on Azure-Part-3
 
Using Node-RED for building IoT workflows
Using Node-RED for building IoT workflowsUsing Node-RED for building IoT workflows
Using Node-RED for building IoT workflows
 
HKOSCON 2020 - Open by default
HKOSCON 2020 - Open by defaultHKOSCON 2020 - Open by default
HKOSCON 2020 - Open by default
 
Best of barcelona symposium experience
Best of barcelona symposium experienceBest of barcelona symposium experience
Best of barcelona symposium experience
 
MuleSoft Surat Virtual Meetup#28 - Exposing and Consuming SOAP Service - SOAP...
MuleSoft Surat Virtual Meetup#28 - Exposing and Consuming SOAP Service - SOAP...MuleSoft Surat Virtual Meetup#28 - Exposing and Consuming SOAP Service - SOAP...
MuleSoft Surat Virtual Meetup#28 - Exposing and Consuming SOAP Service - SOAP...
 
Putting microservices on a diet with Istio
Putting microservices on a diet with IstioPutting microservices on a diet with Istio
Putting microservices on a diet with Istio
 
Why and How SmartNews uses SaaS?
Why and How SmartNews uses SaaS?Why and How SmartNews uses SaaS?
Why and How SmartNews uses SaaS?
 
OGCE Project Overview
OGCE Project OverviewOGCE Project Overview
OGCE Project Overview
 
Putting Microservices on a Diet: with Istio!
Putting Microservices on a Diet: with Istio!Putting Microservices on a Diet: with Istio!
Putting Microservices on a Diet: with Istio!
 
Monitoring as an entry point for collaboration
Monitoring as an entry point for collaborationMonitoring as an entry point for collaboration
Monitoring as an entry point for collaboration
 
Cloud Control Access: From Hack to Reality
Cloud Control Access: From Hack to RealityCloud Control Access: From Hack to Reality
Cloud Control Access: From Hack to Reality
 
Shindig in 2 hours
Shindig in 2 hoursShindig in 2 hours
Shindig in 2 hours
 
OCCIware presentation at EclipseDay in Lyon, November 2017, by Marc Dutoo, Smile
OCCIware presentation at EclipseDay in Lyon, November 2017, by Marc Dutoo, SmileOCCIware presentation at EclipseDay in Lyon, November 2017, by Marc Dutoo, Smile
OCCIware presentation at EclipseDay in Lyon, November 2017, by Marc Dutoo, Smile
 
Model and pilot all cloud layers with OCCIware - Eclipse Day Lyon 2017
Model and pilot all cloud layers with OCCIware - Eclipse Day Lyon 2017Model and pilot all cloud layers with OCCIware - Eclipse Day Lyon 2017
Model and pilot all cloud layers with OCCIware - Eclipse Day Lyon 2017
 
События, шины и интеграция данных в непростом мире микросервисов / Валентин Г...
События, шины и интеграция данных в непростом мире микросервисов / Валентин Г...События, шины и интеграция данных в непростом мире микросервисов / Валентин Г...
События, шины и интеграция данных в непростом мире микросервисов / Валентин Г...
 
Docker Internet Money Gateway
Docker Internet Money GatewayDocker Internet Money Gateway
Docker Internet Money Gateway
 
Docker img-no-disclosure
Docker img-no-disclosureDocker img-no-disclosure
Docker img-no-disclosure
 

Recently uploaded

Busty Girls Call Mumbai 9930245274 Unlimited Short Providing Girls Service Av...
Busty Girls Call Mumbai 9930245274 Unlimited Short Providing Girls Service Av...Busty Girls Call Mumbai 9930245274 Unlimited Short Providing Girls Service Av...
Busty Girls Call Mumbai 9930245274 Unlimited Short Providing Girls Service Av...
revolutionary575
 
Verified Girls Call Mumbai 👀 9820252231 👀 Cash Payment With Room DeliveryDeli...
Verified Girls Call Mumbai 👀 9820252231 👀 Cash Payment With Room DeliveryDeli...Verified Girls Call Mumbai 👀 9820252231 👀 Cash Payment With Room DeliveryDeli...
Verified Girls Call Mumbai 👀 9820252231 👀 Cash Payment With Room DeliveryDeli...
87tomato
 
Hotel Management Software Development Company
Hotel Management Software Development CompanyHotel Management Software Development Company
Hotel Management Software Development Company
XongoLab Technologies LLP
 
How To Fill Timesheet in TaskSprint: Quick Guide 2024
How To Fill Timesheet in TaskSprint: Quick Guide 2024How To Fill Timesheet in TaskSprint: Quick Guide 2024
How To Fill Timesheet in TaskSprint: Quick Guide 2024
TaskSprint | Employee Efficiency Software
 
Authentication Review-June -2024 AP & TS.pptx
Authentication Review-June -2024 AP & TS.pptxAuthentication Review-June -2024 AP & TS.pptx
Authentication Review-June -2024 AP & TS.pptx
DEMONDUOS
 
Independent Girls call Service Pune 000XX00000 Provide Best And Top Girl Serv...
Independent Girls call Service Pune 000XX00000 Provide Best And Top Girl Serv...Independent Girls call Service Pune 000XX00000 Provide Best And Top Girl Serv...
Independent Girls call Service Pune 000XX00000 Provide Best And Top Girl Serv...
bhumivarma35300
 
Russian Girls Call Mumbai 🛵🚡9833363713 💃 Choose Best And Top Girl Service And...
Russian Girls Call Mumbai 🛵🚡9833363713 💃 Choose Best And Top Girl Service And...Russian Girls Call Mumbai 🛵🚡9833363713 💃 Choose Best And Top Girl Service And...
Russian Girls Call Mumbai 🛵🚡9833363713 💃 Choose Best And Top Girl Service And...
dream girl
 
Applitools Autonomous 2.0 Sneak Peek.pdf
Applitools Autonomous 2.0 Sneak Peek.pdfApplitools Autonomous 2.0 Sneak Peek.pdf
Applitools Autonomous 2.0 Sneak Peek.pdf
Applitools
 
Fantastic Design Patterns and Where to use them No Notes.pdf
Fantastic Design Patterns and Where to use them No Notes.pdfFantastic Design Patterns and Where to use them No Notes.pdf
Fantastic Design Patterns and Where to use them No Notes.pdf
6m9p7qnjj8
 
SAP implementation steps PDF - Zyple Software
SAP implementation steps PDF - Zyple SoftwareSAP implementation steps PDF - Zyple Software
SAP implementation steps PDF - Zyple Software
Zyple Software
 
Girls Call Mysore 000XX00000 Provide Best And Top Girl Service And No1 in City
Girls Call Mysore 000XX00000 Provide Best And Top Girl Service And No1 in CityGirls Call Mysore 000XX00000 Provide Best And Top Girl Service And No1 in City
Girls Call Mysore 000XX00000 Provide Best And Top Girl Service And No1 in City
neshakor5152
 
BATber53 AWS Modernize your applications with purpose-built AWS databases
BATber53 AWS Modernize your applications with purpose-built AWS databasesBATber53 AWS Modernize your applications with purpose-built AWS databases
BATber53 AWS Modernize your applications with purpose-built AWS databases
BATbern
 
Agra Girls Call Agra 0X0000000X Unlimited Short Providing Girls Service Avail...
Agra Girls Call Agra 0X0000000X Unlimited Short Providing Girls Service Avail...Agra Girls Call Agra 0X0000000X Unlimited Short Providing Girls Service Avail...
Agra Girls Call Agra 0X0000000X Unlimited Short Providing Girls Service Avail...
rachitkumar09887
 
Amazon Music Spelling Correction - SIGIR 2024
Amazon Music Spelling Correction - SIGIR 2024Amazon Music Spelling Correction - SIGIR 2024
Amazon Music Spelling Correction - SIGIR 2024
siddharth1729
 
High Girls Call Chennai 000XX00000 Provide Best And Top Girl Service And No1 ...
High Girls Call Chennai 000XX00000 Provide Best And Top Girl Service And No1 ...High Girls Call Chennai 000XX00000 Provide Best And Top Girl Service And No1 ...
High Girls Call Chennai 000XX00000 Provide Best And Top Girl Service And No1 ...
singhlata50dh
 
Unleashing the Future: Building a Scalable and Up-to-Date GenAI Chatbot with ...
Unleashing the Future: Building a Scalable and Up-to-Date GenAI Chatbot with ...Unleashing the Future: Building a Scalable and Up-to-Date GenAI Chatbot with ...
Unleashing the Future: Building a Scalable and Up-to-Date GenAI Chatbot with ...
confluent
 
Mobile App Development Company in Noida - Drona Infotech.
Mobile App Development Company in Noida - Drona Infotech.Mobile App Development Company in Noida - Drona Infotech.
Mobile App Development Company in Noida - Drona Infotech.
Mobile App Development Company in Noida - Drona Infotech
 
ERP Software Solutions Provider in Coimbatore
ERP Software Solutions Provider in CoimbatoreERP Software Solutions Provider in Coimbatore
ERP Software Solutions Provider in Coimbatore
Nextskill Technologies
 
Celebrity Girls Call Mumbai 9930687706 Unlimited Short Providing Girls Servic...
Celebrity Girls Call Mumbai 9930687706 Unlimited Short Providing Girls Servic...Celebrity Girls Call Mumbai 9930687706 Unlimited Short Providing Girls Servic...
Celebrity Girls Call Mumbai 9930687706 Unlimited Short Providing Girls Servic...
kiara pandey
 
Il Data Streaming per un’AI real-time di nuova generazione
Il Data Streaming per un’AI real-time di nuova generazioneIl Data Streaming per un’AI real-time di nuova generazione
Il Data Streaming per un’AI real-time di nuova generazione
confluent
 

Recently uploaded (20)

Busty Girls Call Mumbai 9930245274 Unlimited Short Providing Girls Service Av...
Busty Girls Call Mumbai 9930245274 Unlimited Short Providing Girls Service Av...Busty Girls Call Mumbai 9930245274 Unlimited Short Providing Girls Service Av...
Busty Girls Call Mumbai 9930245274 Unlimited Short Providing Girls Service Av...
 
Verified Girls Call Mumbai 👀 9820252231 👀 Cash Payment With Room DeliveryDeli...
Verified Girls Call Mumbai 👀 9820252231 👀 Cash Payment With Room DeliveryDeli...Verified Girls Call Mumbai 👀 9820252231 👀 Cash Payment With Room DeliveryDeli...
Verified Girls Call Mumbai 👀 9820252231 👀 Cash Payment With Room DeliveryDeli...
 
Hotel Management Software Development Company
Hotel Management Software Development CompanyHotel Management Software Development Company
Hotel Management Software Development Company
 
How To Fill Timesheet in TaskSprint: Quick Guide 2024
How To Fill Timesheet in TaskSprint: Quick Guide 2024How To Fill Timesheet in TaskSprint: Quick Guide 2024
How To Fill Timesheet in TaskSprint: Quick Guide 2024
 
Authentication Review-June -2024 AP & TS.pptx
Authentication Review-June -2024 AP & TS.pptxAuthentication Review-June -2024 AP & TS.pptx
Authentication Review-June -2024 AP & TS.pptx
 
Independent Girls call Service Pune 000XX00000 Provide Best And Top Girl Serv...
Independent Girls call Service Pune 000XX00000 Provide Best And Top Girl Serv...Independent Girls call Service Pune 000XX00000 Provide Best And Top Girl Serv...
Independent Girls call Service Pune 000XX00000 Provide Best And Top Girl Serv...
 
Russian Girls Call Mumbai 🛵🚡9833363713 💃 Choose Best And Top Girl Service And...
Russian Girls Call Mumbai 🛵🚡9833363713 💃 Choose Best And Top Girl Service And...Russian Girls Call Mumbai 🛵🚡9833363713 💃 Choose Best And Top Girl Service And...
Russian Girls Call Mumbai 🛵🚡9833363713 💃 Choose Best And Top Girl Service And...
 
Applitools Autonomous 2.0 Sneak Peek.pdf
Applitools Autonomous 2.0 Sneak Peek.pdfApplitools Autonomous 2.0 Sneak Peek.pdf
Applitools Autonomous 2.0 Sneak Peek.pdf
 
Fantastic Design Patterns and Where to use them No Notes.pdf
Fantastic Design Patterns and Where to use them No Notes.pdfFantastic Design Patterns and Where to use them No Notes.pdf
Fantastic Design Patterns and Where to use them No Notes.pdf
 
SAP implementation steps PDF - Zyple Software
SAP implementation steps PDF - Zyple SoftwareSAP implementation steps PDF - Zyple Software
SAP implementation steps PDF - Zyple Software
 
Girls Call Mysore 000XX00000 Provide Best And Top Girl Service And No1 in City
Girls Call Mysore 000XX00000 Provide Best And Top Girl Service And No1 in CityGirls Call Mysore 000XX00000 Provide Best And Top Girl Service And No1 in City
Girls Call Mysore 000XX00000 Provide Best And Top Girl Service And No1 in City
 
BATber53 AWS Modernize your applications with purpose-built AWS databases
BATber53 AWS Modernize your applications with purpose-built AWS databasesBATber53 AWS Modernize your applications with purpose-built AWS databases
BATber53 AWS Modernize your applications with purpose-built AWS databases
 
Agra Girls Call Agra 0X0000000X Unlimited Short Providing Girls Service Avail...
Agra Girls Call Agra 0X0000000X Unlimited Short Providing Girls Service Avail...Agra Girls Call Agra 0X0000000X Unlimited Short Providing Girls Service Avail...
Agra Girls Call Agra 0X0000000X Unlimited Short Providing Girls Service Avail...
 
Amazon Music Spelling Correction - SIGIR 2024
Amazon Music Spelling Correction - SIGIR 2024Amazon Music Spelling Correction - SIGIR 2024
Amazon Music Spelling Correction - SIGIR 2024
 
High Girls Call Chennai 000XX00000 Provide Best And Top Girl Service And No1 ...
High Girls Call Chennai 000XX00000 Provide Best And Top Girl Service And No1 ...High Girls Call Chennai 000XX00000 Provide Best And Top Girl Service And No1 ...
High Girls Call Chennai 000XX00000 Provide Best And Top Girl Service And No1 ...
 
Unleashing the Future: Building a Scalable and Up-to-Date GenAI Chatbot with ...
Unleashing the Future: Building a Scalable and Up-to-Date GenAI Chatbot with ...Unleashing the Future: Building a Scalable and Up-to-Date GenAI Chatbot with ...
Unleashing the Future: Building a Scalable and Up-to-Date GenAI Chatbot with ...
 
Mobile App Development Company in Noida - Drona Infotech.
Mobile App Development Company in Noida - Drona Infotech.Mobile App Development Company in Noida - Drona Infotech.
Mobile App Development Company in Noida - Drona Infotech.
 
ERP Software Solutions Provider in Coimbatore
ERP Software Solutions Provider in CoimbatoreERP Software Solutions Provider in Coimbatore
ERP Software Solutions Provider in Coimbatore
 
Celebrity Girls Call Mumbai 9930687706 Unlimited Short Providing Girls Servic...
Celebrity Girls Call Mumbai 9930687706 Unlimited Short Providing Girls Servic...Celebrity Girls Call Mumbai 9930687706 Unlimited Short Providing Girls Servic...
Celebrity Girls Call Mumbai 9930687706 Unlimited Short Providing Girls Servic...
 
Il Data Streaming per un’AI real-time di nuova generazione
Il Data Streaming per un’AI real-time di nuova generazioneIl Data Streaming per un’AI real-time di nuova generazione
Il Data Streaming per un’AI real-time di nuova generazione
 

Microservices in Scala - theory & practice

  • 1. ITERATORSI T E R A T O R S @luksow Microservices in Scala theory & practice Łukasz Sowa, Warsaw Scala Enthusiasts 2015-07-08
  • 2. ITERATORSI T E R A T O R S @luksow Hi, I'm Łukasz ● Co-founder, engineer @ Iterators (https://iterato.rs) ● ScalaWAW organizer (http://meetup.com/ScalaWAW) ● Specializes in: highly concurrent & distributed systems ● Pizza, beer & football lover ● http://luksow.com (soon!) ● contact@luksow.com ● @luksow
  • 3. ITERATORSI T E R A T O R S @luksow What's in it for you? ● Learn – What are microservices? – How to implement them using Scala ● Takeaways – Feel enthusiastic but cautious about microservices – Be able to design your next project using microservices and Scala – Experience with (almost) production-ready system designed with MSA ● Nope – Yet another REST microframework showcase – 'Microservices will solve all your problems'-type bullshit marketing
  • 4. ITERATORSI T E R A T O R S @luksow Theory In a nutshell
  • 5. ITERATORSI T E R A T O R S @luksow What are microservices? ● Architectural style (MSA) ● System is composed of multiple services – Small* – Independently deployed – Communicate using (lightweight) protocols – Organized around business capabilities ● Bounded Context (DDD) or Single Responsibility Principle (OO) implemented in architecture
  • 6. ITERATORSI T E R A T O R S @luksow Practice For the next ~45 minutes
  • 7. ITERATORSI T E R A T O R S @luksow Let's design! Design a system that allows users to login/register using FB, email-password or codecard. Authenticated user can subscribe to different events from BTC markets (ex. rate changed, volume over N, ask below M etc.) and get real-time alerts about them. Make sure to gather relevant business metrics. auth-fb auth-pass auth-codes btc-users btc-ws identity metrics session token frontend btc-market load balancer
  • 8. ITERATORSI T E R A T O R S @luksow Demo In the meanwhile, please download the Internet... $ git clone https://github.com/theiterators/reactive-microservices.git $ cd reactive-microservices $ sbt compile $ # import into your favourite IDE
  • 9. ITERATORSI T E R A T O R S @luksow Private data stores auth-fb auth-pass auth-codes btc-users btc-ws identity metrics session token btc-market MongoDB Redis PostgreSQL PostgreSQL PostgreSQL MongoDB Event journal
  • 10. ITERATORSI T E R A T O R S @luksow Shared data stores auth-fb auth-pass auth-codes btc-users btc-ws metrics session btc-market MongoDB token Redis PostgreSQL PostgreSQL PostgreSQL identity MongoDB Event journal
  • 11. ITERATORSI T E R A T O R S @luksow Metrics flow
  • 12. ITERATORSI T E R A T O R S @luksow BTC WS state machine
  • 13. ITERATORSI T E R A T O R S @luksow Summary ● Scala's toolbelt (Akka, Play) is ready for MSA ● Lots of problems and dilemmas on MSA way ● Monoliths are easy :-) ● There are more fine tools for Scala, ex. Finagle ● Production code is only half story, the other is operations, which are extremely hard in MSA
  • 14. ITERATORSI T E R A T O R S @luksow Hacking time! Yay!
  • 15. ITERATORSI T E R A T O R S @luksow How to spend next 60 minutes? ● Ideas 1. SPA frontend (Scala.js?) 2. SBT – add Play projects to runAll, clean garbage 3. Metrics – add to other projects 4. Rewrite Play websockets to Akka HTTP websockets 5. Add more BTC markets, update actor protocol 6. Bump dependencies version (migrate to Slick 3, Play 2.4) 7. Simplify streams logic (error handling) 8. Modify business logic (ex. add different authorization levels) 9. Change gateways to use reconnection and/or long-running connections 10. Add new authentication method (ex. G+, SMS) 11. Propose a deployment method (ex. integrate with sbt-assembly or sbt-native-packager) 12. Build deployment environment 13. Integrate with service discovery & configuration management service (ex. ZooKeeper) 14. Think about contract management (ex. integrate with Swagger) 15. Integrate with centralized logging solution (ex. integrate with Logstash) and implement tracing (ex. Correlation-id) 16. Invent a way of testing – single services, subsets or whole solution 17. Your cool idea goes here! ● Subscribe now to http://meetup.com/ScalaWAW to be notified about microservices hackathon in July or August ● Ask me anything! (about ideas, this activator, ScalaWAW, running a software company, ...)
  • 16. ITERATORSI T E R A T O R S @luksow Thanks! ● Łukasz Sowa ● http://luksow.com ● https://iterato.rs (yes, hiring!) ● contact@luksow.com ● @luksow