[ragel-users] interleaving two machines

Robert Lemmen robertle at semistable.com
Wed Oct 22 15:25:58 UTC 2008

On Wed, Oct 22, 2008 at 10:58:37AM -0400, Adrian Thurston wrote:
> I think this has been requested before, or something similar to it. Is
> this a language of your making, or some existing language? I'm
> interested in an example use.

it is a language of my making, but i think it is a quite neat feature.
in my case it is a handshake protocol over the network. you could work
your way around it by specifying the exact order, i.e. one end (the
server) moderates the whole protocol, the other end just answers. it is
however much more efficient and neat if you could avoid that. a really
simple example:

--- helo   -->
<-- helo   ---
--- ident  -->
<-- ident  ---
--- query  -->
<-- answer ---
--- ok     -->
<-- ok     ---

basically, both ends send a "helo", wait for an "ident" and then either
do a "query" which needs an "answer", or just send an "ok". after two
"ok"s the handshake is done. we can of course require the above
ordering, but if we allow both ends to send a package whenever it makes
sense, then the whole thing might get heavily reordered:

--- helo   -->   <-- helo   ---
--- ident  -->   <-- ident  ---
--- query  -->   <-- ok     ---
                 <-- answer ---
--- ok     -->

as you can see, we can then do things in parallel, which is especially
important on high-latency links...

cu  robert

Robert Lemmen                               http://www.semistable.com 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://www.colm.net/pipermail/ragel-users/attachments/20081022/c7c62be6/attachment-0001.sig>

More information about the ragel-users mailing list