Great, thank you for the clarification. Craig
On Nov 23, 10:32 pm, Timothy Spear <tsp...@green20now.com> wrote: > Craig, > The short answer is. No threads may not be spawned. Use the datastore > > to update/change status for the users. Only use memcache for reference > information or information which a invalid current status may be > acceptable. If the current status of a user must be valid, then the > datastore is the only way to persist the information. > Short reason for GAE thinking. The datastore handles replication > between all the servers automatically. The application servers are > load balanced and constantly in a state of flux. For example, server A > may answer the initial request by one user and Server B may answer the > request by the second user. Server A & B may actually be located in > separate data centers around the world. > > Tim > > On Nov 21, 2009, at 10:35 PM, Craig wrote: > > > Hi, > > > I have some questions regarding the limits of server code in GAE. Can > > I write server code that isn't tied to an http request - i.e. a thread > > that would always be running on the server and which servlets could > > communicate with? From what I've read it isn't possible but I just > > wanted to confirm. > > > The application I'm writing is analogous to a chat system where 10 > > users would log in and indicate their status (busy, idle, etc). I > > would prefer to be able to write a single server thread which would > > maintain this information and could give it to the individual servlets > > as needed. I.e. if I could write a persistent thread to manage this > > data I wouldn't need to deal with the data store, memcache, etc. I > > understand that this isn't possible - but please let me know if it is > > and what term I need to search for. > > > Next, please let me know if the following architecture for my app > > makes sense. Since I cannot write a central thread to manage the > > information and respond to requests, I'll accomplish that using the > > memcache & data store. As users update their status the servlets will > > update the data. Then when the other clients refresh themselves, the > > servlets that they spawn will retrieve everyone's status from the data > > store and return it to the client. Does this structure make sense or > > am I missing something? > > > (Eventually I'll use ServerPush to accomplish the refresh but I don't > > think that is relevant to the question). > > > Thanks for your response and advice, > > > Craig > > > -- > > > You received this message because you are subscribed to the Google > > Groups "Google App Engine for Java" group. > > To post to this group, send email to google-appengine-java@googlegroups.com > > . > > To unsubscribe from this group, send email to > > google-appengine-java+unsubscr...@googlegroups.com > > . > > For more options, visit this group > > athttp://groups.google.com/group/google-appengine-java?hl= > > . -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.