Slide 1

Slide 1 text

Microservices To hell and back

Slide 2

Slide 2 text

RUBENS STULZER Full Stack Rails Developer ~ UX Designer @RubensStulzer stulzer

Slide 3

Slide 3 text

No content

Slide 4

Slide 4 text

Back in Colombia !

Slide 5

Slide 5 text

Spanish Database Modeling

Slide 6

Slide 6 text

Big and Bad monolith with a bad git history

Slide 7

Slide 7 text

Around 3 months To bootstrap projects and takeaway code from the big monolith

Slide 8

Slide 8 text

We forgot one thing

Slide 9

Slide 9 text

The Database

Slide 10

Slide 10 text

Yep, that’s bad for ya!

Slide 11

Slide 11 text

Current Status: The big database still exist But will die, next quarter

Slide 12

Slide 12 text

What I’ve being doing

Slide 13

Slide 13 text

No content

Slide 14

Slide 14 text

API Gateway

Slide 15

Slide 15 text

And a little more than that

Slide 16

Slide 16 text

OAuth

Slide 17

Slide 17 text

Image Processing

Slide 18

Slide 18 text

API Contract "modification"

Slide 19

Slide 19 text

{ … "listingType": "RENTA_VENTA" … }

Slide 20

Slide 20 text

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

Slide 21

Slide 21 text

Big Wrapper or The backend of the backend

Slide 22

Slide 22 text

API Versioning

Slide 23

Slide 23 text

Go for simple

Slide 24

Slide 24 text

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

Slide 25

Slide 25 text

Listings V1 to V2 • Same Contract • Zero maintenance on Clients • Lot’s of work on mappings

Slide 26

Slide 26 text

Leads API to Leadr • Maintenance on clients • Client should make decisions

Slide 27

Slide 27 text

Timeouts

Slide 28

Slide 28 text

Fail fast

Slide 29

Slide 29 text

Create not so tight timeouts when you know you have a slow API/endpoint

Slide 30

Slide 30 text

Too Much Network

Slide 31

Slide 31 text

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

Slide 32

Slide 32 text

Request little history

Slide 33

Slide 33 text

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

Slide 34

Slide 34 text

LOG IT X-RequestID

Slide 35

Slide 35 text

Tests

Slide 36

Slide 36 text

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

Slide 37

Slide 37 text

No content

Slide 38

Slide 38 text

http://www.vivareal.com.br/empresa/carreira/vagas/

Slide 39

Slide 39 text

Thank You