Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
AWS, Play! CouchDB: Scaling SOA in the cloud
Christophe Marchal | Software Architect
christophe.marchal@ilegra.com
@toff63
http://github.com/toff63
http://francesbagual.net
About me
www.ilegra.com
Project
● MVP for
● 6 months
● Brazilian taxation
● 5 Developers + 1 Product Owner
Requirements
● Cadastre
● NFe validation
● Taxation violation reports
● Fix prices simulator
● Quotation price simulator
Non Functional goals
SOA
SOA para um prototipo?!
When I say SOA people think: Framework
When I say SOA people think: Framework
When I say SOA people think: Highly Complex
System
When I say SOA people think 5 year project
However, SOA is about Principles
SOA
SOA is about decoupling
SOA is about SOC
SOA is about Flexibility
Strategic goal: get the MVP ready on time
➔ Minimum viable architecture
➔ Minimum viable design
➔ Only create tests that a...
Evolutionary refinement
Definition of services
Define the first services:
● NFe
● Report
● Company
● User
Choosing Play!
HTTP server
Lightweight
Stateless
Easy to learn
Functional
Easy to create
API
AsynC IO
REACTIVE
Play SubProject
Play HTTP client
Play HTTP client: Internal Calls
Service design
Contract
Presentation
Service Layer
Persistence Gateway
Contract / Trait
HTTP + HTML
● Simple design
● SOC
...
Monolithic deploy: pre containers solution
NFe
user Report
company
● 1 debian package
● Each module independant
● No curre...
AWS Deploy
1 conf to rule them all with AWS private DNS
Application config:
● couchdb.internal
● redis.internal
DNS configuration
cha...
What kind of NoSQL ?
● NFe is a document
● Huge amount of NFe to store
Why CouchDB?
● HTTP Interface
● Incremental map/reduce
● Polyglot Persistence ready
● Easy and simple to use
CouchDB: DB and Documents
http://mycouchdbserver:5984/pessoas http://mycouchdbserver:5984/pessoas/1
CouchDB: Design documents
http://mycouchdbserver:5984/pessoas/_design/list_v1
SOA with CouchDB
● Version your document
● Version you Design Document
● You can get backward compatibility in your databa...
AWS Deploy
ElasticSearch for filtering
ElasticSearch for filtering
Almost no db is shared between services
NFE Service Report Service
NFe
But a scalable solution would be ...
Summary
● SOA isn’t about project size
● SOA can be applied to any project
● Don’t rush to complexity
● Create proper abst...
Christophe Marchal | Software Architect
Thanks for your Attention! Any question?
Upcoming SlideShare
Loading in …5
×

Aws, play! couch db scaling soa in the cloud

682 views

Published on

This is the deck I used in TDC Floripa 2015 to show how you can design your product to have SOA benefits with minimal impact on developers productivity. It talks about SOA principles, how Play! is a good choice as HTTP server and how you can version CouchDB documents and views.

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Aws, play! couch db scaling soa in the cloud

  1. 1. AWS, Play! CouchDB: Scaling SOA in the cloud Christophe Marchal | Software Architect
  2. 2. christophe.marchal@ilegra.com @toff63 http://github.com/toff63 http://francesbagual.net About me
  3. 3. www.ilegra.com
  4. 4. Project ● MVP for ● 6 months ● Brazilian taxation ● 5 Developers + 1 Product Owner
  5. 5. Requirements ● Cadastre ● NFe validation ● Taxation violation reports ● Fix prices simulator ● Quotation price simulator
  6. 6. Non Functional goals SOA
  7. 7. SOA para um prototipo?!
  8. 8. When I say SOA people think: Framework
  9. 9. When I say SOA people think: Framework
  10. 10. When I say SOA people think: Highly Complex System
  11. 11. When I say SOA people think 5 year project
  12. 12. However, SOA is about Principles
  13. 13. SOA
  14. 14. SOA is about decoupling
  15. 15. SOA is about SOC
  16. 16. SOA is about Flexibility
  17. 17. Strategic goal: get the MVP ready on time ➔ Minimum viable architecture ➔ Minimum viable design ➔ Only create tests that are relevant ➔ Remove any waste
  18. 18. Evolutionary refinement
  19. 19. Definition of services Define the first services: ● NFe ● Report ● Company ● User
  20. 20. Choosing Play! HTTP server Lightweight Stateless Easy to learn Functional Easy to create API AsynC IO REACTIVE
  21. 21. Play SubProject
  22. 22. Play HTTP client
  23. 23. Play HTTP client: Internal Calls
  24. 24. Service design Contract Presentation Service Layer Persistence Gateway Contract / Trait HTTP + HTML ● Simple design ● SOC ● Trait yet in place for future separation ● Lightweight
  25. 25. Monolithic deploy: pre containers solution NFe user Report company ● 1 debian package ● Each module independant ● No current need to have deploy isolation ● No current need to separate by service profile
  26. 26. AWS Deploy
  27. 27. 1 conf to rule them all with AWS private DNS Application config: ● couchdb.internal ● redis.internal DNS configuration change in every environment
  28. 28. What kind of NoSQL ? ● NFe is a document ● Huge amount of NFe to store
  29. 29. Why CouchDB? ● HTTP Interface ● Incremental map/reduce ● Polyglot Persistence ready ● Easy and simple to use
  30. 30. CouchDB: DB and Documents http://mycouchdbserver:5984/pessoas http://mycouchdbserver:5984/pessoas/1
  31. 31. CouchDB: Design documents http://mycouchdbserver:5984/pessoas/_design/list_v1
  32. 32. SOA with CouchDB ● Version your document ● Version you Design Document ● You can get backward compatibility in your database ● Ease database index migrations ● Let you do Canary Deploys ● Let you do Continuous Deployment with no downtime HOW BENEfits
  33. 33. AWS Deploy
  34. 34. ElasticSearch for filtering
  35. 35. ElasticSearch for filtering
  36. 36. Almost no db is shared between services NFE Service Report Service NFe
  37. 37. But a scalable solution would be ...
  38. 38. Summary ● SOA isn’t about project size ● SOA can be applied to any project ● Don’t rush to complexity ● Create proper abstractions to handle potentials future problems ● Version everything in your system ● Take advantage of the cloud
  39. 39. Christophe Marchal | Software Architect Thanks for your Attention! Any question?

×