python - Pairing users in GAE -


i pair users on request using python.

for example: user1, user2, , user3 request partner in order. user1 , user2 paired while user3 waits fourth user. create db.model class instance 1 value, waiting user, , work there, seems sloppy. there must clean , reliable way of doing this.

note: users have own instance in class, pairing process deal keys.

explanation , code data structure:

user connections stored in user's instance. user1's peer_id equal "user2", , user2's "user1". relationship not stored anywhere else.

class user(db.model):     peer_id = db.stringproperty() 


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -