Sidekiq

Last updated
Sidekiq
Developer(s) Mike Perham
Initial releaseFebruary 5, 2012;11 years ago (2012-02-05) [1]
Stable release
7.1.4 [2]   OOjs UI icon edit-ltr-progressive.svg / 12 September 2023;25 days ago (12 September 2023)
Repository
Written in Ruby
Operating system Cross-platform
Available inEnglish
Type Working queue
License LGPLv3
Website sidekiq.org OOjs UI icon edit-ltr-progressive.svg

Sidekiq is an open source background job framework written in Ruby. [3]

Contents

Architecture

Sidekiq uses Redis for its persistent data store. Each job is stored as a map of key/value pairs, serialized using JSON. Developers can use any programming language to create jobs by constructing the necessary JSON and pushing it into the queue in Redis. A Sidekiq process reads jobs from that Redis queue, using the First In First Out (FIFO) model, and executes the corresponding Ruby code. Job processing is asynchronous, allowing a web-serving thread to continue serving new requests rather than be blocked processing slower tasks.

Sidekiq can be used standalone, or integrated with a Ruby on Rails web application. Sidekiq is multithreaded so multiple jobs can execute concurrently within one process. A large scale application may have dozens or hundreds of Sidekiq processes executing thousands of jobs per second.

Sidekiq comes with a graphical web interface for inspecting and managing job data.

Business model

Sidekiq uses an Open Core business model to provide sustainability for the open source project. [4] The company behind Sidekiq, Contributed Systems, sells closed-source commercial versions, Sidekiq Pro and Sidekiq Enterprise, which contain additional features not included in the open source version.

Reception and use

Sidekiq is described as “well-known queue processing software”. [5]

It's used by Ruby applications like Mastodon, Diaspora, [6] GitLab and Discourse, that need to run tasks in the background, without making web requests wait. Sidekiq is also used to submit threads to the PHASTER phage search tool. [7]

Related Research Articles

In computing, scheduling is the action of assigning resources to perform tasks. The resources may be processors, network links or expansion cards. The tasks may be threads, processes or data flows.

<span class="mw-page-title-main">Ruby on Rails</span> Server-side open source web application framework

Ruby on Rails is a server-side web application framework written in Ruby under the MIT License. Rails is a model–view–controller (MVC) framework, providing default structures for a database, a web service, and web pages. It encourages and facilitates the use of web standards such as JSON or XML for data transfer and HTML, CSS and JavaScript for user interfacing. In addition to MVC, Rails emphasizes the use of other well-known software engineering patterns and paradigms, including convention over configuration (CoC), don't repeat yourself (DRY), and the active record pattern.

The event dispatching thread (EDT) is a background thread used in Java to process events from the Abstract Window Toolkit (AWT) graphical user interface event queue. It is an example of the generic concept of event-driven programming, that is popular in many other contexts than Java, for example, web browsers, or web servers.

<span class="mw-page-title-main">Capistrano (software)</span>

Capistrano is an open-source tool for running scripts on multiple servers; its main use is deploying web applications. It automates the process of making a new version of an application available on one or more web servers, including supporting tasks such as changing databases.

oneAPI Threading Building Blocks, is a C++ template library developed by Intel for parallel programming on multi-core processors. Using TBB, a computation is broken down into tasks that can run in parallel. The library manages and schedules threads to execute these tasks.

<span class="mw-page-title-main">Parallel Extensions</span>

Parallel Extensions was the development name for a managed concurrency library developed by a collaboration between Microsoft Research and the CLR team at Microsoft. The library was released in version 4.0 of the .NET Framework. It is composed of two parts: Parallel LINQ (PLINQ) and Task Parallel Library (TPL). It also consists of a set of coordination data structures (CDS) – sets of data structures used to synchronize and co-ordinate the execution of concurrent tasks.

<span class="mw-page-title-main">Apache CouchDB</span> Document-oriented NoSQL database

Apache CouchDB is an open-source document-oriented NoSQL database, implemented in Erlang.

<span class="mw-page-title-main">Grand Central Dispatch</span> Technology developed by Apple Inc

Grand Central Dispatch, is a technology developed by Apple Inc. to optimize application support for systems with multi-core processors and other symmetric multiprocessing systems. It is an implementation of task parallelism based on the thread pool pattern. The fundamental idea is to move the management of the thread pool out of the hands of the developer, and closer to the operating system. The developer injects "work packages" into the pool oblivious of the pool's architecture. This model improves simplicity, portability and performance.

Web2py is an open-source web application framework written in the Python programming language. Web2py allows web developers to program dynamic web content using Python. Web2py is designed to help reduce tedious web development tasks, such as developing web forms from scratch, although a web developer may build a form from scratch if required.

Heroku is a cloud platform as a service (PaaS) supporting several programming languages. One of the first cloud platforms, Heroku has been in development since June 2007, when it supported only the Ruby programming language, but now supports Java, Node.js, Scala, Clojure, Python, PHP, and Go. For this reason, Heroku is said to be a polyglot platform as it has features for a developer to build, run and scale applications in a similar manner across most languages. Heroku was acquired by Salesforce in 2010 for $212 million.

<span class="mw-page-title-main">Redis</span> Open-source in-memory key–value database

Redis is an open-source in-memory storage, used as a distributed, in-memory key–value database, cache and message broker, with optional durability. Because it holds all data in memory and because of its design, Redis offers low-latency reads and writes, making it particularly suitable for use cases that require a cache. Redis is the most popular NoSQL database, and one of the most popular databases overall. Redis is used in companies like Twitter, Airbnb, Tinder, Yahoo, Adobe, Hulu, and Amazon.

<span class="mw-page-title-main">Node.js</span> JavaScript runtime environment

Node.js is a cross-platform, open-source server environment that can run on Windows, Linux, Unix, macOS, and more. Node.js is a back-end JavaScript runtime environment, runs on the V8 JavaScript engine, and executes JavaScript code outside a web browser.

<span class="mw-page-title-main">Celery (software)</span> Distributed task queue

Celery is an open source asynchronous task queue or job queue which is based on distributed message passing. While it supports scheduling, its focus is on operations in real time.

<span class="mw-page-title-main">Ember.js</span>

Ember.js is an open-source JavaScript web framework that utilizes a component-service pattern. It allows developers to create scalable single-page web applications by incorporating common idioms, best practices, and patterns from other single-page-app ecosystem patterns into the framework.

Apache Kafka is a distributed event store and stream-processing platform. It is an open-source system developed by the Apache Software Foundation written in Java and Scala. The project aims to provide a unified, high-throughput, low-latency platform for handling real-time data feeds. Kafka can connect to external systems via Kafka Connect, and provides the Kafka Streams libraries for stream processing applications. Kafka uses a binary TCP-based protocol that is optimized for efficiency and relies on a "message set" abstraction that naturally groups messages together to reduce the overhead of the network roundtrip. This "leads to larger network packets, larger sequential disk operations, contiguous memory blocks [...] which allows Kafka to turn a bursty stream of random message writes into linear writes."

<span class="mw-page-title-main">Nim (programming language)</span> Programming language

Nim is a general-purpose, multi-paradigm, statically typed, compiled high-level systems programming language, designed and developed by a team around Andreas Rumpf. Nim is designed to be "efficient, expressive, and elegant", supporting metaprogramming, functional, message passing, procedural, and object-oriented programming styles by providing several features such as compile time code generation, algebraic data types, a foreign function interface (FFI) with C, C++, Objective-C, and JavaScript, and supporting compiling to those same languages as intermediate representations.

Enduro/X is an open-source middleware platform for distributed transaction processing. It is built on proven APIs such as X/Open group's XATMI and XA. The platform is designed for building real-time microservices based applications with a clusterization option. Enduro/X functions as an extended drop-in replacement for Oracle Tuxedo. The platform uses in-memory POSIX Kernel queues which insures high interprocess communication throughput.

<span class="mw-page-title-main">DBeaver</span> Multi-platform database administration software

DBeaver is a SQL client software application and a database administration tool. For relational databases it uses the JDBC application programming interface (API) to interact with databases via a JDBC driver. For other databases (NoSQL) it uses proprietary database drivers. It provides an editor that supports code completion and syntax highlighting. It provides a plug-in architecture that allows users to modify much of the application's behavior to provide database-specific functionality or features that are database-independent. This is a desktop application written in Java and based on Eclipse platform.

RoadRunner is an open-source application server, load-balancer and process manager written in Golang (Go) and implemented by PHP 7. It is used in rapid application development to speed up the performance of large web applications for users.

Conductor is a free and open-source microservice orchestration software platform originally developed by Netflix.

References

  1. v0.5.0
  2. "Release 7.1.4". 12 September 2023. Retrieved 19 September 2023.
  3. https://sidekiq.org
  4. https://codecodeship.com/blog/2023-04-14-mike-perham
  5. Cukier, Daniel (2013). DevOps patterns to scale web applications using cloud services. SPLASH '13. doi:10.1145/2508075.2508432.
  6. Diaspora Project (19 May 2013). "diaspora* 0.1.0.0". GitHub . Retrieved 20 January 2014.
  7. Arndt, David; Grant, Jason R.; Marcu, Ana; Sajed, Tanvir; Pon, Allison; Liang, Yongjie; Wishart, David S. (8 July 2016). "PHASTER: a better, faster version of the PHAST phage search tool". Nucleic Acids Research. 44 (W1): W16–W21. doi:10.1093/nar/gkw387. ISSN   0305-1048. PMC   4987931 . PMID   27141966.