AlecAivazis / graphql-over-kafka

A framework for building event-driven microservice applications in python
MIT License
19 stars 3 forks source link

Retrieve data from backend services through action queue #29

Closed AlecAivazis closed 8 years ago

AlecAivazis commented 8 years ago

From #27:

The api frontend should handle many concurrent requests that access the api from HTTP. The complete request (body and HTTP headers) are forwarded to AMQP, using the url/path address a a routing key. The HTTP headers can be used as AMQP message properties.

The processing chain of HTTP/AMQP should be non-blocking on both the api frontend and services. The incoming HTTP requests, relayed AMQP requests, and the AMQP / HTTP responses must be correlated using an identifier. The frontend can keep a queue of HTTP request using the correlation_id to match AMQP responses.

AlecAivazis commented 8 years ago

Using two different events to retrieve data provides an easy way to track the response time of a particular service, allowing us to specify auto-scaling criteria on a per-service basis