[Twisted-Python] pb.Copyable, round trip objects, and untrusted clients

Jasper Phillips jasper at peak.org
Fri May 21 05:07:14 EDT 2004

On Fri, 21 May 2004, David Ripton wrote:
> I was worrying about code size more in the other subthread, the 
> difference between
> client.callRemote("send_game", game)
> and
> client.callRemote("send_stuff_about_game", game.name, game.owner, 
> game.create_time, game.start_time, game.min_players, game.max_players, 
> game.player_names)

But you still have to init/set your Game object with all these args somehow on
the client side, right?  IMHO a more apt comparison is this:

game = Game( *manyArgs )
client.callRemote( "send_game", game )

triggering the server to:
game = reconstituteGame( game )


client.callRemote( "create_game", *manyArgs )

triggering the server to:
game = Game( *manyArgs )

IMHO the second is cleaner and less error prone.


More information about the Twisted-Python mailing list