From: Erik V. <eri...@hc...> - 2008-08-06 22:30:40
|
> If we want to leverage some existing code, for the "near realtime" > communication, XMPP (aka. Jabber) is a more appropriate protocol. I > believe there are a few different existing libraries we can leverage > for the communications, which could save us a TON of work. XML simple? It's verbose and slow, and needs lots of code to build and parse, as I have experienced so far... Its main asset is that it's readable (and, oh yes, fashionable). The simplest thing IMO would be to pass on serialized java objects. Save/Load is already based on (de)serialization. It's simple and fast and it works. My question is rather how to transfer such serialized objects between client and server, or applet and server, or whatever. > We should consider SMTP to be for PBEM only. To be honest, the PBEM > component can be as simple as dropping the saved game file into an > e-mail, and passing around the saved game files. There's a PBEM > Diplomacy client that does basically this. It connects to your mail > server and just looks for specially formatted e-mails, and loads the > contents into the game engine. I had such a thing in mind. I suppose there must be Java code around for a very basic SMTP/POP3 client, that we can build into Rails. Now, if we put either the ASCIIfied serialized Java objects or the corresponding plain text (or why not both) into e-mails, we might have achieved PBEM and near real-time play by the same mechanism. This would be just a start, other means can perhaps be added later. On a LAN it can of course be done a lot simpler: just open a stream between client and server and pass the objects around. But is that safe enough for Internet? Erik. |