CARVIEW |
Select Language
HTTP/2 302
server: nginx
date: Mon, 01 Sep 2025 08:50:40 GMT
content-type: text/plain; charset=utf-8
content-length: 0
x-archive-redirect-reason: found capture at 20101217045912
location: https://web.archive.org/web/20101217045912/https://github.com/rtomayko/node-bertrpc/
server-timing: captures_list;dur=1.086563, exclusion.robots;dur=0.027820, exclusion.robots.policy;dur=0.012349, esindex;dur=0.015911, cdx.remote;dur=62.795524, LoadShardBlock;dur=222.843535, PetaboxLoader3.datanode;dur=35.672110, PetaboxLoader3.resolve;dur=32.718569
x-app-server: wwwb-app225
x-ts: 302
x-tr: 346
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=0
set-cookie: wb-p-SERVER=wwwb-app225; path=/
x-location: All
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
HTTP/2 302
server: nginx
date: Mon, 01 Sep 2025 08:50:42 GMT
content-type: text/plain; charset=utf-8
content-length: 0
x-archive-redirect-reason: found capture at 20100406170820
location: https://web.archive.org/web/20100406170820/https://github.com/rtomayko/node-bertrpc
server-timing: captures_list;dur=0.575371, exclusion.robots;dur=0.022799, exclusion.robots.policy;dur=0.010066, esindex;dur=0.012860, cdx.remote;dur=60.772218, LoadShardBlock;dur=284.209535, PetaboxLoader3.datanode;dur=180.079147, PetaboxLoader3.resolve;dur=1378.175940, load_resource;dur=1394.674089
x-app-server: wwwb-app225
x-ts: 302
x-tr: 1779
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=0
x-location: All
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
HTTP/2 200
server: nginx
date: Mon, 01 Sep 2025 08:50:43 GMT
content-type: text/html; charset=utf-8
x-archive-orig-server: nginx/0.7.61
x-archive-orig-date: Tue, 06 Apr 2010 17:08:20 GMT
x-archive-orig-connection: close
x-archive-orig-status: 200 OK
x-archive-orig-etag: "300abf53e7b49392e770bb35a073dc8d"
x-archive-orig-x-runtime: 119ms
x-archive-orig-content-length: 24633
x-archive-orig-cache-control: private, max-age=0, must-revalidate
x-archive-guessed-content-type: text/html
x-archive-guessed-charset: utf-8
memento-datetime: Tue, 06 Apr 2010 17:08:20 GMT
link: ; rel="original", ; rel="timemap"; type="application/link-format", ; rel="timegate", ; rel="first memento"; datetime="Fri, 20 Nov 2009 10:25:41 GMT", ; rel="prev memento"; datetime="Thu, 25 Feb 2010 17:24:18 GMT", ; rel="memento"; datetime="Tue, 06 Apr 2010 17:08:20 GMT", ; rel="next memento"; datetime="Fri, 17 Dec 2010 04:59:12 GMT", ; rel="last memento"; datetime="Wed, 30 Jul 2025 10:42:04 GMT"
content-security-policy: default-src 'self' 'unsafe-eval' 'unsafe-inline' data: blob: archive.org web.archive.org web-static.archive.org wayback-api.archive.org athena.archive.org analytics.archive.org pragma.archivelab.org wwwb-events.archive.org
x-archive-src: 51_15_20100406110248_crawl102-c/51_15_20100406170717_crawl101.arc.gz
server-timing: captures_list;dur=0.487812, exclusion.robots;dur=0.018887, exclusion.robots.policy;dur=0.009965, esindex;dur=0.012282, cdx.remote;dur=23.897644, LoadShardBlock;dur=264.260363, PetaboxLoader3.datanode;dur=210.118692, PetaboxLoader3.resolve;dur=230.015736, load_resource;dur=223.123156
x-app-server: wwwb-app225
x-ts: 200
x-tr: 589
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=0
x-location: All
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
content-encoding: gzip
rtomayko's node-bertrpc at master - GitHub
rtomayko / node-bertrpc
- Source
- Commits
- Network (4)
- Issues (6)
- Graphs
-
Branch:
master
click here to add a description
click here to add a homepage

Ryan Tomayko (author)
Fri Nov 27 04:47:03 -0800 2009
name | age | message | |
---|---|---|---|
![]() |
COPYING | Sun Nov 15 06:20:46 -0800 2009 | add license info in COPYING [Ryan Tomayko] |
![]() |
Makefile | Mon Nov 16 05:13:18 -0800 2009 | refactoring in bertrpc; new tests [Ryan Tomayko] |
![]() |
README | Thu Nov 19 12:15:56 -0800 2009 | minor error ruby client example in readme [beaucollins] |
![]() |
examples/ | Fri Nov 27 04:55:14 -0800 2009 | more consistency in examples [Ryan Tomayko] |
![]() |
src/ | Fri Nov 27 04:55:14 -0800 2009 | enable trace logging in client [Ryan Tomayko] |
![]() |
test/ | Fri Nov 27 04:55:14 -0800 2009 | single byte / SMALL_INTEGERS are always unsigned [Ryan Tomayko] |
README
bertrpc.js This is a BERT-RPC server and client library for node.js <https://nodejs.org/>, the V8 based evented IO framework. BERT-RPC is a schemaless binary remote procedure call protocol by Tom Preston-Werner, based on the BERT (Binary ERlang Term) serialization format. See <https://bert-rpc.org/> for more information about BERT and BERT-RPC, including additional language implementations. The bert.js library was taken from Rusty Klophaus's BERT-JS project: <https://github.com/rklophaus/BERT-JS> but has been modified quite a bit at this point. INSTALL node.js must be installed and available on your PATH before continuing. It's trivial: cd /tmp curl -L https://bit.ly/nodejs | tar xvzf - cd node-* ./configure PREFIX=/usr/local make && sudo make install EXAMPLES Once you have node installed, grab a clone of the node-bertrpc git repo $ git clone git://github.com/rtomayko/node-bertrpc $ cd node-bertrpc $ node examples/helloworld.js <-- exposing: say [funs: hello, echo] Leave that there and then run the example client in a separate shell: $ node examples/helloclient.js You should see something like the following output from the server: --> connect --> 30: {call, say, hello, []} <-- 21: {reply, <<"hello">>} --> 45: {call, say, echo, [<<"Hello World">>]} <-- 33: {reply, [<<"Hello World">>]} --> 85: {call, say, echo, [[{foo, <<"bar">>}, {bar, <<"baz">>}], 21]} <-- 73: {reply, [[{foo, <<"bar">>}, {bar, <<"baz">>}], 21]} --> eof <-- close Connect with the Ruby BERT-RPC client (or any other BERT-RPC client) to play at a REPL: $ sudo gem install bertrpc -s https://gemcutter.org/ $ irb -rubygems -rbertrpc >> service = BERTRPC::Service.new('localhost', 7000) >> service.call.say.echo('hello', 'world', { 'foo' => %w[bar baz bizle] }) => ["hello", "world", {:foo=>["bar", "baz", "bizzle"]}] BERT-RPC SERVERS Require the "bertrpc" lib and expose objects: var rpc = require('bertrpc'); rpc.expose('hello', { add: function (a, b) { return a + b; }, subtract: function (a, b) { return a - b; } }); rpc.listen(7001, 'localhost'); Start the node server by running your script directly: node yourstuff.js That exposes a BERT-RPC module named "hello" with two remotely callable functions: "add" and "subtract" but you can pass any object to expose to make all of its functions available. BERT-RPC CLIENTS The BERT-RPC client library is still very experimental and likely to change significantly: var sys = require('sys'), rpc = require('bertrpc'); rpc.connect(7001, 'localhost', function (service) { sys.puts("client calling the add fun in the hello module"); service.call('hello', 'add', [1, 2], function (result) { sys.puts("client received response: " + sys.inspect(result)); // do something useful }); }); BERT ENCODING / DECODING The bert.js library includes functions for encoding, decoding, and getting a formatting string representation of BERT objects. Get in a REPL: $ NODE_PATH=./src node-repl Welcome to the Node.js REPL. Enter ECMAScript at the prompt. node> bert = require('bert'); bert.encode serializes an object graph as a BERT: node> holabert = bert.encode('hello') "\u0083m\u0000\u0000\u0000\u0005hello" node> sys.puts(bert.bin_repr(holabert)) <<131,109,0,0,0,5,104,101,108,108,111>> bert.decode deserializes a BERT, creating an object graph: node> bert.decode("\u0083m\u0000\u0000\u0000\u0005hello") "hello" SEE ALSO CODE: git clone git://github.com/rtomayko/node-bertrpc.git HOME: https://github.com/rtomayko/node-bertrpc/ BUGS: https://github.com/rtomayko/node-bertrpc/issues COPY: See the file COPYING (it's MIT)