Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Microservices - To hell and back

Microservices - To hell and back

Do's and don'ts when you move from a legacy monolith to micro-services.

The experience of being wrapping up a bunch of micro-services under a single API.

What, and how to test when you are 100% using micros-services.

And how to keep the micro-services mindset consistent.

412292ca8d206e602f2c6331b5838ad3?s=128

Rubens Stulzer

May 10, 2017
Tweet

Transcript

  1. Microservices To hell and back

  2. RUBENS STULZER Full Stack Rails Developer ~ UX Designer @RubensStulzer

    stulzer
  3. None
  4. Back in Colombia !

  5. Spanish Database Modeling

  6. Big and Bad monolith with a bad git history

  7. Around 3 months To bootstrap projects and takeaway code from

    the big monolith
  8. We forgot one thing

  9. The Database

  10. Yep, that’s bad for ya!

  11. Current Status: The big database still exist But will die,

    next quarter
  12. What I’ve being doing

  13. None
  14. API Gateway

  15. And a little more than that

  16. OAuth

  17. Image Processing

  18. API Contract "modification"

  19. { … "listingType": "RENTA_VENTA" … }

  20. { … "listingType": { "rent": true, "sale": true } …

    }
  21. Big Wrapper or The backend of the backend

  22. API Versioning

  23. Go for simple

  24. Namespace is good enough GET /v1/listings/locations GET /v1/listings/types POST /v1/listings/report

    GET /v1/listings/features POST /v1/listings/price-estimate
  25. Listings V1 to V2 • Same Contract • Zero maintenance

    on Clients • Lot’s of work on mappings
  26. Leads API to Leadr • Maintenance on clients • Client

    should make decisions
  27. Timeouts

  28. Fail fast

  29. Create not so tight timeouts when you know you have

    a slow API/endpoint
  30. Too Much Network

  31. The micro services world have some problems that monoliths don't

  32. Request little history

  33. Client calls /v1/listings/report => Publishers API Publishers API calls =>

    Listings API Listings API calls => LQS -> which reads from a DB => Leads API => Calls Account API Accounts API | -> reads from DB => Call SalesForce
  34. LOG IT X-RequestID

  35. Tests

  36. Kill "Microservices" before its too late - Chad Fowler https://www.youtube.com/watch?v=-UKEPd2ipEk

    The Majestic Monolith - DHH https://m.signalvnoise.com/the-majestic-monolith-29166d022228 Monolith First - Martin Fowler https://martinfowler.com/bliki/MonolithFirst.html
  37. None
  38. http://www.vivareal.com.br/empresa/carreira/vagas/

  39. Thank You