03.01.2013 Views

Chapter 1

Chapter 1

Chapter 1

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

With this scheme, each chat message would be a different GDP datagram from the<br />

datagram containing each BSP response/request pair. That's unfortunate, because of the<br />

real cost of a text message. There are many options for addressing this:<br />

� Do nothing : the user pays the cost of each message, but no higher- level protocol<br />

needs to be altered.<br />

� Save datagrams at connection time: you don't need to send two initiate packets. In the<br />

BSP initiate packet, send the initiating partner's GSDP port ID allocated for chat, and in<br />

the BSP initiate-response, send the listening partner's GSDP port ID allocated for chat.<br />

This relies on GSDP's support for allocating a port ID without participating strictly in the<br />

initiate/listen protocol.<br />

� Save datagrams at hit-request time: include an optional message with each hit<br />

request, and also with the initiate request.<br />

� Low-level protocol piggy-backing : implement a completely different piggy-backing and<br />

reliability scheme than that supported by RGCP, which takes the chat requirement into<br />

account, and optimizes accordingly.<br />

In my view, the first option isn't going far enough, while the final option is probably going too<br />

far. The middle two options require alterations to BSP, but not to the underlying TOGS<br />

protocols. If BSP is changed, then a different game protocol ID needs to be assigned,<br />

otherwise the changed BSP won't successfully interoperate with the existing BSP.<br />

Note<br />

Incidentally the chat requirement – whether verbal or protocol- assisted – is a<br />

good reason for not removing the legend on the borders of the fleet view. At<br />

first I thought those legends were redundant. But having played the game<br />

with some humans, it quickly became apparent that without them it would be<br />

hard to talk about the game.<br />

Midgame protocol change<br />

It would be nice if the GDP protocol could be changed midgame, so that a game could be<br />

played using long-range messaging (SMS) when the players are far apart, and short-range,<br />

free, messaging (Bluetooth) when they meet.<br />

If the GDP protocol were changed, this would imply a change in the addressing information<br />

used by the players. However, the GSDP port IDs must not be changed: they are what<br />

define the game session.<br />

This could probably be kludged without changing TOGS, but I suspect the optimal solution<br />

would involve changes at the GSDP level, if only for proper encapsulation.<br />

Better capability and state support in TOGS<br />

A characteristic of protocol stacks is that they don't represent complete encapsulation. For<br />

instance, it doesn't make much sense to use RGCP without being aware of the underlying<br />

realities of GSDP and GDP, even perhaps the realities of a particular GDP protocol. RGCP<br />

adds value to these layers, but doesn't entirely encapsulate them.<br />

As a consequence, an RGCP application such as Battleships needs access to the<br />

underlying specifics. For instance, is the current GDP protocol networked, and does it<br />

require receive-all? What GDP protocols does the GSDP server support? How can I set,<br />

store, and restore a particular GDP and GSDP configuration?<br />

At the moment, TOGS handles these issues with ad hoc exposure and pass-through of<br />

getter and setter functions up and down the stack. A better system would be to use the<br />

capabilities pattern at each level:<br />

� define a struct that includes all capability and setting information for a given level,

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!