Giter VIP home page Giter VIP logo

delayed_job_riak's Introduction

delayed_job RIAK backend

Installation

Add the gems to your Gemfile:

gem 'delayed_job'
gem 'delayed_job_riak'

Riak

Riak must be configured with allow_mul=true for this to work properly otherwise there is a real potential for multiple workers to claim the same job.

Riak works off of eventual consistency , so there is no data locking or anything of the sort. Vector clocks track the updates made by clients and it is up to the clients to resolve the conflicted states that may arise.

If allow_mul is set to false it is somewhat close to last write wins and this can allow multiple workers to claim the same job. With allow_mul set to true riak will create siblings for conflicted objects (objects that do not descend from the same vector clock values). This may happen when a worker claims a job and worker subsequently attempts to claim the same job. The first worker will be run the job and other worker will detect the conflict and ignore the job, the will not attempt to resolve the conflict though. Conflict resolution will be taken care of by the worker that is running the job.

When a worker runs a job after a successful completion the job is deleted from the queue. If the job fails and needs to be rescheuled it will resolve any conflicts before that happens. It does this by first copying the current attributes for the job and then reloading the job from riak. If a conflict is detected the attributes are set to the values that have been copied and then the object is saved with the current vector clock , resolving the conflicted state.

delayed_job_riak's People

Contributors

rdingwell avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.