Skip to content
Newer
Older
100644 72 lines (42 sloc) 1.35 KB
3ce4b76 @mojombo add readme
authored May 18, 2009
1 BERTRPC
2 =======
3
4 By Tom Preston-Werner (tom@mojombo.com)
5
53562b9 @mojombo make socket read timeout raise a BERTRPC::ReadTimeoutError and enhanc…
authored Oct 27, 2009
6 BERT-RPC client library for Ruby. Makes it ridiculously simple to interface
7 with BERT-RPC servers.
3ce4b76 @mojombo add readme
authored May 19, 2009
8
bc6a487 @mojombo update history, readme, and deps for 1.0.0 release
authored Oct 19, 2009
9 See the full BERT-RPC specification at [bert-rpc.org](http://bert-rpc.org).
3ce4b76 @mojombo add readme
authored May 19, 2009
10
dd90827 @mojombo Readme changes
authored Oct 18, 2009
11 This library currently only supports the following BERT-RPC features:
3ce4b76 @mojombo add readme
authored May 19, 2009
12
cd68d69 @mojombo more readme refinements
authored Oct 18, 2009
13 * `call` requests
14 * `cast` requests
3ce4b76 @mojombo add readme
authored May 19, 2009
15
53562b9 @mojombo make socket read timeout raise a BERTRPC::ReadTimeoutError and enhanc…
authored Oct 27, 2009
16 BERTRPC was developed for GitHub and is currently in production use performing
17 millions of RPC requests every day. The stability and performance have been
18 exemplary.
bc6a487 @mojombo update history, readme, and deps for 1.0.0 release
authored Oct 20, 2009
19
3ce4b76 @mojombo add readme
authored May 19, 2009
20
dd90827 @mojombo Readme changes
authored Oct 19, 2009
21 Installation
22 ------------
7d17b01 @mojombo support cast requests
authored Aug 16, 2009
23
cd68d69 @mojombo more readme refinements
authored Oct 19, 2009
24 $ gem install bertrpc -s http://gemcutter.org
7d17b01 @mojombo support cast requests
authored Aug 16, 2009
25
26
27 Examples
28 --------
29
30 Require the library and create a service:
3ce4b76 @mojombo add readme
authored May 19, 2009
31
32 require 'bertrpc'
33 svc = BERTRPC::Service.new('localhost', 9999)
7d17b01 @mojombo support cast requests
authored Aug 16, 2009
34
35 Make a call:
36
4904d55 @mojombo change semantics to svc.call.mod.fun
authored Aug 13, 2009
37 svc.call.calc.add(1, 2)
3ce4b76 @mojombo add readme
authored May 19, 2009
38 # => 3
39
7d17b01 @mojombo support cast requests
authored Aug 16, 2009
40 The underlying BERT-RPC transaction of the above call is:
f3b7f34 @mojombo cleaner call arity semantics
authored May 18, 2009
41
42 -> {call, calc, add, [1, 2]}
7d17b01 @mojombo support cast requests
authored Aug 16, 2009
43 <- {reply, 3}
44
45 Make a cast:
46
47 svc.cast.stats.incr
48 # => nil
49
50 The underlying BERT-RPC transaction of the above cast is:
51
52 -> {cast, stats, incr, []}
53 <- {noreply}
f3b7f34 @mojombo cleaner call arity semantics
authored May 19, 2009
54
3ce4b76 @mojombo add readme
authored May 19, 2009
55
53562b9 @mojombo make socket read timeout raise a BERTRPC::ReadTimeoutError and enhanc…
authored Oct 27, 2009
56 Documentation
57 -------------
58
59 Creating a service:
60
61 # No timeout
62 svc = BERTRPC::Service.new('localhost', 9999)
63
64 # 10s socket read timeout, raises BERTRPC::ReadTimeoutError
65 svc = BERTRPC::Service.new('localhost', 9999, 10)
66
67
3ce4b76 @mojombo add readme
authored May 19, 2009
68 Copyright
69 ---------
70
71 Copyright (c) 2009 Tom Preston-Werner. See LICENSE for details.
Something went wrong with that request. Please try again.