Hey Maarten,
The main difference of CaRB and Rugby is that its CaRB is miniscule. The
current version is 1475 bytes, and I dont expect it to grow much, and it may
very well shrink. Its good for educational purposes, and can be included within
source without adding much size.
The transport is best described:
close insert open rejoin [tcp:// IP ":" port] mold return-value
and this makes the request end go:
close insert open server mold/only request
So it doesn't pass firewalls too well, and wont work for connections that dont
close right away. But it is small, and I would expect at least decent
performance, but I am sure there is a hit taken because a new connection must be
established to return a value.
The function to send a request is used like this
>> CaRB/Request 10.67.96.10 [increment 999]
To see if the reply has come back...
>> CaRB/Listen
== [1000]
Return values are wrapped in blocks, as to differentiate a 'none for nothing
recieved and a 'none for the server returning none. Unset! values do not get
returned, but potentially could this way. I haven't quite made up my mind yet
though becuase I haven't had a chance to use it much.
On the server end, you have three options:
* You can serve out a context--as you know is sort of dangerous, but quite easy
to impliment without security in mind. Example:
>> CaRB/serve context [increment: func [arg][arg + 1]]
* You can server a block of named functions. Example:
>> CaRB/serve reduce ['increment func [arg][arg/1 + 1] 'decrement func
[arg][arg/1 - 1]]
* You can serve a function directly, so that its passed the whole request as a
block.
This is gives you alot of control over the request. Example:
>> CaRB/serve func [arg][arg/1 + 1] ; Requesting [999] would return [1000].
My explanation is probably longer than the source, so if your interested here is
were you can find the source so far at:
http://www.sonic.net/~gaia/projects/carb.r
Note that this is not a static version, and functionality is subject to change.
I suppose this also means that if you see any flaws in the concept, please let
me know before I release it officially.
You may find it interesting that CaRB is really just one of my expirements in
the design of a internet scale supercomputer.
--Ryan
Maarten Koopmans wrote:
> Hi Ryan,
>
> What is the difference between CaRB and Rugby? Especially if you'd use it in
> View scripts with the Rugby 'chain func, which is a callback?
>
> How do you handle stub code generation and security? What is your
> performance? Do you use http for transport as well? Always interested in
> other broker techniques....
>
> --Maarten
>
> > Keep your eyes out in the REBOL library, as I am releasing a few things
> this
> > month:
> >
> > TEST VERSIONS
> >
> > Calculese -- A multifunction calculator dialect. Ready this month.
> > FTP-Serve -- A light duty FTP Server. Ready this month.
> > CaRB -- Callback Request Broker. Ready this month.
> > Go-POS -- An excellent point of sale system. Ready this month.
> >
> >
> > UPDATES
> >
> > Desk-Calc -- I improved design of my standard function calculator. Now in
> > REBOL library.
> > Mini-Calc -- My minimum function calculator is now even more minimal. Now
> in
> > REBOL library.
> >
> >
> > Plus I hope to post my reb site this month if I have any time leftover.
> >
> > --Ryan
> >
> > --
> > To unsubscribe from this list, please send an email to
> > [EMAIL PROTECTED] with "unsubscribe" in the
> > subject, without the quotes.
> >
>
> --
> To unsubscribe from this list, please send an email to
> [EMAIL PROTECTED] with "unsubscribe" in the
> subject, without the quotes.
--
Note: When sending me email directly, always make sure to include my name
in the message, otherwise my aggressive spam filters may trash it.
Ryan Cole * www.iesco-dms.com * 707-468-5400
--
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the
subject, without the quotes.