[Y-devel] Proposal: message structure change
Dmitry Platonov shadowjack at mail.ru
Fri Feb 27 04:28:47 GMT 2004
On Thu, Feb 26, 2004 at 06:50:32PM +0100, Ulrik Mikaelsson wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> I absolutely agree with you on this. Forcing string conversion/parsing of all
> types of data, such as integers, is quite suboptimal.
Besides this, it is hard to represent complex data types such as list-of-list etc.
> However, there are three other things which I would like to be considered in
> the protocol:
>
> * Whether all the header fields REALLY should be 4 bytes long. Should a
> message ever be allowed to be larger than 64k, on a synchronized protocol,
> for instance?
> Pros:
> - Smaller header. Lesser overhead may be significant for small operations,
> (such as reading and int).
> Cons:
> - - Stricter limitations.
i think overhead here will be much smaller then in other places.
> * Maybe we should add some client-set request-id in the header for
> method-calling, property-reading and every request that will have a response,
> and thereby allow asynchronous I/O in the protocol?
> Pros:
> - Allowing asynchronous I/O means better support for threading in the
> client/server, which may reduce latencies.
> - Asynchronous I/O may significantly increase throughput, especially on
> high-latency connections.
> Cons:
> - Adding a field in the header once again increases overhead, but the field
> probably won't have to be more than 1 byte long. (More than 256 simultaneous
> connects seems unlikely)
> - Asynchronous connection takes a little time to implement properly in all
> involved parts, but when modifying the protocol, adding the field might be a
> good thing.
Asynchronous I/O is attracting, but right now i cannot think of messages
which have immediate replies _and_ high time of execution on server
> * How is character encoding dealt with right now? I'm not really sure whether
> the protocol in it's current form would allow things like UTF-8 or UTF-16?
> And what about KOI or Japanese language support?
>
> Just my little thoughts.
>
> Regards
> /Ulrik
Right now it is simply one-byte strings. They are converted to UCS4 from UFT8
before drawing glyphs (font system takes UCS4 (or wchar_t, which is same on
Linux). I'm working on more 'right' system...
> - --
> "Life sucks, but death doesn't put out at all...."
> - -- Thomas J. Kopp
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.3 (GNU/Linux)
>
> iD8DBQFAPjHr069SELtZwIkRAmMWAKCFZ83p9oPKxoielGkHIvXSThu2zwCfQIOX
> IYUcbE43asucFfq42ZZUdBc=
> =mE8C
> -----END PGP SIGNATURE-----
>
>
More information about the Y-devel mailing list
2026 © www.Y-Windows.Org - All Rights Reserved