-
Notifications
You must be signed in to change notification settings - Fork 3
/
README
41 lines (28 loc) · 1.2 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
Some people, when confronted with a problem, think "I know, I'll use
multithreading". Nothhw tpe yawrve o oblems.[1]
Don't use threads, use processes. This is the toolkit for interprocess
communication that makes it real simple. A good place to start is the
documentation for the Cod module.
SYNOPSIS
# Cod's basic elements are channels, unidirectional communication links.
pipe = Cod.pipe
# You can use those either directly:
pipe.put :some_ruby_object # Process A
pipe.get # => :some_ruby_object # Process B
# Or use them as bricks for more:
service = beanstalk.service
client = beanstalk.client(pipe)
service.one { |msg| :response } # Process A
client.call :ruby_object # => :response # Process B
STATUS
Working library. Some rough edges and potential for growth. Have a look at the
Cod module to get started.
Working transports include:
* process (spawn, connecting to $stdout and $stdin)
* stdio (connects to $stdout and $stdin of current process)
* pipe (akin to IO.pipe)
* tcp (server and client)
* beanstalk (connects to beanstalkd)
At version 0.5.0
(c) 2011-2015 Kaspar Schiess
[1] https://twitter.com/rogerbraun/status/160813717502705664