subzerocloud / postgrest-starter-kit

Starter Kit and tooling for authoring REST API backends with PostgREST
MIT License
744 stars 71 forks source link

Async REST service call from PostgreSQL #34

Closed grotsev closed 5 years ago

grotsev commented 6 years ago

Maybe you are interested in async REST service communication from PostgreSQL based on PostgREST philosophy. I've made prototype https://github.com/grotsev/http_port but stopped development.

ruslantalpa commented 5 years ago

Thanks for letting me know, I am sure this lightweight tool will be useful for someone however for the starter kit, a more robust/flexible approach is required an is already implemented in https://github.com/subzerocloud/subzero-starter-kit by combining (pg-amqp-bridge)[https://github.com/subzerocloud/pg-amqp-bridge] and RabbitMQ

I talk a little about the idea underpinning this here https://docs.subzero.cloud/tutorial/beyond-data/#reacting-to-database-events

Once the message in is RabbitMQ it's trivial to write a "worker" that connects and reacts to messages It can be as simple as a bash script https://github.com/subzerocloud/amqptools/blob/master/docker/onmessage.sh embedded in a docker image based on subzerocloud/amqptools