[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [JDEV] Why XML?



>It's probably important to measure things before guessing, otherwise you
might
>end up doing the equivalent of optimizing the system idle loop.

I meant if we can make things faster even a bit without giving out the
flexibility away why won't we? :)

As I know in ICQ v2 protocol an online alert (packet sent from server to
client) is a UDP packet only 10 bytes long (with the advantage of using UINs
of course). In Jabber I can hardly guess but probably would be much longer
than that. Think you have a list of four thousand people in your roster then
measure it :)

>Yes. No. Yes, the parsing might be a little slower, but no, that will not
need
>to make coding harder. You just grab a standard parsing library and hook it
up.
>Look into the SAX interface for Java for an example.

What if I'm coding in Delphi? :) (I'm currently coding in Delphi in fact
ehhee). And are the standard libs suitable for network-kind of parsing?

>Binary??? Ouch. Directly use structs?? Ouch.

That worked for ICQ, why won't it work for us? :)

>Which platform, compiler, packing options??

Packing options what an IP header has :)

>Intel byte-order or Motorolla?

Say Intel. What about ntohs, htons ? :)

>8,16, 32 or 64 bit alignment???

Why align?

>What if you change your C/C++ code? Break the protocol???

No. Allow the protocol itself to tolerate the changes. That's not that much
hard.

>( ever seen the .TGA file format? )

Nope but now I wonder heheh

>Yes, but XML makes the functional aspect of the protocol so much stronger.
>Noticing a missing '>' is far easier than noticing a missing bit. Besides,
this
>gives you a wealth of tools for viewing the data exchanged, debugging, etc.

I have to admit but if a protocol which makes sense going to be used, then
why a markup language selected for that? A straight text based protocol
(such as POP3, SMTP) could be used. (Then a new code parsing code would be
needed you're right about that one I'm afraid ehhehe)

finest,

SSG