Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Re: Yet another announcement...

From: ryanc:iesco-dms at: 7-Mar-2002 11:22

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 [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: 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: