All Projects โ†’ sorentwo โ†’ Kiq

sorentwo / Kiq

Licence: mit
๐Ÿ“ฎ Robust job queue powered by GenStage and Redis

Programming Languages

elixir
2628 projects

Projects that are alternatives of or similar to Kiq

Qutee
PHP Background Jobs (Tasks) Manager
Stars: โœญ 63 (+28.57%)
Mutual labels:  workers, background-jobs, redis
Rq
Simple job queues for Python
Stars: โœญ 8,065 (+16359.18%)
Mutual labels:  workers, background-jobs, redis
Rqueue
Rqueue aka Redis Queue [Task Queue, Message Broker] for Spring framework
Stars: โœญ 76 (+55.1%)
Mutual labels:  workers, redis
Dtcqueuebundle
Symfony2/3/4/5 Queue Bundle (for background jobs) supporting Mongo (Doctrine ODM), Mysql (and any Doctrine ORM), RabbitMQ, Beanstalkd, Redis, and ... {write your own}
Stars: โœญ 115 (+134.69%)
Mutual labels:  workers, redis
celery.node
Celery task queue client/worker for nodejs
Stars: โœญ 164 (+234.69%)
Mutual labels:  workers, background-jobs
Lowkiq
Ordered background jobs processing
Stars: โœญ 129 (+163.27%)
Mutual labels:  background-jobs, redis
Simpleue
PHP queue worker and consumer - Ready for AWS SQS, Redis, Beanstalkd and others.
Stars: โœญ 124 (+153.06%)
Mutual labels:  workers, redis
Gores
๐Ÿ‘ท Redis-backed library for creating background jobs in Go. Placing jobs in multiple queues, and process them later asynchronously.
Stars: โœญ 137 (+179.59%)
Mutual labels:  workers, redis
Node Celery
Celery client for Node.js
Stars: โœญ 648 (+1222.45%)
Mutual labels:  background-jobs, redis
Verk
A job processing system that just verks! ๐Ÿง›โ€
Stars: โœญ 666 (+1259.18%)
Mutual labels:  workers, redis
Gush
Fast and distributed workflow runner using ActiveJob and Redis
Stars: โœญ 894 (+1724.49%)
Mutual labels:  workers, redis
Curlyq
Efficient and reliable background processing for Go
Stars: โœญ 110 (+124.49%)
Mutual labels:  background-jobs, redis
Django Rq
A simple app that provides django integration for RQ (Redis Queue)
Stars: โœญ 1,361 (+2677.55%)
Mutual labels:  background-jobs, redis
Sidekiq Job Php
Push and schedule jobs to Sidekiq from PHP
Stars: โœญ 34 (-30.61%)
Mutual labels:  workers, redis
Flower
Real-time monitor and web admin for Celery distributed task queue
Stars: โœญ 5,036 (+10177.55%)
Mutual labels:  workers, redis
Asynq
Asynq: simple, reliable, and efficient distributed task queue in Go
Stars: โœญ 934 (+1806.12%)
Mutual labels:  background-jobs, redis
Toro
Multithreaded message processing on Postgres
Stars: โœญ 39 (-20.41%)
Mutual labels:  workers, background-jobs
Findme
serverless application to find unlabelled photos of you on twitter using machine learning (tensorflow.js).
Stars: โœญ 43 (-12.24%)
Mutual labels:  redis
Rediscluster Py
a Python interface to a Cluster of Redis key-value store
Stars: โœญ 46 (-6.12%)
Mutual labels:  redis
Synchrotron
Caching layer load balancer.
Stars: โœญ 42 (-14.29%)
Mutual labels:  redis

Kiq

Build Status Hex.pm Version Hex.pm Downloads Hex Docs

Kiq is a robust and extensible job processing queue that aims for compatibility with Sidekiq, Sidekiq Pro and Sidekiq Enterprise.

Job queuing, processing and reporting are all built on GenStage. That means maximum parallelism with the safety of backpressure as jobs are processed.

Why Kiq?

Many features and architectural choices in Kiq were drawn from existing Elixir job processing packages like Exq, Verk and EctoJob. Each of those packages are great and have varying strenghts, but they lacked seamless interop with Sidekiq Pro or Sidekiq Enterprise jobs.

Sidekiq Pro and Enterprise are amazing pieces of commercial software and worth every centโ€”your organization should buy them! Kiq is intended as a bridge for your team to interop between Ruby and Elixir. As an organization embraces Elixir it becomes necessary to run some background jobs in Elixir, and it must be just as reliable as when jobs were ran through Sidekiq.

Sidekiq Pro & Enterprise Comaptible Feature Set

Kiq's feature set includes many marquee offerings from Sidekiq, Sidekiq Pro and Sidekiq Enterpriseโ€”plus some additional niceties made possible by running on the BEAM. Here is a table highlighting the Kiq's features compared to the various Sidekiq versions:

Feature Kiq Sidekiq Sidekiq Pro Sidekiq Ent
Max Size Queues โœ… โŒ โŒ โŒ
Structured Logging โœ… โŒ โŒ โŒ
Scheduled Jobs โœ… โœ… โœ… โœ…
Error Handling โœ… โœ… โœ… โœ…
Expiring Jobs โœ… โŒ โœ… โœ…
Worker Metrics โœ… โŒ โœ… โœ…
Reliable Client โœ… โŒ โœ… โœ…
Reliable Server โœ… โŒ โœ… โœ…
Rolling Restarts โœ… โŒ โŒ โœ…
Periodic Jobs โœ… โŒ โŒ โœ…
Unique Jobs โœ… โŒ โŒ โœ…
Leader Election โœ… โŒ โŒ โœ…
Multi Process โœ… โŒ โŒ โœ…
Web UI โ€  โŒ โœ… โœ… โœ…
Batch Jobs โ€ก โŒ โŒ โœ… โœ…
Encryption โ€ก โŒ โŒ โŒ โœ…
Rate Limiting โ€ก โŒ โŒ โŒ โœ…
  • โ€  Kiq relies on Sidekiq's Web UI
  • โ€ก Planned, but not implemented yet

If a feature isn't supported or planned it is probably for one of these reasons:

  1. We get it for free on the BEAM and it isn't necessary, i.e. (safe shutdown, multi-process, rolling restarts)
  2. We enable developers to use custom reporters to do it themselves (stats, error reporting)

Design Decisions

  • Avoid global and compile time configuration. All configuration can be defined programatically, eliminating the need for hacks like {:system, "REDIS_URL"}.
  • Not an application, it is included in your application's supervision tree
  • Testing focused, provide helpers and modes to aid testing
  • Extensible job handling via GenStage consumers
  • Simplified worker definitions to ease job definition and pipelining

Installation

Add kiq to your list of dependencies in mix.exs:

def deps do
  [
    {:kiq, "~> 0.7"}
  ]
end

Then run mix deps.get to install the dependency.

Finally, add the supervisor to your application's supervision tree:

{MyApp.Kiq, []}

Kiq itself is not an application and must be started within your application's supervision tree. All of your application's configuration and custom methods should be put into the supervisor.

Usage

Kiq isn't an application that must be started. Similarly to Ecto, you define one or more Kiq modules within your application. This allows multiple supervision trees with entirely different configurations.

Run the generator to define a Kiq supervisor for your application:

mix kiq.gen.supervisor MyApp.Kiq

Include the module in your application's supervision tree:

defmodule MyApp.Application do
  @moduledoc false

  use Application

  alias MyApp.{Endpoint, Kiq, Repo}

  def start(_type, _args) do
    children = [
      {Repo, []},
      {Endpoint, []},
      {Kiq, []}
    ]

    Supervisor.start_link(children, strategy: :one_for_one, name: MyApp.Supervisor)
  end
end

With the supervision tree in place you are ready to start creating workers! The simplest way to create a worker is through the generator:

mix kiq.gen.worker MyApp.Workers.Business

That will define a worker with a perform/1 function where all the magic will happen.

See mix help kiq.gen.worker for additional options.

Check the hexdocs for additional details, configuration options, how to test, defining workers and custom reporters.

Benchmarks

Kiq has a set of benchmarks to track the performance of important operations. Benchmarks are ran using the Benchee library and require Redis to be running.

To run all benchmarks:

mix run bench/bench_helper.exs

Contributing

Clone the repository and run $ mix test to make sure everything is working. For tests to pass, you must have a Redis server running on localhost, port 6379, database 3. You can configure a different host, port and database by setting the REDIS_URL environment variable before testing.

Note that tests will wipe the the configured database on the Redis server multiple times while testing. By default database 3 is used for testing.

License

Kiq is released under the MIT license. See the LICENSE.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].