đ Kiribi â
A simple job management library consisting of the Cloudflare stack.
WARNING
This library is still in the experimental stage. Please use it at your own risk.
Motivation â
Popular frameworks have representative job (task) management systems. For example, Ruby on Rails has Sidekiq, Django has Celery, etc.
These systems are designed to be used in conjunction with the framework, and they are very powerful.
But what about the Cloudflare stack? I still feel that there is a gap in the job management system.
Fortunately, Cloudflare has services such as Queue and D1. I thought that these services could fill this gap.
Cloudflare Workers has a feature called Service Binding (RPC). This allows you to create independent modules that can be shared among workers.
For example, you can share functions such as web scraping, image processing, and AI among multiple applications.
Kiribi functions as a job management gateway using this feature. Kiribi deployed in your Cloudflare account, you can easily run common modules from each application and manage the execution status.
Features â
- đą Easily enqueue jobs.
- đ Semi-persisted queues by combining Queue and D1.
- đ Easily add workers that process queues.
- đī¸ Easily control retries and delays for each queue.
- đŽ Check the execution status of jobs in real time.
- đ¸ī¸ REST API for job management.
- đšī¸ Job management client for real-time monitoring.
Under the hood â
Demo â
You can check the execution status of the job in real time.
INFO
Every hour, the demo client page is reset to the initial state.
How to use the demo â
Add your job by clicking the "+ Job" button.
Select a job from the Binding.
Select FLAKY_JOB
to randomly fail the job.
Enter a JSON data representing the success rate (0~1) in payload
.
{ "chance": 0.5 }
Select SLOW_JOB
to delay the job.
Enter a JSON data representing the delay time (1000~15000) in payload
.
{ "delay": 10000 }