[appengine-java] Re: No API environment is registered for this thread

2010-11-10 Thread Didier Durand
Hi Eyal,

Good to know that some GData calls to Analytics may last longer than
the App Engine limit.

Keep us posted!
didier

On Nov 10, 9:57 am, Eyal twoworldsf...@gmail.com wrote:
 Apparently there are some real issues with App Engine and Analytics
 with this timeout error. Check Nick's post 
 in:http://groups.google.com/group/google-analytics-data-export-api/brows...

 btw., I compiled and run the demo application but the timeout still
 exists.

 Eyal

 On Nov 9, 5:01 pm, Didier Durand durand.did...@gmail.com wrote:

  Eyal,

  1) Yes, working directly on App Engine, i.e very close to Google
  Analytics will definitely help in terms of resp time so it may go
  through with no problem.

  3) You could write to App Engine Datastore from the outside via http
  post and the ad hoc servlet responding to those post.

  good luck and let us know

  regards
  didier

  On Nov 9, 12:41 pm, Eyal twoworldsf...@gmail.com wrote:

   Bhim, did you write anything?

   Didier, I tried it but it doesn't work. I think that at this point I
   have three more things to try:

   1. Deploy a Java app and set up a cron job to start it, and hope
   something good happens.

   2. Run the demo app 
   athttp://code.google.com/p/ga-api-java-samples/source/browse/trunk/src/...
   . It seems to be doing exactly what I'm doing but maybe I'm missing
   something.

   3. This one is actually a question: can I get to the application's
   datastore from outside of App Engine? If I can write to from another
   technology altogether my application can work. But I assume that this
   would require using some remote technology, a Web Service maybe, and
   it seems like an overkill for an application that using a traditional
   database and hosting service is conceptually very simple.

   I'm going to post this to the Analytics group as well, and if none of
   the above solutions work I'll have to ditch App Engine. It's
   unfortunate because the technology is super-cool but if I can't get it
   to work, I can't get it to work.

   Thanks,
   Eyal

   On Nov 9, 11:32 am, Didier Durand durand.did...@gmail.com wrote:

Hi Eyal,

Now I get it: you're reaching the URL fetch timeout of App Engine

Readhttp://code.google.com/appengine/docs/java/urlfetch/overview.html#Req...
to get the instructions to set this timeout to see if it's enough for
you to go through.

regards

didier

On Nov 9, 10:23 am, Bhim Khadka khadka.b...@gmail.com wrote:

 On 11/7/10, Eyal twoworldsf...@gmail.com wrote:

  Hi all,

  I'm trying to use JDO in an app engine application on Eclipse. When 
  I
  use a web interface I'm able to make it work just fine. But I need 
  to
  be able to run it as a java application and when I try I get the
  following exception:

  java.lang.NullPointerException: No API environment is registered for
  this thread.
     at
  com.google.appengine.api.datastore.DatastoreApiHelper.getCurrentAppId(Datas
   toreApiHelper.java:
  108)
     at
  com.google.appengine.api.datastore.DatastoreApiHelper.getCurrentAppIdNamesp
   ace(DatastoreApiHelper.java:
  118)
     at com.google.appengine.api.datastore.Query.init(Query.java:87)
     at
  org.datanucleus.store.appengine.query.DatastoreQuery.validate(DatastoreQuer
   y.java:
  649)
     at
  org.datanucleus.store.appengine.query.DatastoreQuery.performExecute(Datasto
   reQuery.java:
  215)
     at
  org.datanucleus.store.appengine.query.JDOQLQuery.performExecute(JDOQLQuery.
   java:
  89)
     at 
  org.datanucleus.store.query.Query.executeQuery(Query.java:1489)
     at org.datanucleus.store.query.Query.executeWithArray(Query.java:
  1371)
     at org.datanucleus.store.query.Query.execute(Query.java:1344)
     at org.datanucleus.jdo.JDOQuery.execute(JDOQuery.java:221)
     at com.eyes.manager.UpdateManager.main(UpdateManager.java:39)

  This is my jdeoconfig.xml, which is generated by the Eclipse plugin:

  ?xml version=1.0 encoding=utf-8?
  jdoconfig xmlns=http://java.sun.com/xml/ns/jdo/jdoconfig;
     xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
     xsi:noNamespaceSchemaLocation=http://java.sun.com/xml/ns/jdo/
  jdoconfig

     persistence-manager-factory name=transactions-optional
         property name=javax.jdo.PersistenceManagerFactoryClass

  value=org.datanucleus.store.appengine.jdo.DatastoreJDOPersistenceManagerFa
   ctory/

         property name=javax.jdo.option.ConnectionURL
  value=appengine/
         property name=javax.jdo.option.NontransactionalRead
  value=true/
         property name=javax.jdo.option.NontransactionalWrite
  value=true/
         property name=javax.jdo.option.RetainValues value=true/
         property 
  name=datanucleus.appengine.autoCreateDatastoreTxns
  value=true/
     

[appengine-java] Re: No API environment is registered for this thread

2010-11-10 Thread Eyal
Apparently there are some real issues with App Engine and Analytics
with this timeout error. Check Nick's post in:
http://groups.google.com/group/google-analytics-data-export-api/browse_thread/thread/3f9956a25d718b59

btw., I compiled and run the demo application but the timeout still
exists.

Eyal

On Nov 9, 5:01 pm, Didier Durand durand.did...@gmail.com wrote:
 Eyal,

 1) Yes, working directly on App Engine, i.e very close to Google
 Analytics will definitely help in terms of resp time so it may go
 through with no problem.

 3) You could write to App Engine Datastore from the outside via http
 post and the ad hoc servlet responding to those post.

 good luck and let us know

 regards
 didier

 On Nov 9, 12:41 pm, Eyal twoworldsf...@gmail.com wrote:







  Bhim, did you write anything?

  Didier, I tried it but it doesn't work. I think that at this point I
  have three more things to try:

  1. Deploy a Java app and set up a cron job to start it, and hope
  something good happens.

  2. Run the demo app 
  athttp://code.google.com/p/ga-api-java-samples/source/browse/trunk/src/...
  . It seems to be doing exactly what I'm doing but maybe I'm missing
  something.

  3. This one is actually a question: can I get to the application's
  datastore from outside of App Engine? If I can write to from another
  technology altogether my application can work. But I assume that this
  would require using some remote technology, a Web Service maybe, and
  it seems like an overkill for an application that using a traditional
  database and hosting service is conceptually very simple.

  I'm going to post this to the Analytics group as well, and if none of
  the above solutions work I'll have to ditch App Engine. It's
  unfortunate because the technology is super-cool but if I can't get it
  to work, I can't get it to work.

  Thanks,
  Eyal

  On Nov 9, 11:32 am, Didier Durand durand.did...@gmail.com wrote:

   Hi Eyal,

   Now I get it: you're reaching the URL fetch timeout of App Engine

   Readhttp://code.google.com/appengine/docs/java/urlfetch/overview.html#Req...
   to get the instructions to set this timeout to see if it's enough for
   you to go through.

   regards

   didier

   On Nov 9, 10:23 am, Bhim Khadka khadka.b...@gmail.com wrote:

On 11/7/10, Eyal twoworldsf...@gmail.com wrote:

 Hi all,

 I'm trying to use JDO in an app engine application on Eclipse. When I
 use a web interface I'm able to make it work just fine. But I need to
 be able to run it as a java application and when I try I get the
 following exception:

 java.lang.NullPointerException: No API environment is registered for
 this thread.
    at
 com.google.appengine.api.datastore.DatastoreApiHelper.getCurrentAppId(Datas
  toreApiHelper.java:
 108)
    at
 com.google.appengine.api.datastore.DatastoreApiHelper.getCurrentAppIdNamesp
  ace(DatastoreApiHelper.java:
 118)
    at com.google.appengine.api.datastore.Query.init(Query.java:87)
    at
 org.datanucleus.store.appengine.query.DatastoreQuery.validate(DatastoreQuer
  y.java:
 649)
    at
 org.datanucleus.store.appengine.query.DatastoreQuery.performExecute(Datasto
  reQuery.java:
 215)
    at
 org.datanucleus.store.appengine.query.JDOQLQuery.performExecute(JDOQLQuery.
  java:
 89)
    at org.datanucleus.store.query.Query.executeQuery(Query.java:1489)
    at org.datanucleus.store.query.Query.executeWithArray(Query.java:
 1371)
    at org.datanucleus.store.query.Query.execute(Query.java:1344)
    at org.datanucleus.jdo.JDOQuery.execute(JDOQuery.java:221)
    at com.eyes.manager.UpdateManager.main(UpdateManager.java:39)

 This is my jdeoconfig.xml, which is generated by the Eclipse plugin:

 ?xml version=1.0 encoding=utf-8?
 jdoconfig xmlns=http://java.sun.com/xml/ns/jdo/jdoconfig;
    xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
    xsi:noNamespaceSchemaLocation=http://java.sun.com/xml/ns/jdo/
 jdoconfig

    persistence-manager-factory name=transactions-optional
        property name=javax.jdo.PersistenceManagerFactoryClass

 value=org.datanucleus.store.appengine.jdo.DatastoreJDOPersistenceManagerFa
  ctory/

        property name=javax.jdo.option.ConnectionURL
 value=appengine/
        property name=javax.jdo.option.NontransactionalRead
 value=true/
        property name=javax.jdo.option.NontransactionalWrite
 value=true/
        property name=javax.jdo.option.RetainValues value=true/
        property name=datanucleus.appengine.autoCreateDatastoreTxns
 value=true/
    /persistence-manager-factory
 /jdoconfig

 Any idea how can I solve this? How do I register the API
 Environment?

 Thanks!

Bhim Bdr. Khadka
Lalrakshak Prakashan Pvt. Ltd
Phone: 01 4111974
Mobile No: 981096073

-- 
You received this message because you are subscribed to 

[appengine-java] How to write a JPA unit test for GAE?

2010-11-10 Thread lp
hi all,

i have been attempting to convert my existing JPA code over to GAE.

All is working so far except for the unit tests.

i read
code.google.com/appengine/docs/java/tools/localunittesting.html

but it doesnt describe how to get an entityManager involved in usefull
unit tests.

so this is my test. please advise how to achieve the functionality in
this test.

@Test
public void findFriendsSimple() {



PositionUser user1 = new PositionUser();
user1.setFirstName(john);
user1.setLastName(smith);

PositionUser user2 = new PositionUser();
user2.setFirstName(mary);
user2.setLastName(smith);

PositionUser user3 = new PositionUser();
user3.setFirstName(barney);
user3.setLastName(smith);

em.persist(user2);
em.persist(user3);
//em.flush(); --- can use flush for non transaction test

user1.getFriends().add(user2.getKey());
user1.getFriends().add(user3.getKey());

em.persist(user1);
//em.flush(); --- can use flush for non transaction test

Query query = em.createNamedQuery(PositionUser.FIND_FRIENDS);
query.setParameter(userKey, user1.getKey());
List resultList = query.getResultList();
assertEquals( 2, resultList.size() );

}

the assert is triggered
java.lang.AssertionError: expected:2 but was:0

this is because the entitymanager wont detect the persisted entities
that arent in a transaction.

ok no problem, i will add transactions.

But when i do it complains that i am adding multiple groups in a single
transaction.

So besides the simple gae sample unit test, how are others writting
useful unit tests in gae?

any help is most appreciated

-lp

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



[appengine-java] Re: How to write a JPA unit test for GAE?

2010-11-10 Thread Didier Durand
Hi,

Entities that you persist in the datastore are grouped in so called
entity groups for reason of scalability and transactionality

That means that the ds groups your entities on various data servers
according to their keys: this mechanism is not transparent - it
generates the exception that you encounter when you touch entities
belonging to more than 1 group in a single transaction.

This mechanism is specific to GAE: it means that it is not transparent
when you migrate the source code an already existing JPA app. You may
have to rethink your data architecture and modify code accordingly.

You should read the dev docs and articles:

1) 
http://code.google.com/appengine/docs/python/datastore/keysandentitygroups.html#Entity_Groups_Ancestors_and_Paths

2) http://code.google.com/appengine/docs/java/datastore/transactions.html

3) 
http://blog.dantup.com/2010/01/app-engine-entity-groups-contention-and-transactions

4) http://hoangle.info/2010/08/01/datastore-in-google-app-engine-entity-groups/

hope it helps



On Nov 10, 10:37 am, lp lucio.picc...@gmail.com wrote:
 hi all,

 i have been attempting to convert my existing JPA code over to GAE.

 All is working so far except for the unit tests.

 i read
 code.google.com/appengine/docs/java/tools/localunittesting.html

 but it doesnt describe how to get an entityManager involved in usefull
 unit tests.

 so this is my test. please advise how to achieve the functionality in
 this test.

 @Test
 public void findFriendsSimple() {

 PositionUser user1 = new PositionUser();
 user1.setFirstName(john);
 user1.setLastName(smith);

 PositionUser user2 = new PositionUser();
 user2.setFirstName(mary);
 user2.setLastName(smith);

 PositionUser user3 = new PositionUser();
 user3.setFirstName(barney);
 user3.setLastName(smith);

 em.persist(user2);
 em.persist(user3);
 //em.flush(); --- can use flush for non transaction test

 user1.getFriends().add(user2.getKey());
 user1.getFriends().add(user3.getKey());

 em.persist(user1);
 //em.flush(); --- can use flush for non transaction test

 Query query = em.createNamedQuery(PositionUser.FIND_FRIENDS);
 query.setParameter(userKey, user1.getKey());
 List resultList = query.getResultList();
 assertEquals( 2, resultList.size() );

 }

 the assert is triggered
 java.lang.AssertionError: expected:2 but was:0

 this is because the entitymanager wont detect the persisted entities
 that arent in a transaction.

 ok no problem, i will add transactions.

 But when i do it complains that i am adding multiple groups in a single
 transaction.

 So besides the simple gae sample unit test, how are others writting
 useful unit tests in gae?

 any help is most appreciated

 -lp

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



[appengine-java] Re: why Google Instant Previews works with ajax? .. and still they dont crawl ajax sites?

2010-11-10 Thread timwhunt
Actually, it's pretty understandable that these two things are
different.  The process is related, but different enough that it's
reasonable they handle it differently.

The instant preview loads the page in a browser (perhaps a specially
modified browser embedded in another application), and then it takes a
screen shot from the display.

Its significantly different when crawling the page.  There after
rendering the page in this 'browser', you have to pull out the
resulting equivalent HTML text so the crawling text processor can do
its thing.  That's not beyond Google's capabilities, but solving the
instant preview problem does not solve the crawling 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-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Re: mapreduce - passing filters

2010-11-10 Thread Nacho Coloma
Is there any option to contribute to this project? I am using hacks to
do the filtering, and it seems easy to implement.

I would love to discuss things first, but appengine-mapreduce seems
like a read-only project to me. It's fine but I would like to help it
move forward.

On Nov 8, 10:11 pm, Ikai Lan (Google) ikai.l+gro...@google.com
wrote:
 There was talk about supporting it, but the priority is getting out the
 shuffle/reduce steps first.

 appengine-mapreduce is an open source project. You can probably just
 edit/subclass DatastoreInputFormat.java and add the filter functionality:

 http://www.google.com/codesearch/p?hl=en#XwsseYUY0Ps/trunk/java/src/c...

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







 On Mon, Nov 8, 2010 at 12:28 PM, Brad bseef...@finallythebasics.com wrote:
  Ikai,

  Are there any plans to support filter functionality in the future? I
  have a similar situation where I want to iterate over a collection
  that is big enough to be used by the mapper framework, but much
  smaller than the actual collection size of all entities of that kind.

  Brad

  On Nov 8, 11:56 am, Ikai Lan (Google) 
  ikai.l+gro...@google.comikai.l%2bgro...@google.com

  wrote:
   No, the mapper will go over everything. If the number of entities is
  small,
   you are better off placing an indexed property on ONLY these fields, then
   just iterating over them with a cursor and either a local client making
   multiple HTTP calls to your App Engine app or chained task queues.

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

   On Sun, Nov 7, 2010 at 5:58 AM, aswath satrasala 
  aswath.satras...@gmail.com

wrote:
Hello,
I want to perform few aggregations on entities of a kind that are
  filtered
by the property.
The entities I want to perform the aggregation is small compared to the
complete entity set.
Is there any way to pass the filters to the mapper, so that only those
entities are retrieved and aggregation is performed

*Regards
-Aswath
   http://vs-accounting.appspot.com
Accounting for Indian markets.*

--
You received this message because you are subscribed to the Google
  Groups
Google App Engine for Java group.
To post to this group, send email to
google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to
google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2B
 unsubscr...@googlegroups.comgoogle-appengine-java%2B
  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-j...@googlegroups.com.
  To unsubscribe from this group, send email to
  google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2B 
  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-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] JDO: Reorder owned list relationship

2010-11-10 Thread Tobias
Hello,

I am trying to use a JDO based model in conjunction with GWT's new
RequestFactoryServlet. My (example) application edits Recipes, a
Recipe owns a list of Ingredients:

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

[...]

@Persistent
@Element(dependent = false)
private ListIngredient ingredients;

[...]


public ListIngredient getIngredients() {
return this.ingredients;
}

public void setIngredients(ListIngredient ingredients) {
this.ingredients.clear();
this.ingredients.addAll(ingredients);
}

[...]

}


The RequestFactoryServlet will call setIngredients() with an updated
list of ingredients, where some new Ingredients might be included, or
the order of the elements might have changed.
Here's the problem however: The clear() call leads to JDO marking the
elements persistent-deleted and the addAll does not revert that, even
though I tried disabling the dependent-Option. Apparently, as soon
as I take something out of this owned list-relationship, it gets
removed from the persistence, which seems to make it impossible to re-
order the list. Why is that, and is there a way to work around it?

Thanks,
Tobias

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



[appengine-java] Re: Only have 3/10 apps but cannot add another!

2010-11-10 Thread SimonH
 SOLVED 
I reported the issue on the SMS issues form  got an auto-reply saying
my account has been activated.
All seems to work fine now!

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



Re: [appengine-java] Re: mapreduce - passing filters

2010-11-10 Thread Maxim Veksler
Don't think Google would mind if you submit a patch, you have the source
code under SVN available from here
http://code.google.com/p/appengine-mapreduce/source/browse/

On Wed, Nov 10, 2010 at 6:08 PM, Nacho Coloma icol...@gmail.com wrote:

 Is there any option to contribute to this project? I am using hacks to
 do the filtering, and it seems easy to implement.

 I would love to discuss things first, but appengine-mapreduce seems
 like a read-only project to me. It's fine but I would like to help it
 move forward.

 On Nov 8, 10:11 pm, Ikai Lan (Google) 
 ikai.l+gro...@google.comikai.l%2bgro...@google.com
 
 wrote:
  There was talk about supporting it, but the priority is getting out the
  shuffle/reduce steps first.
 
  appengine-mapreduce is an open source project. You can probably just
  edit/subclass DatastoreInputFormat.java and add the filter functionality:
 
  http://www.google.com/codesearch/p?hl=en#XwsseYUY0Ps/trunk/java/src/c...
 
  --
  Ikai Lan
  Developer Programs Engineer, Google App Engine
  Blogger:http://googleappengine.blogspot.com
  Reddit:http://www.reddit.com/r/appengine
  Twitter:http://twitter.com/app_engine
 
 
 
 
 
 
 
  On Mon, Nov 8, 2010 at 12:28 PM, Brad bseef...@finallythebasics.com
 wrote:
   Ikai,
 
   Are there any plans to support filter functionality in the future? I
   have a similar situation where I want to iterate over a collection
   that is big enough to be used by the mapper framework, but much
   smaller than the actual collection size of all entities of that kind.
 
   Brad
 
   On Nov 8, 11:56 am, Ikai Lan (Google) 
   ikai.l+gro...@google.comikai.l%2bgro...@google.com
 ikai.l%2bgro...@google.com ikai.l%252bgro...@google.com
 
   wrote:
No, the mapper will go over everything. If the number of entities is
   small,
you are better off placing an indexed property on ONLY these fields,
 then
just iterating over them with a cursor and either a local client
 making
multiple HTTP calls to your App Engine app or chained task queues.
 
--
Ikai Lan
Developer Programs Engineer, Google App Engine
Blogger:http://googleappengine.blogspot.com
Reddit:http://www.reddit.com/r/appengine
Twitter:http://twitter.com/app_engine
 
On Sun, Nov 7, 2010 at 5:58 AM, aswath satrasala 
   aswath.satras...@gmail.com
 
 wrote:
 Hello,
 I want to perform few aggregations on entities of a kind that are
   filtered
 by the property.
 The entities I want to perform the aggregation is small compared to
 the
 complete entity set.
 Is there any way to pass the filters to the mapper, so that only
 those
 entities are retrieved and aggregation is performed
 
 *Regards
 -Aswath
http://vs-accounting.appspot.com
 Accounting for Indian markets.*
 
 --
 You received this message because you are subscribed to the Google
   Groups
 Google App Engine for Java group.
 To post to this group, send email to
 google-appengine-j...@googlegroups.com.
 To unsubscribe from this group, send email to
 google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.comgoogle-appengine-java%2B
 unsubscr...@googlegroups.comgoogle-appengine-java%2B
   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-j...@googlegroups.com.
   To unsubscribe from this group, send email to
   google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.comgoogle-appengine-java%2B
 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-j...@googlegroups.com.
 To unsubscribe from this group, send email to
 google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/google-appengine-java?hl=en.



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



[appengine-java] Re: Initializing DataStore with minimal required values

2010-11-10 Thread Starman
I created a datastore manipulation service that can execute, using the
task queue service, pieces of code found in 'plugins'. I have plugins
for the initial sourcing and some others to create test and demo
data.

I favor this approach over the bulk uploader as you need to also
prepare for the task of upgrading the datamodel and source data of a
live app. So, I deploy new app versions with new plugins and remove
some from the app code when their job is done.

A good usecase would be adding a field to all entities of a given
type, with this field value determine from some other piece of related
data.

R.

On Nov 9, 11:39 pm, Didier Durand durand.did...@gmail.com wrote:
 Hi,

 you can either use bulkloader 
 (seehttp://ikaisays.com/2010/06/10/using-the-bulkloader-with-java-app-eng...)
 or just write the code needed to store your date in the datastore (i.e
 to create the appropriate entities with their values)
 regards
 didier

 On Nov 9, 8:40 pm, Blaise Gervais gervai...@gmail.com wrote:



  Helo everyone,

  I wonder about how to initialize the datastore (in Dev mode and on GAE)
  with some required values. How can I insert entities required for my
  app like the root user or the menu structure, or anything other ?

  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-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Auto generating datastore-indexes.xml during unit tests

2010-11-10 Thread gholler
Is it possible to auto-generate the datastore-indexes.xml while
running JUnit tests that use the LocalServiceTestHelper (with
LocalDatastoreServiceTestConfig)?
It seems like it would be great to have the file automatically
generated and then deployed with maven.
Unfortunately I don't see the file being generated.

Thanks,
George

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



[appengine-java] Re: How to write a JPA unit test for GAE?

2010-11-10 Thread lp
thanks for the detailed response didier.

the layout of the entities is fine, as transactions are not used in
the application itself, but as a artefact for unit testing.
i only placed the unit tests into a transaction for the purposes of
flushing the to entityManager.

since txn dont work for multiple entities how can i structure my unit
tests to ensure that the entity manager can perform a query on
populated data?

ie.

@Test
public void mytest(){

//populate ds with data... some how ??

Query query = em.createNamedQuery(PositionUser.FIND_FRIENDS)
List resultList = query.getResultList();
assertEquals( 2, resultList.size() );

}


thanks

-lp
On Nov 10, 8:44 pm, Didier Durand durand.did...@gmail.com wrote:
 Hi,

 Entities that you persist in the datastore are grouped in so called
 entity groups for reason of scalability and transactionality

 That means that the ds groups your entities on various data servers
 according to their keys: this mechanism is not transparent - it
 generates the exception that you encounter when you touch entities
 belonging to more than 1 group in a single transaction.

 This mechanism is specific to GAE: it means that it is not transparent
 when you migrate the source code an already existing JPA app. You may
 have to rethink your data architecture and modify code accordingly.

 You should read the dev docs and articles:

 1)http://code.google.com/appengine/docs/python/datastore/keysandentityg...

 2)http://code.google.com/appengine/docs/java/datastore/transactions.html

 3)http://blog.dantup.com/2010/01/app-engine-entity-groups-contention-an...

 4)http://hoangle.info/2010/08/01/datastore-in-google-app-engine-entity-...

 hope it helps

 On Nov 10, 10:37 am, lp lucio.picc...@gmail.com wrote:

  hi all,

  i have been attempting to convert my existing JPA code over to GAE.

  All is working so far except for the unit tests.

  i read
  code.google.com/appengine/docs/java/tools/localunittesting.html

  but it doesnt describe how to get an entityManager involved in usefull
  unit tests.

  so this is my test. please advise how to achieve the functionality in
  this test.

  @Test
  public void findFriendsSimple() {

  PositionUser user1 = new PositionUser();
  user1.setFirstName(john);
  user1.setLastName(smith);

  PositionUser user2 = new PositionUser();
  user2.setFirstName(mary);
  user2.setLastName(smith);

  PositionUser user3 = new PositionUser();
  user3.setFirstName(barney);
  user3.setLastName(smith);

  em.persist(user2);
  em.persist(user3);
  //em.flush(); --- can use flush for non transaction test

  user1.getFriends().add(user2.getKey());
  user1.getFriends().add(user3.getKey());

  em.persist(user1);
  //em.flush(); --- can use flush for non transaction test

  Query query = em.createNamedQuery(PositionUser.FIND_FRIENDS);
  query.setParameter(userKey, user1.getKey());
  List resultList = query.getResultList();
  assertEquals( 2, resultList.size() );

  }

  the assert is triggered
  java.lang.AssertionError: expected:2 but was:0

  this is because the entitymanager wont detect the persisted entities
  that arent in a transaction.

  ok no problem, i will add transactions.

  But when i do it complains that i am adding multiple groups in a single
  transaction.

  So besides the simple gae sample unit test, how are others writting
  useful unit tests in gae?

  any help is most appreciated

  -lp

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



[appengine-java] Re: GAE or EC2

2010-11-10 Thread jacek.ambroziak
Ikai,

I do not think you really addressed JY's pain, which I also share.
Some of us have invested a lot of time and energy into building
GAE-based services. We would like to move to production stage
but frequent denials of service make our applications look bad
to customers.
Also, for what I am trying to do,

1) I need more than 10 applications
2) more space for static files in WARs
3) more memory (quite often I run into OutOfMemory errors)
4) and of course fewer cold starts or 500 errors

I really like GAE's APIs, tools and dashboard
but I find it *difficult to deliver* a service
that I need to host in the Cloud
based on GAE's current reality.

GAE is developer friendly (modulo all the contortions
we need to go through when, say, a data chunk is 1.2 MB),
but as far as production goes ... well ... :-(

Is there a hope for us on the horizon
or do we have to bite the bullet and migrate elsewhere?

PS. For some apps (I do have an Android news app which
preparses Reuters news on GAE and serves binary XML
to Android) I never had any issues; the app does not
need much memory or data to work, and it hardly uses
the datastore) -- so for some small apps things work
just great. More demanding services do run into walls
unfortunately.


On Nov 8, 9:50 pm, Ikai Lan (Google) ikai.l+gro...@google.com
wrote:
 I'm biased, naturally, but here's my piece:

 They're both great, young platforms, and successful businesses have been
 built on both Google App Engine as well as Amazon EC2. Amazon's lower level
 access appeals to some, whereas Google App Engine's abstractions appeal to
 the folks in this group.

 Have you actually used EC2 before? If not, new accounts can sign up for a
 free micro instance. You'll want to check this out before you make any
 decisions. Since you're already looking at EC2, why not look at VPS
 solutions? I personally prefer a provider such as Slicehost or Linode to EC2
 for anything I can't currently do on Google App Engine.

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







 On Mon, Nov 8, 2010 at 5:59 PM, JY jy2...@gmail.com wrote:
  I want to ask fellow GAE users whether you think GAE is good choice to
  build real business on?
  I have used GAE for some personal projects, and right now help a
  friend on a tiny start up (but with big dream). The project is related
  to social network - I am thinking of two options:
  1, GAE
  The benefits are obvious. However, it is also locking you inyou
  don't have much control over it. If you are unhappy later, you will
  have to redo the persistence layer and migrate data etc.
  2, EC2
  You have much more control, and if the start-up gets funding, it is
  easy to migrate to dedicated hosting or even its own data center. The
  down side is developer (me, and only me) will have to spend quite some
  time to take care of the infrastructure (although I like this kind of
  work...)

  I think my biggest concern of GAE is over the quality of service, and
  the data-store - if I go EC2, I probably will use a NoSQL solution
  like MogoDb, or Cassandra. The development efforts might be similar -
  all products are sort of young, hot, and limited.

  Thanks.

  JY

  --
  You received this message because you are subscribed to the Google Groups
  Google App Engine for Java group.
  To post to this group, send email to
  google-appengine-j...@googlegroups.com.
  To unsubscribe from this group, send email to
  google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2B 
  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-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Re: Auto generating datastore-indexes.xml during unit tests

2010-11-10 Thread Didier Durand
Hi George,

Did you follow the instructions of
http://code.google.com/appengine/docs/java/config/indexconfig.html#Using_Automatic_Index_Configuration
?

That should be the answer to your question
regards
didier

On Nov 10, 8:26 pm, gholler georgehol...@gmail.com wrote:
 Is it possible to auto-generate the datastore-indexes.xml while
 running JUnit tests that use the LocalServiceTestHelper (with
 LocalDatastoreServiceTestConfig)?
 It seems like it would be great to have the file automatically
 generated and then deployed with maven.
 Unfortunately I don't see the file being generated.

 Thanks,
 George

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



[appengine-java] Re: How to write a JPA unit test for GAE?

2010-11-10 Thread Didier Durand
Hi,

Instead of flushing, did you try a PersistenceManager.close() that
should lead to the same effect ? After the close, you get a new pm via
the PMF and that should do it.

regards
didier

On Nov 10, 10:57 pm, lp lucio.picc...@gmail.com wrote:
 thanks for the detailed response didier.

 the layout of the entities is fine, as transactions are not used in
 the application itself, but as a artefact for unit testing.
 i only placed the unit tests into a transaction for the purposes of
 flushing the to entityManager.

 since txn dont work for multiple entities how can i structure my unit
 tests to ensure that the entity manager can perform a query on
 populated data?

 ie.

 @Test
 public void mytest(){

 //populate ds with data... some how ??

 Query query = em.createNamedQuery(PositionUser.FIND_FRIENDS)
 List resultList = query.getResultList();
 assertEquals( 2, resultList.size() );

 }

 thanks

 -lp
 On Nov 10, 8:44 pm, Didier Durand durand.did...@gmail.com wrote:

  Hi,

  Entities that you persist in the datastore are grouped in so called
  entity groups for reason of scalability and transactionality

  That means that the ds groups your entities on various data servers
  according to their keys: this mechanism is not transparent - it
  generates the exception that you encounter when you touch entities
  belonging to more than 1 group in a single transaction.

  This mechanism is specific to GAE: it means that it is not transparent
  when you migrate the source code an already existing JPA app. You may
  have to rethink your data architecture and modify code accordingly.

  You should read the dev docs and articles:

  1)http://code.google.com/appengine/docs/python/datastore/keysandentityg...

  2)http://code.google.com/appengine/docs/java/datastore/transactions.html

  3)http://blog.dantup.com/2010/01/app-engine-entity-groups-contention-an...

  4)http://hoangle.info/2010/08/01/datastore-in-google-app-engine-entity-...

  hope it helps

  On Nov 10, 10:37 am, lp lucio.picc...@gmail.com wrote:

   hi all,

   i have been attempting to convert my existing JPA code over to GAE.

   All is working so far except for the unit tests.

   i read
   code.google.com/appengine/docs/java/tools/localunittesting.html

   but it doesnt describe how to get an entityManager involved in usefull
   unit tests.

   so this is my test. please advise how to achieve the functionality in
   this test.

   @Test
   public void findFriendsSimple() {

   PositionUser user1 = new PositionUser();
   user1.setFirstName(john);
   user1.setLastName(smith);

   PositionUser user2 = new PositionUser();
   user2.setFirstName(mary);
   user2.setLastName(smith);

   PositionUser user3 = new PositionUser();
   user3.setFirstName(barney);
   user3.setLastName(smith);

   em.persist(user2);
   em.persist(user3);
   //em.flush(); --- can use flush for non transaction test

   user1.getFriends().add(user2.getKey());
   user1.getFriends().add(user3.getKey());

   em.persist(user1);
   //em.flush(); --- can use flush for non transaction test

   Query query = em.createNamedQuery(PositionUser.FIND_FRIENDS);
   query.setParameter(userKey, user1.getKey());
   List resultList = query.getResultList();
   assertEquals( 2, resultList.size() );

   }

   the assert is triggered
   java.lang.AssertionError: expected:2 but was:0

   this is because the entitymanager wont detect the persisted entities
   that arent in a transaction.

   ok no problem, i will add transactions.

   But when i do it complains that i am adding multiple groups in a single
   transaction.

   So besides the simple gae sample unit test, how are others writting
   useful unit tests in gae?

   any help is most appreciated

   -lp

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



[appengine-java] Re: How to write a JPA unit test for GAE?

2010-11-10 Thread lp

 Instead of flushing, did you try a PersistenceManager.close() that
 should lead to the same effect ? After the close, you get a new pm via
 the PMF and that should do it.

i dunno if i can do that so easily as the entityManager is injected by
spring.

i have a very very very simple example that doesnt not work under gae/
spring.

what do i need to get this to work under gae?

this test case *works* fine under hibernate but fails with gae with a
assert after the query.

any ideas?

@SuppressWarnings(unchecked)
@Test
public void findUserSimple() {
PositionUser user1 = new PositionUser();
user1.setFirstName(john);
user1.setLastName(smith);
user1.setFacebook(11);
em.persist(user1);
em.refresh(user1);
System.out.println( key: + user1.getKey());
PositionUser find = em.find(PositionUser.class, user1.getKey());
assertNotNull(find);

Query query = em.createQuery(Select p from PositionUser p where
p.firstName=:firstname);
query.setParameter(firstname, user1.getFirstName());
List resultList = query.getResultList();
assertEquals( 1, resultList.size() ); --- assert fails here

}

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



[appengine-java] Queue/Task service: different behavior between Dev and GAE

2010-11-10 Thread Didier Durand
Hi,

The queue service as use in junit test below behaves differently
between Dev and Prod on Gaej: the exception message is slightly
different.

On gaej, the message doesn't give the queue name used but Unknown:
see if/then/code. It's less precise so harder for debugging on
production. I would appreciate if the prod env also gave the name of
the wrong queue.

a) Can somebody run my code on its side and that he sees same
behavior ?

b) Shoud I open an issue for this ?

regards
didier

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



[appengine-java] Re: Queue/Task service: different behavior between Dev and GAE

2010-11-10 Thread Didier Durand
Forgot source code: here it is

   @Test
public void testInvalidQueue() {
Queue queue = QueueFactory.getQueue(foo);
try {
queue.add();
fail();
} catch (IllegalStateException e) {
if (Util.runningOnGaej() == true) {
assertEquals(The specified queue is unknown : 
Unknown,
e.getMessage());
} else {
assertEquals(The specified queue is unknown : 
foo,
e.getMessage());
}
}
}

On Nov 11, 6:17 am, Didier Durand durand.did...@gmail.com wrote:
 Hi,

 The queue service as use in junit test below behaves differently
 between Dev and Prod on Gaej: the exception message is slightly
 different.

 On gaej, the message doesn't give the queue name used but Unknown:
 see if/then/code. It's less precise so harder for debugging on
 production. I would appreciate if the prod env also gave the name of
 the wrong queue.

 a) Can somebody run my code on its side and that he sees same
 behavior ?

 b) Shoud I open an issue for this ?

 regards
 didier

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



[appengine-java] Session GAE

2010-11-10 Thread idnoob
Hi all!
Session enable in eclipse but error happen in GAE.
I know that GAE has session disable, how to enable session with GAE?
Many 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-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



Re: [google-appengine] Re: Index problem with GAE for Java

2010-11-10 Thread Jeff Schwartz
Sorry, I didn't realize at first that you were using jdo and so you are
correct, jdo will require package names for the pojo entity. However, you
might want to rethink using that particular geomodel implementation if it
requires jdo and select one that allows you more flexibility in you
architecture. Using JDO with the data store is like trying to fit a square
peg into a round hole; you might eventually get it in but it imposes a
paradigm that doesn't match the underlying architecture of the data store.
Just my opinion of course but getting your library stack right will make a
big difference through out the life of your project.

Jeff

On Tue, Nov 9, 2010 at 3:27 PM, Rmac rony...@gmail.com wrote:

 Using Java and JDO.  The package path is needed... fails without
 that.  As I said earlier, it will work if I remove the where clause
 (or use a different property) so I am able to connect to the datastore
 and pull data.  I can even look at the data from the Admin console so
 it is there and accessible.  I just can't seem to get some query
 related indexes to work.

 I've been all OVER the Google docs researching this... it's a bit
 convoluted and you have to piece information together from several
 places.

 I originally didn't want to use either JDO or JPA, but am using the
 open source geomodel software to do a proximity search on geo-
 coordinates in the data and that code requires JDO.

 Frustrating that something so simple can be so difficult.

 Thanks for your ideas.



 On Nov 9, 1:59 pm, Jeff Schwartz jefftschwa...@gmail.com wrote:
  Should have asked what language you are using (Java or  Python) as well
 as
  if you are using jdo/jpa etc.
 
  The entity type you are querying - myPackage.HospitalData - is the
  'myPackage' part a package name? If so, why? The datastore doesn't know
  about packages, it only knows about Entity types which are named.
 
  When you go into either production or dev console can you see the
 entities
  you are querying for? The name they are listed under is their entity type
  and that is the name you should use in your queries.
 
  Google's datastore docs are very good  provide a lot of information
 about
  querying  indexes.
 
  If you are using JPA/JDO (that's assuming you are using Java) along with
  datanucleus may I suggest you don't because the datastore is not SQL
 which
  these 2 technologies are really geared towards and only serve IMO at
 least
  to confuse the issue. Look into replacing it with a datastore centric
 ORM. I
  personally use Objectify  I swear by it.
 
  Jeff
 
 
 
  On Tue, Nov 9, 2010 at 2:30 PM, Rmac rony...@gmail.com wrote:
   Nope, that throws a different error:  Identifier expected at character
   1 in *
 
   On Nov 9, 10:43 am, Jeff Schwartz jefftschwa...@gmail.com wrote:
Try:
 
select * from HospitalData where Version = '1' order by Hospital_Name
 asc
 
Jeff
 
On Tue, Nov 9, 2010 at 11:16 AM, Rmac rony...@gmail.com wrote:
 Thanks Jeff... here you go...
 
 *The string query supplied to the Query: *
 
 select from myPackage.HospitalData where Version == '1' order by
   Hospital_Name asc
 
 *The GAE response:*
 no matching index found..  datastore-index kind=HospitalData
   ancestor=false source=manual
 property name=Version direction=asc/
 property name=Hospital_Name direction=asc/
 /datastore-index
 
 *Those entries are in the datastore-indexes.xml file and show up on
 the
   admin console as below:*
 HospitalData
 Version ▲,Hospital_Name▲,City▲,State▲,ZIP_Code▲,Hospital_Type▲
 
 If I leave off the where Version == '1' the query works (or if I
 use
   Hospital_Name in the where instead).  Currently, all entities have a
   property value of 1 for Version.  This shouldn't be so difficult to
 figure
   out for a simple example like this!
 
 Thanks for any feedback.
 
  --
 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.comgoogle-appengine%2bunsubscr...@googlegroups.com
 google-appengine%2bunsubscr...@googlegroups.comgoogle-appengine%252bunsubscr...@googlegroups.com
 
   google-appengine%2bunsubscr...@googlegroups.comgoogle-appengine%252bunsubscr...@googlegroups.com
 google-appengine%252bunsubscr...@googlegroups.comgoogle-appengine%25252bunsubscr...@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-appengine@googlegroups.com
 .
   To unsubscribe from this group, send email to
   

[google-appengine] Re: RequestTooLargeError

2010-11-10 Thread mattbeedle
Ok, I see, I thought that fetch was just a straight forward HTTP POST,
but now looking at the documentation I see that is part of the
appengine python API (I'm not a python programmer).  Thanks for the
email limits link.  So, that's the first part of my question answered,
I definitely now understand the problem.  It would be really great if
someone could suggest me a way around this issue now.  Maybe I can
just use httplib to post directly?

Thanks,

Matt

On Nov 8, 7:17 pm, Robert Kluin robert.kl...@gmail.com wrote:
 Sorry, but re-read the bullet point about the size limit increases.
 Specifically the last sentence:
    Note that API requests (e.g. memcache.set(), db.put()) are still
 limited to 1MB in size.

 http://code.google.com/appengine/docs/python/mail/overview.html#Quota...

 Robert







 On Mon, Nov 8, 2010 at 04:49, mattbeedle mattbee...@googlemail.com wrote:
  I'm having trouble with request size limiting, but I don't understand
  why.  Im this blog post (http://googleappengine.blogspot.com/2009/02/
  skys-almost-limit-high-cpu-is-no-more.html) and it seems to say that
  the limits on requests and responses were increased to 10mb.  My
  application receives emails and then forwards them on to a website I
  run using urlfetch.  Whenever I send an email with an attachment over
  1mb, I see theseRequestTooLargeErrorerrors.  Here is the actual
  piece of code that is failing, the error is occurring on the response
  =fetchline:

  import logging, email, yaml
  from django.utils import simplejson as json
  from google.appengine.ext import webapp
  from google.appengine.ext.webapp.mail_handlers import
  InboundMailHandler
  from google.appengine.api.urlfetch importfetch
  from google.appengine.api.urlfetch import Error as FetchError

  settings = yaml.load(open('settings.yaml'))

  def callback(raw):
   result = {'email': {'raw': raw}}

   response =fetch(settings['outbound_url'],
               payload=json.dumps(result),
               method=POST,
               headers={
                 'Authorization': settings['api_key'],
                 'Content-Type': 'application/json'
               },
               deadline=10
              )
   logging.info(response.status_code)
   if response.status_code != 200:
     raise FetchError()

  class InboundHandler(InboundMailHandler):
   def receive(self, message):
     logging.info(Received a message from:  + message.sender)
     callback(message.original.as_string(True))

  It would be great if someone could explain to me why this is not
  working and how I can get around it, 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 
  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] Re: Problems pointing my GoDaddy domain to App Engine (no other posts have been able to help!)

2010-11-10 Thread dar
You do not need to transfer the domain to google apps.  However, it
sounds like you have not configured appengine to know about the cname
you created at godaddy.

Have you followed the instructions at this link?
http://code.google.com/appengine/docs/domain.html


On Nov 9, 8:45 pm, Kevin M kvnsmo...@gmail.com wrote:
 The domain was not purchased through Google Apps, nor is it currently
 managed by Google Apps. I bought it and configure it at GoDaddy. Do I
 need to transfer management of this domain to Google Apps? I'd rather
 not. I set the CNAME entry at GoDaddy, but do I need to set the
 Nameservers to be something google specific? I only set up CNAME
 entries and MX entries. But it's still not working and it's been  24
 hours.

-- 
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] Working with Query results

2010-11-10 Thread Zeynel
Can someone help me understand how to access the results of a query?

This is my model:

class Rep(db.Model):
mAUTHOR = db.UserProperty(auto_current_user=True)
mUNIQUE = db.StringProperty()
mCOUNT = db.IntegerProperty()
mDATE = db.DateTimeProperty(auto_now=True)
mDATE0 = db.DateTimeProperty(auto_now_add=True)
mWEIGHT = db.IntegerProperty()

The app has a textarea form and user submits repetitions. mCOUNT is
the number of repetitions. I use this query to display top ten reps:

QUERY = Rep.all()
QUERY.filter(mAUTHOR =, user)
QUERY.order(-mCOUNT)
RESULTS = QUERY.fetch(10)

I display the results with Mako template:

% for result in RESULTS:
p${result.mUNIQUE} (${result.mCOUNT})/p
% endfor

Instead of sorting by mCOUNT I want to sort by mWEIGHT so that an old
item with high count should be lower than a new item with lower count.
But the precise weighing formula is not important at this point. For
instance, it may be

mWEIGHT = mDATE * mCOUNT

What I do not understand is, how do I access mDATE and mCOUNT to put
them in the formula? I am having difficulty, in general, visualizing
the result of a query. The tutorial
http://code.google.com/appengine/docs/python/datastore/creatinggettinganddeletingdata.html#Getting_Entities_Using_a_Query
says that the query returns the requested results as a list of model
instances. What is a list of model instances? And how to access
them as a variables in this context. Thanks for your help.

-- 
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] Working with Query results

2010-11-10 Thread Wim den Ouden
Hi Zeynel,
I don't use templates but as a guess i think you use result.mCOUNT
To sort you can read the result in a list and sort on this or maybe
the template engine has a solution for this.
gr
wim

On Wed, Nov 10, 2010 at 2:56 PM, Zeynel azeyn...@gmail.com wrote:
 Can someone help me understand how to access the results of a query?

 This is my model:

 class Rep(db.Model):
    mAUTHOR = db.UserProperty(auto_current_user=True)
    mUNIQUE = db.StringProperty()
    mCOUNT = db.IntegerProperty()
    mDATE = db.DateTimeProperty(auto_now=True)
    mDATE0 = db.DateTimeProperty(auto_now_add=True)
    mWEIGHT = db.IntegerProperty()

 The app has a textarea form and user submits repetitions. mCOUNT is
 the number of repetitions. I use this query to display top ten reps:

 QUERY = Rep.all()
 QUERY.filter(mAUTHOR =, user)
 QUERY.order(-mCOUNT)
 RESULTS = QUERY.fetch(10)

 I display the results with Mako template:

 % for result in RESULTS:
 p${result.mUNIQUE} (${result.mCOUNT})/p
 % endfor

 Instead of sorting by mCOUNT I want to sort by mWEIGHT so that an old
 item with high count should be lower than a new item with lower count.
 But the precise weighing formula is not important at this point. For
 instance, it may be

 mWEIGHT = mDATE * mCOUNT

 What I do not understand is, how do I access mDATE and mCOUNT to put
 them in the formula? I am having difficulty, in general, visualizing
 the result of a query. The tutorial
 http://code.google.com/appengine/docs/python/datastore/creatinggettinganddeletingdata.html#Getting_Entities_Using_a_Query
 says that the query returns the requested results as a list of model
 instances. What is a list of model instances? And how to access
 them as a variables in this context. Thanks for your help.

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





-- 
gr
wdo

Demo free E-business: https://e-comm.appspot.com
Wim den Ouden Google App Engine (cloud)

-- 
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: Working with Query results

2010-11-10 Thread Zeynel
On Nov 10, 9:11 am, Wim den Ouden wdenou...@gmail.com wrote:

 I don't use templates but as a guess i think you use result.mCOUNT

Ok. So I try something like this:

for result in RESULTS:
WEIGHT = (datetime.datetime.result.mDATE.toordinal()) *
result.mCOUNT

but I get this error:

WEIGHT = (datetime.datetime.result.mDATE.toordinal()) * result.mCOUNT
AttributeError: type object 'datetime.datetime' has no attribute
'result'

-- 
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: Working with Query results

2010-11-10 Thread Wim den Ouden
result is not part of datetime.datetime, use (
(datetime.datetime(result.mDATE.toordinal()) * result.mCOUNT)

On Wed, Nov 10, 2010 at 3:38 PM, Zeynel azeyn...@gmail.com wrote:
 On Nov 10, 9:11 am, Wim den Ouden wdenou...@gmail.com wrote:

 I don't use templates but as a guess i think you use result.mCOUNT

 Ok. So I try something like this:

 for result in RESULTS:
    WEIGHT = (datetime.datetime.result.mDATE.toordinal()) *
 result.mCOUNT

 but I get this error:

 WEIGHT = (datetime.datetime.result.mDATE.toordinal()) * result.mCOUNT
 AttributeError: type object 'datetime.datetime' has no attribute
 'result'

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





-- 
gr
wdo

Demo free E-business: https://e-comm.appspot.com
Wim den Ouden Google App Engine (cloud)

-- 
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] GqlQuery problem (WHERE NOT)

2010-11-10 Thread Elias
Hi,

I want to find all employees from a company where the telephone number
is NOT empty.

Now I have this:

db.GqlQuery(SELECT * FROM Employee WHERE company = :company AND phone
 :nophone, company=company, nophone=None)


But this always prints out empty results although there are items with
telephone number.



Elias

-- 
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: GqlQuery problem (WHERE NOT)

2010-11-10 Thread Tim Hoffman
Unless you have specifically stored None as a value in the phone field
you won't be able to do this.  You can only find values in the index.

You can't find things that have no value.

If you phone field is a string you could find = 'a'  or ' '.
Something that
starts alphabetically before all valid values.

Rgds

T



On Nov 10, 10:59 pm, Elias elias@gmail.com wrote:
 Hi,

 I want to find all employees from a company where the telephone number
 is NOT empty.

 Now I have this:

 db.GqlQuery(SELECT * FROM Employee WHERE company = :company AND phone

  :nophone, company=company, nophone=None)

 But this always prints out empty results although there are items with
 telephone number.

 Elias

-- 
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: RequestTooLargeError

2010-11-10 Thread Tim Hoffman
Hi

urllib/2 and everything else (httplib) etc..  all sit on top of
urlfetch.

You have to work within the confines of urlfetch.

Rgds

T

On Nov 10, 9:30 pm, mattbeedle mattbee...@googlemail.com wrote:
 Ok, I see, I thought that fetch was just a straight forward HTTP POST,
 but now looking at the documentation I see that is part of the
 appengine python API (I'm not a python programmer).  Thanks for the
 email limits link.  So, that's the first part of my question answered,
 I definitely now understand the problem.  It would be really great if
 someone could suggest me a way around this issue now.  Maybe I can
 just use httplib to post directly?

 Thanks,

 Matt

 On Nov 8, 7:17 pm, Robert Kluin robert.kl...@gmail.com wrote:







  Sorry, but re-read the bullet point about the size limit increases.
  Specifically the last sentence:
     Note that API requests (e.g. memcache.set(), db.put()) are still
  limited to 1MB in size.

 http://code.google.com/appengine/docs/python/mail/overview.html#Quota...

  Robert

  On Mon, Nov 8, 2010 at 04:49, mattbeedle mattbee...@googlemail.com wrote:
   I'm having trouble with request size limiting, but I don't understand
   why.  Im this blog post (http://googleappengine.blogspot.com/2009/02/
   skys-almost-limit-high-cpu-is-no-more.html) and it seems to say that
   the limits on requests and responses were increased to 10mb.  My
   application receives emails and then forwards them on to a website I
   run using urlfetch.  Whenever I send an email with an attachment over
   1mb, I see theseRequestTooLargeErrorerrors.  Here is the actual
   piece of code that is failing, the error is occurring on the response
   =fetchline:

   import logging, email, yaml
   from django.utils import simplejson as json
   from google.appengine.ext import webapp
   from google.appengine.ext.webapp.mail_handlers import
   InboundMailHandler
   from google.appengine.api.urlfetch importfetch
   from google.appengine.api.urlfetch import Error as FetchError

   settings = yaml.load(open('settings.yaml'))

   def callback(raw):
    result = {'email': {'raw': raw}}

    response =fetch(settings['outbound_url'],
                payload=json.dumps(result),
                method=POST,
                headers={
                  'Authorization': settings['api_key'],
                  'Content-Type': 'application/json'
                },
                deadline=10
               )
    logging.info(response.status_code)
    if response.status_code != 200:
      raise FetchError()

   class InboundHandler(InboundMailHandler):
    def receive(self, message):
      logging.info(Received a message from:  + message.sender)
      callback(message.original.as_string(True))

   It would be great if someone could explain to me why this is not
   working and how I can get around it, 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 
   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] Re: RequestTooLargeError

2010-11-10 Thread mattbeedle
ok, thanks for you response, but I do not know python and I really
could do with a little help here.  I think we have established that
fetch will not work for me, thank you. It would be really great then
if someone could suggest to me a different way of solving this issue.
I just want to get the raw email code into my application, I'm sure
there must be a simple way to do this!

Thanks,

Matt

On Nov 10, 4:09 pm, Tim Hoffman zutes...@gmail.com wrote:
 Hi

 urllib/2 and everything else (httplib) etc..  all sit on top of
 urlfetch.

 You have to work within the confines of urlfetch.

 Rgds

 T

 On Nov 10, 9:30 pm, mattbeedle mattbee...@googlemail.com wrote:







  Ok, I see, I thought thatfetchwas just a straight forward HTTP POST,
  but now looking at the documentation I see that is part of the
  appengine python API (I'm not a python programmer).  Thanks for the
  email limits link.  So, that's the first part of my question answered,
  I definitely now understand the problem.  It would be really great if
  someone could suggest me a way around this issue now.  Maybe I can
  just use httplib to post directly?

  Thanks,

  Matt

  On Nov 8, 7:17 pm, Robert Kluin robert.kl...@gmail.com wrote:

   Sorry, but re-read the bullet point about the size limit increases.
   Specifically the last sentence:
      Note that API requests (e.g. memcache.set(), db.put()) are still
   limited to 1MB in size.

  http://code.google.com/appengine/docs/python/mail/overview.html#Quota...

   Robert

   On Mon, Nov 8, 2010 at 04:49, mattbeedle mattbee...@googlemail.com 
   wrote:
I'm having trouble with request size limiting, but I don't understand
why.  Im this blog post (http://googleappengine.blogspot.com/2009/02/
skys-almost-limit-high-cpu-is-no-more.html) and it seems to say that
the limits on requests and responses were increased to 10mb.  My
application receives emails and then forwards them on to a website I
run using urlfetch.  Whenever I send an email with an attachment over
1mb, I see theseRequestTooLargeErrorerrors.  Here is the actual
piece of code that is failing, the error is occurring on the response
=fetchline:

import logging, email, yaml
from django.utils import simplejson as json
from google.appengine.ext import webapp
from google.appengine.ext.webapp.mail_handlers import
InboundMailHandler
from google.appengine.api.urlfetch importfetch
from google.appengine.api.urlfetch import Error as FetchError

settings = yaml.load(open('settings.yaml'))

def callback(raw):
 result = {'email': {'raw': raw}}

 response =fetch(settings['outbound_url'],
             payload=json.dumps(result),
             method=POST,
             headers={
               'Authorization': settings['api_key'],
               'Content-Type': 'application/json'
             },
             deadline=10
            )
 logging.info(response.status_code)
 if response.status_code != 200:
   raise FetchError()

class InboundHandler(InboundMailHandler):
 def receive(self, message):
   logging.info(Received a message from:  + message.sender)
   callback(message.original.as_string(True))

It would be great if someone could explain to me why this is not
working and how I can get around it, 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 
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: deploy failures

2010-11-10 Thread Martin Ceperley
Don't know if this has anything to do with your problems, but my (python) 
deployments began failing recently because my error_handlers: page directive, 
defined in app.yaml, was pointing to an error page in a subdirectory. When I 
moved it up to the top-level directory it worked.  Filed a bug here: 
http://code.google.com/p/googleappengine/issues/detail?id=4032


On Nov 10, 2010, at 11:01 AM, Dave Watson wrote:

 Also happening to me constantly when doing Java deployment via command-
 line (automated deploy script). I'm getting about a 75% failure rate,
 which is a gigantic time waster.
 
 I don't know how Google can claim to have a reasonable system when
 their deployment tools fail so much. This is really getting
 ridiculous.
 
 On Nov 9, 8:22 am, Alexandru Farcaş alex.far...@expert-group.biz
 wrote:
 I also receive this error : SEVERE: Received IOException parsing the
 input stream for my_path/war/WEB_INF//web.xml)
 I am using java sdk and Eclipse Helios.
 After I restart the eclipse it's working ok.
 
 On Nov 9, 2:47 pm, Erik erik.e.wil...@gmail.com wrote:
 
 
 
 
 
 
 
 I have also been getting constant deployment errors with Java
 deployment for the past couple days, seems like something is funny on
 the google side, don't think my connection is flaky:
 
 Nov 9, 2010 7:18:59 AM
 com.google.apphosting.utils.config.AbstractConfigXmlReader
 getTopLevelNode
 SEVERE: Received IOException parsing the input stream for /home/erik/
 workspace/wikihop/war/WEB-INF/web.xml
 java.net.ConnectException: Connection timed out
 at java.net.PlainSocketImpl.socketConnect(Native Method)
  ...
 SEVERE: Received exception processing /home/erik/workspace/wikihop/war/
 WEB-INF/web.xml
 com.google.apphosting.utils.config.AppEngineConfigException: Received
 IOException parsing the input stream for /home/erik/workspace/wikihop/
 war/WEB-INF/web.xml
 at
 com.google.apphosting.utils.config.AbstractConfigXmlReader.getTopLevelNode( 
 AbstractConfigXmlReader.java:
 210)
  ...
 Bad configuration: Received IOException parsing the input stream for /
 home/erik/workspace/wikihop/war/WEB-INF/web.xml
   Caused by: Connection timed out
 
 -- 
 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] Hiring Python GAE Developer in NYC

2010-11-10 Thread Ted Roden
Hello Everybody,

I'll keep this short since I know it doesn't apply to everybody.

I run a company based in NYC and we're looking to hire Google App
Engine developers (using python). If you or someone you know may be a
good fit, please hit me up.

A better description of who were are, what we do, and what we're
looking for is here: http://fncy.it/bkgO0p

-Ted

-- 
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: deploy failures

2010-11-10 Thread Stream18
Exactly the same problem for me since yesterday. I'm using both
eclipse plugin and appcfg.

On Nov 9, 2:22 pm, Alexandru Farcaş alex.far...@expert-group.biz
wrote:
 I also receive this error : SEVERE: Received IOException parsing the
 input stream for my_path/war/WEB_INF//web.xml)
 I am using java sdk and Eclipse Helios.
 After I restart the eclipse it's working ok.

 On Nov 9, 2:47 pm, Erik erik.e.wil...@gmail.com wrote:

  I have also been getting constant deployment errors with Java
  deployment for the past couple days, seems like something is funny on
  the google side, don't think my connection is flaky:

  Nov 9, 2010 7:18:59 AM
  com.google.apphosting.utils.config.AbstractConfigXmlReader
  getTopLevelNode
  SEVERE: Received IOException parsing the input stream for /home/erik/
  workspace/wikihop/war/WEB-INF/web.xml
  java.net.ConnectException: Connection timed out
          at java.net.PlainSocketImpl.socketConnect(Native Method)
   ...
  SEVERE: Received exception processing /home/erik/workspace/wikihop/war/
  WEB-INF/web.xml
  com.google.apphosting.utils.config.AppEngineConfigException: Received
  IOException parsing the input stream for /home/erik/workspace/wikihop/
  war/WEB-INF/web.xml
          at
  com.google.apphosting.utils.config.AbstractConfigXmlReader.getTopLevelNode( 
  AbstractConfigXmlReader.java:
  210)
   ...
  Bad configuration: Received IOException parsing the input stream for /
  home/erik/workspace/wikihop/war/WEB-INF/web.xml
    Caused by: Connection timed out



-- 
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] Bad entity in Datastore

2010-11-10 Thread jdwx
Hello,

I have a datastore entry that is not viewable i.e. I get A server
error has occurred. when I click on the entry in the datastore
viewer. This particular data entry is causing my app to crash too when
I try to retrieve  and display it. Does anyone know the reason?


Thank you.
Gerald

-- 
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] Zend Application on Google App Engine

2010-11-10 Thread ashish jindal
Hi,
I want to Run a PHP Zend Framework application on Google App Engine.
Tell  the Procedure for the same, I will be highly obliged.

Thank you in anticipation

Regards,
 Ashish Jindal

-- 
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: RequestTooLargeError

2010-11-10 Thread Robert Kluin
Hey Matt,
  My first thoughts: If you run the other site, maybe you can break
the email into parts then reassemble the parts at the other end.
Maybe it would be easier to break the email up and store the parts on
AE.  Then send a request to your other site to 'fetch' the email from
your AE app.




Robert






On Wed, Nov 10, 2010 at 11:22, mattbeedle mattbee...@googlemail.com wrote:
 ok, thanks for you response, but I do not know python and I really
 could do with a little help here.  I think we have established that
 fetch will not work for me, thank you. It would be really great then
 if someone could suggest to me a different way of solving this issue.
 I just want to get the raw email code into my application, I'm sure
 there must be a simple way to do this!

 Thanks,

 Matt

 On Nov 10, 4:09 pm, Tim Hoffman zutes...@gmail.com wrote:
 Hi

 urllib/2 and everything else (httplib) etc..  all sit on top of
 urlfetch.

 You have to work within the confines of urlfetch.

 Rgds

 T

 On Nov 10, 9:30 pm, mattbeedle mattbee...@googlemail.com wrote:







  Ok, I see, I thought thatfetchwas just a straight forward HTTP POST,
  but now looking at the documentation I see that is part of the
  appengine python API (I'm not a python programmer).  Thanks for the
  email limits link.  So, that's the first part of my question answered,
  I definitely now understand the problem.  It would be really great if
  someone could suggest me a way around this issue now.  Maybe I can
  just use httplib to post directly?

  Thanks,

  Matt

  On Nov 8, 7:17 pm, Robert Kluin robert.kl...@gmail.com wrote:

   Sorry, but re-read the bullet point about the size limit increases.
   Specifically the last sentence:
      Note that API requests (e.g. memcache.set(), db.put()) are still
   limited to 1MB in size.

  http://code.google.com/appengine/docs/python/mail/overview.html#Quota...

   Robert

   On Mon, Nov 8, 2010 at 04:49, mattbeedle mattbee...@googlemail.com 
   wrote:
I'm having trouble with request size limiting, but I don't understand
why.  Im this blog post (http://googleappengine.blogspot.com/2009/02/
skys-almost-limit-high-cpu-is-no-more.html) and it seems to say that
the limits on requests and responses were increased to 10mb.  My
application receives emails and then forwards them on to a website I
run using urlfetch.  Whenever I send an email with an attachment over
1mb, I see theseRequestTooLargeErrorerrors.  Here is the actual
piece of code that is failing, the error is occurring on the response
=fetchline:

import logging, email, yaml
from django.utils import simplejson as json
from google.appengine.ext import webapp
from google.appengine.ext.webapp.mail_handlers import
InboundMailHandler
from google.appengine.api.urlfetch importfetch
from google.appengine.api.urlfetch import Error as FetchError

settings = yaml.load(open('settings.yaml'))

def callback(raw):
 result = {'email': {'raw': raw}}

 response =fetch(settings['outbound_url'],
             payload=json.dumps(result),
             method=POST,
             headers={
               'Authorization': settings['api_key'],
               'Content-Type': 'application/json'
             },
             deadline=10
            )
 logging.info(response.status_code)
 if response.status_code != 200:
   raise FetchError()

class InboundHandler(InboundMailHandler):
 def receive(self, message):
   logging.info(Received a message from:  + message.sender)
   callback(message.original.as_string(True))

It would be great if someone could explain to me why this is not
working and how I can get around it, 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 
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] Bad entity in Datastore

2010-11-10 Thread Robert Kluin
Hi Gerald,
  Is there any information in your logs?  If not maybe you want to
provide a little more info about the context, such as the model def,
how data gets in, how you get it out, etc...


Robert







On Wed, Nov 10, 2010 at 10:45, jdwx jdwxj...@gmail.com wrote:
 Hello,

 I have a datastore entry that is not viewable i.e. I get A server
 error has occurred. when I click on the entry in the datastore
 viewer. This particular data entry is causing my app to crash too when
 I try to retrieve  and display it. Does anyone know the reason?


 Thank you.
 Gerald

 --
 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] Bad entity in Datastore

2010-11-10 Thread 风笑雪
You can try to retrieve it by low level api:

from google.appengine.api import datastore
print datastore.Query('model_name', {'attr_name =': xxx}).Get(1)


--
keakon



On Wed, Nov 10, 2010 at 11:45 PM, jdwx jdwxj...@gmail.com wrote:
 Hello,

 I have a datastore entry that is not viewable i.e. I get A server
 error has occurred. when I click on the entry in the datastore
 viewer. This particular data entry is causing my app to crash too when
 I try to retrieve  and display it. Does anyone know the reason?


 Thank you.
 Gerald

 --
 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] Random CPU Billing

2010-11-10 Thread Steve
Hi,

I've been trying to understand how CPU usage is calculated / billed.
Because I could not correlate the amounts consumed with what I
expected, I set up a special handler which just returns a 200
response, nothing else.  I then set up a cron job to call that special
url every couple minutes.

As an example, the cron called the URL 5 consecutive times.  During
that time no other users were using this application.  I also checked
each call and none of them indicated that they were responsible for
starting a new instance.  Across these I had an average 102cpu_ms
consumed with a staggeringly high standard deviation of 100cpu_ms.

You can see the actual calls from my log here:
http://oi53.tinypic.com/694c40.jpg

Google, are you actually measuring my CPU usage per call?  Or are you
doing something like the water department where you only measure the
total consumed every X number of calls and just sort of guess the ones
in between?

--Steve

-- 
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] Architecture approaches for puts

2010-11-10 Thread Eli Jones
How big is the average entity for this Model that you are putting to? (Are
you just putting one entity at a time?)

If you create a separate Model with the same properties but no indexes, how
long and how much CPU does it use up on a put (in comparison to your fully
indexed model)?  Also, what do you mean by puts run too close to the 1,000
ms limit?  Do you just mean that your app uses up 1,000 CPU MS or 1,000
API_CPU MS?

Why are you generating a custom integer id instead of using the one that the
datastore would create (I am not saying you should not do this, but I am
wondering what the requirement is that makes you need to do it.)?

Also, you mention that you are not very write intensive and new records
occur infrequently.. so what is the main reasoning for this complicated put
process (does the processing leading up to the put place you near the 30
second limit)?

Depending on what your restrictions are.. there are different
recommendations that can/could be made.

On Tue, Nov 9, 2010 at 3:07 PM, stevep prosse...@gmail.com wrote:

 I would like some feedback about pluses / minuses for handling new records.
 Currently I need to optimize how the client request handler processes new
 entity put()s. Several custom indices for the model are used, so puts run
 too close to the 1,000 ms limit (were running over the limit prior to Nov.
 6th maintenance – thanks Google).

 The entities are written with unique integer key values. Integers are
 generated using Google’s recommended sharded process. Client currently POSTs
 a new record to the GAE handler. If handler does not send back a successful
 response, client will retry POST “n” times (at least twice, but possibly
 more). Continued failures past “n” will prompt user that record could not be
 created, saves data locally, and asks user to try later.

 Planned new process will use Task Queue.
 1) Client POSTs new entity data to the handler. At this point, user sees a
 dialog box saying record is being written.
 2) Handler will use the shards to generate the next integer value for the
 key.
 3) Handler sets up a task queue with the new key value and record data, and
 responds back to the client with they key value.
 4) Client receives key value back from handler, and changes to inform user
 that record write is being confirmed on the server (or as before retries
 entire POST if response is an error code).
 5) Client waits a second or two (for task queue to finish), then issues a
 GET to the handler to read the new record using the key value.
 6) Handler does a simple key value read of the new record. Responds back to
 client either with found or not found status.
 7) If client gets found response, then we are done. If not found, or error
 response client will wait a few seconds, and issue another GET.
 7) If after “n” tries, no GET yields a successful read, then client informs
 user that record could not be written, and “please try again in a few
 minutes” (saving new record data locally).

 I know this is not ideal, but believe it is a valid, given GAE’s
 limitations, as an approach to minimize lost writes. Would very much
 appreciate feedback. I should note that the imposition of a few seconds
 delay while writing the record should not be an issue given it is a single
 transaction at the end of a previous creative process which has engaged user
 for several minutes.  Also, we do not use logic that cannot handle gaps
 (missing) integer values in the model's key values.

 TIA,
 stevep

  --
 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.comgoogle-appengine%2bunsubscr...@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] Random CPU Billing

2010-11-10 Thread Eli Jones
Did you expand the logs to see if any of those were cold starts?  I'm
guessing that the higher CPU ones were newly created instances.  And, or all
of the runs were cold starts.. since doing imports on cold start can be all
over the place for CPU MS usage.  (Though, the recent datastore maintenance
seems to have made this performance better.)

What is the page importing when it runs?

On Wed, Nov 10, 2010 at 2:14 PM, Steve unetright.thebas...@xoxy.net wrote:

 Hi,

 I've been trying to understand how CPU usage is calculated / billed.
 Because I could not correlate the amounts consumed with what I
 expected, I set up a special handler which just returns a 200
 response, nothing else.  I then set up a cron job to call that special
 url every couple minutes.

 As an example, the cron called the URL 5 consecutive times.  During
 that time no other users were using this application.  I also checked
 each call and none of them indicated that they were responsible for
 starting a new instance.  Across these I had an average 102cpu_ms
 consumed with a staggeringly high standard deviation of 100cpu_ms.

 You can see the actual calls from my log here:
 http://oi53.tinypic.com/694c40.jpg

 Google, are you actually measuring my CPU usage per call?  Or are you
 doing something like the water department where you only measure the
 total consumed every X number of calls and just sort of guess the ones
 in between?

 --Steve

 --
 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.comgoogle-appengine%2bunsubscr...@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: Random CPU Billing

2010-11-10 Thread Steve
Eli,

All five were on the same instance, and as noted in my original post,
I also checked
each call and none of them indicated that they were responsible for
starting a new instance.

So no, it's not a cold start issue.  And it's not an import issue
because all of them used the same single instance.

--Steve

-- 
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: Problems pointing my GoDaddy domain to App Engine (no other posts have been able to help!)

2010-11-10 Thread Kevin M
Yes I have

On Nov 10, 8:31 am, dar dher...@gmail.com wrote:
 You do not need to transfer the domain to google apps.  However, it
 sounds like you have not configured appengine to know about the cname
 you created at godaddy.

 Have you followed the instructions at this 
 link?http://code.google.com/appengine/docs/domain.html

 On Nov 9, 8:45 pm, Kevin M kvnsmo...@gmail.com wrote:

  The domain was not purchased through Google Apps, nor is it currently
  managed by Google Apps. I bought it and configure it at GoDaddy. Do I
  need to transfer management of this domain to Google Apps? I'd rather
  not. I set the CNAME entry at GoDaddy, but do I need to set the
  Nameservers to be something google specific? I only set up CNAME
  entries and MX entries. But it's still not working and it's been  24
  hours.

-- 
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: Random CPU Billing

2010-11-10 Thread Eli Jones
Sorry, I guess I glossed over that part of your e-mail and just keyed in on
the 5 minute time period of the log.

Do your instances generally last 5 minutes or longer?  I have a chained task
that runs every 5 minutes for 80 times a day.  Only occasionally do I see it
hit a warm instance (pretty much never twice in a row).

Granted, the 5 ms response time suggest that these are warm instance, but
the only times I see notable swings in CPU_MS are with imports on cold
starts in comparison to warm instances.

On Wed, Nov 10, 2010 at 2:52 PM, Steve unetright.thebas...@xoxy.net wrote:

 Eli,

 All five were on the same instance, and as noted in my original post,
 I also checked
 each call and none of them indicated that they were responsible for
 starting a new instance.

 So no, it's not a cold start issue.  And it's not an import issue
 because all of them used the same single instance.

 --Steve

 --
 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.comgoogle-appengine%2bunsubscr...@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: Random CPU Billing

2010-11-10 Thread Steve
Hi Eli,

Sorry if my reply sounded snippy.  Today I've spent over an hour on
the phone arguing with ATT and my frustration with them bled
through.  I reread what I wrote and really wasn't happy with my tone.

Sorry!

-- 
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] jars in WEB-INF/lib for deployment

2010-11-10 Thread haole
i'm wondering which jars are required to be in the WEB-INF/lib
directory when i deploy. i have a bunch that were automatically added
when i created an appengine project in eclipse, but it seems like the
app should already have a lot of these jars in the production
classpath. am i supposed to add these to the project in some other way
than to just add them to the WEB-INF/lib directory?

here's what's in my WEB-INF/lib:

appengine-api-1.0-sdk-1.3.8.jar
appengine-api-labs-1.3.8.jar
appengine-jsr107cache-1.3.8.jar
datanucleus-appengine-1.0.7.final.jar
datanucleus-core-1.1.5.jar
datanucleus-jpa-1.1.5.jar
gdatacore10.jar
geronimo-jpa_3.0_spec-1.1.1.jar
geronimo-jta_1.1_spec-1.1.1.jar
gwt-servlet.jar
jdo2-api-2.3-eb.jar
jsr107cache-1.1.jar
mail.jar
recaptcha4j-0.0.7.jar

-- 
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: Zend Application on Google App Engine

2010-11-10 Thread Greg
Here's how to run PHP on appengine:

Step 1: Wait.

Appengine currently supports python and java. There are rumours that
PHP may be added at some stage, but there aren't any official comments
from Google, and certainly not any indication of when this might
happen.

Depending on your circumstances, I'd strongly recommend you look at
python. I'm in a position to choose which tools I use, and I find
python far more productive than PHP. I also prefer appengine to
running my own servers, or any of the other cloud platforms.

Cheers
Greg.

On Nov 10, 9:56 pm, ashish jindal er.ashishjin...@gmail.com wrote:
 Hi,
 I want to Run a PHP Zend Framework application on Google App Engine.
 Tell  the Procedure for the same, I will be highly obliged.

 Thank you in anticipation

 Regards,
  Ashish Jindal

-- 
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] Working with Query results

2010-11-10 Thread djidjadji
RESULTS = QUERY.fetch(10)
RESULTS.sort(key=lambda x: x.mDATE.toordinal() * x.mCOUNT)

What is a list of model instances?
You can start by learning some basic python. Read the tutorial on the
python.org website, or in the help file (on windows platform)

2010/11/10 Zeynel azeyn...@gmail.com:
 Can someone help me understand how to access the results of a query?

 This is my model:

 class Rep(db.Model):
    mAUTHOR = db.UserProperty(auto_current_user=True)
    mUNIQUE = db.StringProperty()
    mCOUNT = db.IntegerProperty()
    mDATE = db.DateTimeProperty(auto_now=True)
    mDATE0 = db.DateTimeProperty(auto_now_add=True)
    mWEIGHT = db.IntegerProperty()

 The app has a textarea form and user submits repetitions. mCOUNT is
 the number of repetitions. I use this query to display top ten reps:

 QUERY = Rep.all()
 QUERY.filter(mAUTHOR =, user)
 QUERY.order(-mCOUNT)
 RESULTS = QUERY.fetch(10)

 I display the results with Mako template:

 % for result in RESULTS:
 p${result.mUNIQUE} (${result.mCOUNT})/p
 % endfor

 Instead of sorting by mCOUNT I want to sort by mWEIGHT so that an old
 item with high count should be lower than a new item with lower count.
 But the precise weighing formula is not important at this point. For
 instance, it may be

 mWEIGHT = mDATE * mCOUNT

 What I do not understand is, how do I access mDATE and mCOUNT to put
 them in the formula? I am having difficulty, in general, visualizing
 the result of a query. The tutorial
 http://code.google.com/appengine/docs/python/datastore/creatinggettinganddeletingdata.html#Getting_Entities_Using_a_Query
 says that the query returns the requested results as a list of model
 instances. What is a list of model instances? And how to access
 them as a variables in this context. Thanks for your help.

 --
 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: Mystery data usage

2010-11-10 Thread Erik

Thanks for the info Ikai.
I starred issue 2740, hopefully we will be able to view index
statistics sometime in the future.
Being able to delete the datastore without having to delete each
entity would be nice too, it can become expensive very quickly to make
mistakes.

On Nov 9, 7:44 pm, Ikai Lan (Google) ikai.l+gro...@google.com
wrote:
 No, it won't auto clear indexes. You'll need to use something like the
 Mapper API to read all the entities, modifies them and re-saves them.

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

 On Tue, Nov 9, 2010 at 2:44 PM, Erik erik.e.wil...@gmail.com wrote:

  Thanks for the information and tips Robert, somehow I missed that
  AppEngine automatically indexes properties.
  Simply adding the unindexed extension to the JDO class should
  eventually clear the auto-generated indexes?

  Cheers  thanks again,
   -Erik

  On Nov 9, 10:52 am, Robert Kluin robert.kl...@gmail.com wrote:
   Hi Erik,
     As far as I know the persistence manager would not create any extra
  entities.

     It sounds like you might want to explicitly disable indexing on any
   fields you will not be querying on.  See the 'Properties that Aren't
   Indexed' section on the 'Queries and Indexes' page.
 http://code.google.com/appengine/docs/java/datastore/queriesandindexe...

     You might also want to use shorter kind and property names.  Kind
   and property names are stored with every entity, so it can add up
   pretty fast.

   Robert

   On Tue, Nov 9, 2010 at 08:05, Erik erik.e.wil...@gmail.com wrote:
Hi Robert,

Thanks for the response, I did wait several days before sending that
message, but shortly afterwards the quota cleared to zero.  I am using
a persistence manager with jdo, would these create temporary
entities?

I need to explicitly index my keys in descending order for mapreduce,
and thought I needed to index my collections but as I am not
performing any queries don't think that is necessary.  My persistent
objects consist of a single property with type of long collection,
entities are fetched by id.

My latest 30MB dataset has already grown to consume 710MB, that is an
enormous increase.  Datastore statistics say only 131MB is being used
with 71% of that as metadata.

Any other ideas?

Thanks,
 -Erik

On Nov 8, 1:03 pm, Robert Kluin robert.kl...@gmail.com wrote:
Hi Erik,
  Several common sources of datastore stats / quota number funkiness:
     1) The numbers are not updated in real time.  Sometimes it can
take a day for the numbers to get updated.
     2) Because of 1, if you are using a session library (or something
similar) that create lots of temporary entities the numbers can
'appear' to be out-of-sync.

  I assume when you say switched to explicit indexes, you mean you
explicitly disabled indexing of any properties that do not need
indexes?

  Also, you might want to star issue 2740.
     http://code.google.com/p/googleappengine/issues/detail?id=2740

Robert

On Sat, Nov 6, 2010 at 19:29, Erik erik.e.wil...@gmail.com wrote:

 Hello all,

 I have been uploading a dataset which is composed of 100MB of CSV
 values.  During the process of uploading with bulkloader, which
  never
 completed, the datastore expanded to consume 2GB of usage.  I
  decided
 to explicitly index my data and clear the datastore before a
  re-import
 using the blobstore/mapreduce method.  However, after clearing the
 datastore there is still a persistent .37GB of data usage remaining,
 while datastore statistics say 53KB is being consumed by 174
  objects,
 and nothing shows in datastore viewer.

 Any ideas on how I can recover the .37GB of quota which is
 mysteriously being used in my empty datastore?

 Many thanks,
  -Erik

 --
 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.comgoogle-appengine%2bunsubscr...@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.comgoogle-appengine%2bunsubscr...@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.

Re: [google-appengine] Zend Application on Google App Engine

2010-11-10 Thread Robert Kluin
You can star issue 13.
http://code.google.com/p/googleappengine/issues/detail?id=13

You might also look into quercus.  Have no idea how well it works, but
it has been mentioned numerous times.




Robert






On Wed, Nov 10, 2010 at 03:56, ashish jindal er.ashishjin...@gmail.com wrote:
 Hi,
 I want to Run a PHP Zend Framework application on Google App Engine.
 Tell  the Procedure for the same, I will be highly obliged.

 Thank you in anticipation

 Regards,
  Ashish Jindal

 --
 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: Bad entity in Datastore

2010-11-10 Thread jdwx
Hello guys,

I am using Java. Usually when I am storing data, it will be a number
of objects at the same time.

I will first create many objects and then use

persistenceManager.makePersistentAll(Objects);
persistenceManager.close();


My system sometimes, will need to edit a few of these Objects, and I
do

Object.setAttribute(something)
persistenceManager.close();


I do not think there are errors sending in the data? I can view the
data in my datastore, just that when I click on it to fetch it(the
data entry's primary key has a blue link when you click on it you get
to edit the entry), it fails. When my app retrieves it through
persistenceManager.newQuery(sQuery).execute();, it works but when I
try to output the results of the query, it fails. Logs are clean. Is
my datastore input method wrong or something?

Thank you.



On Nov 11, 1:27 am, 风笑雪 kea...@gmail.com wrote:
 You can try to retrieve it by low level api:

 from google.appengine.api import datastore
 print datastore.Query('model_name', {'attr_name =': xxx}).Get(1)

 --
 keakon



 On Wed, Nov 10, 2010 at 11:45 PM, jdwx jdwxj...@gmail.com wrote:
  Hello,

  I have a datastore entry that is not viewable i.e. I get A server
  error has occurred. when I click on the entry in the datastore
  viewer. This particular data entry is causing my app to crash too when
  I try to retrieve  and display it. Does anyone know the reason?

  Thank you.
  Gerald

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



[google-appengine] Re: Bad entity in Datastore

2010-11-10 Thread jdwx
I found the issue. Datastore cannot seem to store '%' sign! What is
the workaround if I want to store '%' sign e.g. I want to store a
string that says Congratulations, you got 100%!.

Thank you.

On Nov 11, 11:22 am, jdwx jdwxj...@gmail.com wrote:
 Hello guys,

 I am using Java. Usually when I am storing data, it will be a number
 of objects at the same time.

 I will first create many objects and then use

 persistenceManager.makePersistentAll(Objects);
 persistenceManager.close();

 My system sometimes, will need to edit a few of these Objects, and I
 do

 Object.setAttribute(something)
 persistenceManager.close();

 I do not think there are errors sending in the data? I can view the
 data in my datastore, just that when I click on it to fetch it(the
 data entry's primary key has a blue link when you click on it you get
 to edit the entry), it fails. When my app retrieves it through
 persistenceManager.newQuery(sQuery).execute();, it works but when I
 try to output the results of the query, it fails. Logs are clean. Is
 my datastore input method wrong or something?

 Thank you.

 On Nov 11, 1:27 am, 风笑雪 kea...@gmail.com wrote:



  You can try to retrieve it by low level api:

  from google.appengine.api import datastore
  print datastore.Query('model_name', {'attr_name =': xxx}).Get(1)

  --
  keakon

  On Wed, Nov 10, 2010 at 11:45 PM, jdwx jdwxj...@gmail.com wrote:
   Hello,

   I have a datastore entry that is not viewable i.e. I get A server
   error has occurred. when I click on the entry in the datastore
   viewer. This particular data entry is causing my app to crash too when
   I try to retrieve  and display it. Does anyone know the reason?

   Thank you.
   Gerald

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