r2dbc-postgresql
worker
r2dbc-postgresql | worker | |
---|---|---|
4 | 23 | |
1,061 | 2,011 | |
0.5% | 1.1% | |
7.1 | 9.1 | |
11 months ago | 16 days ago | |
Java | TypeScript | |
Apache License 2.0 | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
r2dbc-postgresql
-
Reactive Backend Applications with Spring Boot, Kotlin and Coroutines (Part 1)
Now that we have an application, let's turn it into a reactive application. For this, we will replace Spring Web dependency with Spring WebFlux, Spring Data JPA with Spring Data R2DBC. We will also add R2DBC dependency for our H2 database. R2DBC works with a reactive driver so it will integrate nicely with the rest of our application to allow us database access in a non-blocking way.
- Reactive db drivers (r2dbc)
-
I need to create an API, but I don't know what framework to use. What would you choose, of you were me, and scalability is a quite important factor?
However, if you really expect a lot of users (especially concurrent ones) to use your API, you should delve into the world of reactive programming. Use tools like RxJS (JS/TS) or Project Reactor (Java) in such a case, preferably in combination with a broker like Kafka or RabbitMQ. R2DBC is also great for a data store. Then of course if you want to go one step further, there also exists the less popular but very interesting Actor model which Akka easily has ported into Java.
- Postgres is a great pub/sub and job server
worker
-
Ask HN: How do/did you use PostgreSQL's LISTEN/NOTIFY in production?
I'll add comments to this thread with Github projects that I can find by searching for "postgres listen/notify" on Github.
https://github.com/graphile/worker
// Line 535 in src/main.ts
- Graphile-worker: High performance Node.js/PostgreSQL job queue
-
Do you need Redis? PostgreSQL does queuing, locking, and pub/sub
This is a fairly old article, but this has become a very common pattern. For 90% of projects that just need a task queue for sending email or generating reports, you're not going to be doing millions of messages a second and anything that simplifies your stack is worth looking at. I've used these patterns so often to work around issues encountered with Celery that I've split them into their own framework, https://github.com/TkTech/chancy (feedback appreciated ;)
There are lots of these, several of which are commercial ventures so there's definite interest behind it:
https://worker.graphile.org/ (Node.js)
-
Show HN: An SQS Alternative on Postgres
People considering this project should also probably consider Graphile Worker[1] I've scaled Graphile Worker to 10m daily jobs just fine
The behavior of this library is a bit different and in some ways a bit lower level. If you are using something like this, expect to get very intimate with it as you scale- a lot of times your custom workload would really benefit from a custom index and it's handy to understand how the underlying system works.
[1] https://worker.graphile.org/
-
Postgres as Queue
Big fan of Graphile Worker to handle this job. https://github.com/graphile/worker
- GitHub - graphile/worker: High performance Node.js/PostgreSQL job queue (also suitable for getting jobs generated by PostgreSQL triggers/functions out into a different work queue)
- High performance Node.js/PostgreSQL job queue
-
Choose Postgres Queue Technology
I do enjoy using https://github.com/graphile/worker for my postgresql queuing needs. Very scalable, the next release 0.14 even more so, and easy to use.
-
PGMQ: Simple Message Queues Built on Postgres
On the same subject (job queue based on PostgreSQL), I'm successfully using the https://github.com/graphile/worker/ (NodeJS) project in production.
Jobs are written in Javascript.
-
How Trigger.dev makes serverless background jobs possible
Postgres is used both as a store of state for Runs/Tasks and for the Job queue (we use Graphile Worker).
What are some alternatives?
sql-task-queue
pg-boss - Queueing jobs in Postgres from Node.js like a boss
BlockHound - Java agent to detect blocking calls from non-blocking threads.
dramatiq - A fast and reliable background task processing library for Python 3.
reactive-kotlin-weather-api
walex - Postgres change events (CDC) in Elixir