If I try to instance a pb.Avatar subclass and send it to a peer
manually, the object that the peer receives is an Unpersistable
instead of a real remote reference to the pb.Avatar. How do I fix this
and actually send out new perspectives to users?
Here's why I want to do this:
Suppose I have a network chess program using perspective broker. When
a user process logs in it receives a remote reference to a
perspective, which is an instance of a pb.Avatar subclass. Suppose
that perspective manages the user's ability to interact with a game
lobby. For example, the perspective may implement perspective_joinGame
allowing the user to partake in a game of chess. This part I know how
to do using the cred system.
Now suppose the user wants to join multiple games of chess
simultaneously. It doesn't make sense to use the same perspective in
both games because then every time the user wanted to announce
intended action we'd have to constantly pass around extra objects to
keep track of which game that perspective is trying to interact with.
A similar problem occurs if the same user wants to play as both
players in a single game. In other words, it would be nice to separate
the responsibilities of the user from those of the "player."
If I'm not thinking about this correctly please advise.
Thank you for your time,