Crates.io | sidekiq-rs |
lib.rs | sidekiq-rs |
version | 0.7.0 |
source | src |
created_at | 2016-08-26 10:07:50.794923 |
updated_at | 2017-03-08 02:10:40.266248 |
description | Sidekiq compatible server in Rust |
homepage | https://github.com/doomsplayer/sidekiq-rs |
repository | https://github.com/doomsplayer/sidekiq-rs |
max_upload_size | |
id | 6125 |
size | 1,011,327 |
Sidekiq compatible server in rust, which behaviours totally same as vanilla when you take a look into sidekiq's dashboard.
The basic idea is that, since ruby is slow, we write job handlers in rust with native code. So we write job definitions in ruby and implementations in rust and enqueue jobs in ruby and done jobs in rust.
JobHandler
You can refer to examples/main.rs
for building a sidekiq-rs server, and refer to codes in ruby
to get an idea on write dummy tasks in ruby.
You can definitely embed a ruby VM in your job handlers, running ruby codes when the job is not a native job, so that it soon becomes a complete sidekiq server with additional native code support.
sidekiq-rs includes an implementation of signal handling, and it currently recognize 2 type of signals:
Server will not accept anymore jobs if either signal received.