[ANN] Jabber-RPC 0.1.0

  • Thread starter Massimiliano Mirra - bard
  • Start date
M

Massimiliano Mirra - bard

URL:

http://jabber-rpc.rubyforge.org

Changes:

* Rudimentary handling of transport-level errors in remote calls.
* Allow selection of XML parser in client.
* Debug option and introspection for sample agent.
* Smarter processing of method response in Client#call2.
* Bugfix: test agent human input processor expected message instead of message body.
* Now only message body is passed to human input processor.
* Bugfix: results of human input processor were not interpreted correctly.
* Fixed sample TodoAgent to work with new BasicServer.
* BasicAgent is now BasicServer and inherites from XMLRPC::Server.
Jabber::RPC::BasicServer gets from XMLRPC::Server all the goodies such
as introspection, interfaces with explicit signatures, default
handlers and proc handlers. It also allows (potentially) exposure of
multiple agents at a single JID, though it's probably not a good thing
in the Jabber case (see README).

Description:

Jabber-RPC lets objects talk over the network transparently.

Unlike CORBA, objects can reside anywhere on the Internet (safely).

Unlike XMLRPC and SOAP, they can reside in a LAN behind a firewall,
communication is asynchronous (both parties can initiate
conversation), and you don't need a web server.

Small example (assumes jabberd installed on local machine):

---- agent.rb ----

require "jabber/rpc"

class TestAgent
INTERFACE = XMLRPC::interface("") {
meth "boolean alive?()"
}

def alive?(from)
true
end
end

agent = TestAgent.new
server = Jabber::RPC::BasicServer.new("bot@localhost/TestAgent", "password")
server.add_handler(TestAgent::INTERFACE, agent)
server.serve

Thread.stop

---- irb ----

require "jabber/rpc"
session = Jabber::Session.bind("user@localhost/Ruby", "password")
agent = Jabber::RPC::Client.new(session, "bot@localhost/TestAgent").proxy3
agent.alive? #=> true
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top