graphile / graphile.github.io

PostGraphile (PostGraphQL) and Graphile-Build website - contributions very welcome!
https://www.graphile.org/
26 stars 127 forks source link

Add a section for Graphile Worker #116

Open benjie opened 5 years ago

benjie commented 5 years ago

https://github.com/graphile/worker

graphile.org / worker

garcianavalon commented 4 years ago

Hey @benjie I've been using Graphile Worker for some time now, are you open to PRs for this issue?

benjie commented 4 years ago

Always :raised_hands:

It might be worth discussing direction before implementing; what do you have in mind?

garcianavalon commented 4 years ago

Creating a new section under Operation called "background tasks" or something alike. In there, briefly introduce the concept on background tasks, when to use them and the Graphile Worker library as the recommend way of running them. We could also add an "other options" section, but I'm not familiar with other solutions that integrate deeply with Postgres.

Inside this "background tasks" section, have several sub-sections (similar to Functions -> Computed Columns, Custom Queries, etc.) covering the following topics:

Also, in our project we've set up job delegation from Graphile Worker to GCP Cloud Tasks, a fully managed cloud task queue with support to different targets. We use this task queue when we need to run large amount of tasks on other services and we need better visibility on retries and errors. I could also add a section about how this integration works, maybe on the Deploying to GCP article?

benjie commented 4 years ago

Aside: if you could send a PR to Graphile Worker with an example for how you hand off to GCP Cloud Tasks, that would be awesome! Here's the relevant issue: https://github.com/graphile/worker/issues/7

Regarding the rest of your suggestion, I like where this is going. I think we should add graphile.org/worker/ for details about graphile-worker itself (docs, examples, etc) but adding a "background tasks" section to the PostGraphile docs talking about how you can solve this problem and what some of the options (including Graphile Worker) are, that sounds great.

An excellent place to start would be to create a markdown file with some initial content inside the postgraphile folder and adding a reference to it to nav.json; then raise it in a PR. We can iterate from there. Feel free to ask me for input on Discord if I'm not replying on GitHub (my GitHub inbox gets quite large!).

Thanks so much @garcianavalon! :raised_hands:

garcianavalon commented 4 years ago

Got it 👌

I will start the PR this week with the "background tasks" section and we can iterate from there