Skip to content
/ devent Public

Distributed event handling under gevent using redis

License

Notifications You must be signed in to change notification settings

nollbit/devent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

devent

Distributed event handling under gevent using redis, inspired by the Planet Framework.

Huh?

It uses a redis channel to transport the events across processes and instances

Example using a localhost redis at 6379

nexus_out = EventNexus()
@nexus_out.subscribes("test.topic")
def test_method(event):
    print "test_method: Got event %s" % event

@nexus_out.subscribes("test.*")
def test_method2(event):
    print "test_method2: Got event %s" % event

nexus_in = EventNexus()
nexus_in.publish("test.topic", "hello from the other side!")

gevent.sleep(10)

The code above would yield

test_method: Got event Event(topic='test-topic', obj='hello from the other side!', source='johanm-vm')
test_method2: Got event Event(topic='test-topic', obj='hello from the other side!', source='johanm-vm')

License

Apache 2.0

About

Distributed event handling under gevent using redis

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages