Tim Ansell pisze:

> A "nifty" thing about the Thousand Parsec protocol is that it is "self
> modifying" in a controllable way.
> 
> To allow servers to define new order types without having to upgrade all
> the clients, orders are dynamically described (and in tp04 objects will
> also be dynamically described in a similar fashion). 
> 
> Each order frame has a base "type" (which tells the library that it is
> an order Frame) and a "subtype", which tell the protocol how the extra
> data at the end of the frame should be parsed. 
> 
> The extra data at the end are not defined in protocol.xml file, instead
> they are dynamically defined by OrderDesc frames. 

I'm getting closer to understanding and I have a huge patch pending which
implements support for that, but I haven't tested it yet :) I think I got
OrderDesc, but not yet the Order frame.

> libtpproto-py handles this by dynamically building classes. This is
> probably a bit hard to do in Java so you might want to go down the
> parametrise route which libtpproto-cpp uses.

It would be enough to know the "wire format"; OrderDesc is described in
protocol3.php, it seems, but for Order it only says "extra data, required by
the order is appended to the end" (and protocolxml.php says "The extra data
is defined by Order descriptions frames.").

There are also some ambiguities in protocol3.xml, like:

- the parameter's structure is defined in <usestruct> element, but there's
also <descstruct> with empty <structure> for each parameter - what's this for?

- there are two elements that "introduce" a parameter: useparameters and
descparameter; why two and what's the difference between them?
-KS

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
tp-devel mailing list
[email protected]
http://www.thousandparsec.net/tp/mailman.php/listinfo/tp-devel

Reply via email to