SlideShare une entreprise Scribd logo
1  sur  51
Télécharger pour lire hors ligne
Building microservices
web application using
Scala & Akka
Grokking Engineering, March 2015
Binh Nguyen - Anduin Transactions, Inc.
March 21st, 2015 HCMC
Introduction: Who?
Engineer at-large with strong
interest in engineering
processeses.
2
Who?
August 2014 - now
Anduin Transactions
3
Who?
4
Palantir
Technologies
2011-2014
Who?
5
What?
● What is µ-services architecture?
pros and cons
● Why Anduin µ-services?
● How can Akka & Scala help?
6
The world before microservices
7
Monolithic vs microservices
8
Monolithic problems
● Complexity
9
Monolithic problems
● Complexity
● Conway’s law => silos
10
Monolithic problems
● Complexity
● Conway’s law => silos
● Modules development speed
11
Monolithic problems
● Complexity
● Conway’s law => silos
● Modules development speed
● Dependencies collision
12
Monolithic problems
● Complexity
● Conway’s law => silos
● Modules development speed
● Dependencies collision
● Deployment
13
Monolithic problems
● Complexity
● Conway’s law => silos
● Modules development speed
● Dependencies collision
● Deployment
14
Can it be fixed?
15
So what’s microservices?
Microservices
The term "Microservice Architecture" has sprung up over the last few years to describe a particular way of designing
software applications as suites of independently deployable services. While there is no precise
definition of this architectural style, there are certain common
characteristics around organization around business capability, automated deployment, intelligence in the
endpoints, and decentralized control of languages and data.
Martin Fowler http://martinfowler.com/articles/microservices.html
16
So what’s microservices?
“complex applications are composed of small,
independent processes communicating with
each other using language-agnostic APIs”
Wikipedia
17
Some key takeaways
● should be something one developer can fit in their head
18
Some key takeaways
● Can fit in one developer head
● One developer should be able to independently produce
19
Some key takeaways
● Can fit in one developer head
● One developer should be able to independently produce
● One "verb" (single concern/function, not
GET/PUT/DELETE) per microservice
20
Some key takeaways
● Can fit in one developer head
● One developer should be able to independently produce
● One "verb" (single concern/function, not
GET/PUT/DELETE) per microservice
● Should be possible to deploy in a container
21
Some key takeaways
● Can fit in one developer head
● One developer should be able to independently produce
● One "verb" (single concern/function, not
GET/PUT/DELETE) per microservice
● Should be possible to deploy in a container
● Can be upgraded independently
22
So...what is microservices?
23
Microservices challenges
24
So why chasing that unicorn?
25
So why chasing that unicorn?
26
Iteration speed
So why chasing that unicorn?
27
Engineers autonomy
28
So why chasing that unicorn?
29
More tools available = it’s not too bad
Summary - microservices
● Microservices is challenging
● ...But worths it (in my view)
● Modern tools like Amazon AWS, Docker,
Deis, CoreOS, Kubenettes, Ansible, Akka,
… help a lot!
30
So...programming language?
31
Obligatory joke on language war
32
Node.js/Vert.x/Meteor
33
Go
● Readability over everything else
● Battery included
● Google
● Easy to pick up
● A bit of niche feel (more system oriented)
● No Type safety
● Some problems with cross OSs compiling
34
OK, more serious choice: Java
35
OK, more serious choice: Java
36
Java: Multithreaded programming
37
In
Theory
Java: Multithreaded programming
38
In
Practice
Java: Lack of functional and Immutability
39
Clojure
My personal favorite language
● Simple but no simpler
● Lisp
● Rich Hickey & the likes
● ClojureScript
● Weak libraries
● Dynamic typing
40
Scala: Very complicated
41
Scala: Long time to master
42
Akka = Actor model
● One of the biggest reason for choosing
Scala!
43
Concurrent and
distributed programming
done right
Akka’s “cool kids” club!
● Apache Spark
● Apache Kafka
● Apache Samza
● Spray
● ….
44
Akka Remote Actor and Clustering
● Location transparency
● Distributed by default (beware: Fallacies of
distributed computing)
45
Akka Persistence
● Actor state snapshot for easier recovery
● Event sourcing
46
Akka reactive streaming
Data flow at the same speed as the slowest link
to prevent buffer blows up.
47
Akka: built for modern web
● Akka http 2.0
● Akka websocket
● Akka webRTC
48
Conclusion: Scala & Akka
49
50
51

Contenu connexe

Tendances

Tendances (20)

What's New in the Ambassador Edge Stack 1.0?
What's New in the Ambassador Edge Stack 1.0? What's New in the Ambassador Edge Stack 1.0?
What's New in the Ambassador Edge Stack 1.0?
 
Continuous delivery by sergey seletsky
Continuous delivery by sergey seletskyContinuous delivery by sergey seletsky
Continuous delivery by sergey seletsky
 
Spring cloud for microservices architecture
Spring cloud for microservices architectureSpring cloud for microservices architecture
Spring cloud for microservices architecture
 
Asynchronous Microservices in nodejs
Asynchronous Microservices in nodejsAsynchronous Microservices in nodejs
Asynchronous Microservices in nodejs
 
JavaCro'15 - Service Discovery in OSGi Beyond the JVM using Docker and Consul...
JavaCro'15 - Service Discovery in OSGi Beyond the JVM using Docker and Consul...JavaCro'15 - Service Discovery in OSGi Beyond the JVM using Docker and Consul...
JavaCro'15 - Service Discovery in OSGi Beyond the JVM using Docker and Consul...
 
Microservices with Spring Cloud, Netflix OSS and Kubernetes
Microservices with Spring Cloud, Netflix OSS and Kubernetes Microservices with Spring Cloud, Netflix OSS and Kubernetes
Microservices with Spring Cloud, Netflix OSS and Kubernetes
 
GUJavaSC - Criando Micro-serviços Reativos com Java
GUJavaSC - Criando Micro-serviços Reativos com JavaGUJavaSC - Criando Micro-serviços Reativos com Java
GUJavaSC - Criando Micro-serviços Reativos com Java
 
Introduction to the Nancy Framework
Introduction to the Nancy FrameworkIntroduction to the Nancy Framework
Introduction to the Nancy Framework
 
JavaCro'15 - Secure Web Services Development - Askar Akhmerov
JavaCro'15 - Secure Web Services Development - Askar AkhmerovJavaCro'15 - Secure Web Services Development - Askar Akhmerov
JavaCro'15 - Secure Web Services Development - Askar Akhmerov
 
Application Rollout - Istio
Application Rollout - Istio Application Rollout - Istio
Application Rollout - Istio
 
Bbva bank on Open Stack
Bbva bank on Open StackBbva bank on Open Stack
Bbva bank on Open Stack
 
Tokyo azure meetup #9 azure update, october
Tokyo azure meetup #9   azure update, octoberTokyo azure meetup #9   azure update, october
Tokyo azure meetup #9 azure update, october
 
Secure JAX-RS
Secure JAX-RSSecure JAX-RS
Secure JAX-RS
 
Effective cloud-ready apps with MicroProfile
Effective cloud-ready apps with MicroProfileEffective cloud-ready apps with MicroProfile
Effective cloud-ready apps with MicroProfile
 
The 6 Rules for Modernizing Your Legacy Java Monolith with Microservices
The 6 Rules for Modernizing Your Legacy Java Monolith with MicroservicesThe 6 Rules for Modernizing Your Legacy Java Monolith with Microservices
The 6 Rules for Modernizing Your Legacy Java Monolith with Microservices
 
Micronaut Deep Dive - Codeone 2019
Micronaut Deep Dive - Codeone 2019Micronaut Deep Dive - Codeone 2019
Micronaut Deep Dive - Codeone 2019
 
JavaEE Microservices platforms
JavaEE Microservices platformsJavaEE Microservices platforms
JavaEE Microservices platforms
 
Tokyo Azure Meetup #9 - Azure Update, september
Tokyo Azure Meetup #9 - Azure Update, septemberTokyo Azure Meetup #9 - Azure Update, september
Tokyo Azure Meetup #9 - Azure Update, september
 
Building a Web Frontend with Microservices and NGINX Plus
Building a Web Frontend with Microservices and NGINX PlusBuilding a Web Frontend with Microservices and NGINX Plus
Building a Web Frontend with Microservices and NGINX Plus
 
Microservices: A Security Nightmare?
Microservices: A Security Nightmare?Microservices: A Security Nightmare?
Microservices: A Security Nightmare?
 

En vedette

Webconf nodejs-production-architecture
Webconf nodejs-production-architectureWebconf nodejs-production-architecture
Webconf nodejs-production-architecture
Ben Lin
 

En vedette (20)

A csodák logikája
A csodák logikájaA csodák logikája
A csodák logikája
 
vert.x - asynchronous event-driven web applications on the JVM
vert.x - asynchronous event-driven web applications on the JVMvert.x - asynchronous event-driven web applications on the JVM
vert.x - asynchronous event-driven web applications on the JVM
 
Microservices and modern backends - Azure Meetup Frankfurt
Microservices and modern backends  - Azure Meetup FrankfurtMicroservices and modern backends  - Azure Meetup Frankfurt
Microservices and modern backends - Azure Meetup Frankfurt
 
Migrating a Monolithic App to Microservices on Cloud Foundry
Migrating a Monolithic App to Microservices on Cloud FoundryMigrating a Monolithic App to Microservices on Cloud Foundry
Migrating a Monolithic App to Microservices on Cloud Foundry
 
A High-Performance Solution To Microservices UI Composition
A High-Performance Solution To Microservices UI CompositionA High-Performance Solution To Microservices UI Composition
A High-Performance Solution To Microservices UI Composition
 
DSR Microservices (Day 1, Part 2)
DSR Microservices (Day 1, Part 2)DSR Microservices (Day 1, Part 2)
DSR Microservices (Day 1, Part 2)
 
Intro To Node.js
Intro To Node.jsIntro To Node.js
Intro To Node.js
 
Webconf nodejs-production-architecture
Webconf nodejs-production-architectureWebconf nodejs-production-architecture
Webconf nodejs-production-architecture
 
Building Scalable Web Applications Using Microservices Architecture and NodeJ...
Building Scalable Web Applications Using Microservices Architecture and NodeJ...Building Scalable Web Applications Using Microservices Architecture and NodeJ...
Building Scalable Web Applications Using Microservices Architecture and NodeJ...
 
Microservice Architecture
Microservice ArchitectureMicroservice Architecture
Microservice Architecture
 
An Unexpected Solution to Microservices UI Composition
An Unexpected Solution to Microservices UI CompositionAn Unexpected Solution to Microservices UI Composition
An Unexpected Solution to Microservices UI Composition
 
Microservice Websites (microXchg 2017)
Microservice Websites (microXchg 2017)Microservice Websites (microXchg 2017)
Microservice Websites (microXchg 2017)
 
Understanding Microservices
Understanding Microservices Understanding Microservices
Understanding Microservices
 
Akka Persistence and Eventuate
Akka Persistence and EventuateAkka Persistence and Eventuate
Akka Persistence and Eventuate
 
Developing applications with a microservice architecture (svcc)
Developing applications with a microservice architecture (svcc)Developing applications with a microservice architecture (svcc)
Developing applications with a microservice architecture (svcc)
 
Azure Microservices in Practice - Radu Vunvulea
Azure Microservices in Practice - Radu VunvuleaAzure Microservices in Practice - Radu Vunvulea
Azure Microservices in Practice - Radu Vunvulea
 
Akka: Simpler Scalability, Fault-Tolerance, Concurrency & Remoting through Ac...
Akka: Simpler Scalability, Fault-Tolerance, Concurrency & Remoting through Ac...Akka: Simpler Scalability, Fault-Tolerance, Concurrency & Remoting through Ac...
Akka: Simpler Scalability, Fault-Tolerance, Concurrency & Remoting through Ac...
 
Microsoft: Building a Massively Scalable System with DataStax and Microsoft's...
Microsoft: Building a Massively Scalable System with DataStax and Microsoft's...Microsoft: Building a Massively Scalable System with DataStax and Microsoft's...
Microsoft: Building a Massively Scalable System with DataStax and Microsoft's...
 
Azure Service Fabric Overview
Azure Service Fabric OverviewAzure Service Fabric Overview
Azure Service Fabric Overview
 
Reactive Streams 1.0.0 and Why You Should Care (webinar)
Reactive Streams 1.0.0 and Why You Should Care (webinar)Reactive Streams 1.0.0 and Why You Should Care (webinar)
Reactive Streams 1.0.0 and Why You Should Care (webinar)
 

Similaire à Building microservices web application using scala & akka

Similaire à Building microservices web application using scala & akka (20)

Micro Front-End & Microservices - Plansoft
Micro Front-End & Microservices - PlansoftMicro Front-End & Microservices - Plansoft
Micro Front-End & Microservices - Plansoft
 
Introduction to Microservices
Introduction to MicroservicesIntroduction to Microservices
Introduction to Microservices
 
Montréal AWS Users United: Let's go Serverless!
Montréal AWS Users United: Let's go Serverless!Montréal AWS Users United: Let's go Serverless!
Montréal AWS Users United: Let's go Serverless!
 
Microservices - when, why and how incontrodevops.it
Microservices  - when, why and how incontrodevops.itMicroservices  - when, why and how incontrodevops.it
Microservices - when, why and how incontrodevops.it
 
Infrastructure As Code
Infrastructure As CodeInfrastructure As Code
Infrastructure As Code
 
Node.js meetup at Palo Alto Networks Tel Aviv
Node.js meetup at Palo Alto Networks Tel AvivNode.js meetup at Palo Alto Networks Tel Aviv
Node.js meetup at Palo Alto Networks Tel Aviv
 
AWS Community Day: From Monolith to Microservices - What Could Go Wrong?
AWS Community Day: From Monolith to Microservices - What Could Go Wrong?AWS Community Day: From Monolith to Microservices - What Could Go Wrong?
AWS Community Day: From Monolith to Microservices - What Could Go Wrong?
 
Alles Docker oder Was ?
Alles Docker oder Was ?Alles Docker oder Was ?
Alles Docker oder Was ?
 
Serverless Toronto User Group - Let's go Serverless!
Serverless Toronto User Group - Let's go Serverless!Serverless Toronto User Group - Let's go Serverless!
Serverless Toronto User Group - Let's go Serverless!
 
Micro service pitfalls voxxed days istanbul 2015
Micro service pitfalls voxxed days istanbul 2015Micro service pitfalls voxxed days istanbul 2015
Micro service pitfalls voxxed days istanbul 2015
 
Microservices - Scaling Development and Service
Microservices - Scaling Development and ServiceMicroservices - Scaling Development and Service
Microservices - Scaling Development and Service
 
Efficient platform engineering with Microk8s & gopaddle.pdf
Efficient platform engineering  with  Microk8s & gopaddle.pdfEfficient platform engineering  with  Microk8s & gopaddle.pdf
Efficient platform engineering with Microk8s & gopaddle.pdf
 
DevOps State of the Union 2015
DevOps State of the Union 2015DevOps State of the Union 2015
DevOps State of the Union 2015
 
A quick tour around Azure Dev Spaces
A quick tour around Azure Dev SpacesA quick tour around Azure Dev Spaces
A quick tour around Azure Dev Spaces
 
Microservice architecture
Microservice architectureMicroservice architecture
Microservice architecture
 
Moving from Monolith to Microservices
Moving from Monolith to MicroservicesMoving from Monolith to Microservices
Moving from Monolith to Microservices
 
Magical monolith
Magical monolithMagical monolith
Magical monolith
 
Application Centric Microservices from Redhat Summit 2015
Application Centric Microservices from Redhat Summit 2015Application Centric Microservices from Redhat Summit 2015
Application Centric Microservices from Redhat Summit 2015
 
Dockerization
DockerizationDockerization
Dockerization
 
Montreal Kubernetes Meetup: Developer-first workflows (for microservices) on ...
Montreal Kubernetes Meetup: Developer-first workflows (for microservices) on ...Montreal Kubernetes Meetup: Developer-first workflows (for microservices) on ...
Montreal Kubernetes Meetup: Developer-first workflows (for microservices) on ...
 

Dernier

Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
amitlee9823
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
MsecMca
 

Dernier (20)

Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the start
 
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdf
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
 
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
 
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineering
 
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced LoadsFEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
 
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptx
 

Building microservices web application using scala & akka