The external device polls for data from GAE.
It is not specified when the data arrives. To describe it more clearly. The
device is a GSM modem device that sends an SMS on the user request.

The user launches a web browser and writes a mobile phone number. The
browser sends data to the GAE and the sms should be send immediately

So I cannot specify how long I can wait in Thread.sleep().



You mention about Objectify. I use that library but I'm quite new to it.

 Does it have the mechanism that works like:

 process A waits for data until data into database arrives or timeout
expires
 process B puts the data into database
 process a continues processing the data inserted by process B

?






On Sat, Jan 29, 2011 at 3:59 PM, Didier Durand <durand.did...@gmail.com>wrote:

> Hi,
>
> Forgot: you can use Thread.sleep() to wait (java.lang.Thread is also
> part of the JRE)
>
> regards
>
> didier
>
> On Jan 29, 3:35 pm, Didier Durand <durand.did...@gmail.com> wrote:
> > Hi,
> >
> > LinkedBlokingQueue is part of JRE WhiteList:
> http://code.google.com/appengine/docs/java/jrewhitelist.html. So, you
> > can use it.
> >
> > But, I dont see the need. Why don't you just from on the datastore on
> > 1 side and read from it on the other. It would be very simple and rely
> > on the most basic (i.e solid) mechanism of gae. (I would recommend
> > Objectify for ds read/ write)
> >
> > As you have network round-trips, the read / write time will be
> > negligible even it can seem high compared to an in-memory mechanism
> > like a Queue.
> >
> > regards
> >
> > didier
> >
> > On Jan 29, 1:51 pm, arturad <artur.dow...@googlemail.com> wrote:
> >
> > > In my application an embedded device (no public IP) should connect to
> > > the GAE in order to obtain some data from it. The data are provided by
> > > the web browser.
> >
> > > The whole data-passing process looks like:
> >
> > >                                               web browser -> GAE ->
> > > embedded standalone device
> >
> > > I developed a servlet the device connects to. It issues the HTTP GET.
> > > On the other side the web browser sends data using standard GWT
> > > RemoteServiceServlet.
> >
> > > In case there is no data for the device the doGet method in the
> > > servlet should stop for some seconds until user enters data or time
> > > out expires.
> >
> > > I'm trying to use LinkedBlockingQueue  to pass data between two
> > > servlets. It does not work unfortunately. Seems like the GAE launches
> > > new JVM for concurrent requests... I pushed the LinkedBlockingQueue
> > > into memcache and get it by name from concurrent requests. Still does
> > > not work. Memcache returns NOTnull. But there are no data in the
> > > queue.
> >
> > > In order to investigate my issue I've made some tests with the
> > > semaphore. Pushed the semaphore to the memcache and made some
> > > concurrent operations ... -> does not work -> one process does not
> > > release the other...
> >
> > > The problem occurs on GAE only. The whole mechanism works on the
> > > development server.
> >
> > > Is there any way to stop/freeze one process (in the doGet method in
> > > servlet) and unblock it by another one ?
> >
> > > Or... Is there any other way to solve my problem ?
> > > Thank you for any suggestions.
> > > Artur
> >
> >
>
> --
> 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<google-appengine-java%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>
>

-- 
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 at 
http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to