'json_rpc:call': error

20 views
Skip to first unread message

subhajit sidhanta

unread,
Nov 14, 2011, 2:34:43 AM11/14/11
to scalaris
Hi,

I tried calling scalaris from a java application and got following
error. Could somebody please throw some light on what this error maybe
about?:

(boot@Subhajit-PC)1> calling subscribers []
(boot@Subhajit-PC)1> calling subscribers ["n2"]
(boot@Subhajit-PC)1> calling "n2"
(boot@Subhajit-PC)1> {error,{badmatch,{error,no_scheme}}} "n2"
(boot@Subhajit-PC)1>
=ERROR REPORT==== 14-Nov-2011::01:07:20 ===
'json_rpc:call': error
error: {badmatch,{error,no_scheme}}
stack: [{jsonrpc,call,3},{pubsub_publish,publish_internal,3}]

Thanks and regards,
Subhajit

Nico Kruber

unread,
Nov 14, 2011, 3:12:20 AM11/14/11
to scal...@googlegroups.com
Hi Subhajit,
subscribers need to be URLs on which a JSON RPC call can be done, e.g.
http://n2.yourdomain.com:8080

For a full java-Implementation of such a subscriber, have a look at
scalaris/java-api/test/de/zib/scalaris/PubSubTest.java
and in there the testSubscriptions* methods

A Python equivalent can be found in the according unit test in
scalaris/python-api/scalaris_test.py

Regards
Nico Kruber

signature.asc

Thorsten Schuett

unread,
Nov 14, 2011, 3:25:09 AM11/14/11
to scal...@googlegroups.com
Hi Subhajit,

the pubsub system assumes that you register valid http-urls as
subscribers, i.e.:
./scalaris -subscribe "my-topic" "http://127.0.0.1:1234/notifications"
When you publish an event, Scalaris will send a json-message to this
url. The receiver of the notifications should be running a webserver on
the given ip-address+port.

Thorsten

Reply all
Reply to author
Forward
0 new messages