[racket] Unique IDs may be needed in Universe programs

From: Marco Morazan (morazanm at gmail.com)
Date: Mon Jan 7 16:05:28 EST 2013

Dear All,

Just a friendly warning about name in Universe. The documentation
states that in (name expr)  expr is used as the title of the canvas.
Some of us, however, use expr for more than that. Specifically, you
may use expr to identify the world that has taken an action to be
communicated to other worlds (e.g., a world moves a rocket and that
same movement needs to be mimicked elsewhere with the correct rocket).
A "natural" solution would be to identify a rocket in another world
using expr. In other words, expr is the "owner" of the rocket it is
associated with. When world expr moves the rocket, the corresponding
rocket needs to mimick the move in other worlds. This all works like a
charm *as long as* every world has a unique name--a bug not easily
detected by first-year students is worlds having the same name.

Would it make sense to have universe itself avoid this situation? For
example, the server could automatically refuse a world joining if it
has a name that is already in use. Yes, I know I could have the
students do the checking in their code but I would rather they focus
on other stuff like protocol design, marshalling, etc. Suggesting that
they check the name before allowing a world to join frustrates
students especially when there are bigger fish to fry in the world of
distributed programming that they are wrestling with.

-- 

Cheers,

Marco

Have a´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´ (¸.·´ * wonderful day! :)


Posted on the users mailing list.