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.

Symfony e micro (non così tanto) services

382 views

Published on

Case study di una applicazione che da monolitica è stata suddivisa in un insieme di microservizi... non così tanto micro! Nella presentazione verranno discussi tra l'altro: organizzazione del codice, test, gestione degli aggiornamenti, problematiche incontrate e possibili sviluppi futuri.

Published in: Software
  • Be the first to comment

  • Be the first to like this

Symfony e micro (non così tanto) services

  1. 1. Symfony e micro (mica tanto) servizi
  2. 2. A bit of history…
  3. 3. Peaks on gen - jun - aug up to 70 M pg/mth Peaks during big matches
  4. 4. PaaS Platform as a Service (almost) Zero configuration Put the code “on the cloud” and you’re done
  5. 5. In the beginning there was…
  6. 6. Hard limits on resource (e.g 50 db con) Deploy via ftp (sf cache mess) Blackbox: No realtime log, no access PHP 5.3
  7. 7. Microservices FTW!
  8. 8. micro vs macro? orchestration? maintenance? security? test?
  9. 9. micro vs macro
  10. 10. How many ways can you split an app?
  11. 11. Web: the main web (sf1) Mobile: mobile version (sf components) Vxl: community site (sf2 v2.8)
  12. 12. Talk: api for comments, votes, ratings (sf2 v2.8) Adv: api for ads serving (sf2 v2.8) Media: api for images mgnt (sf2 v2.8)
  13. 13. Talk api
  14. 14. /queue
 /comments
 /comments/totals
 /comments/{idComment}
 /comments/publish
 /comments/{idComment}/votes
 /comments/{idComment}/votes/{idVote}
 /comments/best-users
 /comments/week-best-users
 /comments-with-replies
 /users/{userId}/statistic
 /users/{userId}/comments
 /articles/most-commented-today
  15. 15. Media api
  16. 16. /collections
 /collections/{idCollection}
 /files
 /files/multiple
 /files/{idFile}
 /files/{idFile}/publish
  17. 17. Why small is better?
  18. 18. Lines Of Code
  19. 19. Fits in my head https://www.infoq.com/presentations/microservices-replaceability- consistency
  20. 20. How services can interact?
  21. 21. Client Side
  22. 22. S1 S2 S3 Page UI1 UI2 UI3
  23. 23. Client knows the endpoint Endpoints are public (caching!) Async loading, progressive enhancement
  24. 24. Server Side
  25. 25. S1 S2 S3 ProxyUI
  26. 26. Client knows only one endpoint Do not expose the underlying architecture
  27. 27. Provide high level apis
  28. 28. What if something goes wrong?
  29. 29. All services are on subdomains vxl.calciomercato.com www.calciomercato.com
  30. 30. Login set cookie on .calciomercato.com
  31. 31. web vxl login Cookie PHPSESSID: b22j6… Domain: .calciomercato.com
  32. 32. Api services are token based talk.calciomercato.com adv.calciomercato.com media.calciomercato.com token expires with session
  33. 33. Deploy
  34. 34. How can we deploy a feature involving a single service?
  35. 35. How can you deploy a feature involving n services?
  36. 36. Keep Backward Compatibility!
  37. 37. What if you are removing an endpoint?
  38. 38. What if you are adding an endpoint?
  39. 39. What if you are modifying an endpoint?
  40. 40. Maintenance
  41. 41. n smaller app to keep updated
  42. 42. MicroKernelTrait
  43. 43. Testing
  44. 44. Test a service in isolation
  45. 45. Test interaction of several services?
  46. 46. S1 S2 S3 SUT
  47. 47. What we learned so far?
  48. 48. Michele Orselli CTO@Ideato _orso_ micheleorselli / ideatosrl mo@ideato.it Thank you! https://joind.in/talk/92907
  49. 49. https://electric-cloud.com/blog/author/ecloud/page/5/ http://www.magnasoma.com/content/images/Magnasoma-Monolith-3-01.jpg https://sudo.hailoapp.com/assets/posts/journey-to-microservices/wheel-of-doom- highlighted.png http://www.arabamerica.com/wp-content/uploads/2016/05/20160422-the-wire-so-and-so- animated-gif-1.gif http://blogs.versionone.com/agile-development/wp-content/uploads/sites/4/2013/04/ ContextMap2.png https://cdn.infoq.com/statics_s1_20161011-0321_2/resource/articles/qcon-london-2015/en/ resources/8-a.jpg http://www.uqasar.eu/wp-content/uploads/2014/05/Metrics.jpg http://pad1.whstatic.com/images/thumb/8/8c/Cheat-at-Card-Games-Step-3.jpg/728px-Cheat- at-Card-Games-Step-3.jpg

×