Sha256: 9c931b0d0d5a3ac59e8fc1a5f04fa1ba9d617c148f4cfe8303dd5adac07f2f1f

Contents?: true

Size: 890 Bytes

Versions: 1

Compression:

Stored size: 890 Bytes

Contents

module Tickwork
  class DataStore

    # This is an abstract parent class, ruby style :)
    #
    # Tickwork requires a data store to record the last time events ran
    # Ideally, this would be an optimistic write, but it doesn't really matter.
    # It doesn't matter because our goal is errrs for at least once, vs. at most or exactly
    # So we run, we record that we ran. There's a chance that another process also ran at the same time
    # e.g we both read the same 'last time running'
    # In practice, this shouldn't happen unless our external ticker is called faster than our jobs can run


    # Providers should implement
    #
    # def get(key)
    #
    # end
    # 
    # def set(key, value)
    #
    # end
    #
    # note: keys will be prefixed with '_tickwork_' both for easy identification and also to 
    # help avoid conflicts with the rest of the app

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
tickwork-0.0.1 lib/tickwork/data_store.rb