beta of async:// xml-rpc
[1/5] from: maarten::vrijheid::net at: 25-Feb-2004 16:22
Hi All,
I integrated async:// from Gabriele with rebXR from Andreas.
rebXR is an XML-RPC implementation, allowing you to invoke remote
functions in REBOL, Java, >NET, Perl ....
See http://earl.strain.at/space/rebXR for more info.
This version, which I hope Andreas will integrate The Right Way in rebXR
as 1.4.0 adds the possibility for an
async client and a standalone server.
Added: xmlrpc-serve 9005 [ function names go here ]
This will start a little HTTP 1.0 daemon on port 9005 that captures any
requests and processes them
e.g. xml-rpc-serve 9090 [ add ]
will expose the add function to XML-RPC clients. Note that the server is
also async:// based.
For the server you need async-protocol.r , libxmlrpc.r and async-xmlrpc.r
Added: async-xmlrpc-exec "host:port/path" [ add 1 2 ]
With no proto at the host (it is converted to async://), and the
callback getting the value of the invocation or an error! value.
If the latter is not handled, there is a silent exit. The callback
*must* be supplied and can be used to initiate an action once a value is
received,
for example updating a GUI, printing, .... Doing I/O in the callback, or
calling a wait might result in trouble (I/O from within I/O handlers is
never a good idea).
Haven't tested that (I suspect writing to a file is OK)
example:
async-xmlrpc-exec "localhost:9090" [add 1 2] :print
forever [wait []]
For the client you need async-protocol.r , libxmlrpc.r and
async-xmlrpc-client.r
And change a few do's at the beginning for both client and servers...
Get the beta at: http://www.surfnetters.nl/maarten/xmlrpc.zip
The API may change, depending on what Andreas wants it to look like in
the offical release.
--Maarten
[2/5] from: jason:cunliffe:verizon at: 25-Feb-2004 16:30
> I integrated async:// from Gabriele with rebXR from Andreas.
> rebXR is an XML-RPC implementation, allowing you to invoke remote
> functions in REBOL, Java, >NET, Perl ....
>
> See http://earl.strain.at/space/rebXR for more info.
Thank you !
Does this mean we are now *very* close to having an http server which can
run Vanilla and be installed and started on the fly anywhere ?
And that with rebXR in the mix, we can now invoke Vanilla methods [special
dynascripts]or any other server-side rebol functions?
And act as a possible replacement for Colin Moock's Unity server?
http://www.moock.org/unity/
I am sorry if I am still not quite getting it, but I think this is all very
exciting news. However I confess I still don't yet understand your async://
references or the implications of al that.
Guess I just need a few more simple examples...
thanks
- Jason
[3/5] from: maarten:vrijheid at: 26-Feb-2004 8:10
>Does this mean we are now *very* close to having an http server which can
>run Vanilla and be installed and started on the fly anywhere ?
>And that with rebXR in the mix, we can now invoke Vanilla methods [special
>dynascripts]or any other server-side rebol functions?
>And act as a possible replacement for Colin Moock's Unity server?
>http://www.moock.org/unity/
>
Yes, the generic HTTP server with Reblet support is next. It always
takes more time than you expect, but if you got a REBOL interpreter
you'll have a HTTP 1.1 web server. With Reblet support and this version
of XML-RPC built-in.
>I am sorry if I am still not quite getting it, but I think this is all very
>exciting news. However I confess I still don't yet understand your async://
>references or the implications of al that.
>Guess I just need a few more simple examples...
>
async:// server is just faster, nothing more. async:// clients allow you
to make a call and continue immediately. When the result is received a
specified function is handed that result (this is the callback). For
example, you'd fetch a user-list on start up and populate the GUI with
the users once the call is completed. In the meantime you're not just
waiting, but other things can happen.
--Maarten
(who will write docs ;-)
[4/5] from: robert:muench:robertmuench at: 26-Feb-2004 16:20
On Wed, 25 Feb 2004 16:22:01 +0100, Maarten Koopmans
<[maarten--vrijheid--net]> wrote:
> I integrated async:// from Gabriele with rebXR from Andreas.
> rebXR is an XML-RPC implementation, allowing you to invoke remote
> functions in REBOL, Java, >NET, Perl ....
Hi, this stuff sounds very cool! I never dived into invent handling in
Rebol, async stuff etc. Is there a tutorial available somewhere? If not,
you and Gariele should write one. :-)) This knowledge needs to be spreaded
because it's an underestimated feature of Rebol. Robert
[5/5] from: maarten:vrijheid at: 26-Feb-2004 18:16
>Hi, this stuff sounds very cool! I never dived into invent handling in
>Rebol, async stuff etc. Is there a tutorial available somewhere? If not,
>you and Gariele should write one. :-)) This knowledge needs to be spreaded
>because it's an underestimated feature of Rebol. Robert
>
I know, I know.... Gabriele wrote to little sample scripts that teach
the basics of async:// I'm pretty sure if you look at the handler of
the async:// xmlrpc-client file most of you will get it. But yes, we
should write a tutorial.
OTOH: witha sync xml-rpc a lot of ground is covered. Just try an async
exec from a view GUI
--Maarten