Re: [google-appengine] How To Create Unique Entities

2010-07-20 Thread Robert Kluin
Hey Carl,
  What about just making the subscription's key_name something like 
"customer.key().id_or_name()-service.key().id_or_name()".  That will prevent 
duplicating subscriptions. 


Robert



On Jul 20, 2010, at 23:42, cwaldbieser  wrote:

> I have 3 models:  A customer account, a service, and a model that
> represents a customer's subscription to the service.  The subscription
> is essentially:
> 
> class Subscription(db.Model):
>  customer = db.ReferenceProperty(Customer)
>  service = db.ReferenceProperty(Service)
> 
> I have a user interface that allows creating or cancelling a
> customer's subscription.  I want to be able to create a subscription
> only if an existing subscription does not already exist.  I thought
> that a transaction might be the key, but I can't do a query in
> transaction unless it is by key or an ancestor query.  So I am not
> sure what to do.
> 
> Any thoughts?
> 
> Thanks,
> Carl
> 
> -- 
> 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-appeng...@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-appeng...@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] Stuck on "Welcome to Google App Engine" screen

2010-07-20 Thread Nickolas Daskalou
Assuming your Google Apps domain is hackerdojo.com, try visiting:

https://appengine.google.com/a/dhackerdojo.com

Nick


On 21 July 2010 10:27, Brian Klug  wrote:

> There seems to be a massive bug where my Google Account can't get past
> the screen on http://appengine.google.com/start.
>
> I was able to SMS verify, I was able to create an application, and
> even deploy one, but I can't see my list of applications.
>
> Note I am using a Google Apps account (non-gmail).
>
> Any help would be appreciated.
>
> -B
>
> --
> 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-appeng...@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-appeng...@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] Ranking data in datastore

2010-07-20 Thread Nickolas Daskalou
Check out ranklist:

http://code.google.com/p/google-app-engine-ranklist/

It was developed for Google Code Jam by Google employees:

http://googleappengine.blogspot.com/2009/01/google-code-jams-ranking-library.html

Nick


On 21 July 2010 01:52, Alvin  wrote:

> Hi,
>
> After searching the internet for several weeks, I cannot find an
> efficient way to rank entities in a table.
> For example, if I store millions of scores of game plays in a table,
> and each score has an unique ID, how do I get the rank of a specific
> score? In other words, how do I find the rank of certain score by its
> unique ID?
>
> Because each query only returns maximum 1000 entities, it would be a
> problem if the target score's rank is larger than 1000.
> If we add another column called rank, to track the rank of each
> entity, then it costs a lot of computation time to update rank if we
> insert a new score.
>
> Thanks for your help in advance.
>
> Alvin
>
> --
> 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-appeng...@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-appeng...@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: Validation code

2010-07-20 Thread Saqib Ali
I have a similar problem:

I had already used my cell phone number for SMS Verification for App
Engine (consumer edition). But now when I try to use the same phone
for App Engine for Business it complains, "The phone number has been
sent too many messages or has already been used to confirm an
account." . How can I sign for App Engine for Business now? Help..




On Jul 20, 11:35 am, saturdayplace  wrote:
> I've used my phone number to validate app engine for one domain
> already, but I'd like to do it for a different domain. When I attempt
> to create my first app for that domain, I'm asked to enter in my
> number, but when I do I'm told that number has already been used.  Is
> there any way I can get manually activated?

-- 
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-appeng...@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] Stuck on "Welcome to Google App Engine" screen

2010-07-20 Thread Brian Klug
There seems to be a massive bug where my Google Account can't get past
the screen on http://appengine.google.com/start.

I was able to SMS verify, I was able to create an application, and
even deploy one, but I can't see my list of applications.

Note I am using a Google Apps account (non-gmail).

Any help would be appreciated.

-B

-- 
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-appeng...@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: Issue with precompilation-enabled java sdk 1.3.5

2010-07-20 Thread Sean Lynch
Yes, it is now on by default (I will correct the documentation).

We are investigating deployment issues that's come up for Python
developers which may also be related to precompilation.

On Jul 19, 11:41 pm, Galoch  wrote:
> Hi,
>
> I looked at the release notes of 1.3.1 where it says "Java
> Precompilation is now on by default" where as the current
> documentation at link [http://code.google.com/appengine/kb/java.html]
> says it will be supported in future versions.
>
> I believe, former is true. Reason being, I am unable to deploy
> application with default settings in my appengine-web.xml since
> deployment fails with 500 internal server error. Has anyone else
> noticed it. I have seen this issue pop up after I started using task
> queues.
> After explicitly turning off precompilation of JSPs, I am able to
> deploy but I am not sure what would be the impact on overall app
> performance.
>
> Thanks
> G

-- 
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-appeng...@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: Server Error on code upload

2010-07-20 Thread Sean Lynch
We're looking into it.  Can you try deploying your applications
without the python_precompiled flag in app.yaml?

On Jul 20, 9:29 am, José Moreira  wrote:
> I also been having this problem ocasionally, my guess is appengine overload
>
> 2010/7/20 vivpuri 
>
> > I have been getting server error while trying to upload code to prod
> > since 8 AM EST. Anyone else facing this issue? I do have the
> > derived_file_type: - python_precompiled set in the app.yaml.
>
> > --
> > 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-appeng...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > google-appengine+unsubscr...@googlegroups.com > e...@googlegroups.com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/google-appengine?hl=en.
>
> --
> irc://josemore...@irc.freenode.nethttp://pt.linkedin.com/in/josemoreirahttp://djangopeople.net/josemoreira

-- 
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-appeng...@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: Server Error on code upload

2010-07-20 Thread Shoubhik

Even i am having the same problem


com.google.apphosting.utils.jetty.runtimeappenginewebappcont...@916f80{/,/
base/data/home/apps/nseccse3/1.343504414594986335}
org.mortbay.util.MultiException[java.lang.UnsupportedClassVersionError:
com/google/appengine/demos/jdoexamples/AddressBookServlet :
Unsupported major.minor version 51.0,
java.lang.UnsupportedClassVersionError: com/google/appengine/demos/
jdoexamples/FriendServlet : Unsupported major.minor version 51.0,
java.lang.UnsupportedClassVersionError: com/google/appengine/demos/
jdoexamples/GuestbookServlet : Unsupported major.minor version 51.0,
java.lang.UnsupportedClassVersionError: com/google/appengine/demos/
jdoexamples/NamedCounterServlet : Unsupported major.minor version
51.0, java.lang.UnsupportedClassVersionError: org/apache/jsp/
addressbook_jsp : Unsupported major.minor version 51.0,
java.lang.UnsupportedClassVersionError: org/apache/jsp/friends_jsp :
Unsupported major.minor version 51.0,
java.lang.UnsupportedClassVersionError: org/apache/jsp/guestbook_jsp :
Unsupported major.minor version 51.0,
java.lang.UnsupportedClassVersionError: org/apache/jsp/index_jsp :
Unsupported major.minor version 51.0,
java.lang.UnsupportedClassVersionError: org/apache/jsp/
namedcounter_jsp : Unsupported major.minor version 51.0]
at
org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:
656)
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:
250)
at com.google.apphosting.base.RuntimePb$EvaluationRuntime
$6.handleBlockingRequest(RuntimePb.java:7115)
at com.google.apphosting.base.RuntimePb$EvaluationRuntime
$6.handleBlockingRequest(RuntimePb.java:7113)
at
com.google.net.rpc.impl.BlockingApplicationHandler.handleRequest(BlockingApplicationHandler.java:
24)
at com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java:
398)
at com.google.net.rpc.impl.Server$2.run(Server.java:852)
at
com.google.tracing.LocalTraceSpanRunnable.run(LocalTraceSpanRunnable.java:
56)
at
com.google.tracing.LocalTraceSpanBuilder.internalContinueSpan(LocalTraceSpanBuilder.java:
576)
at com.google.net.rpc.impl.Server.startRpc(Server.java:807)
at com.google.net.rpc.impl.Server.processRequest(Server.java:369)
at
com.google.net.rpc.impl.ServerConnection.messageReceived(ServerConnection.java:
442)
at
com.google.net.rpc.impl.RpcConnection.parseMessages(RpcConnection.java:
319)
at
com.google.net.rpc.impl.RpcConnection.dataReceived(RpcConnection.java:
290)
at com.google.net.async.Connection.handleReadEvent(Connection.java:
474)
at
com.google.net.async.EventDispatcher.processNetworkEvents(EventDispatcher.java:
831)
at
com.google.net.async.EventDispatcher.internalLoop(EventDispatcher.java:
207)
at com.google.net.async.EventDispatcher.loop(EventDispatcher.java:
103)
at
com.google.net.rpc.RpcService.runUntilServerShutdown(RpcService.java:
251)
at com.google.apphosting.runtime.JavaRuntime
$RpcRunnable.run(JavaRuntime.java:417)
at java.lang.Thread.run(Unknown Source)
java.lang.UnsupportedClassVersionError: com/google/appengine/demos/
jdoexamples/AddressBookServlet : Unsupported major.minor version 51.0
at
com.google.appengine.runtime.Request.process-764416578912ce09(Request.java)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
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.jav

[google-appengine] HardDeadlineExceededError (problems today)

2010-07-20 Thread Ian
Hello to all!

We have been running some tests on the Java GAE platform prior to
making a commitment to deploying some upcoming projects with have on
GAE. Everything seemed to be going ok until today!

To cut straight to the point we stared to encounter (some traces
below):

com.google.apphosting.runtime.HardDeadlineExceededError exceptions

Yesterday the code (that is unchanged) worked fine using the same load
pattern (a few mobile devices that do periodic uploads).

Now I appreciate that these errors are indicating a 30 second timeout
exception has occurred but I'm not sure why. I've seen these errors
occurring while our app tries to delete an object from an ArrayList
(that contains less than 100 items) as well as when retrieving data
from JDO.

This has only happened today so I'm guessing (and hoping) this is a
GAE issue. Has anyone else encountered similar problems over the last
24 hours?

Thanks,
Ian

Example trace:

com.google.apphosting.runtime.HardDeadlineExceededError: This request
(6c7858aa8c29829d) started at 2010/07/20 20:11:04.342 UTC and was
still executing at 2010/07/20 20:11:33.425 UTC.
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:443)
at java.util.concurrent.TimeUnit.timedWait(Unknown Source)
at com.google.apphosting.runtime.AsyncFuture.get(AsyncFuture.java:60)
at com.google.apphosting.runtime.ApiProxyImpl
$AsyncApiFuture.get(ApiProxyImpl.java:332)
at com.google.apphosting.runtime.ApiProxyImpl
$AsyncApiFuture.get(ApiProxyImpl.java:223)
at
com.google.apphosting.runtime.ApiProxyImpl.doSyncCall(ApiProxyImpl.java:
135)
at com.google.apphosting.runtime.ApiProxyImpl.access
$000(ApiProxyImpl.java:43)
at com.google.apphosting.runtime.ApiProxyImpl$1.run(ApiProxyImpl.java:
108)
at com.google.apphosting.runtime.ApiProxyImpl$1.run(ApiProxyImpl.java:
106)
at java.security.AccessController.doPrivileged(Native Method)
at
com.google.apphosting.runtime.ApiProxyImpl.makeSyncCall(ApiProxyImpl.java:
106)
at
com.google.apphosting.runtime.ApiProxyImpl.makeSyncCall(ApiProxyImpl.java:
43)
at com.google.apphosting.api.ApiProxy.makeSyncCall(ApiProxy.java:98)
at
com.google.appengine.api.datastore.DatastoreApiHelper.makeSyncCall(DatastoreApiHelper.java:
58)
at com.google.appengine.api.datastore.DatastoreServiceImpl
$2.run(DatastoreServiceImpl.java:188)
at
com.google.appengine.api.datastore.TransactionRunner.runInTransaction(TransactionRunner.java:
30)
at
com.google.appengine.api.datastore.DatastoreServiceImpl.put(DatastoreServiceImpl.java:
176)
at
com.google.appengine.api.datastore.DatastoreServiceImpl.put(DatastoreServiceImpl.java:
156)
at
com.google.appengine.api.datastore.DatastoreServiceImpl.put(DatastoreServiceImpl.java:
148)
at
org.datanucleus.store.appengine.RuntimeExceptionWrappingDatastoreService.put(RuntimeExceptionWrappingDatastoreService.java:
93)
at
org.datanucleus.store.appengine.DatastorePersistenceHandler.put(DatastorePersistenceHandler.java:
180)
at
org.datanucleus.store.appengine.DatastorePersistenceHandler.put(DatastorePersistenceHandler.java:
127)
at
org.datanucleus.store.appengine.DatastorePersistenceHandler.insertObjects(DatastorePersistenceHandler.java:
254)
at
org.datanucleus.store.appengine.DatastorePersistenceHandler.insertObject(DatastorePersistenceHandler.java:
240)
at
org.datanucleus.state.JDOStateManagerImpl.internalMakePersistent(JDOStateManagerImpl.java:
3185)
at
org.datanucleus.state.JDOStateManagerImpl.makePersistent(JDOStateManagerImpl.java:
3161)
at
org.datanucleus.ObjectManagerImpl.persistObjectInternal(ObjectManagerImpl.java:
1298)
at
org.datanucleus.sco.SCOUtils.validateObjectForWriting(SCOUtils.java:
1476)
at
org.datanucleus.store.mapped.scostore.ElementContainerStore.validateElementForWriting(ElementContainerStore.java:
380)
at
org.datanucleus.store.mapped.scostore.FKListStore.validateElementForWriting(FKListStore.java:
609)
at
org.datanucleus.store.mapped.scostore.FKListStore.internalAdd(FKListStore.java:
344)
at
org.datanucleus.store.appengine.DatastoreFKListStore.internalAdd(DatastoreFKListStore.java:
146)
at
org.datanucleus.store.mapped.scostore.AbstractListStore.add(AbstractListStore.java:
105)
at org.datanucleus.sco.backed.ArrayList.add(ArrayList.java:698)

Alternate trace:

com.google.apphosting.runtime.HardDeadlineExceededError: This request
(a8a462671465bfdf) started at 2010/07/20 15:00:31.927 UTC and was
still executing at 2010/07/20 15:01:01.031 UTC.
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:443)
at java.util.concurrent.TimeUnit.timedWait(Unknown Source)
at com.google.apphosting.runtime.AsyncFuture.get(AsyncFuture.java:60)
at com.google.apphosting.runtime.ApiProxyImpl
$AsyncApiFuture.ge

[google-appengine] Re: Server Error on code upload

2010-07-20 Thread Shoubhik
im havin the same prob..

-- 
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-appeng...@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] Ranking data in datastore

2010-07-20 Thread Alvin
Hi,

After searching the internet for several weeks, I cannot find an
efficient way to rank entities in a table.
For example, if I store millions of scores of game plays in a table,
and each score has an unique ID, how do I get the rank of a specific
score? In other words, how do I find the rank of certain score by its
unique ID?

Because each query only returns maximum 1000 entities, it would be a
problem if the target score's rank is larger than 1000.
If we add another column called rank, to track the rank of each
entity, then it costs a lot of computation time to update rank if we
insert a new score.

Thanks for your help in advance.

Alvin

-- 
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-appeng...@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] what does this msg mean?

2010-07-20 Thread saintthor
in log info:

This request caused a new process to be started for your application,
and thus caused your application code to be loaded for the first time.
This request may thus take longer and use more CPU than a typical
request for your application.

what code may cause this?

-- 
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-appeng...@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: Google AppEngine Indexing

2010-07-20 Thread GeekTantra
The above post contains the manually configured indexes from my
index.yaml. But as I said earlier its not configuring the indexes that
I am facing problem with but its the time it takes to start serving
the index even in an empty datastore thats causing the problem in
instantly deploying my application. Any help or work around in this
regard with be appreciable.

On Jul 21, 7:05 am, Michael DeLaney 
wrote:
> I think that it is possible to manually configure your indexes as part of
> your app.yaml file... or perhaps it is your index.yaml...
>
>
>
>
>
> On Tue, Jul 20, 2010 at 7:59 PM, GeekTantra  wrote:
> > I am trying to create an application on appengine. The problem is when
> > I deploy it to production, even with empty datastore, it takes atleast
> > 2 hours for the indexes to start serving.
>
> > The contents of the index.yaml are:
> > - kind: comments
> >  properties:
> >  - name: content_type_id
> >  - name: is_public
> >  - name: is_removed
> >  - name: object_pk
> >  - name: site_id
> >  - name: created
>
> > - kind: comments
> >  properties:
> >  - name: content_type_id
> >  - name: object_pk
> >  - name: user_email
> >  - name: user_name
> >  - name: user_url
> >  - name: created
>
> > - kind: content_type
> >  properties:
> >  - name: app_label
> >  - name: name
>
> > - kind: pages
> >  properties:
> >  - name: post_status
> >  - name: created
>
> > - kind: pages
> >  properties:
> >  - name: post_status
> >  - name: post_title
>
> > - kind: posts
> >  properties:
> >  - name: post_status
> >  - name: created
>
> > - kind: posts
> >  properties:
> >  - name: post_status
> >  - name: created
> >    direction: desc
>
> > No since I want to make this application an opensource product its
> > important that people can deploy it instantly and see the results but
> > without the indexes being served instantly I start getting 500
> > errors(NoIndexErrors) instantly when I deploy. Is there a work around.
> > Initially the datastore would be completely empty, so I presume the
> > Indexing shouldn't take so much time.
>
> > --
> > 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-appeng...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > google-appengine+unsubscr...@googlegroups.com > e...@googlegroups.com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/google-appengine?hl=en.
>
> --
> Michael S. DeLaney
> mdela...@delaneylawoffices.com
>
> DeLaney Law Offices, Ltd.
> ELDER LAW ATTORNEYS
> 14524 John Humphrey Drive
> Orland Park, IL  60462
>
> (708) 675-7144
> (708) 675-7150 - Direct Dial
> Fax: (866) 282-6509
>
> NOTICE:  The information contained in this electronic mail transmission
> (including any attachment) is intended by DeLaney Law Offices, Ltd. for the
> use of the named individual or entity to which it is directed and may
> contain information that it is privileged or otherwise confidential.  It is
> not intended for transmission to, or receipt by, anyone other than the named
> addressee (or a person authorized to deliver it to the named addressee).  It
> should not be copied or forwarded to any unauthorized persons.  If you have
> received this electronic mail transmission in error, please delete it from
> your system without copying or forwarding it, and notify the sender of the
> error by reply e-mail or by calling DeLaney Law Offices, Ltd. at
> 708-675-7144 so that our address record may be corrected.  Thank you.
>
> IRS CIRCULAR 230 NOTICE. Any advice expressed above as to tax matters was
> neither written nor intended by the sender or DeLaney Law Offices, Ltd. to
> be used and cannot be used by any taxpayer for the purpose of avoiding tax
> penalties that may be imposed under U.S. tax law. If any person uses or
> refers to any such tax advice in promoting, marketing or recommending a
> partnership or other entity, investment plan or arrangement to any taxpayer,
> then (i) the advice was written to support the promotion or marketing (by a
> person other than DeLaney Law Offices, Ltd.) of that transaction or matter,
> and (ii) such taxpayer should seek advice based on the taxpayer's particular
> circumstances from an independent tax advisor.

-- 
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-appeng...@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 To Create Unique Entities

2010-07-20 Thread cwaldbieser
I have 3 models:  A customer account, a service, and a model that
represents a customer's subscription to the service.  The subscription
is essentially:

class Subscription(db.Model):
  customer = db.ReferenceProperty(Customer)
  service = db.ReferenceProperty(Service)

I have a user interface that allows creating or cancelling a
customer's subscription.  I want to be able to create a subscription
only if an existing subscription does not already exist.  I thought
that a transaction might be the key, but I can't do a query in
transaction unless it is by key or an ancestor query.  So I am not
sure what to do.

Any thoughts?

Thanks,
Carl

-- 
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-appeng...@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: Is there an AnyValue filter in gae datastore?

2010-07-20 Thread Tapir
As I mentioned at the end of my first comment.
The sql includes the 3 fields :isToday, isThisWeek and isThisMonth" is
to create less indexes.
If I use the 3 fields each in a sql, then there will be 3 indexes
created insead of one.

I heard of that more indexes means more index builing time when create
or update an entity.

I also know the query with sql "(isToday==true || isToday==false) &&
(isThisWeek==true ||
isThisWeek==false)   && isThisMonth==true" in fact is 4 sub queries.
It is not efficient.

But if there is a AnyValue filter, the query with sql " AnyValue
(isToday) &&  AnyValue(isThisWeek) && isThisMonth==true"
is exactly one sub query.

There are more cases, with a AnyValue filter, ther number of indexes
will largely saved.


On Jul 15, 4:09 am, Robert Kluin  wrote:
> Hi Tapir,
>   You might want to read the "How Entities and Indexes are Stored"
> article from the "Mastering the Datastore" series.
>      http://code.google.com/appengine/articles/datastore/overview.html
>
>   You might also check out Alfred Fullers next gen queries talk from
> Google IO 2010.
>      http://code.google.com/events/io/2010/sessions/next-gen-queries-appen...
>
> Robert
>
>
>
> On Tue, Jul 13, 2010 at 10:12 PM, Tapir  wrote:
> > For example, this query:
>
> >  (isToday==true || isToday==false) && (isThisWeek==true ||
> > isThisWeek==false)
> >  && isThisMonth==true
>
> > in fact contains 4 sub queries:
>
> >  (isToday==true) && (isThisWeek==true) && isThisMonth==true
> >  (isToday==true) && (isThisWeek==false) && isThisMonth==true
> >  (isToday==false) && (isThisWeek==true) && isThisMonth==true
> >  (isToday==false) && (isThisWeek==false) && isThisMonth==true
>
> > If use the AnyValue filter, only one sub query is needed:
>
> >  AnyValue (isToday) &&  AnyValue(isThisWeek) && isThisMonth==true
>
> > BTW, the reason of using one query instead of 4 queries is to decrease
> > the number of indexes.
>
> > --
> > 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-appeng...@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.- Hide quoted text -
>
> - Show quoted text -

-- 
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-appeng...@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] Google AppEngine Indexing

2010-07-20 Thread Michael DeLaney
I think that it is possible to manually configure your indexes as part of
your app.yaml file... or perhaps it is your index.yaml...

On Tue, Jul 20, 2010 at 7:59 PM, GeekTantra  wrote:

> I am trying to create an application on appengine. The problem is when
> I deploy it to production, even with empty datastore, it takes atleast
> 2 hours for the indexes to start serving.
>
> The contents of the index.yaml are:
> - kind: comments
>  properties:
>  - name: content_type_id
>  - name: is_public
>  - name: is_removed
>  - name: object_pk
>  - name: site_id
>  - name: created
>
> - kind: comments
>  properties:
>  - name: content_type_id
>  - name: object_pk
>  - name: user_email
>  - name: user_name
>  - name: user_url
>  - name: created
>
> - kind: content_type
>  properties:
>  - name: app_label
>  - name: name
>
> - kind: pages
>  properties:
>  - name: post_status
>  - name: created
>
> - kind: pages
>  properties:
>  - name: post_status
>  - name: post_title
>
> - kind: posts
>  properties:
>  - name: post_status
>  - name: created
>
> - kind: posts
>  properties:
>  - name: post_status
>  - name: created
>direction: desc
>
>
> No since I want to make this application an opensource product its
> important that people can deploy it instantly and see the results but
> without the indexes being served instantly I start getting 500
> errors(NoIndexErrors) instantly when I deploy. Is there a work around.
> Initially the datastore would be completely empty, so I presume the
> Indexing shouldn't take so much time.
>
> --
> 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-appeng...@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.
>
>


-- 
Michael S. DeLaney
mdela...@delaneylawoffices.com

DeLaney Law Offices, Ltd.
ELDER LAW ATTORNEYS
14524 John Humphrey Drive
Orland Park, IL  60462

(708) 675-7144
(708) 675-7150 - Direct Dial
Fax: (866) 282-6509

NOTICE:  The information contained in this electronic mail transmission
(including any attachment) is intended by DeLaney Law Offices, Ltd. for the
use of the named individual or entity to which it is directed and may
contain information that it is privileged or otherwise confidential.  It is
not intended for transmission to, or receipt by, anyone other than the named
addressee (or a person authorized to deliver it to the named addressee).  It
should not be copied or forwarded to any unauthorized persons.  If you have
received this electronic mail transmission in error, please delete it from
your system without copying or forwarding it, and notify the sender of the
error by reply e-mail or by calling DeLaney Law Offices, Ltd. at
708-675-7144 so that our address record may be corrected.  Thank you.

IRS CIRCULAR 230 NOTICE. Any advice expressed above as to tax matters was
neither written nor intended by the sender or DeLaney Law Offices, Ltd. to
be used and cannot be used by any taxpayer for the purpose of avoiding tax
penalties that may be imposed under U.S. tax law. If any person uses or
refers to any such tax advice in promoting, marketing or recommending a
partnership or other entity, investment plan or arrangement to any taxpayer,
then (i) the advice was written to support the promotion or marketing (by a
person other than DeLaney Law Offices, Ltd.) of that transaction or matter,
and (ii) such taxpayer should seek advice based on the taxpayer's particular
circumstances from an independent tax advisor.

-- 
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-appeng...@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] Google AppEngine Indexing

2010-07-20 Thread GeekTantra
I am trying to create an application on appengine. The problem is when
I deploy it to production, even with empty datastore, it takes atleast
2 hours for the indexes to start serving.

The contents of the index.yaml are:
- kind: comments
  properties:
  - name: content_type_id
  - name: is_public
  - name: is_removed
  - name: object_pk
  - name: site_id
  - name: created

- kind: comments
  properties:
  - name: content_type_id
  - name: object_pk
  - name: user_email
  - name: user_name
  - name: user_url
  - name: created

- kind: content_type
  properties:
  - name: app_label
  - name: name

- kind: pages
  properties:
  - name: post_status
  - name: created

- kind: pages
  properties:
  - name: post_status
  - name: post_title

- kind: posts
  properties:
  - name: post_status
  - name: created

- kind: posts
  properties:
  - name: post_status
  - name: created
direction: desc


No since I want to make this application an opensource product its
important that people can deploy it instantly and see the results but
without the indexes being served instantly I start getting 500
errors(NoIndexErrors) instantly when I deploy. Is there a work around.
Initially the datastore would be completely empty, so I presume the
Indexing shouldn't take so much time.

-- 
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-appeng...@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] Blobstore - requires billing to be enabled?

2010-07-20 Thread Pieter Coucke
Yes.

See http://code.google.com/intl/nl-BE/appengine/docs/quotas.html#Blobstore
"The Blobstore API is only available for apps with billing enabled. You
still get an amount of quota for free, but billing must be enabled to use
it."




On Tue, Jul 20, 2010 at 11:38 PM, Mark  wrote:

> Hi,
>
> I can't find the doc stat states this, but in order to use the
> blobstore, we need to enable billing?
>
> 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-appeng...@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.
>
>


-- 
Pieter Coucke - Onthoo BVBA 
zamtam.com  in The
Netherlands| Belgium (
nl  | fr ) |
France|
Germany  | UK


-- 
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-appeng...@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] Blobstore - requires billing to be enabled?

2010-07-20 Thread Mark
Hi,

I can't find the doc stat states this, but in order to use the
blobstore, we need to enable billing?

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-appeng...@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: Data Migration

2010-07-20 Thread amos
What I mean is to update the persistent data that is stored for my
application as my application evolves (versions) over time and from
release to release.

For example:
Let say I have a table with a string field. I later find out that I
need this field to be a Text field (store more than 500 characters). I
already have millions of entries with the field having the wrong type
and I'd like to update the type.

In other cases, I may change the structure of my domain model: split
one entity into two entities, etc.



On Jul 20, 1:25 pm, Robert Kluin  wrote:
> What do you mean between versions?  From your existing app to the GAE
> version you should look at the bulkloader or writing your own
> data-importers or synchronization code.
>
> Once on GAE all versions use the same datastore.
>
> RobertOn Mon, Jul 19, 2010 at 11:35 PM, amos  wrote:
> > Hi,
> > I'm trying to build a commercial application but I'm pretty stuck on
> > an approach for data migration between versions of my application.
>
> > I found this thread which seems to have ended in 2008. Any updates
> > from Google on this? Any ideas?
>
> >http://groups.google.com/group/google-appengine/browse_thread/thread/...
>
> > --
> > 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-appeng...@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-appeng...@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: Subcategory Capability with GAE Datastore Models?

2010-07-20 Thread Michael DeLaney
You do this by creating a Category Class, with a string property Name, an
optional reference property ParentCategory, and two functions:

1. CategoryList() which recursively returns a list of categories including
the category and all child categories,
2. TopCategory() which recurses upwards and returns the top most parent
category.  (You need this to validate any ParentCollection selection, you
don't want to set a Category's parent to be equal to any Category who's top
most parent is the same as the category in question, or you define an
endless loop that will crash your CategoryList().

All of your items must have a required reference property Category.  You
search on Item.Category IN Category.CategoryList().

You can add n-levels of categories to the Category Table.

LivingThing = Category (Name = "Living Thing")
Animal = Category (Name = "Animal", ParentCategory = LivingThing)
Mammal = Category (Name = "Mammal", ParentCategory = Animal)
Plant = Category(Name = "Plant", ParentCategory = LivingThing)

LivingThing.CategoryList() # returns {LivingThing, Animal,Mammal,Plant}
Animal.CategoryList() # returns {Animal, Mammal}
Plant.CategoryList() # returns {Plant}

If you later decide you want to store inanimate objects, you could then add

InAnimateObject = Category (Name "Inanimate Objects")
ManMade = Category(Name="Inanimate Objects", InAnimateObject)

In which case you would have two top level categories, LivingThing, and
InAnimateObject.  You will need to validate any ParentCategory Selection
that the user makes to prevent a circular heirarchy.  (E.G. if you set the
parent of LivingThing to Mammal, then the CategoryList() of LivingThing,
Animal, and Mammal would recurse forever.  This is why you need
Category.TopCategoy() -> ThisCategory.ParentCategory.TopCategory() Can't be
equal to ThisCategory.

As a variation of this, you could make the Category Class contain a
reference LIST property ParentCategories.  You would do this if you wanted
to create a heirarchy that was more robust, which would allow you to add,
forexample:

ClonedAnimal = Category(Name ="Cloned Animal", ParentCategories = {Animal,
ManMade})
Sheep = Category(Name = "Sheep", ParentCategories = {Animal})
ClonedSheep = Category (Name="ClonedSheep", ParentCategories= {Sheep,
ClonedAnimal})

Then
Sheep.CategoryList() # returns {Sheep, ClonedSheep}
ClonedAnimal.CategoryList() # returns {ClonedAnimal, ClonedSheep}
ManMade.CategoryList() # returns {ManMade, ClonedAnimal, ClonedSheep}


On Mon, Jul 19, 2010 at 4:59 PM, Bill Edwards  wrote:

> Hi guys,
>
> Thanks for the suggestions!  However, there is a slight detail that I
> forgot to mention.  I need to be able to dynamically define the
> subcategories, and I have literally hundreds of them already defined
> (more to be added by users).  Storing the categories as a
> StringListProperty seems promising.  That means that when I'm writing
> an entity to the datastore with a specific supercategory, I have to
> look for all subcategories and add those to the list as well.  Can you
> guys suggest a schema that won't require an extra call to the database
> by storing the relationships within the schema?
>
> Thanks!
>
> On Jul 19, 2:20 am, gops  wrote:
> > you can achieve this in polymodel by adding all common properties to
> > polymodel base class and specific property to the hierarchy.
> >
> > i.e.
> >
> > Class LivingThing(polymodel.PolyModel):
> > Kingdom = db.StringProperty()
> > Phylum = db.StringProperty()
> > Subphylum = db.StringProperty()
> >
> > Class Mammal(LivingThing):
> > noofbreast = db.IntegerProperty()
> >
> > class Monkey(Mammal):
> >canjump = db.BooleanProperty()
> >
> > now you can create class monkey as,
> > Monkey(Kingdom="Animal",canjump=True)
> >
> > and later query as LivingThing.filter("Kingdom =","Animal").fetch()
> >
> > can return Monkey.
> >
> > On Jul 19, 1:04 pm, Bill Edwards  wrote:
> >
> > > Hi!
> >
> > > I've been recently trying to wrap my head around GAE's datatypes.  Is
> > > there a model type in GAE that allows me to define subproperties?  For
> > > example, I want to have a "category" property where some categories
> > > fall under others, and when i query for all entities within a
> > > supercategory, i get the subcategories also.
> >
> > > For example:
> > > class Animals(db.Model):
> > > type = db.StringProperty()
> >
> > > Animals(type='mammal')
> > > Animals(type='chimpanzee')
> > > Animals(type='monkey')
> >
> > > When I query for all animals with type mammal, i want to return all 3
> > > of the above objects.
> >
> > > I've read through the documentation, and the PolyModel datastore model
> > > has struck my eye as being potentially helpful.  However, it doesn't
> > > seem to quite do the job.
> >
> > > 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-appeng...@googlegroups.com.
> To unsubscribe from this group, send e

[google-appengine] App upload error

2010-07-20 Thread Harshal
$ appcfg.py update .
/usr/local/bin/appcfg.py:41: DeprecationWarning: the sha module is
deprecated; use the hashlib module instead
  os.path.join(DIR_PATH, 'lib', 'antlr3'),
/Users/harshal/Downloads/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver_login.py:33:
DeprecationWarning: the md5 module is deprecated; use hashlib instead
  import md5
Application: my_app_name; version: 1.
Server: appengine.google.com.
Scanning files on local disk.
Scanned 500 files.
Initiating update.
Could not guess mimetype for static/jqtouch/sample.htaccess.  Using
application/octet-stream.
Cloning 62 static files.
Cloning 792 application files.
Cloned 100 files.
Cloned 200 files.
Cloned 300 files.
Cloned 400 files.
Cloned 500 files.
Cloned 600 files.
Cloned 700 files.
Uploading 1 files and blobs.
2010-07-21 01:01:15,749 ERROR appcfg.py:1573 An unexpected error occurred.
Aborting.
Traceback (most recent call last):
  File
"/Users/harshal/Downloads/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/appcfg.py",
line 1554, in DoUpload
self.file_batcher.Flush()
  File
"/Users/harshal/Downloads/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/appcfg.py",
line 1186, in Flush
self.SendBatch()
  File
"/Users/harshal/Downloads/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/appcfg.py",
line 1159, in SendBatch
version=self.version)
  File
"/Users/harshal/Downloads/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/appengine_rpc.py",
line 346, in Send
f = self.opener.open(req)
  File
"/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib2.py",
line 383, in open
response = self._open(req, data)
  File
"/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib2.py",
line 401, in _open
'_open', req)
  File
"/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib2.py",
line 361, in _call_chain
result = func(*args)
  File
"/Users/harshal/Downloads/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/https_wrapper.py",
line 136, in https_open
return self.do_open(http_class_wrapper, req)
  File
"/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib2.py",
line 1105, in do_open
raise URLError(err)
URLError: 
Rolling back the update.
Traceback (most recent call last):
  File "/usr/local/bin/appcfg.py", line 68, in 
run_file(__file__, globals())
  File "/usr/local/bin/appcfg.py", line 64, in run_file
execfile(script_path, globals_)
  File
"/Users/harshal/Downloads/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/appcfg.py",
line 2766, in 
main(sys.argv)
  File
"/Users/harshal/Downloads/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/appcfg.py",
line 2757, in main
result = AppCfgApp(argv).Run()
  File
"/Users/harshal/Downloads/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/appcfg.py",
line 1768, in Run
self.action(self)
  File
"/Users/harshal/Downloads/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/appcfg.py",
line 2628, in __call__
return method()
  File
"/Users/harshal/Downloads/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/appcfg.py",
line 2075, in Update
lambda path: open(os.path.join(basepath, path), 'rb'))
  File
"/Users/harshal/Downloads/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/appcfg.py",
line 1554, in DoUpload
self.file_batcher.Flush()
  File
"/Users/harshal/Downloads/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/appcfg.py",
line 1186, in Flush
self.SendBatch()
  File
"/Users/harshal/Downloads/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/appcfg.py",
line 1159, in SendBatch
version=self.version)
  File
"/Users/harshal/Downloads/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/goog

[google-appengine] Validation code

2010-07-20 Thread saturdayplace
I've used my phone number to validate app engine for one domain
already, but I'd like to do it for a different domain. When I attempt
to create my first app for that domain, I'm asked to enter in my
number, but when I do I'm told that number has already been used.  Is
there any way I can get manually activated?

-- 
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-appeng...@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: Hoping to understand the difference between CPU Time and Datastore CPU Time

2010-07-20 Thread Greg Tracy

Thanks for the input, Robert.

After more performance tuning, I've been able to eliminate the
DeadlineExceeded errors. But I still have a hard time scaling the app
since the put calls are so expensive. Over thousands of request
handler calls, I quickly eat up CPU quota (free and paid).

Going back to the original question, I'm still unsure how the quota
math is working. I'm in the process of creating an-to-end performance
model of these calls and will post the results.



On Jul 15, 4:40 pm, Robert Kluin  wrote:
> Greg,
>   If you are having issues with long write times, there are two common
> options you may consider: smaller batches and transactional tasks.
>
>   I have some code that does batch processing, I set it up to search
> for the maximum batch size that is currently succeeding.  Basically I
> slowly increase my batch size until I am getting deadline exceeded
> warnings then I drop back down adjust my 'growth factor' and repeat
> the processes.  This seems to keep my batches running very close to
> the upper limit without too many deadline exceeded exceptions.
>
>   The other approach I have used it to offload some of the writes to
> other background tasks.  I write a group of entities, then send
> another handler another block of entities to write.  This has been
> working well for me too.
>
> Robert
>
>
>
> On Thu, Jul 15, 2010 at 5:22 PM, Greg Tracy  wrote:
>
> > I just started using AppStats for the first time - very nice package!
> > However, it didn't reveal any glaring problems. But it did help
> > validate my belief that I was using the memcache effectively.
>
> > I've been using the 'quota' package to find costly operations, and I
> > did discover a bug in my measurement. I was "starting the clock" in
> > the wrong spot so I have found some new areas to optimize. Will work
> > on that now... but I'm still not confident I can compensate for the
> > long write times.
>
> > Thanks!
>
> > On Jul 14, 10:46 pm, Robert Kluin  wrote:
> >> If you have not already, take a look at AppStats.  Perhaps you can
> >> find a way to improve performance.  You may also want to read through
> >> some of the datastore articles in the docs to be sure you are
> >> minimizing resource usage.
>
> >> Robert
>
> >> On Wed, Jul 14, 2010 at 7:24 PM, Greg Tracy  wrote:
>
> >> > Not for me... I set a budget and immediately started paying.
>
> >> > Not thrilled about this and may need to start a new thread asking for
> >> > advice on datastore contention...
>
> >> > Thanks.
>
> >> > On Jul 14, 5:57 pm, Nate Bauernfeind 
> >> > wrote:
> >> >> I have been.
>
> >> >> On Wed, Jul 14, 2010 at 5:37 PM, Greg Tracy  wrote:
> >> >> > Does this imply that I can go over the CPU Time quota and not pay for
> >> >> > it?
>
> >> >> > On Jul 14, 5:26 pm, Nate Bauernfeind 
> >> >> > wrote:
> >> >> > > The DataStore CPU time is included in total CPU time. To take 
> >> >> > > advantage
> >> >> > of
> >> >> > > "free datastore cpu time" you need to increase your cpu-usage 
> >> >> > > quota. When
> >> >> > I
> >> >> > > loaded a bunch of initial test data into the datastore I got tons of
> >> >> > > deadline exceeded errors, though I assumed it was cause I was 
> >> >> > > trying to
> >> >> > > stuff a lot of data in there all at once.
>
> >> >> > > Nate
>
> >> >> > > On Wed, Jul 14, 2010 at 5:24 PM, Greg Tracy  
> >> >> > > wrote:
>
> >> >> > > > I've been adding some new datastore-intensive features to an app 
> >> >> > > > and
> >> >> > > > am blowing through the "CPU Time" quota. While my understanding is
> >> >> > > > that the "Datastore CPU Time" quotas have been lifted while the 
> >> >> > > > App
> >> >> > > > Engine team continues to work on the performance, I can't figure 
> >> >> > > > out
> >> >> > > > why these are mutually exclusive metrics in my app.
>
> >> >> > > > When I measure the cpu cycles being consumed in the new features, 
> >> >> > > > it
> >> >> > > > is almost exclusively in the db.put() call. In fact, 50% of the 
> >> >> > > > time,
> >> >> > > > I'm getting DeadlineExceeded errors before the put call even 
> >> >> > > > returns.
>
> >> >> > > > Is the "Datastore CPU Time" also counted in the "CPU Time"? If 
> >> >> > > > so, are
> >> >> > > > there plans to extend the quota limits there as well?
>
> >> >> > > > I'm interested in finding some resources that track performance
> >> >> > > > metrics on App Engine. I don't know what to expect in terms of
> >> >> > > > performance when I store, for example, 400 entities in the data 
> >> >> > > > store.
> >> >> > > > Are there resources where folks are contributing their metrics for
> >> >> > > > others to see?
>
> >> >> > > > 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] Re: Issue with precompilation-enabled java sdk 1.3.5

2010-07-20 Thread Galoch
Interesting. Now I am able to deploy my app with precompilation-
enabled set to true without making any change to app or environment.

Thanks
G

On Jul 19, 11:41 pm, Galoch  wrote:
> Hi,
>
> I looked at the release notes of 1.3.1 where it says "Java
> Precompilation is now on by default" where as the current
> documentation at link [http://code.google.com/appengine/kb/java.html]
> says it will be supported in future versions.
>
> I believe, former is true. Reason being, I am unable to deploy
> application with default settings in my appengine-web.xml since
> deployment fails with 500 internal server error. Has anyone else
> noticed it. I have seen this issue pop up after I started using task
> queues.
> After explicitly turning off precompilation of JSPs, I am able to
> deploy but I am not sure what would be the impact on overall app
> performance.
>
> Thanks
> G

-- 
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-appeng...@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] Data Migration

2010-07-20 Thread Robert Kluin
What do you mean between versions?  From your existing app to the GAE
version you should look at the bulkloader or writing your own
data-importers or synchronization code.

Once on GAE all versions use the same datastore.


Robert



On Mon, Jul 19, 2010 at 11:35 PM, amos  wrote:
> Hi,
> I'm trying to build a commercial application but I'm pretty stuck on
> an approach for data migration between versions of my application.
>
> I found this thread which seems to have ended in 2008. Any updates
> from Google on this? Any ideas?
>
> http://groups.google.com/group/google-appengine/browse_thread/thread/af31f013857f36ae#
>
>
> --
> 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-appeng...@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-appeng...@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] Use logging for statistical purposes?

2010-07-20 Thread Robert Kluin
Each log level is limited to a set amount of storage, so if you have
many ads with that that many requests you will probably miss stuff.

I suggest you check out Brett Slatkins pipeline IO talk:
  
http://code.google.com/events/io/2010/sessions/high-throughput-data-pipelines-appengine.html



Robert





On Tue, Jul 20, 2010 at 12:47 PM, Scott Newman  wrote:
> Hello all,
>
> I've got Python ad-serving application that needs to track how many
> times an ad was served daily. I could obviously add a record to the
> datastore, but I'm wondering if logging the request and then exporting/
> parsing it daily would be as effective? This would keep my datastore
> writes way down as I'm looking at about 60-100 million requests/day.
>
> Is the logging consistent enough to rely upon?
>
> Thanks!
>
> Scott
>
> --
> 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-appeng...@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-appeng...@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] GAE Datastore low-level API null=empty list=non-existent

2010-07-20 Thread Jeff Schnitzer
You will also find that all integral numbers are converted to Long and
all collections are converted to ArrayList.  The low-level api is
powerful but a little quirky; this is why folks built Objectify, Twig,
SimpleDS, and Slim3.

Jeff

On Tue, Jul 20, 2010 at 8:29 AM, Jeff Schwartz  wrote:
> Entity is an expando and that is indeed the way they work.
>
> On Tue, Jul 20, 2010 at 5:32 AM, Marc Hacker  wrote:
>>
>> Surely this is not intended!  Entity.getProperty() gives exactly the
>> same result, null, if there is no property, there is a property set to
>> null or there is an empty Collection!
>>
>>
>>        DatastoreService datastore =
>> DatastoreServiceFactory.getDatastoreService();
>>        Key key = KeyFactory.createKey("testKind", "testKey");
>>        Entity e = new Entity(key);
>>        e.setProperty("null", null);
>>        e.setProperty("emptylist", new ArrayList());
>>        datastore.put(e);
>>        try {
>>                        Entity e2 = datastore.get(key);
>>                        System.out.println(e2.getProperty("null")==null);
>>
>>  System.out.println(e2.getProperty("emptylist")==null);
>>
>>  System.out.println(e2.getProperty("doesNotExist")==null);
>>                } catch (EntityNotFoundException exc) {
>>                        exc.printStackTrace();
>>                }
>> Result:
>> true
>> true
>> true
>>
>> At the very least an empty list should be saved as an empty list no?
>>
>> --
>> 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-appeng...@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.
>>
>
>
>
> --
> --
> 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-appeng...@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-appeng...@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] Use logging for statistical purposes?

2010-07-20 Thread Scott Newman
Hello all,

I've got Python ad-serving application that needs to track how many
times an ad was served daily. I could obviously add a record to the
datastore, but I'm wondering if logging the request and then exporting/
parsing it daily would be as effective? This would keep my datastore
writes way down as I'm looking at about 60-100 million requests/day.

Is the logging consistent enough to rely upon?

Thanks!

Scott

-- 
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-appeng...@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] Server Error on code upload

2010-07-20 Thread José Moreira
I also been having this problem ocasionally, my guess is appengine overload

2010/7/20 vivpuri 

> I have been getting server error while trying to upload code to prod
> since 8 AM EST. Anyone else facing this issue? I do have the
> derived_file_type: - python_precompiled set in the app.yaml.
>
> --
> 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-appeng...@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.
>
>


-- 
irc://josemore...@irc.freenode.net
http://pt.linkedin.com/in/josemoreira
http://djangopeople.net/josemoreira

-- 
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-appeng...@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: Channel API

2010-07-20 Thread Tom Wu
Great !

Just waiting for the Channel API Docs and key register.

Best Regards
Tom Wu



2010/7/20 lumpynifkin 

> This also just came out.  Shows a sample app and how the API will
> work.
>
>
> http://code.google.com/events/io/2010/sessions/building-real-time-apps-app-engine-feed-api.html
>
>
>
> On May 21, 4:18 pm, "Ikai L (Google)"  wrote:
> > Looks like there's a Trusted Tester signup form:
> >
> > https://spreadsheets.google.com/a/google.com/viewform?formkey=dGFxQ1A...
> >
> >  .>Note
> > that this doesn't guarantee we can get you early access.
> >
> > On Fri, May 21, 2010 at 12:41 PM, Ikai L (Google) 
> wrote:
> >
> >
> >
> > > I'd subscribe to our blog as well as keep track of this in the groups:
> >
> > >http://googleappengine.blogspot.com/2010/05/app-engine-at-google-io-2.
> ..
> >
> > > <
> http://googleappengine.blogspot.com/2010/05/app-engine-at-google-io-2..
> .>We
> > > do prerelease SDKs when possible, so keep on the lookout for one that
> does
> > > what you are looking for.
> >
> > > On Thu, May 20, 2010 at 7:12 AM, Backpack 
> wrote:
> >
> > >> I read about the upcoming channel API (comet stuff) on the app engine
> > >> blog. I know it is still in an early stage but anybody has any link to
> > >> any kind of preview?
> >
> > >> Just can't wait...
> >
> > >> --
> > >> 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-appeng...@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.
> >
> > > --
> > > Ikai Lan
> > > Developer Relations, Google App Engine
> > > Twitter:http://twitter.com/ikai
> > > Delicious:http://delicious.com/ikailan
> >
> > > 
> > > Google App Engine links:
> > > Blog:http://googleappengine.blogspot.com
> > > Twitter:http://twitter.com/app_engine
> > > Reddit:http://www.reddit.com/r/appengine
> >
> > --
> > Ikai Lan
> > Developer Relations, Google App Engine
> > Twitter:http://twitter.com/ikai
> > Delicious:http://delicious.com/ikailan
> >
> > 
> > Google App Engine links:
> > Blog:http://googleappengine.blogspot.com
> > Twitter:http://twitter.com/app_engine
> > Reddit:http://www.reddit.com/r/appengine
> >
> > --
> > 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-appeng...@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-appeng...@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-appeng...@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] GAE Datastore low-level API null=empty list=non-existent

2010-07-20 Thread Jeff Schwartz
Entity is an expando and that is indeed the way they work.

On Tue, Jul 20, 2010 at 5:32 AM, Marc Hacker  wrote:

> Surely this is not intended!  Entity.getProperty() gives exactly the
> same result, null, if there is no property, there is a property set to
> null or there is an empty Collection!
>
>
>DatastoreService datastore =
> DatastoreServiceFactory.getDatastoreService();
>Key key = KeyFactory.createKey("testKind", "testKey");
>Entity e = new Entity(key);
>e.setProperty("null", null);
>e.setProperty("emptylist", new ArrayList());
>datastore.put(e);
>try {
>Entity e2 = datastore.get(key);
>System.out.println(e2.getProperty("null")==null);
>
>  System.out.println(e2.getProperty("emptylist")==null);
>
>  System.out.println(e2.getProperty("doesNotExist")==null);
>} catch (EntityNotFoundException exc) {
>exc.printStackTrace();
>}
> Result:
> true
> true
> true
>
> At the very least an empty list should be saved as an empty list no?
>
> --
> 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-appeng...@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.
>
>


-- 
--
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-appeng...@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 application

2010-07-20 Thread Lu
Hi,

I find debugging the web application is quite annoying because we
cannot print message to a file. What's more, sometimes the message is
too long, the console window of elipse will erase the previous
printing message.

Is there a better way to debug the application?

Thanks,
Lu

-- 
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-appeng...@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: Channel API

2010-07-20 Thread lumpynifkin
This also just came out.  Shows a sample app and how the API will
work.

http://code.google.com/events/io/2010/sessions/building-real-time-apps-app-engine-feed-api.html



On May 21, 4:18 pm, "Ikai L (Google)"  wrote:
> Looks like there's a Trusted Tester signup form:
>
> https://spreadsheets.google.com/a/google.com/viewform?formkey=dGFxQ1A...
>
> Note
> that this doesn't guarantee we can get you early access.
>
> On Fri, May 21, 2010 at 12:41 PM, Ikai L (Google)  wrote:
>
>
>
> > I'd subscribe to our blog as well as keep track of this in the groups:
>
> >http://googleappengine.blogspot.com/2010/05/app-engine-at-google-io-2...
>
> > We
> > do prerelease SDKs when possible, so keep on the lookout for one that does
> > what you are looking for.
>
> > On Thu, May 20, 2010 at 7:12 AM, Backpack  wrote:
>
> >> I read about the upcoming channel API (comet stuff) on the app engine
> >> blog. I know it is still in an early stage but anybody has any link to
> >> any kind of preview?
>
> >> Just can't wait...
>
> >> --
> >> 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-appeng...@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.
>
> > --
> > Ikai Lan
> > Developer Relations, Google App Engine
> > Twitter:http://twitter.com/ikai
> > Delicious:http://delicious.com/ikailan
>
> > 
> > Google App Engine links:
> > Blog:http://googleappengine.blogspot.com
> > Twitter:http://twitter.com/app_engine
> > Reddit:http://www.reddit.com/r/appengine
>
> --
> Ikai Lan
> Developer Relations, Google App Engine
> Twitter:http://twitter.com/ikai
> Delicious:http://delicious.com/ikailan
>
> 
> Google App Engine links:
> Blog:http://googleappengine.blogspot.com
> Twitter:http://twitter.com/app_engine
> Reddit:http://www.reddit.com/r/appengine
>
> --
> 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-appeng...@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-appeng...@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] local_db does not exist; cannot store persistent data

2010-07-20 Thread Erencie
I use Google app Engine plugin for Eclipse and managed to make the
"guestbook" demo run successfuly. When I create my own app by
following the code pattern of "guestbook", sth weird happens:

Jul 19, 2010 6:08:46 AM
com.google.appengine.api.datastore.dev.LocalDatastoreService load
INFO: The backing store, D:\Eclipse workspace\TeammateV0.0\war\WEB-INF
\appengine-generated\local_db.bin, does not exist. It will be created.


I noticed that in /war/WEB-INF/appengine-generated folder, there is
only "datastore-indexes-auto.xml", but no "local_db.bin" file exists,
unlike the case in the demo guestbook project.

And I find that I cannot store anything persistent objects, even
though I follow the correct codes in tutorials. However, the whole
thing runs without any errors.


I tried diff configurations in the few xml files, and tried using
transactions as well. I did also closed the persistentFactory. But
nothing changes.

Can anyone help me?Thanks a lot.

-- 
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-appeng...@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] GAE Datastore low-level API null=empty list=non-existent

2010-07-20 Thread Marc Hacker
Surely this is not intended!  Entity.getProperty() gives exactly the
same result, null, if there is no property, there is a property set to
null or there is an empty Collection!


DatastoreService datastore =
DatastoreServiceFactory.getDatastoreService();
Key key = KeyFactory.createKey("testKind", "testKey");
Entity e = new Entity(key);
e.setProperty("null", null);
e.setProperty("emptylist", new ArrayList());
datastore.put(e);
try {
Entity e2 = datastore.get(key);
System.out.println(e2.getProperty("null")==null);
System.out.println(e2.getProperty("emptylist")==null);

System.out.println(e2.getProperty("doesNotExist")==null);
} catch (EntityNotFoundException exc) {
exc.printStackTrace();
}
Result:
true
true
true

At the very least an empty list should be saved as an empty list no?

-- 
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-appeng...@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] Issue with precompilation-enabled java sdk 1.3.5

2010-07-20 Thread Galoch
Hi,

I looked at the release notes of 1.3.1 where it says "Java
Precompilation is now on by default" where as the current
documentation at link [http://code.google.com/appengine/kb/java.html]
says it will be supported in future versions.

I believe, former is true. Reason being, I am unable to deploy
application with default settings in my appengine-web.xml since
deployment fails with 500 internal server error. Has anyone else
noticed it. I have seen this issue pop up after I started using task
queues.
After explicitly turning off precompilation of JSPs, I am able to
deploy but I am not sure what would be the impact on overall app
performance.

Thanks
G

-- 
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-appeng...@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: stuck indexes

2010-07-20 Thread Claude Vedovini
everything's back to normal, forget it :)

On Jul 20, 1:04 pm, Claude Vedovini  wrote:
> Hi,
> It looks like the indexes for my application (id: fbpagewatch) are
> stuck.
> Can someone help with this?
> Thanks in advance,
> C.

-- 
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-appeng...@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] Server Error on code upload

2010-07-20 Thread vivpuri
I have been getting server error while trying to upload code to prod
since 8 AM EST. Anyone else facing this issue? I do have the
derived_file_type: - python_precompiled set in the app.yaml.

-- 
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-appeng...@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: db.get(<10 keys>) vs. ModelType.all().filter(...).fetch(10)

2010-07-20 Thread Blixt
Okay, thanks! Just what I wanted to hear. I guess my benchmark results
were due to randomness then.

/Blixt

On Jul 20, 3:00 pm, "Nick Johnson (Google)" 
wrote:
> Hi Blixt,
>
> Since a query consists of an index scan followed by a batch get, internally,
> the batch get alone should always be faster. One possible exception is if
> you're doing a query that is satisfiable by the primary index - for example,
> querying on a key range, or only by kind with no filters. In these cases,
> performance is likely to be about the same, possibly slightly better for the
> query.
>
> -Nick Johnson
>
>
>
>
>
> On Mon, Jul 19, 2010 at 7:26 PM, Blixt  wrote:
> > I'd like to know the performance difference between db.get()ting with
> > specific keys and getting the same entities using a filter.
>
> > I did a benchmark and using a query appears to be very slightly
> > faster. Are there situations where the performance can differ more?
> > Are there other pitfalls I should watch out for?
>
> > --
> > 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-appeng...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > google-appengine+unsubscr...@googlegroups.com > e...@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 Google Ireland Ltd. ::
> Registered in Dublin, Ireland, Registration Number: 368047
> Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number:
> 368047

-- 
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-appeng...@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] db.get(<10 keys>) vs. ModelType.all().filter(...).fetch(10)

2010-07-20 Thread Nick Johnson (Google)
Hi Blixt,

Since a query consists of an index scan followed by a batch get, internally,
the batch get alone should always be faster. One possible exception is if
you're doing a query that is satisfiable by the primary index - for example,
querying on a key range, or only by kind with no filters. In these cases,
performance is likely to be about the same, possibly slightly better for the
query.

-Nick Johnson

On Mon, Jul 19, 2010 at 7:26 PM, Blixt  wrote:

> I'd like to know the performance difference between db.get()ting with
> specific keys and getting the same entities using a filter.
>
> I did a benchmark and using a query appears to be very slightly
> faster. Are there situations where the performance can differ more?
> Are there other pitfalls I should watch out for?
>
> --
> 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-appeng...@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 Google Ireland Ltd. ::
Registered in Dublin, Ireland, Registration Number: 368047
Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number:
368047

-- 
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-appeng...@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] stuck indexes

2010-07-20 Thread Claude Vedovini
Hi,
It looks like the indexes for my application (id: fbpagewatch) are
stuck.
Can someone help with this?
Thanks in advance,
C.

-- 
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-appeng...@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: NotImplementedError: Only tempfile.TemporaryFile is available for use

2010-07-20 Thread Tim Hoffman
Hi

You should include the stack trace in your post, you don't say where
the error is occurring.

My guess is the library that implements the twitter api is trying to
write to file somewhere,
which you can't do in app engine.

T

On Jul 20, 6:02 pm, pyrocks  wrote:
> I am using twitter Api to send message from my application to Twitter
> profile page after authenticate the user in python.It is giving the
> error like
>
> NotImplementedError: Only tempfile.TemporaryFile is available for use.
>
> My code is like
> 
>
> class MainHandler(webapp.RequestHandler):
>     def get(self):
>         api = twitter.Api(username='twitteruser',
> password='***')
>         status = api.PostUpdate('I love python-twitter!')
>         self.response.out.write("tweet posted %s" % status)
>
> def main():
>   application = webapp.WSGIApplication([('/Tweetmess',
> MainHandler)],
>                                        debug=True)
>   wsgiref.handlers.CGIHandler().run(application)
>
> if __name__ == '__main__':
>   main()
>
> 
>
> Can any body there to help me in  fixing this error?
>
> Thanks and Regards.
>
> Py

-- 
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-appeng...@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] NotImplementedError: Only tempfile.TemporaryFile is available for use

2010-07-20 Thread pyrocks
I am using twitter Api to send message from my application to Twitter
profile page after authenticate the user in python.It is giving the
error like

NotImplementedError: Only tempfile.TemporaryFile is available for use.


My code is like


class MainHandler(webapp.RequestHandler):
def get(self):
api = twitter.Api(username='twitteruser',
password='***')
status = api.PostUpdate('I love python-twitter!')
self.response.out.write("tweet posted %s" % status)


def main():
  application = webapp.WSGIApplication([('/Tweetmess',
MainHandler)],
   debug=True)
  wsgiref.handlers.CGIHandler().run(application)


if __name__ == '__main__':
  main()



Can any body there to help me in  fixing this error?

Thanks and Regards.

Py

-- 
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-appeng...@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] sychronization

2010-07-20 Thread Pieter Coucke
No, this is not possible.

See
http://code.google.com/intl/nl-BE/appengine/docs/java/runtime.html#The_Sandbox

"An App Engine application cannot:
- spawn a sub-process or thread. A web request to an application must be
handled in a single process within a few seconds. Processes that take a very
long time to respond are terminated to avoid overloading the web server."




On Tue, Jul 20, 2010 at 10:09 AM, Lu  wrote:

> Hi,
>
> I'm trying to write some synchronization code to speed up my
> application but GAE seems not support this.
>
> This is the standard java sync class. Am I able to do this if put them
> on the server side?
>
> public class HelloRunnable implements Runnable {
>
>public void run() {
>System.out.println("Hello from a thread!");
>}
>
>public static void main(String args[]) {
>(new Thread(new HelloRunnable())).start();
>}
>
> }
>
>
> Thanks,
> Lu
>
> --
> 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-appeng...@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-appeng...@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] sychronization

2010-07-20 Thread Lu
Hi,

I'm trying to write some synchronization code to speed up my
application but GAE seems not support this.

This is the standard java sync class. Am I able to do this if put them
on the server side?

public class HelloRunnable implements Runnable {

public void run() {
System.out.println("Hello from a thread!");
}

public static void main(String args[]) {
(new Thread(new HelloRunnable())).start();
}

}


Thanks,
Lu

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