at NewStore
Jan-Oliver Pantel
Software Engineer Commerce Backend
@NewStore
and
Copyright Martin Fowler
we did it...
Service A
{
"exchange": "rpc",
"routing_key": "rpc.service_b.do",
"context": {
"user_id": "4711",
"request_id": "0815",
"tenant": "hannoverjs"
},
"body": {
"hello": "world",
"foo": "bar"
}
}Service B
{
"request_id": "0815",
"has_error": false,
"response": {
"done": true
}
}Service A
{
"exchange": "events",
"routing_key": "events.called_service_b",
"context": {
"user_id": "4711",
"request_id": "0815",
"tenant": "hannoverjs"
},
"body": {
"hello": "world",
"foo": "bar"
}
}for Infrastructure
Where is Rabbit / Postgres / ... ?
{
"service": "rabbitmq",
"host": "192.168.278.32",
"port": "5432",
"user": "guest",
"password": "guest"
}for Services
Where is Service B?
{
"service": "service_b",
"host": "192.168.278.133",
"port": "1337",
"up": true,
"up_since": 7437981
}{
"service": "service_b",
"host": "",
"port": "",
"up": false,
"up_since": null
}Hey it's me Service A
{
"service": "service_a",
"host": "192.168.278.133",
"port": "1337",
"health_check": "/health"
}Import
API
Import
Pers.
Prod.
Import
Prod.
Pers.
Post
processor
Indexer
Copyright by ThoughtWorks
If possible
If your protocol isn't HTTP anyway