[appengine-java] java.lang.NoSuchMethodError: javax.persistence.EntityManager.createNamedQuery

2011-04-08 Thread sonxurxo
That's the output I get when my Spring-injected JPA EntityManager
instance calls createNamedQuery method:

java.lang.NoSuchMethodError:
javax.persistence.EntityManager.createNamedQuery(Ljava/lang/
String;Ljava/lang/Class;)Ljavax/persistence/TypedQuery;

This is called inside a very tested and absolutely working library
(working outside appengine). This happens locally in my computer, and
I suppose also when uploaded in GAE.

Other methods (persist, merge, remove, find...) work fine.

Am I missing something? Any ideas? TIA

-- 
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.



Re: [appengine-java] Re: My application works well in eclipse but when I deploy the same code in GAE it shows the following error while opening the homepage

2011-04-08 Thread Amit Pandey
As per your exception* tweet_now* class is not available for JVM. If you
have created this class, make sure you have imported it. OR if you are using
jar file for this class, make sure you have added the jar file to the class
path.

Just to clarify- Are you using eclipse to deploy the code in app engine?

Thanks,
 Amit


On Fri, Apr 8, 2011 at 11:49 AM, hiran.suvrat hiran.suv...@gmail.comwrote:

 I have a similar problem and the error log is.. Thank you for the help

 500 776ms 956cpu_ms 0kb Mozilla/5.0 (Windows; U; Windows NT 5.1; en-
 US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.133 Safari/
 534.16,gzip(gfe)
 203.110.243.21 - - [30/Mar/2011:14:33:44 -0700] GET / HTTP/1.1 500 0
 - Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/534.16
 (KHTML, like Gecko) Chrome/10.0.648.133 Safari/534.16,gzip(gfe)
 sentiment-app.appspot.com ms=777 cpu_ms=957 api_cpu_ms=0
 cpm_usd=0.026614 loading_request=1
 W 2011-03-30 14:33:44.409
 EXCEPTION
 java.lang.ClassNotFoundException: tweet_now
at
 com.google.appengine.runtime.Request.process-01e974251f42de3f(Request.java)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
at org.mortbay.util.Loader.loadClass(Loader.java:91)
at org.mortbay.util.Loader.loadClass(Loader.java:71)
at org.mortbay.jetty.servlet.Holder.doStart(Holder.java:73)
at
 org.mortbay.jetty.servlet.ServletHolder.doStart(ServletHolder.java:
 242)
at
 org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
 50)
at
 org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:
 685)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
at
 org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:
 1250)
at
 org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:
 517)
at
 org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:
 467)
at
 org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
 50)
at com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java:
 437)
at com.google.net.rpc.impl.Server$RpcTask.runInContext(Server.java:
 573)
at com.google.tracing.TraceContext$TraceContextRunnable
 $1.run(TraceContext.java:448)
at com.google.tracing.TraceContext.runInContext(TraceContext.java:
 688)
at com.google.tracing.TraceContext

 $AbstractTraceContextCallback.runInInheritedContextNoUnref(TraceContext.java:
 326)
at com.google.tracing.TraceContext
 $AbstractTraceContextCallback.runInInheritedContext(TraceContext.java:
 318)
at com.google.tracing.TraceContext
 $TraceContextRunnable.run(TraceContext.java:446)
at
 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:
 1110)
at java.util.concurrent.ThreadPoolExecutor
 $Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:636)
 E 2011-03-30 14:33:44.410
 javax.servlet.ServletContext log: unavailable
 javax.servlet.UnavailableException: tweet_now
at org.mortbay.jetty.servlet.Holder.doStart(Holder.java:79)
at
 org.mortbay.jetty.servlet.ServletHolder.doStart(ServletHolder.java:
 242)
at
 org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
 50)
at
 org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:
 685)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
at
 org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:
 1250)
at
 org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:
 517)
at
 org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:
 467)
at
 org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
 50)
at

 com.google.apphosting.runtime.jetty.AppVersionHandlerMap.createHandler(AppVersionHandlerMap.java:
 191)
at

 com.google.apphosting.runtime.jetty.AppVersionHandlerMap.getHandler(AppVersionHandlerMap.java:
 168)
at

 com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:
 123)
at
 com.google.apphosting.runtime.JavaRuntime.handleRequest(JavaRuntime.java:
 261)
at com.google.apphosting.base.RuntimePb$EvaluationRuntime
 $2.handleRequest(RuntimePb.java:9285)
at com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java:
 437)
at com.google.net.rpc.impl.Server$RpcTask.runInContext(Server.java:
 573)
at com.google.tracing.TraceContext$TraceContextRunnable
 $1.run(TraceContext.java:448)
at com.google.tracing.TraceContext.runInContext(TraceContext.java:
 688)
at com.google.tracing.TraceContext

 $AbstractTraceContextCallback.runInInheritedContextNoUnref(TraceContext.java:
 326)
at com.google.tracing.TraceContext
 $AbstractTraceContextCallback.runInInheritedContext(TraceContext.java:
 318)

[appengine-java] Re: JDO - Updating a One-to-one child

2011-04-08 Thread Ian Marshall
Hi Luca,

What's your code for

  r.setImage(newImage)

and anything else that might be relevant?

Ian



On Apr 7, 4:25 pm, Luca Matteis lmatt...@gmail.com wrote:
 Hello Ian, I tried using your exact piece of code. Still same results.
 The recipe still points to the first image instead of the most
 recently added one.

 On Thu, Apr 7, 2011 at 5:20 PM, Ian Marshall ianmarshall...@gmail.com wrote:
  Do you use transactions?

  Instead of your

   PersistenceManager pm = PMF.get().getPersistenceManager();
   Recipe r = pm.getObjectById(Recipe.class, recKey);
   try
   {
     r.setImage(newImage);
   }
   finally
   {
     pm.close();
   }

  have you tried

     PersistenceManager pm = PMF.get().getPersistenceManager();
     Transaction tx = pm.currentTransaction();
     try
     {
       tx.begin();

       Recipe r = pm.getObjectById(Recipe.class, recKey);
       r.setImage(newImage);

       tx.commit();
     }
     finally
     {
       try
       {
         if (tx.isActive())    // Because of an exception, say
           tx.rollback();
       }
       finally
       {
         pm.close();
       }
     }

  On Apr 7, 3:03 pm, Luca Matteis lmatt...@gmail.com wrote:
  This is really weird. I cannot find anything on the internet that
  could help me. It seems such a simple thing to be editing child
  objects and I find it ridiculous that I can't find a solution.

  please help

  On Thu, Apr 7, 2011 at 11:53 AM, Luca Matteis lmatt...@gmail.com wrote:
   Well, I would think the Key has relationship information. The thing is
   that I'm able to fetch the image for the recipe, so the relationship
   is there somehow. It seems as if setImage() isn't enough for the
   linkage to update to the latest image.

   On Thu, Apr 7, 2011 at 11:29 AM, Simon Knott knott.si...@gmail.com 
   wrote:
   Yes, that's what I would have expected - how else would a recipe ever 
   retain
   which image it is related to?  Is the relationship purely stored within 
   the
   key of the Image?

   I must admit that without any knowledge of JDO and its relationship
   management, I'm just making wild guesses!

   --
   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.

  --
  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=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.



Re: [appengine-java] Re: JDO - Updating a One-to-one child

2011-04-08 Thread Luca Matteis
Here's the entire piece of code that handles the update. I changed it
to setAvatar() (line 42) and it's on a `MyUser` object instead of a
Recipe, but it's the same thing:

http://codepad.org/qPo2ZyBX

I also update the 'name' of the user, and the update works fine...
just as I said, the object still points to the first image instead of
the one added.

On Fri, Apr 8, 2011 at 10:11 AM, Ian Marshall ianmarshall...@gmail.com wrote:
 Hi Luca,

 What's your code for

  r.setImage(newImage)

 and anything else that might be relevant?

 Ian



 On Apr 7, 4:25 pm, Luca Matteis lmatt...@gmail.com wrote:
 Hello Ian, I tried using your exact piece of code. Still same results.
 The recipe still points to the first image instead of the most
 recently added one.

 On Thu, Apr 7, 2011 at 5:20 PM, Ian Marshall ianmarshall...@gmail.com 
 wrote:
  Do you use transactions?

  Instead of your

   PersistenceManager pm = PMF.get().getPersistenceManager();
   Recipe r = pm.getObjectById(Recipe.class, recKey);
   try
   {
     r.setImage(newImage);
   }
   finally
   {
     pm.close();
   }

  have you tried

     PersistenceManager pm = PMF.get().getPersistenceManager();
     Transaction tx = pm.currentTransaction();
     try
     {
       tx.begin();

       Recipe r = pm.getObjectById(Recipe.class, recKey);
       r.setImage(newImage);

       tx.commit();
     }
     finally
     {
       try
       {
         if (tx.isActive())    // Because of an exception, say
           tx.rollback();
       }
       finally
       {
         pm.close();
       }
     }

  On Apr 7, 3:03 pm, Luca Matteis lmatt...@gmail.com wrote:
  This is really weird. I cannot find anything on the internet that
  could help me. It seems such a simple thing to be editing child
  objects and I find it ridiculous that I can't find a solution.

  please help

  On Thu, Apr 7, 2011 at 11:53 AM, Luca Matteis lmatt...@gmail.com wrote:
   Well, I would think the Key has relationship information. The thing is
   that I'm able to fetch the image for the recipe, so the relationship
   is there somehow. It seems as if setImage() isn't enough for the
   linkage to update to the latest image.

   On Thu, Apr 7, 2011 at 11:29 AM, Simon Knott knott.si...@gmail.com 
   wrote:
   Yes, that's what I would have expected - how else would a recipe ever 
   retain
   which image it is related to?  Is the relationship purely stored 
   within the
   key of the Image?

   I must admit that without any knowledge of JDO and its relationship
   management, I'm just making wild guesses!

   --
   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.

  --
  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=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.



-- 
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.



Re: [appengine-java] Re: JDO - Updating a One-to-one child

2011-04-08 Thread Simon Knott
Can you post the code for your MyUser and the MyImage classes as well?

-- 
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.



Re: [appengine-java] Re: JDO - Updating a One-to-one child

2011-04-08 Thread Luca Matteis
The MyUser entity:

http://codepad.org/C2qRTTRt

and the MyImage entity:

http://codepad.org/xR6hhuU8

On Fri, Apr 8, 2011 at 11:00 AM, Simon Knott knott.si...@gmail.com wrote:
 Can you post the code for your MyUser and the MyImage classes as well?

 --
 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.


-- 
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.



[appengine-java] Re: JDO - Updating a One-to-one child

2011-04-08 Thread Ian Marshall
Hi Luca,

My comments, for what they are worth, in ascending order of
importance:

1.  In your two MyUser public static methods, it might be good
practice to close the PersistenceManager instance before returning.

2.  For the annotation for persistent entity classes, I use:

  @PersistenceCapable(identityType = IdentityType.APPLICATION,
   detachable = true)

Now, you do not have to do the detachable bit, but I do use the first
part (identityType) (unlike in the GAE/J documentation examples) which
you do not.

3.  Try constructing your MyImage instance within the transaction.
This may allow the enhancement magic to work better and the new
MyImage instance to be persisted.

Cheers,

Ian



On Apr 8, 10:07 am, Luca Matteis lmatt...@gmail.com wrote:
 The MyUser entity:

 http://codepad.org/C2qRTTRt

 and the MyImage entity:

 http://codepad.org/xR6hhuU8

 On Fri, Apr 8, 2011 at 11:00 AM, Simon Knott knott.si...@gmail.com wrote:
  Can you post the code for your MyUser and the MyImage classes as well?

  --
  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.



-- 
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.



[appengine-java] Not receiving E-mail updates

2011-04-08 Thread Ian Marshall
I am no longer receiving E-mail updates for topics that I have set
this option.

Is anyone else having this problem?

-- 
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.



Re: [appengine-java] Re: JDO - Updating a One-to-one child

2011-04-08 Thread Simon Knott
I've no idea whether it makes any difference, but try changing the 
following:

@Persistent
private MyImage avatar;

to

@Persistent(defaultFetchGroup = true)
private MyImage avatar;


-- 
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.



Re: [appengine-java] Re: JDO - Updating a One-to-one child

2011-04-08 Thread Simon Knott
Is there any reason you make a new MyImage object?  Why can't you just 
change the MyImage object which already exists in the MyUser object?

-- 
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.



Re: [appengine-java] Re: JDO - Updating a One-to-one child

2011-04-08 Thread Luca Matteis
Argh! Nothing! I just tried making all changes... nothing.. same results :(
It's incredible I can't find any example online that involves editing
a child owned entity.

On Fri, Apr 8, 2011 at 11:41 AM, Simon Knott knott.si...@gmail.com wrote:
 I've no idea whether it makes any difference, but try changing the
 following:

 @Persistent
 private MyImage avatar;

 to

 @Persistent(defaultFetchGroup = true)
 private MyImage avatar;


 --
 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.


-- 
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.



[appengine-java] Re: JDO - Updating a One-to-one child

2011-04-08 Thread Ian Marshall
Have you looked at the GAE persistence blog of Max Ross of Google?
There are some excellent working examples there... I have found it
useful whilst working through my own private JDO nightmare!



On Apr 8, 10:49 am, Luca Matteis lmatt...@gmail.com wrote:
 Argh! Nothing! I just tried making all changes... nothing.. same results :(
 It's incredible I can't find any example online that involves editing
 a child owned entity.

 On Fri, Apr 8, 2011 at 11:41 AM, Simon Knott knott.si...@gmail.com wrote:
  I've no idea whether it makes any difference, but try changing the
  following:

      @Persistent
      private MyImage avatar;

  to

      @Persistent(defaultFetchGroup = true)
      private MyImage avatar;

  --
  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.



-- 
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.



[appengine-java] Re: fetching of children JDO

2011-04-08 Thread Neto
Hi, i didnt have the element

 property name=datanucleus.maxFetchDepth value=1/

in the jdoconfig.xml file, but i added it with a value of 2 and it
indeed solved the problem.

I was about to use your suggestion, but since the fecth depth worked,
for now this is all i need!

Thanks alot for your help, you saved me a lot of work!

On Apr 7, 4:13 pm, Ian Marshall ianmarshall...@gmail.com wrote:
 The problem could be due to fetch depth. In my jdoconfig.xml file, I
 have

   property name=datanucleus.maxFetchDepth value=1/

 which is the default value.

 I use transactions for my data exchange with the datastore using JDO
 for everything except queries which can return entities from more than
 one entity group.

 What I do is:

   ·  Retrieve or get an instance of A.
   ·  Touch = retrieve the instance of B from A (A.getB()?)
   ·  Touch = retrieve the instance of C from B (B.getC()?)

 whilst in the transaction and before detaching. Then you should have
 what you need.

 What I do (and it's not optimised but it works) is have a generalised
 business method like

   /**
    * For each object in the list supplied, fetches explicitly all
 fields
    * which represent either persistent objects or lists (of any
 object),
    * in order to force their loading into the persistent object.
    * This method traverses one generation only in each direction.
    * (To traverse another generation, a fresh call to the database
    * will be needed to yield the relevant object(s) from the correct
    * source generation.)
    * @param liList The list of persistence objects to be traversed.
    */
   private static void fetchChildAndParentFields(ArrayList liList)
   {
     ListIterator iterList = liList.listIterator();

     while (iterList.hasNext())
     {
       Object obj = iterList.next();

       if (obj instanceof User)
       {
         User user = (User)obj;

         ArrayListUserDetails liUserDetails = user.getUserDetails();
         if (liUserDetails != null)
           liUserDetails.size();

         ImageDataTemp idtImageDataTemp = user.getImageDataTemp();

         ArrayListCommissionReceived liCommissionsReceived =
          user.getCommissionsReceived();
         if (liCommissionsReceived != null)
           liCommissionsReceived.size();
       }
       else if ...
       ...
     }
   }

 which is called within the transaction before detachment. I then know
 that I have got the next layer of objects already fetched and ready
 for use and abuse.

 On Apr 7, 1:19 pm, Neto jpe.n...@gmail.com wrote:







  I have a mistake above: by

  I retrieve a A object and than detach it. I can acess the listB field just
  fine, but when i try to acess the* working hours*, i get the following
  error:

  e mean

  I retrieve a A object and than detach it. I can acess the listB field just
  fine, but when i try to acess the *listC*, i get the following error:

-- 
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.



Re: [appengine-java] Re: JDO - Updating a One-to-one child

2011-04-08 Thread Amit Pandey
But editing the existing one is not a good solution. What if I want to
insert another object keeping old object remains on datastore?

On Fri, Apr 8, 2011 at 4:04 PM, Luca Matteis lmatt...@gmail.com wrote:

 Oh! Oh!!! Great idea I will just edit it instead of creating a new
 one! DUH! thanks so much

 On Fri, Apr 8, 2011 at 11:53 AM, Simon Knott knott.si...@gmail.com
 wrote:
  Is there any reason you make a new MyImage object?  Why can't you just
  change the MyImage object which already exists in the MyUser object?
 
  --
  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.
 

 --
 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.



-- 
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.



Re: [appengine-java] Re: JDO - Updating a One-to-one child

2011-04-08 Thread Luca Matteis
Oh! Oh!!! Great idea I will just edit it instead of creating a new
one! DUH! thanks so much

On Fri, Apr 8, 2011 at 11:53 AM, Simon Knott knott.si...@gmail.com wrote:
 Is there any reason you make a new MyImage object?  Why can't you just
 change the MyImage object which already exists in the MyUser object?

 --
 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.


-- 
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.



[appengine-java] Re: fetching of children JDO

2011-04-08 Thread Ian Marshall
You're welcome.



On Apr 8, 11:40 am, Neto jpe.n...@gmail.com wrote:
 Hi, i didnt have the element

  property name=datanucleus.maxFetchDepth value=1/

 in the jdoconfig.xml file, but i added it with a value of 2 and it
 indeed solved the problem.

 I was about to use your suggestion, but since the fecth depth worked,
 for now this is all i need!

 Thanks alot for your help, you saved me a lot of work!

 On Apr 7, 4:13 pm, Ian Marshall ianmarshall...@gmail.com wrote:

  The problem could be due to fetch depth. In my jdoconfig.xml file, I
  have

    property name=datanucleus.maxFetchDepth value=1/

  which is the default value.

  I use transactions for my data exchange with the datastore using JDO
  for everything except queries which can return entities from more than
  one entity group.

  What I do is:

    ·  Retrieve or get an instance of A.
    ·  Touch = retrieve the instance of B from A (A.getB()?)
    ·  Touch = retrieve the instance of C from B (B.getC()?)

  whilst in the transaction and before detaching. Then you should have
  what you need.

  What I do (and it's not optimised but it works) is have a generalised
  business method like

    /**
     * For each object in the list supplied, fetches explicitly all
  fields
     * which represent either persistent objects or lists (of any
  object),
     * in order to force their loading into the persistent object.
     * This method traverses one generation only in each direction.
     * (To traverse another generation, a fresh call to the database
     * will be needed to yield the relevant object(s) from the correct
     * source generation.)
     * @param liList The list of persistence objects to be traversed.
     */
    private static void fetchChildAndParentFields(ArrayList liList)
    {
      ListIterator iterList = liList.listIterator();

      while (iterList.hasNext())
      {
        Object obj = iterList.next();

        if (obj instanceof User)
        {
          User user = (User)obj;

          ArrayListUserDetails liUserDetails = user.getUserDetails();
          if (liUserDetails != null)
            liUserDetails.size();

          ImageDataTemp idtImageDataTemp = user.getImageDataTemp();

          ArrayListCommissionReceived liCommissionsReceived =
           user.getCommissionsReceived();
          if (liCommissionsReceived != null)
            liCommissionsReceived.size();
        }
        else if ...
        ...
      }
    }

  which is called within the transaction before detachment. I then know
  that I have got the next layer of objects already fetched and ready
  for use and abuse.

  On Apr 7, 1:19 pm, Neto jpe.n...@gmail.com wrote:

   I have a mistake above: by

   I retrieve a A object and than detach it. I can acess the listB field 
   just
   fine, but when i try to acess the* working hours*, i get the following
   error:

   e mean

   I retrieve a A object and than detach it. I can acess the listB field 
   just
   fine, but when i try to acess the *listC*, i get the following error:



-- 
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.



Re: [appengine-java] Re: Detecting orphaned blobs in the Blobstore

2011-04-08 Thread lorenoolive...@gmail.com
Hi Didier,

I'm not sure if I understand your idea. The get method you pointed is a
method of a map that is retrieved by the getUploadedBlobs, from
BlobstoreService right? If so, it only make sense to call getUploadedBlobs
right after the blobstore redirect the request back to my application
(according to the javadoc).

Your idea is to store the blobs` keys regardless my form is stored or not?


On Fri, Apr 8, 2011 at 1:27 AM, Didier Durand durand.did...@gmail.comwrote:

 Hi,

 You get the key of your blob via BlobKey blobKey = blobs.get(myFile)
 (see http://code.google.com/appengine/docs/java/blobstore/overview.html)

 So, I would personally store all the myFile ids that I distributed
 from the server side and in an asynchronous queue task would do to see
 if the get() above responds with a Key. If yes, you decide with other
 data if orphaned or not and delete appropriately.

 regards

 didier


 On Apr 7, 8:46 pm, lorenoolive...@gmail.com
 lorenoolive...@gmail.com wrote:
  Hi there.
 
  One of the features of my application requires the upload of image files
  along with other data in a form. That is, my entity is composed of both
 some
  fileds (text, currency, dates, etc) and an image file.
 
  As far as I could see, to deal with the blob store service is a two phase
  process. In my case, I submit a form with both the image and the
 remaining
  data, this post is handled by the blob store service, which stores the
 image
  and redirects the request back to my application, with the blob key and
 the
  remaining data of the form. But, what happens if, by some reason, the
  remaining of the post data cannot be persisted by my application? In
 cases
  like that, how can I cope with orphaned blobs in the blob store? I took a
  look at the BlobstoreService API, but could not find any method that
 lists
  all the keys of persisted blobs.
 
  Actually, I have some ideas for detecting and deleting such orphan blobs,
  but I'm afraid I can be missing something obvious since I'm still
 starting
  with GAE.
 
  Any advice in this sense?
 
  Loreno

 --
 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.



-- 
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.



[appengine-java] Re: Custom security for servlets

2011-04-08 Thread Simon Knott
Hi,

In what way is it not working?

Cheers,
Simon

-- 
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.



[appengine-java] Re-deploying an application under heavy load... what happens?

2011-04-08 Thread András Belicza
Hi,

I have a question. How does the deployment process exactly work? What 
happens if I re-deploy an application or switch to a different, already 
uploaded version when the application is under heavy load?

My guess would be that the requests that are currently running will be 
finished but no new requests will be received/processed until the deployment 
is ready. Is this what happens?

Also during the deployment process if a new HTTP request arrives, what will 
the client get? Will it be delayed and executed/served properly? Or will the 
client get some HTTP error code (something like temporarily unavailable)?

Thanks in advance.

-- 
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.



Re: [appengine-java] Re: Custom security for servlets

2011-04-08 Thread Amit Pandey
To apply the basic authentication we have to provide role (as I did in
Tomcat container). Here google app engine defines only two role a) *. b)
admin.

I believe Google app engine has customize the BASIC_AUTH to GOOGLE_AUTH.
Thats why they have their own role constraint. And in GOOGLE_AUTH it
redirects the google login page.
So I can't use BASIC_AUTH in my application.

Thoughts?
On Fri, Apr 8, 2011 at 6:15 PM, Simon Knott knott.si...@gmail.com wrote:

 Hi,

 In what way is it not working?

 Cheers,
 Simon

 --
 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.


-- 
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.



[appengine-java] Object Manager has been closed - solution other than detaching

2011-04-08 Thread Luca Matteis
Whenever I query something like

public static MyUser getUserInfo(Key userKey) {
PersistenceManager pm = PMF.get().getPersistenceManager();
MyUser myUser, detached = null;
try {
myUser = pm.getObjectById(MyUser.class, userKey);
pm.detachCopy(myUser.getAvatar()); // little worried about
this, but fixes the error
detached = pm.detachCopy(myUser);
} finally {
pm.close();
}
return detached;
}

before closing the PM I detach the object so that I can use the result
of the query after closing the PM. This works fine, however it becomes
a little crazy when my Objects contain child objects that need to be
detached as well.

Is there a better way of getting information from a query without
having to go through the entire result and detach all the objects?

-- 
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.



Re: [appengine-java] Re: Unable to delete entities

2011-04-08 Thread Ben
Ahhh. Thanks Didier! That makes sense, and should have been obvious!

-Ben

http://www.liink.it
http://about.me/benjaminc




On Thu, Apr 7, 2011 at 11:21 PM, Didier Durand durand.did...@gmail.com wrote:
 Hi,

 You should try querying them all (so that you don't have to create an
 invalid query) via a Java program and then check the value of the
 property once the object is instantiated in order to issue a delete if
 the prop value is wrong.

 You may have to do this via chained queued tasks if your data is big.

 regards

 didier

 On Apr 7, 8:53 pm, Ben bencarl...@gmail.com wrote:
 Hello,

 I have a strange problem in the app engine data viewer (admin tools).
 I have entities in my app that have an email property, but the value
 of email is ''... blank. This is apparently invalid, as when I browse
 all entities with the email property, I get an error.

 I then try to query: SELECT * FROM User WHERE email = '' and get the
 error: email must not be empty. I then try to query in reverse:
 SELECT * FROM User WHERE email != '' and I can browse the entities
 with no issues.

 How can I delete the entities with blank emails, when I cannot query
 on it being blank?

 I have a similar issue with URLs.

 Thanks!

 -Ben

 http://www.liink.ithttp://about.me/benjaminc

 --
 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.



-- 
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.



[appengine-java] Infinite redirection loop...

2011-04-08 Thread Dom Derrien
Here is a behavior I don't how to prevent:

- Launching https://anothersocialeconomy.appspot.com/404.html in a
browser displays my (poor) 404 page.
- Launching it with a trailing character (https://
anothersocialeconomy.appspot.com/404.htmll) starts a loop of
redirection with continued appending of 'index.jsp/'! The browser
stops it after 20 redirections with the message 'Error 310
(net::ERR_TOO_MANY_REDIRECTS): There were too many redirects.'

This loop is triggered by any incorrect URL :(

My web.xml contains:
welcome-file-list
welcome-fileindex.jsp/welcome-file
/welcome-file-list
and:
error-page
error-code404/error-code
location/404.html/location
/error-page
I've no filter or servlet definition covering the entire path ('/*').

Any suggestion about the issue root cause? Any idea on a fix?
Note that behavior cannot be reproduced in the development
environment.

A+, Dom

-- 
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.



[appengine-java] Datastore - best way to insert/update a record

2011-04-08 Thread Peter
Folks,

In my GAE datastore, the Users table contains two fields - email addr and 
counter. Each time a user accesses a specific object, I need to increment 
the counter. The logic is as follows:

1. SELECT Email, Counter FROM Users Where Email = emailAddr
2. If record not found, create one and set counter value to 1
3. If record found, increment the counter value and save it back.

I am wondering what is the best way to achieve this in Java.

Thank you in advance for your help.

Regards,
Peter

-- 
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.



[appengine-java] User API, not logging out properly.

2011-04-08 Thread Qifan
Hi,

I'm having a problem with logging out the user.

I have the following code inside a jsp file, let say located at 
http://test.appspot.com/index.jsp

% 
 UserService userService = UserServiceFactory.getUserService();
 if (userService.isUserLoggedIn()) { 
  User user = userService.getCurrentUser(); %
  a href=%= userService.createLogoutURL(request.getRequestURI() + 
?domain= + request.getParameter(domain), user.getAuthDomain()) %Sign 
out/a
 % } else  {% 
  a href=%= userService.createLoginURL(request.getRequestURL() + 
?domain= + request.getParameter(domain), null, 
request.getParameter(domain), null) %Sign in/a
 % } %

I do the following:
1. Go to http://test.appspot.com/index.jsp?domain=mycompany.com for the 
first time.
2. click Sign in and it redirect me to the google domain login page.
3. I enter username and password, and click sign-in.
4. I get redirected back to 
http://test.appspot.com/index.jsp?domain=mycompany.com.
5. I click Sign out.

The problem is when I click Sign in again, it doesn't redirect me to the 
Google domain login page, instead it directly logs me in.

-- 
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.



[appengine-java] Weird 500 Internal Server Error nginx/0.7.67

2011-04-08 Thread miglate
Hi when I try to send a multipart/form-data post request to one of my 
servlet I got this wierd error:

500 Internal Server Error  nginx/0.7.67

However, when I try to investigate it with server logs, I even can't find 
any information about that request. 

What could be possible reasons for this behavior?

Thanks,

-- 
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.



[appengine-java] Re: Datastore - best way to insert/update a record

2011-04-08 Thread Didier Durand
Hi,

I guess that you just have to
  - select how you access the Datastore (JDO/JPA or low-level API
or 3rd party package like Objectify)
  - make an annotated entity Counter with the 2 fields above
  - code the algo as you say above
  - you may want to put this code in a task rather than do it
directly: if datastore is not available or any other problem in
execution, gae will do the retries of your write automatically.

regards

didier

On Apr 8, 9:22 pm, Peter ptr...@gmail.com wrote:
 Folks,

 In my GAE datastore, the Users table contains two fields - email addr and
 counter. Each time a user accesses a specific object, I need to increment
 the counter. The logic is as follows:

 1. SELECT Email, Counter FROM Users Where Email = emailAddr
 2. If record not found, create one and set counter value to 1
 3. If record found, increment the counter value and save it back.

 I am wondering what is the best way to achieve this in Java.

 Thank you in advance for your help.

 Regards,
 Peter

-- 
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.



[appengine-java] Re: My application works well in eclipse but when I deploy the same code in GAE it shows the following error while opening the homepage

2011-04-08 Thread hiran.suvrat
Hi,
Tweet_now is a servlet which i have made. when i run it on the local
server it works fine. but after deployment to google app engine server
this error occurs. i am using netbeans to create war file but i am not
able to deploy it to the server through netbeans. i am using command
line to deploy on server.

thanks

On Apr 8, 12:42 pm, Amit Pandey amit.s...@gmail.com wrote:
 As per your exception* tweet_now* class is not available for JVM. If you
 have created this class, make sure you have imported it. OR if you are using
 jar file for this class, make sure you have added the jar file to the class
 path.

 Just to clarify- Are you using eclipse to deploy the code in app engine?

 Thanks,
  Amit

 On Fri, Apr 8, 2011 at 11:49 AM, hiran.suvrat hiran.suv...@gmail.comwrote: 
 I have a similar problem and the error log is.. Thank you for the help

  500 776ms 956cpu_ms 0kb Mozilla/5.0 (Windows; U; Windows NT 5.1; en-
  US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.133 Safari/
  534.16,gzip(gfe)
  203.110.243.21 - - [30/Mar/2011:14:33:44 -0700] GET / HTTP/1.1 500 0
  - Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/534.16
  (KHTML, like Gecko) Chrome/10.0.648.133 Safari/534.16,gzip(gfe)
  sentiment-app.appspot.com ms=777 cpu_ms=957 api_cpu_ms=0
  cpm_usd=0.026614 loading_request=1
  W 2011-03-30 14:33:44.409
  EXCEPTION
  java.lang.ClassNotFoundException: tweet_now
         at
  com.google.appengine.runtime.Request.process-01e974251f42de3f(Request.java)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
         at org.mortbay.util.Loader.loadClass(Loader.java:91)
         at org.mortbay.util.Loader.loadClass(Loader.java:71)
         at org.mortbay.jetty.servlet.Holder.doStart(Holder.java:73)
         at
  org.mortbay.jetty.servlet.ServletHolder.doStart(ServletHolder.java:
  242)
         at
  org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
  50)
         at
  org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:
  685)
         at org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
         at
  org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:
  1250)
         at
  org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:
  517)
         at
  org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:
  467)
         at
  org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
  50)
         at com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java:
  437)
         at com.google.net.rpc.impl.Server$RpcTask.runInContext(Server.java:
  573)
         at com.google.tracing.TraceContext$TraceContextRunnable
  $1.run(TraceContext.java:448)
         at com.google.tracing.TraceContext.runInContext(TraceContext.java:
  688)
         at com.google.tracing.TraceContext

  $AbstractTraceContextCallback.runInInheritedContextNoUnref(TraceContext.jav 
  a:
  326)
         at com.google.tracing.TraceContext
  $AbstractTraceContextCallback.runInInheritedContext(TraceContext.java:
  318)
         at com.google.tracing.TraceContext
  $TraceContextRunnable.run(TraceContext.java:446)
         at
  java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:
  1110)
         at java.util.concurrent.ThreadPoolExecutor
  $Worker.run(ThreadPoolExecutor.java:603)
         at java.lang.Thread.run(Thread.java:636)
  E 2011-03-30 14:33:44.410
  javax.servlet.ServletContext log: unavailable
  javax.servlet.UnavailableException: tweet_now
         at org.mortbay.jetty.servlet.Holder.doStart(Holder.java:79)
         at
  org.mortbay.jetty.servlet.ServletHolder.doStart(ServletHolder.java:
  242)
         at
  org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
  50)
         at
  org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:
  685)
         at org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
         at
  org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:
  1250)
         at
  org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:
  517)
         at
  org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:
  467)
         at
  org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
  50)
         at

  com.google.apphosting.runtime.jetty.AppVersionHandlerMap.createHandler(AppV 
  ersionHandlerMap.java:
  191)
         at

  com.google.apphosting.runtime.jetty.AppVersionHandlerMap.getHandler(AppVers 
  ionHandlerMap.java:
  168)
         at

  com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceReques 
  t(JettyServletEngineAdapter.java:
  123)
         at
  com.google.apphosting.runtime.JavaRuntime.handleRequest(JavaRuntime.java:
  261)
         at com.google.apphosting.base.RuntimePb$EvaluationRuntime
  $2.handleRequest(RuntimePb.java:9285)
         at com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java:
  437)
        

RE: [google-appengine] Being rate limited at twitter due to some rogue app on GAE, can u shift my app to different ip range?

2011-04-08 Thread Brandon Wirtz
I cheated horribly. My app calls a PHP file on another server and the PHP
file does a Curl.  Was really easy to setup, because I just used the Twitter
API PHP example, and added some security on the PHP so that only Appengine
could hit it, and only if it new the rotating secret.

 

-brandon

 

From: google-appengine@googlegroups.com
[mailto:google-appengine@googlegroups.com] On Behalf Of Nischal Shetty
Sent: Thursday, April 07, 2011 10:42 PM
To: google-appengine@googlegroups.com
Subject: Re: [google-appengine] Being rate limited at twitter due to some
rogue app on GAE, can u shift my app to different ip range?

 

Sigh :( Long day ahead for me. What proxy did you use? Have you documented
your experience (of setting up a proxy) somewhere? Can you point me to
something I can use?

 

-N

 

 

On 8 April 2011 11:08, Brandon Wirtz drak...@digerat.com wrote:

Been there, argued with Ev about why this was worth having someone fix,
resolved issue using a proxy. Down side is the proxy will likely cost you by
the gig transferred and you have to pay the appengine price for traffic as
well, so your costs go up, but it resolves the issue.  Plus in a world where
IP's are now in limited supply buying an IP somewhere is worth doing if you
rely on API's from others.

 

 

 

From: google-appengine@googlegroups.com
[mailto:google-appengine@googlegroups.com] On Behalf Of Nischal Shetty
Sent: Thursday, April 07, 2011 10:33 PM
To: google-appengine@googlegroups.com
Subject: Re: [google-appengine] Being rate limited at twitter due to some
rogue app on GAE, can u shift my app to different ip range?

 

Yes, they aren't whitelisting apps based on id and that sucks. I'm not using
the search API, I'm making use of authenticated API calls against each user
and it has been working well (my app makes thousands of reqs per hour).

 

There actually is no rate limit on the calls I make (they are posts not get
and twitter puts limits on gets). But, the twitter API team said that at
times when there are excessive requests, they block these calls as well.

 

I'm guessing there's some other app that is making a lot of post requests
that are similar to mine. I don't know how to get over this. Right now I'm
trying to move these calls over to some other server, been working on it.

 

But, I love the appengine, I want to be here :( Is there no way you can make
my app use some other ip range, that might help.

 

-N

 

On 8 April 2011 10:17, Nick Johnson (Google) nick.john...@google.com
wrote:

Hi Nischal,

 

Are you using the search API, or one of the other APIs? The Search API
doesn't require authentication, and so is limited by IP range. The most
likely explanation is not a single badly behaving app - it's simply that
there are a lot of App Engine apps that want to communicate with Twitter.
This is a problem with any service that doesn't have dedicated IPs for each
customer - and that's only going to get worse with the exhaustion of the
IPv4 address space, unfortunately.

 

We provide the App ID in the referer header so services like Twitter can
distinguish requests from different apps for the purpose of ratelimiting and
abuse detection, but Twitter haven't implemented anything to break apps out
on this basis.

 

-Nick Johnson

 

On Fri, Apr 8, 2011 at 11:33 AM, nischalshetty nischalshett...@gmail.com
wrote:

Hi,

My app has been facing limit issues with the twitter API and under
regular circumstances this should not have happened. I've been in
talks with the twitter API team from the last 36 hours and they
checked things on their end. They say that the most probable cause is
some app on the same ip range as my app which might be making a lot of
requests causing my app to be rate limited in the process.

I don't know what a quick solution to this is but I might have to move
away from appengine because my app is unusable right now. My app has
been running from the last 1 year on the appengine and has 200k+
users. I need your help :(

My app id is justunfollow . Is there any way you can move it to a
different ip range?


-Nischal

--
You received this message because you are subscribed to the Google Groups
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to
google-appengine+unsubscr...@googlegroups.com
mailto:google-appengine%2bunsubscr...@googlegroups.com .
For more options, visit this group at
http://groups.google.com/group/google-appengine?hl=en.




-- 

Nick Johnson, Developer Programs Engineer, App Engine

-- 

You received this message because you are subscribed to the Google Groups
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to
google-appengine+unsubscr...@googlegroups.com
mailto:google-appengine%2bunsubscr...@googlegroups.com .
For more options, visit this group at
http://groups.google.com/group/google-appengine?hl=en.




-- 
-Nischal


Re: [google-appengine] Users service, urlfetch and 2-legged oauth?

2011-04-08 Thread Jan Z/ Hapara
Yesh - it's close, but as I think you pointed out on another thread, not the 
same as api.users - which means kludgy code.

It would really make sense to merge users and oauth, they really are the 
same thing from the service consumer standpoint.  I *might* want to know 
which was used, but 90% of the time, it doesn't matter.

The impact here is needing to change the existing app, potentially in 
unpredictable ways.

J

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



Re: [google-appengine] Being rate limited at twitter due to some rogue app on GAE, can u shift my app to different ip range?

2011-04-08 Thread Nischal Shetty
Haha, right now as a quick way to get my app back on it's feet I'm doing the
exact same thing!

-N

On 8 April 2011 12:13, Brandon Wirtz drak...@digerat.com wrote:

 I cheated horribly… My app calls a PHP file on another server and the PHP
 file does a Curl.  Was really easy to setup, because I just used the Twitter
 API PHP example, and added some security on the PHP so that only Appengine
 could hit it, and only if it new the rotating secret.



 -brandon



 *From:* google-appengine@googlegroups.com [mailto:
 google-appengine@googlegroups.com] *On Behalf Of *Nischal Shetty
 *Sent:* Thursday, April 07, 2011 10:42 PM

 *To:* google-appengine@googlegroups.com
 *Subject:* Re: [google-appengine] Being rate limited at twitter due to
 some rogue app on GAE, can u shift my app to different ip range?



 Sigh :( Long day ahead for me. What proxy did you use? Have you documented
 your experience (of setting up a proxy) somewhere? Can you point me to
 something I can use?



 -N





 On 8 April 2011 11:08, Brandon Wirtz drak...@digerat.com wrote:

 Been there, argued with Ev about why this was worth having someone fix,
 resolved issue using a proxy. Down side is the proxy will likely cost you by
 the gig transferred and you have to pay the appengine price for traffic as
 well, so your costs go up, but it resolves the issue.  Plus in a world where
 IP’s are now in limited supply buying an IP somewhere is worth doing if you
 rely on API’s from others.







 *From:* google-appengine@googlegroups.com [mailto:
 google-appengine@googlegroups.com] *On Behalf Of *Nischal Shetty
 *Sent:* Thursday, April 07, 2011 10:33 PM
 *To:* google-appengine@googlegroups.com
 *Subject:* Re: [google-appengine] Being rate limited at twitter due to
 some rogue app on GAE, can u shift my app to different ip range?



 Yes, they aren't whitelisting apps based on id and that sucks. I'm not
 using the search API, I'm making use of authenticated API calls against each
 user and it has been working well (my app makes thousands of reqs per hour).



 There actually is no rate limit on the calls I make (they are posts not get
 and twitter puts limits on gets). But, the twitter API team said that at
 times when there are excessive requests, they block these calls as well.



 I'm guessing there's some other app that is making a lot of post requests
 that are similar to mine. I don't know how to get over this. Right now I'm
 trying to move these calls over to some other server, been working on it.



 But, I love the appengine, I want to be here :( Is there no way you can
 make my app use some other ip range, that might help.



 -N



 On 8 April 2011 10:17, Nick Johnson (Google) nick.john...@google.com
 wrote:

 Hi Nischal,



 Are you using the search API, or one of the other APIs? The Search API
 doesn't require authentication, and so is limited by IP range. The most
 likely explanation is not a single badly behaving app - it's simply that
 there are a lot of App Engine apps that want to communicate with Twitter.
 This is a problem with any service that doesn't have dedicated IPs for each
 customer - and that's only going to get worse with the exhaustion of the
 IPv4 address space, unfortunately.



 We provide the App ID in the referer header so services like Twitter can
 distinguish requests from different apps for the purpose of ratelimiting and
 abuse detection, but Twitter haven't implemented anything to break apps out
 on this basis.



 -Nick Johnson



 On Fri, Apr 8, 2011 at 11:33 AM, nischalshetty nischalshett...@gmail.com
 wrote:

 Hi,

 My app has been facing limit issues with the twitter API and under
 regular circumstances this should not have happened. I've been in
 talks with the twitter API team from the last 36 hours and they
 checked things on their end. They say that the most probable cause is
 some app on the same ip range as my app which might be making a lot of
 requests causing my app to be rate limited in the process.

 I don't know what a quick solution to this is but I might have to move
 away from appengine because my app is unusable right now. My app has
 been running from the last 1 year on the appengine and has 200k+
 users. I need your help :(

 My app id is justunfollow . Is there any way you can move it to a
 different ip range?


 -Nischal

 --
 You received this message because you are subscribed to the Google Groups
 Google App Engine group.
 To post to this group, send email to google-appengine@googlegroups.com.
 To unsubscribe from this group, send email to
 google-appengine+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-appengine?hl=en.




 --

 Nick Johnson, Developer Programs Engineer, App Engine

 --

 You received this message because you are subscribed to the Google Groups
 Google App Engine group.
 To post to this group, send email to google-appengine@googlegroups.com.
 To unsubscribe from this group, send email to
 

Re: [google-appengine] Re: HItting query limit using Geocoding API from App Engine

2011-04-08 Thread Ikai Lan (Google)
I'll admit that I don't understand the maps API to be an authority on this,
but the last time I spoke to them, they mentioned some kind of a key you can
get a hold of? With this key you can make signed requests that can be
whitelisted. Otherwise, you're put into the general pool of IPs and subject
to throttling.

Ikai Lan
Developer Programs Engineer, Google App Engine
Blog: http://googleappengine.blogspot.com
Twitter: http://twitter.com/app_engine
Reddit: http://www.reddit.com/r/appengine



On Fri, Apr 8, 2011 at 12:20 AM, nickmilon nickmi...@gmail.com wrote:

 IMHO a proxy will complicate things.
 What about if GAE team gets in touch with maps V3 team and explain to
 them the issue so may be they can rate limit all GAE originated appls
 by app id which is a very secure method since app id can't be
 hacked ?

 @Joe sorry my api isn't that useful in your case.
 Regards
 Nick



 On Apr 7, 1:06 am, Brandon Wirtz drak...@digerat.com wrote:
  Use a Proxy.  Then you can come through your own IP-pool.
 
  From: google-appengine@googlegroups.com
  [mailto:google-appengine@googlegroups.com] On Behalf Of Joe Tyson
  Sent: Wednesday, April 06, 2011 2:59 PM
  To: google-appengine@googlegroups.com
  Subject: Re: [google-appengine] Re: HItting query limit using Geocoding
 API
  from App Engine
 
  We are delegating some of that to the client now, but it is far
 
  less than ideal. Our client is mobile, so every byte that we send
 
  over can end up costing our users money (you would be surprised
 
  how sensitive some people are to this).
 
  Thanks for the resource, though. I wish country level would be
 
  enough information for us :-(.
 
  Doing some additional searching around, it looks this issue has
 
  been bought up by some other users on the maps forum:
 
  http://goo.gl/RyJ9w
 
  On Wednesday, April 6, 2011 at 2:44 PM, nickmilon wrote:
 
  May be you can delegate the geocoding job to the client side using
  js ?
  also you can take a look here :
 http://gaengine.blogspot.com/2010/11/world-countries-and-ip-geocoding...
  ml
 
  Nick ;-)
 
  On Apr 6, 7:25 pm, Joe Tyson joety...@gmail.com wrote:
 
  Hello,
 
  This seems to be more of a problem with the geocoding api than app
 engine,
  but I'm unable to get ahold of anyone on that team so I'll post here
  instead.
 
  The new Geocoding API doesn't do any form of url signing or api keys for
  non-premier accounts and resorts to using IP address to control quotas.
  Since App Engine uses a shared IP pool, my app gets clumped in the quota
  limitations of other apps. This must be a somewhat frequent problem for
  other apps, since 90% of my geocoding attempts get an 'OVER_QUERY_LIMIT'
  message. These last few days, it has been closer to 100% at 500-600
 queries
  spread out over an 15-20 hours.
 
  I'll add that I don't think using a pool of IPs is at all the issue. Any
  large scale deployment would be hitting the Geocoding API from a pool of
  IPs, and if the pool were dedicated to a single service, the service
 would
  be circumventing the Geocoding API quotas anyway.
 
  Is anyone else on the list having this issue? Have you been able to work
  with the geocoding team to get auth tokens that don't require having a
  premier account?
 
  joe
 
  --
  You received this message because you are subscribed to the Google Groups
  Google App Engine group.
  To post to this group, send email to google-appengine@googlegroups.com.
  To unsubscribe from this group, send email to
  google-appengine+unsubscr...@googlegroups.com.
  For more options, visit this group athttp://
 groups.google.com/group/google-appengine?hl=en.
 
  --
  You received this message because you are subscribed to the Google Groups
  Google App Engine group.
  To post to this group, send email to google-appengine@googlegroups.com.
  To unsubscribe from this group, send email to
  google-appengine+unsubscr...@googlegroups.com.
  For more options, visit this group athttp://
 groups.google.com/group/google-appengine?hl=en.

 --
 You received this message because you are subscribed to the Google Groups
 Google App Engine group.
 To post to this group, send email to google-appengine@googlegroups.com.
 To unsubscribe from this group, send email to
 google-appengine+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-appengine?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



Re: [google-appengine] Re: SDK 1.4.3 has been released!

2011-04-08 Thread Ikai Lan (Google)
Do these problems appear only with threadsafe on? Or do they only occur when
threadsafe is set to off?

Ikai Lan
Developer Programs Engineer, Google App Engine
Blog: http://googleappengine.blogspot.com
Twitter: http://twitter.com/app_engine
Reddit: http://www.reddit.com/r/appengine



On Thu, Apr 7, 2011 at 8:56 PM, Sérgio Lopes slo...@gmail.com wrote:

 Master/Slave. But the exceptions don't seem to be related do datastore.
 Most errors are with /_ah/warmup requests, and my startup process doesn't
 touch the datastore.

 --
 You received this message because you are subscribed to the Google Groups
 Google App Engine group.
 To post to this group, send email to google-appengine@googlegroups.com.
 To unsubscribe from this group, send email to
 google-appengine+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-appengine?hl=en.


-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] How many concurrent channels can GAE handle?

2011-04-08 Thread Jamie
Given that the current quota for Channel creation is 95,040 per day,
I'm looking into building a degradation path where I would use polling
from the client side after a certain number of concurrent users have
been reached.  What I'm trying to figure out is where is cut-off point
should be.

How many concurrent channel connections can GAE handle in a performant
manner?

At a high level, this is how my app works:

1) Server receives an update from an external source.
2) Server notifies each connected client via the Channel API about
this new update.  This is currently done in a crude way by looping
through all clients and sending the msg via
ChannelService.sendMessage().

Given that my site is not very popular right now, it's hard for me to
know if GAE's Channel API can handle a large number of concurrent
channels.

Does anyone have rough numbers or best practices in regards to this?

Thanks,
J

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] __debug__ and assert in prod

2011-04-08 Thread Joey
Is it possible to disable __debug__ on App Engine so that Python
assert statements are not included in production code?

http://docs.python.org/reference/simple_stmts.html#the-assert-statement

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



Re: [google-appengine] XMPP Service

2011-04-08 Thread Nishant @Krypton
 *main application will not be built on Google App Engine.  Can the XMPP
Service be used on its own without using the rest of App Engine?*

Yes. you can use only the XMPP service.

You can look at the quotas of XMPP for app engine here :
http://code.google.com/appengine/docs/quotas.html#XMPP

Regards
NM @ Krypton http://www.kryptonlabs.com

On Thu, Apr 7, 2011 at 4:37 AM, Justin jbmey...@gmail.com wrote:

 I'm interested in using the XMPP Service for app to app
 communication.  The main application will not be built on Google App
 Engine.  Can the XMPP Service be used on its own without using the
 rest of App Engine?

 How many users can the XMPP Service support?

 Basically I'm looking for a hosted XMPP Service that can scale to
 support 100,000s to millions of users.  I'm assuming that the Google
 XMPP services can support this as they are supporting massive scale
 for GoogleTalk ,etc.  Is this support / scale available for third
 party applications?

 thanks,
 -J

 --
 You received this message because you are subscribed to the Google Groups
 Google App Engine group.
 To post to this group, send email to google-appengine@googlegroups.com.
 To unsubscribe from this group, send email to
 google-appengine+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-appengine?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



Re: [google-appengine] Re: Scheduled Downtime Woes

2011-04-08 Thread Simon Knott
The 3x CPU cost is only for Puts/deletes though isn't it?  It's not as if 
your CPU costs are suddenly going to triple by moving to HR - if a majority 
of your activity is reads, then the impact is mainly through the increased 
storage costs.

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Read XML

2011-04-08 Thread VHT Corp
Hi all,
I want read file xml but not working on GAE.
Please demo for me.

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



Re: [google-appengine] Read XML

2011-04-08 Thread Ikai Lan (Google)
This isn't a useful post. Please tell us:

1. What you tried, if anything?
2. What language are you using?
3. ... did you ever do a search?
http://www.google.com/search?sourceid=chromeie=UTF-8q=parsing+xml+app+engine

Ikai Lan
Developer Programs Engineer, Google App Engine
Blog: http://googleappengine.blogspot.com
Twitter: http://twitter.com/app_engine
Reddit: http://www.reddit.com/r/appengine



On Fri, Apr 8, 2011 at 11:13 AM, VHT Corp vht...@gmail.com wrote:

 Hi all,
 I want read file xml but not working on GAE.
 Please demo for me.

 --
 You received this message because you are subscribed to the Google Groups
 Google App Engine group.
 To post to this group, send email to google-appengine@googlegroups.com.
 To unsubscribe from this group, send email to
 google-appengine+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-appengine?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



Re: [google-appengine] Re: Scheduled Downtime Woes

2011-04-08 Thread Ikai Lan (Google)
Strong consistency is guaranteed if your queries as ancestor queries using
entity groups. Or ... if you write by key and read by key, these will always
be strongly consistent.

The only case in which strong consistency is NOT guaranteed is if you write
an entity, then do a cross entity group query on a property. Example pseudo
code:

deal =  {
   name: My deal,
   cost: 25.00
}

datastore.put(deal)
datastore.query(SELECT from deal where cost = 25.00);

Since you aren't setting an ancestor, this *may* go to a data center that
didn't yet commit the write. Note that this is generally unlikely. A better
way to structure this:

dealFamilySF = {
  name: San Francisco Bay Area
}

deal =  {
   parent: dealFamily,
   name: My deal,
   cost: 25.00
}

datastore.put(deal)
datastore.query(SELECT from deal where cost = 25.00 AND ancestor IS
dealFamilySF);

This query will be strongly consistent.

Ikai Lan
Developer Programs Engineer, Google App Engine
Blog: http://googleappengine.blogspot.com
Twitter: http://twitter.com/app_engine
Reddit: http://www.reddit.com/r/appengine



On Fri, Apr 8, 2011 at 3:50 AM, Kyle Mulka kyle.mu...@gmail.com wrote:

 On Apr 7, 10:20 am, Ikai Lan (Google) ika...@google.com wrote:
  Yes, we'd love to do that at some point in the future - pick a general
 area
  where your apps would exist, and we'd run them from those nodes. I
 suspect
  that if we ever did this feature and you wanted to move to a new cluster,
  that you would have to run the datastore migration tool (similar to what
 it
  would take to move from MS - HR), and if you're going to do this, why
 not
  just move to high replication?

 I'm not that worried about running the migration tool. Should I be?
 I'm worried about the eventual consistency model of the high
 replication datastore. I want a user of our app to be able to create
 an object in the datastore and then be able to read it right away.

 --
 Kyle Mulka
 Co-Founder, DealSavant
 http://www.dealsavant.com

 --
 You received this message because you are subscribed to the Google Groups
 Google App Engine group.
 To post to this group, send email to google-appengine@googlegroups.com.
 To unsubscribe from this group, send email to
 google-appengine+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-appengine?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



Re: [google-appengine] Re: Scheduled Downtime Woes

2011-04-08 Thread Ikai Lan (Google)
One more note: we are working on two things for master/slave datastore:

1. Fewer scheduled downtimes
2. Faster downtimes. Downtimes at some point in the future will be on the
order of minutes, not an hour

Note that you will still be exposed to latency spikes.

Ikai Lan
Developer Programs Engineer, Google App Engine
Blog: http://googleappengine.blogspot.com
Twitter: http://twitter.com/app_engine
Reddit: http://www.reddit.com/r/appengine



On Fri, Apr 8, 2011 at 11:38 AM, Ikai Lan (Google) ika...@google.comwrote:

 Strong consistency is guaranteed if your queries as ancestor queries using
 entity groups. Or ... if you write by key and read by key, these will always
 be strongly consistent.

 The only case in which strong consistency is NOT guaranteed is if you write
 an entity, then do a cross entity group query on a property. Example pseudo
 code:

 deal =  {
name: My deal,
cost: 25.00
 }

 datastore.put(deal)
 datastore.query(SELECT from deal where cost = 25.00);

 Since you aren't setting an ancestor, this *may* go to a data center that
 didn't yet commit the write. Note that this is generally unlikely. A better
 way to structure this:

 dealFamilySF = {
   name: San Francisco Bay Area
 }

 deal =  {
parent: dealFamily,
name: My deal,
cost: 25.00
 }

 datastore.put(deal)
 datastore.query(SELECT from deal where cost = 25.00 AND ancestor IS
 dealFamilySF);

 This query will be strongly consistent.

 Ikai Lan
 Developer Programs Engineer, Google App Engine
 Blog: http://googleappengine.blogspot.com
 Twitter: http://twitter.com/app_engine
 Reddit: http://www.reddit.com/r/appengine



 On Fri, Apr 8, 2011 at 3:50 AM, Kyle Mulka kyle.mu...@gmail.com wrote:

 On Apr 7, 10:20 am, Ikai Lan (Google) ika...@google.com wrote:
  Yes, we'd love to do that at some point in the future - pick a general
 area
  where your apps would exist, and we'd run them from those nodes. I
 suspect
  that if we ever did this feature and you wanted to move to a new
 cluster,
  that you would have to run the datastore migration tool (similar to what
 it
  would take to move from MS - HR), and if you're going to do this, why
 not
  just move to high replication?

 I'm not that worried about running the migration tool. Should I be?
 I'm worried about the eventual consistency model of the high
 replication datastore. I want a user of our app to be able to create
 an object in the datastore and then be able to read it right away.

 --
 Kyle Mulka
 Co-Founder, DealSavant
 http://www.dealsavant.com

 --
 You received this message because you are subscribed to the Google Groups
 Google App Engine group.
 To post to this group, send email to google-appengine@googlegroups.com.
 To unsubscribe from this group, send email to
 google-appengine+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-appengine?hl=en.




-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



Re: [google-appengine] Re: Scheduled Downtime Woes

2011-04-08 Thread Simon Knott
I've asked this question before, but haven't had any official answers.

What's the expected behaviour of the following on an HR app:

   1. Carry out a put and schedule a task in a transaction
   2. Commit the transaction
   3. In the task, read-by-key for the entity you put in the transaction

Should the entity read in the task be the updated entity, or is there a 
chance that the task is run before the put has been committed fully?

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Clarification on appengine-mapreduce

2011-04-08 Thread Dan Dubois
I see on http://code.google.com/p/appengine-mapreduce/wiki/UserGuidePython 
the following statement under Current Limitations:

Only full range scan is supported, i.e. it's impossible to scan a subset of 
a particular entity kind.

Is this because it is technically impossible or just that the functionality 
hasn't been implemented yet? It would be an awesome feature!

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Re: HItting query limit using Geocoding API from App Engine

2011-04-08 Thread bFlood
Google Maps Premium
http://www.google.com/enterprise/earthmaps/maps.html

Dev guide for Url signing
http://code.google.com/apis/maps/documentation/premier/guide.html



On Apr 8, 3:31 am, Ikai Lan (Google) ika...@google.com wrote:
 I'll admit that I don't understand the maps API to be an authority on this,
 but the last time I spoke to them, they mentioned some kind of a key you can
 get a hold of? With this key you can make signed requests that can be
 whitelisted. Otherwise, you're put into the general pool of IPs and subject
 to throttling.

 Ikai Lan
 Developer Programs Engineer, Google App Engine
 Blog:http://googleappengine.blogspot.com
 Twitter:http://twitter.com/app_engine
 Reddit:http://www.reddit.com/r/appengine







 On Fri, Apr 8, 2011 at 12:20 AM, nickmilon nickmi...@gmail.com wrote:
  IMHO a proxy will complicate things.
  What about if GAE team gets in touch with maps V3 team and explain to
  them the issue so may be they can rate limit all GAE originated appls
  by app id which is a very secure method since app id can't be
  hacked ?

  @Joe sorry my api isn't that useful in your case.
  Regards
  Nick

  On Apr 7, 1:06 am, Brandon Wirtz drak...@digerat.com wrote:
   Use a Proxy.  Then you can come through your own IP-pool.

   From: google-appengine@googlegroups.com
   [mailto:google-appengine@googlegroups.com] On Behalf Of Joe Tyson
   Sent: Wednesday, April 06, 2011 2:59 PM
   To: google-appengine@googlegroups.com
   Subject: Re: [google-appengine] Re: HItting query limit using Geocoding
  API
   from App Engine

   We are delegating some of that to the client now, but it is far

   less than ideal. Our client is mobile, so every byte that we send

   over can end up costing our users money (you would be surprised

   how sensitive some people are to this).

   Thanks for the resource, though. I wish country level would be

   enough information for us :-(.

   Doing some additional searching around, it looks this issue has

   been bought up by some other users on the maps forum:

  http://goo.gl/RyJ9w

   On Wednesday, April 6, 2011 at 2:44 PM, nickmilon wrote:

   May be you can delegate the geocoding job to the client side using
   js ?
   also you can take a look here :
 http://gaengine.blogspot.com/2010/11/world-countries-and-ip-geocoding...
   ml

   Nick ;-)

   On Apr 6, 7:25 pm, Joe Tyson joety...@gmail.com wrote:

   Hello,

   This seems to be more of a problem with the geocoding api than app
  engine,
   but I'm unable to get ahold of anyone on that team so I'll post here
   instead.

   The new Geocoding API doesn't do any form of url signing or api keys for
   non-premier accounts and resorts to using IP address to control quotas.
   Since App Engine uses a shared IP pool, my app gets clumped in the quota
   limitations of other apps. This must be a somewhat frequent problem for
   other apps, since 90% of my geocoding attempts get an 'OVER_QUERY_LIMIT'
   message. These last few days, it has been closer to 100% at 500-600
  queries
   spread out over an 15-20 hours.

   I'll add that I don't think using a pool of IPs is at all the issue. Any
   large scale deployment would be hitting the Geocoding API from a pool of
   IPs, and if the pool were dedicated to a single service, the service
  would
   be circumventing the Geocoding API quotas anyway.

   Is anyone else on the list having this issue? Have you been able to work
   with the geocoding team to get auth tokens that don't require having a
   premier account?

   joe

   --
   You received this message because you are subscribed to the Google Groups
   Google App Engine group.
   To post to this group, send email to google-appengine@googlegroups.com.
   To unsubscribe from this group, send email to
   google-appengine+unsubscr...@googlegroups.com.
   For more options, visit this group athttp://
  groups.google.com/group/google-appengine?hl=en.

   --
   You received this message because you are subscribed to the Google Groups
   Google App Engine group.
   To post to this group, send email to google-appengine@googlegroups.com.
   To unsubscribe from this group, send email to
   google-appengine+unsubscr...@googlegroups.com.
   For more options, visit this group athttp://
  groups.google.com/group/google-appengine?hl=en.

  --
  You received this message because you are subscribed to the Google Groups
  Google App Engine group.
  To post to this group, send email to google-appengine@googlegroups.com.
  To unsubscribe from this group, send email to
  google-appengine+unsubscr...@googlegroups.com.
  For more options, visit this group at
 http://groups.google.com/group/google-appengine?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 

Re: [google-appengine] Re: Scheduled Downtime Woes

2011-04-08 Thread Ikai Lan (Google)
Only the enqueuing of the tasks is transactional. You should expect strong
consistency in that situation. The task should not run unless the commit has
succeeded. Transactional reads (default read) will wait to make sure the
data is the new version before returning.

Did you find some documentation that would suggest otherwise?

Ikai Lan
Developer Programs Engineer, Google App Engine
Blog: http://googleappengine.blogspot.com
Twitter: http://twitter.com/app_engine
Reddit: http://www.reddit.com/r/appengine



On Fri, Apr 8, 2011 at 11:52 AM, Simon Knott knott.si...@gmail.com wrote:

 I've asked this question before, but haven't had any official answers.

 What's the expected behaviour of the following on an HR app:

1. Carry out a put and schedule a task in a transaction
2. Commit the transaction
3. In the task, read-by-key for the entity you put in the transaction

 Should the entity read in the task be the updated entity, or is there a
 chance that the task is run before the put has been committed fully?

 --
 You received this message because you are subscribed to the Google Groups
 Google App Engine group.
 To post to this group, send email to google-appengine@googlegroups.com.
 To unsubscribe from this group, send email to
 google-appengine+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-appengine?hl=en.


-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



Re: [google-appengine] Clarification on appengine-mapreduce

2011-04-08 Thread Ikai Lan (Google)
The functionality isn't implemented yet. Right now priority #1 is getting
reduce out the door.

Ikai Lan
Developer Programs Engineer, Google App Engine
Blog: http://googleappengine.blogspot.com
Twitter: http://twitter.com/app_engine
Reddit: http://www.reddit.com/r/appengine



On Fri, Apr 8, 2011 at 12:04 PM, Dan Dubois uvico...@gmail.com wrote:

 I see on http://code.google.com/p/appengine-mapreduce/wiki/UserGuidePythonthe 
 following statement under Current Limitations:

 Only full range scan is supported, i.e. it's impossible to scan a subset of
 a particular entity kind.

 Is this because it is technically impossible or just that the functionality
 hasn't been implemented yet? It would be an awesome feature!

 --
 You received this message because you are subscribed to the Google Groups
 Google App Engine group.
 To post to this group, send email to google-appengine@googlegroups.com.
 To unsubscribe from this group, send email to
 google-appengine+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-appengine?hl=en.


-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



Re: [google-appengine] Re: Scheduled Downtime Woes

2011-04-08 Thread Simon Knott
I've had experience which suggests otherwise :)

I'm finding that very occasionally the entity returned by the read-by-key 
hasn't been updated yet.  I've got around it by just re-queuing the task, 
and the second time around the entity is always in the updated state.  

I must admit that I was quite surprised it was happening - at first I 
thought I must not have enqueued in the task in the transaction, but after 
checking I definitely am.

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



Re: [google-appengine] Clarification on appengine-mapreduce

2011-04-08 Thread Dan Dubois
OK thanks for letting me know. I am certainly looking forward to being able 
to map over a subset of entities. It'll make my implementation of 
broadcasting using the Channel API much nicer!

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



Re: [google-appengine] Re: Scheduled Downtime Woes

2011-04-08 Thread Ikai Lan (Google)
Is this high replication datastore or master slave?

http://code.google.com/appengine/articles/transaction_isolation.html

In a 
Master/Slavehttp://code.google.com/appengine/docs/python/datastore/overview.html
datastore,
the entire transaction is almost always completely applied before the commit
returns.

A request that looks up an updated entity by its key at a time after
Milestone A is guaranteed to see the latest version of that entity. 

The key here is the word almost always. If you do a transactional get by
key, it *should* return the most updated entity. All gets in High
Replication are, by default, transactional, so interestingly enough, it's
more strongly consistent in this regard than master/slave.

Ikai Lan
Developer Programs Engineer, Google App Engine
Blog: http://googleappengine.blogspot.com
Twitter: http://twitter.com/app_engine
Reddit: http://www.reddit.com/r/appengine



On Fri, Apr 8, 2011 at 2:30 PM, Simon Knott knott.si...@gmail.com wrote:

 I've had experience which suggests otherwise :)

 I'm finding that very occasionally the entity returned by the read-by-key
 hasn't been updated yet.  I've got around it by just re-queuing the task,
 and the second time around the entity is always in the updated state.

 I must admit that I was quite surprised it was happening - at first I
 thought I must not have enqueued in the task in the transaction, but after
 checking I definitely am.

  --
 You received this message because you are subscribed to the Google Groups
 Google App Engine group.
 To post to this group, send email to google-appengine@googlegroups.com.
 To unsubscribe from this group, send email to
 google-appengine+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-appengine?hl=en.


-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



Re: [google-appengine] Clarification on appengine-mapreduce

2011-04-08 Thread Ikai Lan (Google)
It just sounds like what you need are long running background tasks. If you
expect this to take more than 10 minutes, you can either do task queue
chaining with query cursors, or look into one of the pipelining tools:

1. Fantasm: http://code.google.com/appengine/articles/fantasm.html
2. Pipeline API: http://code.google.com/p/appengine-pipeline/


Ikai Lan
Developer Programs Engineer, Google App Engine
Blog: http://googleappengine.blogspot.com
Twitter: http://twitter.com/app_engine
Reddit: http://www.reddit.com/r/appengine



On Fri, Apr 8, 2011 at 2:43 PM, Dan Dubois uvico...@gmail.com wrote:

 OK thanks for letting me know. I am certainly looking forward to being able
 to map over a subset of entities. It'll make my implementation of
 broadcasting using the Channel API much nicer!

  --
 You received this message because you are subscribed to the Google Groups
 Google App Engine group.
 To post to this group, send email to google-appengine@googlegroups.com.
 To unsubscribe from this group, send email to
 google-appengine+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-appengine?hl=en.


-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



Re: [google-appengine] Re: Scheduled Downtime Woes

2011-04-08 Thread Simon Knott
This is on High Replication.

The only time I've seen the same problem on M/S is when I accidentally left 
the task enqueue out of the transaction.  Once I added the enqueue into the 
transaction on M/S, the problem went away and I haven't seen any 
re-occurrence.

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Can't creat new application

2011-04-08 Thread Rex Johnson
First off, my post of this problem (May 6th) has disappeared from
Discussions so I'm posting again. Issue is I have created ONE app.
When I try to create a new one I get taken to that once only phone
number/SMS confirmation page, which won't accept my input since I've
used the number before to create my first app. App Engine DOES accept
updates and new versions of the original app but that's it.

Google - PLEASE HELP. Developers will make your stuff glow in the
skies, but only if you make it possible to advance.

Thanx,
Rex

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



Re: [google-appengine] Can't creat new application

2011-04-08 Thread Barry Hunter
If you are using a Google Apps login/domain, you should goto

http://appengine.google.com/a/yourdomain.com/



On 8 April 2011 15:20, Rex Johnson rex.good...@gmail.com wrote:
 First off, my post of this problem (May 6th) has disappeared from
 Discussions so I'm posting again. Issue is I have created ONE app.
 When I try to create a new one I get taken to that once only phone
 number/SMS confirmation page, which won't accept my input since I've
 used the number before to create my first app. App Engine DOES accept
 updates and new versions of the original app but that's it.

 Google - PLEASE HELP. Developers will make your stuff glow in the
 skies, but only if you make it possible to advance.

 Thanx,
 Rex

 --
 You received this message because you are subscribed to the Google Groups 
 Google App Engine group.
 To post to this group, send email to google-appengine@googlegroups.com.
 To unsubscribe from this group, send email to 
 google-appengine+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/google-appengine?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Re: Can't creat new application

2011-04-08 Thread Rex Johnson
Thanx, but I'm using .appspot.com/
:)

On Apr 8, 10:20 am, Rex Johnson rex.good...@gmail.com wrote:
 First off, my post of this problem (May 6th) has disappeared from
 Discussions so I'm posting again. Issue is I have created ONE app.
 When I try to create a new one I get taken to that once only phone
 number/SMS confirmation page, which won't accept my input since I've
 used the number before to create my first app. App Engine DOES accept
 updates and new versions of the original app but that's it.

 Google - PLEASE HELP. Developers will make your stuff glow in the
 skies, but only if you make it possible to advance.

 Thanx,
 Rex

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Unit Testing of DAOs locally on App Engine

2011-04-08 Thread Kayode Odeyemi
I am hoping David Chandler can help here as regards his post at
http://turbomanage.wordpress.com/2009/10/19/unit-testing-the-appengine-datastore-with-jdo/.
I have added aeftools.jar to my project classpath, but the test keeps
failing with the error:

warning: FAILED: No tests found
junit.framework.AssertionFailedError

Initially, I added just the 3 classes in com.appenginefan.toolkit.unittests,
as well as appengine-testing.jar to my classpath, but the compiler keeps
reporting a NoClassFound on
com.google.appengine.tools.development.ApiProxyLocalImpl.

Please I need help on this as I really can't query the datastore and
blobstore without a unit test.

Here's my test class:

public class UserEntityJDOTest extends BaseTest {


@Test
public void testFindUserByEmail(String email) {

UserEntityDAOImpl userentityDAO = new UserEntityDAOImpl();
email = t...@gmail.com;
PersistenceManager manager = newPersistenceManager();
// run a query
UserEntity expectedemail = manager.getObjectById(UserEntity.class,
email);
assertEquals(expectedemail, userentityDAO.findUserByEmail(email));
manager.close();
fail(The test case is a prototype.);
}
}

Regards
-- 
Odeyemi 'Kayode O.
http://www.sinati.com

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



Re: [google-appengine] Issue 4603 URLFetch error Could not verify SSL certificate when using development server

2011-04-08 Thread Robert Kluin
I think there was an issue in the 1.4.3 release:
For Java:
  http://code.google.com/p/googleappengine/issues/detail?id=4823

For Python:
  http://code.google.com/p/googleappengine/issues/detail?id=4824






On Thu, Apr 7, 2011 at 11:03, carride carr...@gmail.com wrote:
 I know this issue says the problem was resolved, but this does not
 seem to be my case. Issue says it was resolved in SDK 1.4.2, even
 though I am using 1.4.3 and experiencing the problem as originally
 described. To summarize it only happens while running against local
 development server. When deployed to appspot the problem does not
 happen.
 http://code.google.com/p/googleappengine/issues/detail?id=4603

 Calling the java URLFetchService w/HTTPRequest - GET w/HTTPS, and
 option parameter set to other suggested workaround
 FetchOptions.Builder.doNotValidateCertificate(). Also have Basic
 Authentication set in header

 App Engine SDK 1.4.3
 Mac OSX 10.6.6
 Eclipse Helios Service Release 2
 1.6.0.jdk

 Thanks

 --
 You received this message because you are subscribed to the Google Groups 
 Google App Engine group.
 To post to this group, send email to google-appengine@googlegroups.com.
 To unsubscribe from this group, send email to 
 google-appengine+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/google-appengine?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



Re: [google-appengine] Re: SDK 1.4.3 has been released!

2011-04-08 Thread Sérgio Lopes
I disabled threadsafe and AlwaysOn and it got worse. Many 500 errors on
instance startups, all with this message:


The process handling this request unexpectedly died. This is likely to
cause a new process to be used for the next request to your
application. (Error code 203)


When I re-enabled AlwaysOn, my 3 instances started ok. So I disabled
AlwaysOn again to test and, again, many 500 errors on startups.

Anyway, I'm moving to HR. I was already planning the move, and from what
people says, it seems to be more stable.

Thanks

On Fri, Apr 8, 2011 at 04:33, Ikai Lan (Google) ika...@google.com wrote:

 Do these problems appear only with threadsafe on? Or do they only occur
 when threadsafe is set to off?

 Ikai Lan
 Developer Programs Engineer, Google App Engine
 Blog: http://googleappengine.blogspot.com
 Twitter: http://twitter.com/app_engine
 Reddit: http://www.reddit.com/r/appengine



 On Thu, Apr 7, 2011 at 8:56 PM, Sérgio Lopes slo...@gmail.com wrote:

 Master/Slave. But the exceptions don't seem to be related do datastore.
 Most errors are with /_ah/warmup requests, and my startup process doesn't
 touch the datastore.

 --
 You received this message because you are subscribed to the Google Groups
 Google App Engine group.
 To post to this group, send email to google-appengine@googlegroups.com.
 To unsubscribe from this group, send email to
 google-appengine+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-appengine?hl=en.


  --
 You received this message because you are subscribed to the Google Groups
 Google App Engine group.
 To post to this group, send email to google-appengine@googlegroups.com.
 To unsubscribe from this group, send email to
 google-appengine+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-appengine?hl=en.


-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Re: How many concurrent channels can GAE handle?

2011-04-08 Thread Stephen Blum
Jamie,

I have experience with what you are describing Jamie while I was
building an IRC style chat client where multiple user are connected to
a chat room.  When a user send a message I would loop through each
user connected in the channel and send them a message using
ChannelService.sendMessage().  This becomes slow as more users
connect.  Because the Channel API does not scale with this
broadcasting pattern, I've changed to a service that specializes in
broadcasting called www.pubnub.com PubNub. The design pattern for
broadcasting works great with this service.  All I need to do is
execute one function call with the intended message and every
connected user receives this message instantly.


On Apr 7, 11:22 am, Jamie ja...@mapstagram.com wrote:
 Given that the current quota for Channel creation is 95,040 per day,
 I'm looking into building a degradation path where I would use polling
 from the client side after a certain number of concurrent users have
 been reached.  What I'm trying to figure out is where is cut-off point
 should be.

 How many concurrent channel connections can GAE handle in a performant
 manner?

 At a high level, this is how my app works:

 1) Server receives an update from an external source.
 2) Server notifies each connected client via the Channel API about
 this new update.  This is currently done in a crude way by looping
 through all clients and sending the msg via
 ChannelService.sendMessage().

 Given that my site is not very popular right now, it's hard for me to
 know if GAE's Channel API can handle a large number of concurrent
 channels.

 Does anyone have rough numbers or best practices in regards to this?

 Thanks,
 J

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



Re: [google-appengine] Re: How many concurrent channels can GAE handle?

2011-04-08 Thread Robert Kluin
Hi Stephen,
  Out of curiosity, were you simply going through the list one-by-one
sending messages?  Or, did you implement a more sophisticated fanout
strategy?  For example, did you break the list into sets of, say, ten
users then insert a bunch of tasks to handle the sending?



Robert






On Fri, Apr 8, 2011 at 15:33, Stephen Blum blum.step...@gmail.com wrote:
 Jamie,

 I have experience with what you are describing Jamie while I was
 building an IRC style chat client where multiple user are connected to
 a chat room.  When a user send a message I would loop through each
 user connected in the channel and send them a message using
 ChannelService.sendMessage().  This becomes slow as more users
 connect.  Because the Channel API does not scale with this
 broadcasting pattern, I've changed to a service that specializes in
 broadcasting called www.pubnub.com PubNub. The design pattern for
 broadcasting works great with this service.  All I need to do is
 execute one function call with the intended message and every
 connected user receives this message instantly.


 On Apr 7, 11:22 am, Jamie ja...@mapstagram.com wrote:
 Given that the current quota for Channel creation is 95,040 per day,
 I'm looking into building a degradation path where I would use polling
 from the client side after a certain number of concurrent users have
 been reached.  What I'm trying to figure out is where is cut-off point
 should be.

 How many concurrent channel connections can GAE handle in a performant
 manner?

 At a high level, this is how my app works:

 1) Server receives an update from an external source.
 2) Server notifies each connected client via the Channel API about
 this new update.  This is currently done in a crude way by looping
 through all clients and sending the msg via
 ChannelService.sendMessage().

 Given that my site is not very popular right now, it's hard for me to
 know if GAE's Channel API can handle a large number of concurrent
 channels.

 Does anyone have rough numbers or best practices in regards to this?

 Thanks,
 J

 --
 You received this message because you are subscribed to the Google Groups 
 Google App Engine group.
 To post to this group, send email to google-appengine@googlegroups.com.
 To unsubscribe from this group, send email to 
 google-appengine+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/google-appengine?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



RE: [google-appengine] How many concurrent channels can GAE handle?

2011-04-08 Thread Brandon Wirtz
What are you doing that you have 95k people a day using your channels?  Is
it porn? You can tell us.  

But seriously... Assuming  people want to send data to somewhere and not
have a channel all to themselves you would have to have something like 250k
users a day, on 24/7.

If you did something sane you should be able to spread the load and re-use
channels as users exit the system.  Assuming these users eat, and sleep, and
leave the house you should be able to accommodate 1m users on the 95k limit.
And that assumes you use a channel per user, not group the channels based on
what is going on.



-Original Message-
From: google-appengine@googlegroups.com
[mailto:google-appengine@googlegroups.com] On Behalf Of Jamie
Sent: Thursday, April 07, 2011 11:22 AM
To: Google App Engine
Subject: [google-appengine] How many concurrent channels can GAE handle?

Given that the current quota for Channel creation is 95,040 per day, I'm
looking into building a degradation path where I would use polling from the
client side after a certain number of concurrent users have been reached.
What I'm trying to figure out is where is cut-off point should be.

How many concurrent channel connections can GAE handle in a performant
manner?

At a high level, this is how my app works:

1) Server receives an update from an external source.
2) Server notifies each connected client via the Channel API about this new
update.  This is currently done in a crude way by looping through all
clients and sending the msg via ChannelService.sendMessage().

Given that my site is not very popular right now, it's hard for me to know
if GAE's Channel API can handle a large number of concurrent channels.

Does anyone have rough numbers or best practices in regards to this?

Thanks,
J

--
You received this message because you are subscribed to the Google Groups
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/google-appengine?hl=en.


-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



Re: [google-appengine] Re: Scheduled Downtime Woes

2011-04-08 Thread Robert Kluin
Interesting.  Are you using any type of caching strategy, or is this a
'pure' db.get(the_key)?






On Fri, Apr 8, 2011 at 08:30, Simon Knott knott.si...@gmail.com wrote:
 I've had experience which suggests otherwise :)

 I'm finding that very occasionally the entity returned by the read-by-key
 hasn't been updated yet.  I've got around it by just re-queuing the task,
 and the second time around the entity is always in the updated state.

 I must admit that I was quite surprised it was happening - at first I
 thought I must not have enqueued in the task in the transaction, but after
 checking I definitely am.

 --
 You received this message because you are subscribed to the Google Groups
 Google App Engine group.
 To post to this group, send email to google-appengine@googlegroups.com.
 To unsubscribe from this group, send email to
 google-appengine+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-appengine?hl=en.


-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Channel Listener seems not work

2011-04-08 Thread Ania
Hi all,
I'm not sure if this is the right forum to ask.I have implemented Channel 
API in my gwt project.It creates token but when i try to open a channel it 
doesn't seem to work.In onOpen() method I try to log info on the server that 
channel has been opened but it doesn't work.Can anyone have a look and tell 
me it is not working.I ran out of ideas.Have really bad time with 
implementing channel.There is my code from onModuleLoad( ) [class filesfor 
channel,socket and socket listener are from dance,dance robot app]:
private void listenToChannel() {
Window.alert(listen to channel..);
if(cca==null){
cca=(ChatChannelAsync) GWT.create(ChatChannel.class);
((ServiceDefTarget) cca).setServiceEntryPoint(ChatChannel);
}
 ((ServiceDefTarget) cca).setServiceEntryPoint(ChatChannel);
AsyncCallbackString callback=new AsyncCallbackString(){

@Override
public void onFailure(Throwable caught) {
Window.alert(caught.toString());
 }

@Override
public void onSuccess(String result) {
 Channel channel=ChannelFactory.createChannel(result);
 channel.open(new SocketListener(){

@Override
public void onOpen() {
 Logger log=Logger.getLogger(CryptoChat.class.getName());
log.info(channel open);
 }

@Override
public void onMessage(String message) {
try {
SerializationStreamReader reader =
pushServiceStreamFactory.createStreamReader(message);
String msg = (String) reader.readString();
int i=message.indexOf(says);
String contact=message.substring(0, i-1);
handleMessage(msg,contact);
} catch (SerializationException e) {
throw new RuntimeException(Unable to deserialize  +
message, e);
} 
}
}); 
}
};
cca.createChannel(callback); 
}

THANKS FOR ANY HELP!
Ania

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Re: HItting query limit using Geocoding API from App Engine

2011-04-08 Thread nickmilon
@bFlood : Maps Premium is an expensive service used by not public-
facing, password protected Web sites, while what we are talking about
here is the free Google Maps service, where G is penalizing all Apps
running on top of GAE since they have to share the ip addresses pool
of GAE ip adresses.

@Ikai : what you write applies to old maps (V2) API where you can
obtain an application authorization key and applications are rate
limited based on this key, although I feel that some kind of ip based
limitations exists also.
Maps V3 which is the way to go especially for mobile appls, do not
require an application key, instead there are rate limitations based
just on originating IP addresses, this puts GAE based appls on a
disadvantage since we have to share this with all other GAE based
appls using the service.

Regards
Nick



On Apr 8, 2:58 pm, bFlood bfl...@spatialdatalogic.com wrote:
 Google Maps Premiumhttp://www.google.com/enterprise/earthmaps/maps.html

 Dev guide for Url 
 signinghttp://code.google.com/apis/maps/documentation/premier/guide.html

 On Apr 8, 3:31 am, Ikai Lan (Google) ika...@google.com wrote:







  I'll admit that I don't understand the maps API to be an authority on this,
  but the last time I spoke to them, they mentioned some kind of a key you can
  get a hold of? With this key you can make signed requests that can be
  whitelisted. Otherwise, you're put into the general pool of IPs and subject
  to throttling.

  Ikai Lan
  Developer Programs Engineer, Google App Engine
  Blog:http://googleappengine.blogspot.com
  Twitter:http://twitter.com/app_engine
  Reddit:http://www.reddit.com/r/appengine

  On Fri, Apr 8, 2011 at 12:20 AM, nickmilon nickmi...@gmail.com wrote:
   IMHO a proxy will complicate things.
   What about if GAE team gets in touch with maps V3 team and explain to
   them the issue so may be they can rate limit all GAE originated appls
   by app id which is a very secure method since app id can't be
   hacked ?

   @Joe sorry my api isn't that useful in your case.
   Regards
   Nick

   On Apr 7, 1:06 am, Brandon Wirtz drak...@digerat.com wrote:
Use a Proxy.  Then you can come through your own IP-pool.

From: google-appengine@googlegroups.com
[mailto:google-appengine@googlegroups.com] On Behalf Of Joe Tyson
Sent: Wednesday, April 06, 2011 2:59 PM
To: google-appengine@googlegroups.com
Subject: Re: [google-appengine] Re: HItting query limit using Geocoding
   API
from App Engine

We are delegating some of that to the client now, but it is far

less than ideal. Our client is mobile, so every byte that we send

over can end up costing our users money (you would be surprised

how sensitive some people are to this).

Thanks for the resource, though. I wish country level would be

enough information for us :-(.

Doing some additional searching around, it looks this issue has

been bought up by some other users on the maps forum:

   http://goo.gl/RyJ9w

On Wednesday, April 6, 2011 at 2:44 PM, nickmilon wrote:

May be you can delegate the geocoding job to the client side using
js ?
also you can take a look here :
  http://gaengine.blogspot.com/2010/11/world-countries-and-ip-geocoding...
ml

Nick ;-)

On Apr 6, 7:25 pm, Joe Tyson joety...@gmail.com wrote:

Hello,

This seems to be more of a problem with the geocoding api than app
   engine,
but I'm unable to get ahold of anyone on that team so I'll post here
instead.

The new Geocoding API doesn't do any form of url signing or api keys for
non-premier accounts and resorts to using IP address to control quotas.
Since App Engine uses a shared IP pool, my app gets clumped in the quota
limitations of other apps. This must be a somewhat frequent problem for
other apps, since 90% of my geocoding attempts get an 'OVER_QUERY_LIMIT'
message. These last few days, it has been closer to 100% at 500-600
   queries
spread out over an 15-20 hours.

I'll add that I don't think using a pool of IPs is at all the issue. Any
large scale deployment would be hitting the Geocoding API from a pool of
IPs, and if the pool were dedicated to a single service, the service
   would
be circumventing the Geocoding API quotas anyway.

Is anyone else on the list having this issue? Have you been able to work
with the geocoding team to get auth tokens that don't require having a
premier account?

joe

--
You received this message because you are subscribed to the Google 
Groups
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group athttp://
   groups.google.com/group/google-appengine?hl=en.

--
You received this message because you are subscribed to the Google 
Groups
Google App Engine 

Re: [google-appengine] Re: HItting query limit using Geocoding API from App Engine

2011-04-08 Thread Jeff Schnitzer
On Thu, Apr 7, 2011 at 3:20 PM, nickmilon nickmi...@gmail.com wrote:
 IMHO a proxy will complicate things.
 What about if GAE team gets in touch with maps V3 team and explain to
 them the issue so may be they can rate limit all GAE originated appls
 by app id which is a very secure method since app id can't be
 hacked ?

Unfortunately this would incentivize the rest of the world to start
*adding* GAE headers to work around maps' ratelimits.  But combined
with knowledge of the IP pool that appengine fetches from, it's a
great idea.

BTW, a proxy is pretty trivial to set up.  And you can use it for
other services that have rate issues as well - I've run into several.

Jeff

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Re: Redirect from naked domain preserving full path

2011-04-08 Thread roberto.cr
I'm having the same problem!

I've set (under google apps cpanel DomainSettingsDomains) google apps
to redirect mydomain.com to app.mydomain.com (because appengine
doesn't allow for naked domains anymore)
Then I've set (under google apps cpanel AppEngineServiceSettings) app
engine to listen to *.mydomain.com (yes, you can set the * wildcard
there now)
This worked almost perfectly, but the only thing off is actually the
most important:

mydomain.com would redirect to app.mydomain.com
userinput.mydomain.com would keep the userinput and load my regular
app.mydomain.com (as described in my app.yaml, having my app to treat
userinput: in Python's webapp framework you can access this with
self.request.headers['Host'] )
userinput.mydomain.com/login would keep the url but behave like
app.mydomain.com/login (as expected) while still being able to read
userinput
BUT mydomain.com/login would NOT redirect to app.mydomain.com/login !
it simply redirects to app.mydomain.com ignoring the full path!

the problem seems to be the way google redirects my naked domain. it
ignores the full path. I guess it's not just me, is it?

so you are saying the solution really involves setting everything up
on godaddy ?
(in my case hostgator. I bought a .to domain, set the NS to my regular
hostgator account and setting all DNS settings there.)

On Apr 2, 1:13 am, Thomas Wiradikusuma wiradikus...@gmail.com wrote:
 Hi Giacinto,

 I'm having exactly the same problem. Can you get into more detail
 (step-by-step, starting 
 fromhttps://www.google.com/a/cpanel/MYDOMAIN/DomainSettingsDomains
 probably?) on how you get it done? I understand your post, but I'm
 afraid I might click/delete the wrong stuff.

 On Mar 31, 2:31 am, Giacinto decata...@gmail.com wrote:







  Well, i solved the problem! None of the previous solutions is really the
  good solution, or better, none is complete. The real problem of the lost
  request's full path is the google autosetting for wwwredirect!

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



Re: [google-appengine] Users service, urlfetch and 2-legged oauth?

2011-04-08 Thread Robert Kluin
I did a couple quick tests this evening (in Python).  I wrote a couple
super simple handlers to walk me through the (three-legged) OAuth
setup, then stored the token in the datastore.

One the provider side I wrote a simple utility function, get_user that
return users.get_current_user() if it returned a value, if not it
tried oauth.get_current_user(), and finally returned None otherwise.
It worked correctly.  I have not tried this on an OpenID App yet.



Robert






On Fri, Apr 8, 2011 at 02:47, Jan Z/ Hapara jan.zawad...@gmail.com wrote:
 Yesh - it's close, but as I think you pointed out on another thread, not the
 same as api.users - which means kludgy code.

 It would really make sense to merge users and oauth, they really are the
 same thing from the service consumer standpoint.  I *might* want to know
 which was used, but 90% of the time, it doesn't matter.

 The impact here is needing to change the existing app, potentially in
 unpredictable ways.

 J

 --
 You received this message because you are subscribed to the Google Groups
 Google App Engine group.
 To post to this group, send email to google-appengine@googlegroups.com.
 To unsubscribe from this group, send email to
 google-appengine+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-appengine?hl=en.


-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



Re: [google-appengine] Users service, urlfetch and 2-legged oauth?

2011-04-08 Thread Robert Kluin
Just a small follow up, I did some testing with a federated login app.
 This seems to work fine for Google Accounts. For Google Apps accounts
the authentication process appears to happen correctly, but the app
does not recognize a user on subsequent requests (even though I do get
an access token).

If anyone has used the built in OAuth provider with federated login
and an Apps account I'd love to know if you needed to do anything
differently.



Robert






On Fri, Apr 8, 2011 at 23:40, Robert Kluin robert.kl...@gmail.com wrote:
 I did a couple quick tests this evening (in Python).  I wrote a couple
 super simple handlers to walk me through the (three-legged) OAuth
 setup, then stored the token in the datastore.

 One the provider side I wrote a simple utility function, get_user that
 return users.get_current_user() if it returned a value, if not it
 tried oauth.get_current_user(), and finally returned None otherwise.
 It worked correctly.  I have not tried this on an OpenID App yet.



 Robert






 On Fri, Apr 8, 2011 at 02:47, Jan Z/ Hapara jan.zawad...@gmail.com wrote:
 Yesh - it's close, but as I think you pointed out on another thread, not the
 same as api.users - which means kludgy code.

 It would really make sense to merge users and oauth, they really are the
 same thing from the service consumer standpoint.  I *might* want to know
 which was used, but 90% of the time, it doesn't matter.

 The impact here is needing to change the existing app, potentially in
 unpredictable ways.

 J

 --
 You received this message because you are subscribed to the Google Groups
 Google App Engine group.
 To post to this group, send email to google-appengine@googlegroups.com.
 To unsubscribe from this group, send email to
 google-appengine+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-appengine?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.