[squeak-dev] using O-Meta for parsing, etc., this UDP packet template?

Hans-Martin Mosner hmm at heeg.de
Wed Nov 17 05:44:00 UTC 2010


Am 16.11.2010 20:43, schrieb Lawson English:
> I've had the Squeak-based SL client project on hold for a while due to
> networking issues, but the most recent versions of various libraries
> seem to work fine with the Second Life server, so I'd like to start
> that up again.
>
> My current issue concerns handling the 500+ UDP packets that define a
> huge part of the Second Life client-server protocols:
>
> http://lib.openmetaverse.org/template/release/1.19.1.4.txt
>
> http://wiki.secondlife.com/wiki/Template_verifier.py
>
> There are 3 interrelated tasks: parsing the template, parsing data
> from incoming packets and creating data for outgoing packets. Jecel
> suggested I look into O-Meta for this purpose, but I have not a clue
> how to get started.

I'd guess that OMeta would be very useful for parsing the templates, but
probably not speedy enough for the UDP packets for real-time use due to
its backtracking mechanism.
One possible approach is to use an OMeta grammar to generate fast packet
parsing code from the templates. This is what I would try.
Another would be to implement a simpler #apply: method that is suitable
for packet parsing, and generate OMeta productions from the templates.

Cheers,
Hans-Martin




More information about the Squeak-dev mailing list