Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/solidsnack/lark
Gem for managing distributed state in a redis cluster
https://github.com/solidsnack/lark
Last synced: about 2 months ago
JSON representation
Gem for managing distributed state in a redis cluster
- Host: GitHub
- URL: https://github.com/solidsnack/lark
- Owner: solidsnack
- Created: 2010-11-15T22:08:01.000Z (about 14 years ago)
- Default Branch: master
- Last Pushed: 2010-11-15T23:41:14.000Z (about 14 years ago)
- Last Synced: 2023-04-09T12:18:36.818Z (almost 2 years ago)
- Language: Ruby
- Homepage:
- Size: 101 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.markdown
Awesome Lists containing this project
README
# Lark
Lark is a simple system to store local cache in a cluster of redis servers, be
able to query state about other lark nodes, and notice when one goes offline.Lark.on_expired do |id|
Log.debug "Lost node #{id}"
endLark.configure :domain => "staging", :expire => 60
EM.run do
lark = Lark::Base.new "bottom_node.1", "group3", "ip" => "127.0.0.1", "role" => "worker node"EM::PeriodicTimer.new(5) do
lark.set "load" => get_load, "mem_usage" => get_mem_usage
endon_some_event do
Lark.get(:group3).each do |n|
check_on_node(n)
end
end
end