| CARVIEW |
mojombo / bertrpc
- Source
- Commits
- Network (7)
- Issues (0)
- Downloads (18)
- Wiki (1)
- Graphs
-
Branch:
master
click here to add a description
click here to add a homepage
Pledgie Donations
Once activated, we'll place the following badge in your repository's detail box:
BERTRPC is a Ruby BERT-RPC client library. — Read more
| name | age | message | |
|---|---|---|---|
| |
.document | Mon May 18 19:33:40 -0700 2009 | add readme [mojombo] |
| |
.gitignore | Mon May 18 19:24:30 -0700 2009 | Initial commit to bertrpc. [mojombo] |
| |
History.txt | Wed Feb 10 22:15:47 -0800 2010 | Version bump to 1.2.1 [mojombo] |
| |
LICENSE | Mon May 18 19:24:30 -0700 2009 | Initial commit to bertrpc. [mojombo] |
| |
README.md | Tue Oct 27 15:13:13 -0700 2009 | make socket read timeout raise a BERTRPC::ReadT... [mojombo] |
| |
Rakefile | Sat Nov 28 10:52:19 -0800 2009 | better dep spec for bert; cleanup Rakefile [mojombo] |
| |
VERSION | Wed Feb 10 22:15:47 -0800 2010 | Version bump to 1.2.1 [mojombo] |
| |
bertrpc.gemspec | Wed Feb 10 22:15:57 -0800 2010 | Regenerated gemspec for version 1.2.1 [mojombo] |
| |
lib/ | Wed Feb 10 22:15:17 -0800 2010 | restrict to IPv4 [mojombo] |
| |
test/ | Thu Feb 04 17:26:16 -0800 2010 | tests work with new select(2) based read logic [rtomayko] |
BERTRPC
By Tom Preston-Werner (tom@mojombo.com)
BERT-RPC client library for Ruby. Makes it ridiculously simple to interface with BERT-RPC servers.
See the full BERT-RPC specification at bert-rpc.org.
This library currently only supports the following BERT-RPC features:
callrequestscastrequests
BERTRPC was developed for GitHub and is currently in production use performing millions of RPC requests every day. The stability and performance have been exemplary.
Installation
$ gem install bertrpc -s https://gemcutter.org
Examples
Require the library and create a service:
require 'bertrpc'
svc = BERTRPC::Service.new('localhost', 9999)
Make a call:
svc.call.calc.add(1, 2)
# => 3
The underlying BERT-RPC transaction of the above call is:
-> {call, calc, add, [1, 2]}
<- {reply, 3}
Make a cast:
svc.cast.stats.incr
# => nil
The underlying BERT-RPC transaction of the above cast is:
-> {cast, stats, incr, []}
<- {noreply}
Documentation
Creating a service:
# No timeout
svc = BERTRPC::Service.new('localhost', 9999)
# 10s socket read timeout, raises BERTRPC::ReadTimeoutError
svc = BERTRPC::Service.new('localhost', 9999, 10)
Copyright
Copyright (c) 2009 Tom Preston-Werner. See LICENSE for details.
