chat application design help app engine

26 views
Skip to first unread message

ravi teja

unread,
Sep 22, 2011, 1:04:33 PM9/22/11
to Google App Engine
hi,

I'm developing an app to be hosted on GAE.Basically my app needs to
connect people randomly.

I did similar app before where i assigned unique id to each user.Once
the user enter the app his ID will be inserted into static
synchronized LinkedHashSet(which acts like global datastore for
app).Similarly second user enters synchronized LinkedHashSet,If he
finds the ID other than his ID then they are connected.The Second user
removes their ID's from LinkedHashSet and Inserts them into Mysql
DataBase as pairs.Note that access to LinkedHashSet is synchronized.

Now i wanted to design a similar app in cloud environment like GAE.But
in GAE static variables are not global since the distributed nature of
app engine.How to write similar code in cloud environment?

regards,
ravi

Gerald Tan

unread,
Sep 23, 2011, 5:14:48 AM9/23/11
to google-a...@googlegroups.com
If you perform the matching in a Task Queue, it should be synchronous.
This may require the user to poll the app until they get a match.
Reply all
Reply to author
Forward
0 new messages