[appengine-java] Any examples for low level datastore? or suggest another way?

2010-01-14 Thread philip
Hi All,

I want to use the low level datastore, I looked at the documentation
and it looks ... complex.
http://code.google.com/intl/zh-HK/appengine/docs/java/javadoc/com/google/appengine/api/datastore/package-summary.html

Basically, I have a client program which needs to create tables and
their entities dynamically, so the columns would change over time.
This does not fit well with JDO as it works for fixed column entitys
that are annotated. So I thought to use the low level API but it looks
difficult. Is there any example code around?

Alternatively, can someone suggest another way?

Phil
-- 
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: Any examples for low level datastore? or suggest another way?

2010-01-14 Thread datanucleus
 Basically, I have a client program which needs to create tables and
 their entities dynamically, so the columns would change over time.
 This does not fit well with JDO as it works for fixed column entitys
 that are annotated.

Not necessarily. Annotations are just one way of specifying what is
persisted. JDO is also the only persistence standard with an API to
define what fields are persisted. You could make use of that, as some
clients have done, and have everything totally dynamic -- the class
generation, the metadata specification, the enhancement, and the
persistence
http://www.jpox.org/servlet/wiki/pages/viewpage.action?pageId=6619188

Fits very nicely with JDO
-- 
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] Eclipse hangs at startup, Ubuntu

2010-01-14 Thread pgoetz
Hi group,

I have a problem with the Google Eclipse Plugin. I am developing an
application for the Google App Engine (Eclipse JEE Galileo, Google
Plugin 1.2.0, Google App Engine SDK 1.3.0, OS Ubuntu 9.10). Yesterday
I reinstalled the Google Plugin and Google App Engine SDK after I got
the same problem with an older version of the SDK.
Today I started Eclipse and after the workspace comes up, I see the
message Updating myproject/...ne - 1.3.0 in the status bar of
Eclipse. I suspect that it means Updating myproject/Google App
Engine - 1.3.0. With this message my whole Eclipse freezes and I can
only kill the process.
Does anybody know why that happens? And how can I prevent the plugin
from performing the update?
I had the same problem yesterday with the old setup and the solution
was to remove the folders for the plugin from Eclipse plugins and
features directories and to reinstall the plugin. Then it worked
yesterday and crashed this morning.

Thank you very much for your help!

Greetings,

Peter
-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-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] sudden errors

2010-01-14 Thread aswath satrasala
I was just checking my application.  Suddenly I started getting the errors
for the same links I was clicking earlier.
I looked into the dashboard for the logs, to find an error.

com.veersoft.action.LoginInterceptor intercept:
com.google.apphosting.api.ApiProxy$UnknownException:
An error occurred for the API request datastore_v3.Get().


Any ideas why this sporadic behavior

-Aswath
-- 

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: Eclipse hangs at startup, Ubuntu

2010-01-14 Thread Blessed Geek
Is any of your resources sitting in a foreign file system like smb,
ntfs or nfs?

And do you have many projects mounted like I do? I had the same
problem and I had to kill/restart the connector process to the foreign
file system, whenever this happens. I would notice thrashing going own
in the connection and eclipse got stuck.

In my less than educated opinion, it looks like running datanucleus is
too expensive during startup because it has to compete with rebuilds
and other startup activities when automatic build is set on in eclipse
and your data communication channels to those foreign file systems may
not be able to cope with the traffic and somehow eclipse starts
thrashing back and forth in its frenzy to get to what it wants,
resulting in deadlocks.

Therefore, the real question that I have been asking is - why did the
eclipse designers make eclipse rebuild my projects on startup since
they have already been rebuilt just before I shut eclipse down.
Eclipse should memorise that fact that projects have already been
rebuilt just before I shut it down. We should take a look if there is
a bug report concerning this feature/bug.

Perhaps, you could turn autobuild off everytime you exit eclipse so
that it when eclipse is started, it would not autobuild - and turn it
back on when eclipse startup has quieted down.

In Galileo, when I switch autobuild off, I find that error highlights
persists even though the code is error free until I restart autobuild.
That is the disadvantage of switching autobuild off, because it would
mislead me about the syntax integrity of the code.
-- 
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: Eclipse hangs at startup, Ubuntu

2010-01-14 Thread pgoetz
On Jan 14, 11:41 am, Blessed Geek blessedg...@gmail.com wrote:
 Is any of your resources sitting in a foreign file system like smb,
 ntfs or nfs?

No, all of my resources are local. They are attached to a SVN
repository, but the subversion plugin does not communicate with the
repository at that time.


 And do you have many projects mounted like I do? I had the same
 problem and I had to kill/restart the connector process to the foreign
 file system, whenever this happens. I would notice thrashing going own
 in the connection and eclipse got stuck.

Again no. It is the only project in this workspace (just a test
project).

 [...]
 Perhaps, you could turn autobuild off everytime you exit eclipse so
 that it when eclipse is started, it would not autobuild - and turn it
 back on when eclipse startup has quieted down.

That was a hint in the right direction, I think. I have disabled the
google plugin, closed the project, reactivated the plugin and after a
startup and some time for eclipse to organize itself, I opened the
project. That did the trick.
In my opinion this is not a very elegant solution, but it works for me
so far.

Thank you very much for your help!

Greetings,

Peter
-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-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] Java DNS cache

2010-01-14 Thread Max
Do you know any issues with Java, DNS and AppEngine.

If I run java app on non google appengine and my app will use app
engine app as web service.

e.g. http://myapp2475687236458.appspot.com

Have any one experienced problem that google will update DNS for
myapp2475687236458.appspot.com domain and Java will cache it and use
old IP.

I had such problems with S3 before.  Some libraries cache DNS results
and Java it self caches DNS.

Amazon very often change IP for buckets. So I noticed it while
benching my app.

Is it advised to use dnsjava or similar package from beginning or
nobody experienced such problems with app engine?

Cheers,
Max
-- 
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] entity collections and equals/hashCode

2010-01-14 Thread jopaki
Using GAE/J JDO, must one implement equals/hashCode based on non-
primary key properties for entities designed to co-exist in a
collection in the same manner as Hibernate ORM requires?

Ref: https://www.hibernate.org/109.html

-- 
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: how to get session id under a Class which doesn't extend HttpServlet?

2010-01-14 Thread Prashant Gupta
anyone???

2010/1/12 Prashant Gupta nextprash...@gmail.com

 Hi,

 Thanks guys for looking into this.

 All requests to my app pass through a single servlet, say *Main*. So, I
 thought I need not to add additional filter and I used a ThreadLocal
 variable to store session id :

 public static final ThreadLocalString sessionID = new
 ThreadLocalString();

 And for every request I am doing

 if(*Main*.sessionID.get() == null)

 *Main*.sessionID.set(req.getSession().getId());

 But it doesn't seem to work. According to my understanding 
 *Main*.sessionID.get()
 should be null each new session (or each new request, I am not sure here).
 Did I get something wrong?


 2010/1/9 A1programmer derrick.simp...@gmail.com

 You probably want to architect the classes in such a way that they are
 not tightly coupled to the http servlet session.

 Anyway, when you were working with ThreadLocal earlier, did you first
 set the ServletRequest from the filter?

 class UserService {
private UserDAO userDAO;

   public Collection Item getItemsForUser(User user){
  return userDao.getItemsForUser(user);
   }

 }


 class UserDAO {

   public CollectionItem getItemsForUser(User user) {

   Long userId = user.getId();
   String userName = user.getUserName();

   // query the database based on user information

   }

 }

 On Jan 9, 3:53 am, Prashant Gupta nextprash...@gmail.com wrote:
  I tried following code, getting null all the time.
 
  public static HttpSession getSession(){
  return new ThreadLocalHttpServletRequest().get().getSession();
 
  }
 
  2010/1/9 Elias Mårtenson loke...@gmail.com
 
 
 
   On 9 Jan, 01:27, Prashant Gupta nextprash...@gmail.com wrote:
 
I am trying to implement my own user management system, for that I
 need
   some
way to make session id available to all classes independent of
 whether it
extends HttpServlet or not. I know there is some way to do that but
 I am
   not
able to find it. Any kind of help would be appreciated.
 
   One way to do it is to use a servlet filter to make the user
   information available through a ThreadLocal instance. That way you can
   have a single static method that returns the user wherever you are.
 
   --
   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: Integration with Ning App (authentication)

2010-01-14 Thread Pion
I have just found the following:

http://wiki.opensocial.org/index.php?title=Introduction_To_Signed_Requests
http://wiki.opensocial.org/index.php?title=Validating_Signed_Requests
https://opensocialresources.appspot.com/certificates/

I'll try it if it works with Ning.

On Jan 13, 3:45 pm, Pion onlee2...@gmail.com wrote:
 I am wondering if anyone has experience integrating Ning App (http://
 developer.ning.com/) with GAE for Java. Note that Ning only supports a
 subset of OpenSocial API. Specifically, I need help on the following:

 1. Let a user login to Ning network.
 2. Once Ning has authenticated the user, I'd like to let the user to
 access my app on GAE without having to login twice.
 3. The user could store additional data on GAE.

 I don't know how to do the step #2 above.

 I am open with other scenario as long as I can achieve #1 and #3
 (using Ning's username  authentication) to access the data on the
 GAE.

 Thanks in advance for your help.
-- 
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: how to get session id under a Class which doesn't extend HttpServlet?

2010-01-14 Thread Prashant Gupta
ok, thanks a lot.



2010/1/14 Stephan Hartmann hartm...@metamesh.de

 Threads do not end when they finished serving a request. Instead they will
 catch up another request in the queue and serve it.
 So basically at the end of your service method of your servlet you should
 explicitly set the value of your ThreadLocal to null, prefferably in a
 finally block.


 2010/1/14 Prashant Gupta nextprash...@gmail.com

 anyone???

 2010/1/12 Prashant Gupta nextprash...@gmail.com

 Hi,

 Thanks guys for looking into this.

 All requests to my app pass through a single servlet, say *Main*. So, I
 thought I need not to add additional filter and I used a ThreadLocal
 variable to store session id :

 public static final ThreadLocalString sessionID = new
 ThreadLocalString();

 And for every request I am doing

 if(*Main*.sessionID.get() == null)

 *Main*.sessionID.set(req.getSession().getId());

 But it doesn't seem to work. According to my understanding 
 *Main*.sessionID.get()
 should be null each new session (or each new request, I am not sure here).
 Did I get something wrong?


 2010/1/9 A1programmer derrick.simp...@gmail.com

  You probably want to architect the classes in such a way that they are
 not tightly coupled to the http servlet session.

 Anyway, when you were working with ThreadLocal earlier, did you first
 set the ServletRequest from the filter?

 class UserService {
private UserDAO userDAO;

   public Collection Item getItemsForUser(User user){
  return userDao.getItemsForUser(user);
   }

 }


 class UserDAO {

   public CollectionItem getItemsForUser(User user) {

   Long userId = user.getId();
   String userName = user.getUserName();

   // query the database based on user information

   }

 }

 On Jan 9, 3:53 am, Prashant Gupta nextprash...@gmail.com wrote:
  I tried following code, getting null all the time.
 
  public static HttpSession getSession(){
  return new ThreadLocalHttpServletRequest().get().getSession();
 
  }
 
  2010/1/9 Elias Mårtenson loke...@gmail.com
 
 
 
   On 9 Jan, 01:27, Prashant Gupta nextprash...@gmail.com wrote:
 
I am trying to implement my own user management system, for that I
 need
   some
way to make session id available to all classes independent of
 whether it
extends HttpServlet or not. I know there is some way to do that
 but I am
   not
able to find it. Any kind of help would be appreciated.
 
   One way to do it is to use a servlet filter to make the user
   information available through a ThreadLocal instance. That way you
 can
   have a single static method that returns the user wherever you are.
 
   --
   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.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.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.



Re: [appengine-java] Re: App instance recycling and response times - is there solution?

2010-01-14 Thread 杨浩
治本只能等GAE的升级了,这样确实只能保证你的应用不会因为两分钟没有请求被关闭!
不知道GAE收费版本是不是没有这个问题

2010/1/13 yjun hu itswa...@gmail.com

 治标不治本

 On Wed, Jan 13, 2010 at 1:24 PM, 杨浩 skzr@gmail.com wrote:

 create a cron:every one minutes to run for keep your app online in the
 GAE!
 I try it,and it is work very good!


 --
 dream or truth


-- 

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: Task Queue problems

2010-01-14 Thread 杨浩
代理 支持ssl:
proxy.kerkgroep-hopjestad.com 3128
jwe219.internetdsl.tpnet.pl 3128
webmail.mwit.ac.th 80

我一般用第一个,他不是很稳定!

2010/1/13 yjun hu itswa...@gmail.com

 which proxy are u using now?

 2010/1/12 杨浩 skzr@gmail.com

 在中国appspot的https无法正常工作,因为gfw屏蔽了这部分,你寻找一个https代理,然后再测试应该就没有问题了!




 --
 dream or truth


-- 

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] Wildcard must appear at the end of the expression string (only prefix matches are supported)

2010-01-14 Thread Max Ross (Google)
Thanks for the report Steve, looks like a bug.  The information in the error
message is still relevant though.  The datastore does not support real
regular expression matching, but rather just startsWith filters.  So, if
your regex can be rewritten to use GrpName.startsWith() then you can use
that as your workaround, but if it can't be written this way then the
datastore won't be able to fulfill this query even once this bug is fixed.

Sorry for the trouble,
Max

On Wed, Jan 13, 2010 at 3:42 AM, Steve Pritchard steve...@gmail.com wrote:

 I get this exception.

 viewItemByQuery
 Exception:org.datanucleus.store.appengine.query.DatastoreQuery
 $UnsupportedDatastoreFeatureException: Problem with query SELECT FROM
 com.rsi.gems.bbb.gdo.GdoSysGroups WHERE this.GrpName.matches(.*):
 Wildcard must appear at the end of the expression string (only prefix
 matches are supported)

 The Datanucleus doc clearly states this is a String Regex expression
 which is what I have.

 To quote: Returns whether string matches the passed expression. The
 pattern argument follows the rules of java.lang.String.matches
 method.

 How do I proceed?

 Steve

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



Re: [appengine-java] Java DNS cache

2010-01-14 Thread Ikai L (Google)
Oh man, I've been bitten by Java's DNS cache before as well. This should
have been addressed in Java 6, which is what we run in production. Here's a
quick blog post on the subject:
http://www.mattryall.net/blog/2005/03/javas-awful-dns-caching

You shouldn't run into this in production. Let us know if you do.

On Thu, Jan 14, 2010 at 4:44 AM, Max max.seven@gmail.com wrote:

 Do you know any issues with Java, DNS and AppEngine.

 If I run java app on non google appengine and my app will use app
 engine app as web service.

 e.g. http://myapp2475687236458.appspot.com

 Have any one experienced problem that google will update DNS for
 myapp2475687236458.appspot.com domain and Java will cache it and use
 old IP.

 I had such problems with S3 before.  Some libraries cache DNS results
 and Java it self caches DNS.

 Amazon very often change IP for buckets. So I noticed it while
 benching my app.

 Is it advised to use dnsjava or similar package from beginning or
 nobody experienced such problems with app engine?

 Cheers,
 Max

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






-- 
Ikai Lan
Developer Programs Engineer, Google App Engine
-- 

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] Use Google login cred to logon in one GAE in other GAE app

2010-01-14 Thread Wouter
Hi,
I have a question regarding Google cookies and REST security. I have
2
apps both running on GAE (java) where 1 application is a GWT based
app
which communicates with another app that is a REST (Restlet 2) based
that provides backend services. This works really good (especially
when using caching in the GWT app). My only problem is that my REST
application is currently not secured while my GWT application is
secured using a Google user id. How can i reuse the Google
authentication cookie(s) used in my GWT app to secure my REST app ?
Can I just add the google cookies to each REST request i make (using
HttpClient) or would that be to simple ? Any other thought on how to
secure my REST app are also welcome
regards
Wouter
-- 
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] Ant and --enable_jar_splitting

2010-01-14 Thread Marcel Overdijk
target name=update description=Uploads the application to App
Engine.
appcfg action=update war=war
options
arg value=--enable_jar_splitting /
/options
/appcfg
/target

I'm using the target as above but I get message:
Found a jar file too large to upload. Consider using --
enable_jar_splitting.

Did I specified something wrong in the above target to enable jar
splitting?
-- 
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] Ant and providing email / password

2010-01-14 Thread Marcel Overdijk
target name=update description=Uploads the application to App
Engine.
appcfg action=update war=war
options
arg value=--enable_jar_splitting /
/options
/appcfg
/target

I have above ant target to update the app.

But when run I get this message:

[java] Your authentication credentials can't be found and may have
expired.
[java] Please run appcfg directly from the command line to re-
establish your credentials.

How can I supply the email and password when running the ant target. I
don't want to store then in build.xml (at least not the password).
-- 
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] have a solution to create docx and xlsx Microsoft Office files on GAE by using GaeVFS to generate zip files

2010-01-14 Thread Houston startup coder
I posted to this list a long time ago to ask about creating Microsoft
Word and Excel files on Google App Engine since traditional Java
libraries like Apache POI are not supported.  Thought I'd be helpful
and share a solution that works for me.  Basically, I'm leveraging
GaeVFS to generate the zip-based Microsoft Office Open XML documents
on  Google App Engine.  The whole story is here:

http://stephenhuey.wordpress.com/2010/01/01/docxgae/


I shared this solution with the list a while ago, but I just found out
from a Google employee that the post wasn't allowed to go through
since I replied to a thread of mine that had aged beyond a certain
threshold.

Enjoy,
Stephen Huey
-- 
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: App instance recycling and response times - is there solution?

2010-01-14 Thread Stephan Hartmann
Jeff,

in one point i disagree.

In a high available einvironment you would have a cluster of load balanced
application servers and you would deploy new versions of your app in turn,
one at a time.
So if one instance is down the other(s) will continue serving your users
(though it might require sticky sessions).
Of course, this is a must for enterprise applications.

Regards,
Stephan


2010/1/13 Jeff Schnitzer j...@infohazard.org

 I've been thinking about this issue a little.  It's not quite as
 straightforward as just keeping an instance warm.  Even if you have an
 app that gets multiple hits per second, there will still be cold
 starts:

  * When a new instance comes online to serve more demand.
  * When you redeploy a version of your app.

 Is appengine smart about letting new instances added to the pool warm
 up before serving requests?  It's hard to tell from my logs but it
 doesn't look like it.

 I know appengine is *not* smart about warming up an instance before
 redeploying.  When I redeploy, some large number of users must wait
 while the appserver(s) startup.

 One thing to keep in mind during these discussions is how other Java
 EE environments solve this problem:  They *don't*.  For a long time
 it's been assumed in the EE development that server initialization
 time is irrelevant, and we grew fat libraries that take tens of
 seconds to minutes to start up.  The problem is, this time has *never*
 been irrelevant - even in a production environment you must deploy new
 versions of your app, and none of the appservers I'm familiar with are
 smart enough to keep serving off the old version while the new one
 loads.  Users with unlucky timing always got screwed.

 We just didn't care because we only deployed code once a week and we
 added/removed server instances far less often than that.  Well guess
 what, now it's easy - you can deploy up to 1,000 times per day just by
 clicking a button in eclipse, and server provisioning is now not only
 trivial but 100% transparent to you.  Just try that with WebSphere!

 You aren't going to like this, but here's the only answer that isn't
 going to piss off your customers:  Stop using Spring.  Stop performing
 eager initialization.  Stop assuming that users don't see startup
 time.  Yes, change the way you write code.

 Jeff

 On Tue, Jan 12, 2010 at 1:11 PM, Don Schwarz schwa...@google.com wrote:
  Make sure you are using offline precompilation.  We are always working on
  optimizations to decrease the latency of loading requests, but here are
 some
  other tips:
 
 http://googleappengine.blogspot.com/2009/12/request-performance-in-java.html
  On Tue, Jan 12, 2010 at 3:01 PM, Locke locke2...@gmail.com wrote:
 
  I agree that making users wait 20 seconds for your app to load is not
  adequate for the vast majority of apps. I also agree that
  reengineering everything to try and hide load times from users is a
  poor solution in most cases.
 
  Using cron to keep your app loaded will not consume your quota; it
  will actually conserve your quota. Every time your app loads you will
  be billed for 20s of CPU time. If you keep it loaded, you will only be
  billed for a few milliseconds per 'keep-alive' cron execution.
 
  However, the Google engineers who post here have recommended against
  doing this. If everyone did it, appengine might run out of resources
  (RAM, I assume).
 
  I imagine that Google will need to either find a way to load apps in
  1/10th the time (the ideal solution), raise prices significantly, or
  ration  resources in some other way.
 
  If I may make a suggestion to the Google engineers: offer a keep my
  app loaded option and make it available ONLY for billing-enabled
  apps. Disable cron for apps which are not billing-enabled, so that
  people who just want free hosting or are merely toying with appengine
  won't be using up resources all the time.
 
  This way, the people who have shown that they are serious about
  appengine (by laying their cash down) won't be driven away by the
  people who are just fooling with it.
 
  Yes, we are seriously considering something like this.  Please star this
  issue for updates:
  http://code.google.com/p/googleappengine/issues/detail?id=2456
 
 
  On Jan 12, 1:43 pm, Konrad konradpaw...@gmail.com wrote:
   I asked same question on Stack Overflow (http://stackoverflow.com/
  
 questions/2051036/google-app-engine-application-instance-recycling-and-
   response-times).
  
   So far proposed solutions (in SO thread and found on other websites)
   do not satisfy me. Creating cron or any other kind of periodic HTTP
   requests to keep instance up and running make no sense. First - there
   is no evidence that this instance will serve next coming request (eg.
   from different network location etc.), second - it will consume Quota
   (which is less a problem).
  
   Other solution - refactoring app - replacing critical functionality
   with lightweight servlet - sounds better, but is GAE forcing to go
 

Re: [appengine-java] Re: A running app does not detect newly created files.

2010-01-14 Thread Jason (Google)
Thanks for the extra information re: your use of Narwhal. I don't have too
much experience with it, but can you implement the Blobstore docs demo
without Narwhal to see if it works for you as it does for me? This is the
doc I used to implement my version:

http://code.google.com/appengine/docs/java/blobstore/overview.html

- Jason

On Thu, Jan 14, 2010 at 9:53 AM, George Moschovitis 
george.moschovi...@gmail.com wrote:



 On Jan 14, 12:47 am, Jason (Google) apija...@google.com wrote:
  I implemented the sample Blobstore application provided in the
 documentation
  (two servlets, Upload.java and Serve.java -- Upload.java redirects to
  Serve.java which looks up the blob and renders it using
  blobstoreService.serve) but I'm not able to reproduce your error. I can
 see
  that, on the development server, the uploaded file is indeed stored in
  WEB-INF/appengine-generated, but there aren't any exceptions when trying
 to
  read this file regardless of whether the development server is still
  running.
 
  Out of curiosity, what platform are you running (Windows, Mac OS X, or
  Linux) and what are the permissions of the newly added file? This is what
 I
  see: -rw-r--r-- If your case is similar, you shouldn't have any issue

 I see this as well:

 -rw-r--r-- 1 root  root40018 2010-01-14 19:49
 fgMldUn0bca_tWegd6UK2Q

 but I still get the error where trying to view the file.

 However, if I restart the devserver and try to serve the file it
 works!
 It seems like the server is getting a snapshot of the filesystem and
 does not recognize new files?

 Btw I am running a Javascript (Rhino) application using narwhal
 (www.narwhaljs.org)
 Perhaps this is a problem with narwhal and not the devserver?

 regards,
 -g.

 --
 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] Using geocoding service throws G_GEO_TOO_MANY_QUERIES

2010-01-14 Thread Willem
I use the static MAPS API to geolocate cities and use my registered
API key. I notice the G_GEO_TOO_MANY_QUERIES is thrown very fast on
App Engine. Even when i do 1 request each 5 seconds I get this error
after 5 calls.

Strangely this never happens on my local GAE environment where I can
perform queries at a much faster rate (each 200ms)

Any ideas? Thx
-- 
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] Doubt with detachability...

2010-01-14 Thread Jason (Google)
Thank you for the extra information. If you enable debug output for the ORM
layer, you may see an explanation for why you don't need to detach your
object again after retrieving it from memcache. Since it works for you
without the second detachment, I recommend omitting the second detachCopy
call and moving on.

If you're still curious, check out the ORM debug output. Just change the
DataNucleus lines in logging.properties to INFO instead of WARNING.

- Jason

On Wed, Jan 13, 2010 at 8:15 PM, Prashant Gupta nextprash...@gmail.comwrote:

 Yes, it works fine if I do not detach second time...

 2010/1/14 Jason (Google) apija...@google.com

 Does your application work if you don't detach the entity a second time?
 For instance, are you able to update the entity, re-cache it, then retrieve
 it and pass it back into makePersistent without any errors? I was under the
 impression that passing an entity into makePersistent re-attaches the
 entity, but it's also possible that you don't need to explicitly detach it
 more than once.

 - Jason

 On Tue, Jan 12, 2010 at 7:15 AM, Prashant Gupta 
 nextprash...@gmail.comwrote:

 Hi,

 Here is my doubt...

 Suppose I created a new Entity : Entity ety = new Entity();
 Created a new persistent manager and made it persistent :
 pm.makePersisent(ety);
 Detached it and cached to memcache : cache.put(myentity,
 pm.detachCopy(ety));
 pm.close();

 now, in the same request or subsequent request, I need that entity again.
 So, I picked it from memcache : Entity ety = cache.get(myentity);
 Made some changes : ety.doSomeChange();
 Opened a new persistent manager and persisted it :
 pm.makePersistent(ety);
 Now I want to update memcache also :  cache.put(myentity, *
 pm.detachCopy(ety)*);  // line 204
 pm.close();

 Is it required to detach entity second time? While trying to detach is
 second time I am getting following exception;

 javax.jdo.JDOUserException: Object of type xyz.Entity and identity
 ety was not detached correctly. Please consult the log for any possible
 information.
 at
 org.datanucleus.jdo.NucleusJDOHelper.getJDOExceptionForNucleusException(NucleusJDOHelper.java:375)
 at
 org.datanucleus.jdo.JDOPersistenceManager.jdoDetachCopy(JDOPersistenceManager.java:1110)
  at
 org.datanucleus.jdo.JDOPersistenceManager.detachCopy(JDOPersistenceManager.java:1134)
 at HelperClass.makePersistent(HelperClass.java:204)
 .

 I am not able to point out any other reason for this exception.

 Following is my Entity Class :

 @PersistenceCapable(identityType = IdentityType.APPLICATION, detachable =
 true)
 public class Entity implements Serializable{

 @SuppressWarnings(unused)
  @Persistent(primaryKey = true)
 private String ID;

  @Persistent
 private String Version;

 @Persistent
  private Boolean Enabled;
  @Persistent
  private Date TimeStamp;
  @Persistent
  private LinkedListKey Permissions;
  @SuppressWarnings(unused)
  @Persistent
 private ModuleType Type; // ModuleType is an Enum Type


 --
 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.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.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] Order clause and missing entities

2010-01-14 Thread Kyrre
Hi,

In both the DataViewer and in my app using JDO, I'm seeing a strange
difference in the number of results returned depending on whether I
add an order by clause:

62 results:
SELECT * FROM ListEntry where appId = '323629596' and latest = false

38 results:
SELECT * FROM ListEntry where appId = '323629596' and latest = false
order by date

All the entities have a date property. The same thing also happens if
I add an inequality operator on the date property.

What am I missing here? Thanks for any help.

Kyrre
-- 
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] How to store/retrieve inheritance and composition in Datastore

2010-01-14 Thread Federico Keen
Hi guys, I'm trying to use the datastore with a model like this:

Class A extends C
{
 @Persistent
 private String a1;
}

Class B extends C
{
 @Persistent
 private String b1;
 @Persistent
 private D dAttribute;
}

Class D
{
 @Persistent
 private String d1;
}

Class C
{
 @PrimaryKey
 @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
 private Key id;

 @Persistent
 private double c1;
 @Persistent
 private double c2;
}

How should I declare this in Java?
How can I make queries? The following queries are failing and I don't
can't find more help!

public ListA get( String minC1, String maxC1 ) {
PersistenceManager pm = WherePersistanceManagerFactory.get
().getPersistenceManager();
Query query = pm.newQuery(A.class);
query.setFilter(c1 =  + minC1 +   c1 =  + maxC1);
return (ListA) query.execute();
}

public ListB get( String minC1, String maxC1 ) {
PersistenceManager pm = WherePersistanceManagerFactory.get
().getPersistenceManager();
Query query = pm.newQuery(B.class);
query.setFilter(c1 =  + minC1 +   c1 =  + maxC1 +  
dAttribute.d1 = someConstant);
return (ListB) query.execute();
}
I can't understand how to store/retrieve classes that inherit from
other classes or classes as attributes of other classes. I always get
an error saying that the subclass hasn't got the superclass attribute
or that the class that has a reference to the other class cannot find
that attribute.
Can anyone help me?
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: [appengine-java] Re: App instance recycling and response times - is there solution?

2010-01-14 Thread Jeff Schnitzer
On Thu, Jan 14, 2010 at 12:59 PM, Stephan Hartmann hartm...@metamesh.de wrote:
 Jeff,

 in one point i disagree.

 In a high available einvironment you would have a cluster of load balanced
 application servers and you would deploy new versions of your app in turn,
 one at a time.
 So if one instance is down the other(s) will continue serving your users
 (though it might require sticky sessions).
 Of course, this is a must for enterprise applications.

In theory, yes.  In practice, you often have a clustered, replicated
cache which (depending on your code change) may or may not gracefully
handle swapping out code on one server at a time.  Also, you'll lose
session state - unless have replicated sessions, which also might not
survive your code changes.  Of course, replicating sessions further
decreases your scalability.

I've spent most of the last decade deploying big enterprise systems
like this and they really don't work quite like the advertising
literature says.  It has required a few changes in my coding practice,
but I'm much happier with the GAE approach.

Jeff
-- 
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: App instance recycling and response times - is there solution?

2010-01-14 Thread 风笑雪
I've tried this, but after 1 day, GAE recycled my instance every 40 seconds.
Then I used task queue to request my site per 30 seconds, but GAE
started to recycle every 20 seconds.

So I don't think it's a good way.

2010/1/13 杨浩 skzr@gmail.com:
 create a cron:every one minutes to run for keep your app online in the GAE!
 I try it,and it is work very good!

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


-- 
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: Task Queue problems

2010-01-14 Thread yjun hu
thanks.
also u can use GPass+SKYPE(or ssh)  replace

2010/1/15 杨浩 skzr@gmail.com

 代理 支持ssl:
 proxy.kerkgroep-hopjestad.com 3128
 jwe219.internetdsl.tpnet.pl 3128
 webmail.mwit.ac.th 80

 我一般用第一个,他不是很稳定!

 2010/1/13 yjun hu itswa...@gmail.com

 which proxy are u using now?

 2010/1/12 杨浩 skzr@gmail.com

 在中国appspot的https无法正常工作,因为gfw屏蔽了这部分,你寻找一个https代理,然后再测试应该就没有问题了!




 --
 dream or truth



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




-- 
dream or truth
-- 

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: Ant and providing email / password

2010-01-14 Thread steveb
Here's how I did it...

java classname=com.google.appengine.tools.admin.AppCfg
inputstring=${appengine.password}
sysproperty key=appengine.sdk.root 
value=${sdk.dir} /
classpath
fileset dir=${sdk.dir}/lib 
includes=**/*.jar /
/classpath
arg value=--email=${appengine.email} /
arg value=update /
arg value=${foo.war} /
/java
-- 
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] Any examples for low level datastore? or suggest another way?

2010-01-14 Thread Rusty Wright

Joel Weight wrote a data store service that I thought was easy to understand.  Reading 
his code made me realize that what's in the data store is basically the fields of the 
object, without the object itself; therefore to re-hydrate an object from the 
data store, you first instantiate/new the object, then fetch its row from the data store, 
then for each property you got from the data store, call the object's setter with it.

http://kenai.com/projects/seedsofchance/sources/subversion/content/soc/src/java/jota/soc/data/service/DataServiceImpl.java


philip wrote:

Hi All,

I want to use the low level datastore, I looked at the documentation
and it looks ... complex.
http://code.google.com/intl/zh-HK/appengine/docs/java/javadoc/com/google/appengine/api/datastore/package-summary.html

Basically, I have a client program which needs to create tables and
their entities dynamically, so the columns would change over time.
This does not fit well with JDO as it works for fixed column entitys
that are annotated. So I thought to use the low level API but it looks
difficult. Is there any example code around?

Alternatively, can someone suggest another way?

Phil

-- 
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] Unable to open DataViewer

2010-01-14 Thread Saurabh Mehta
Hi,

We have 2 applications, which we are using for demo for one of our
customers..

- snugcampus-dtu-btech2010-demo
- snugcampus-admissions-dtu-demo

In both the applications we are facing the below issues which we need
to address ASAP, before we have the next demo.

1) After we enter some test data, keeping them as authentic as
possible and avoiding all the chances of getting corrupt data being
entered. We are unable to view the data in the Appengine dataviewer,
whereas if i try to access the same within our code, it works fine.

2) We keep the key as null before saving the data, and expect the
appengine to generate the key for us. The key id generated for the
entities are not in the sequential order, sometimes we get the id as
1/2/3, sometimes it gets 1001/1002 and in the last time got the id as
2001.. We have about less than 10 entities in total.

In the next demo, it is highly required by us to show them how their
data gets saved in the appengine datastore, and how the same can be
viewed in the appengine admin console. Request your support, so that
we may come to the cause of the issue and correct the same in our
code, if we are making any mistake. The one uploaded on the
application is a prototype and we would building the final application
from learnings achieved on the same.

Thanks in advance!
-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-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: After how much time of no traffic does GAE shut-down the instance

2010-01-14 Thread 杨浩
the other talk about your
problem!https://groups.google.com/group/google-appengine-java/msg/2c425aa60b091f5d?dmode=print
GROUPS Title:
 App instance recycling and response times - is there solution?
https://groups.google.com/group/google-appengine-java/browse_thread/thread/bd5110b72b852e15/9f751301a9fb943c?q=App+instance+recycling+and+response+times+-+is+there+solution#9f751301a9fb943c
2010/1/15 Ikai L (Google) ika...@google.com

 Hey everybody,

 2 minutes is EXTREMELY aggressive. If you have evidence that your app is
 being cycled out this quickly, can you let us know your app ID? There may be
 something going on with your application. Our numbers indicate that even if
 you are getting a minute amount of traffic, you shouldn't not be cycled out.

 In general we discourage using cron to ping your application. Cold startup
 time is a very high priority for us.

 2010/1/10 杨浩 skzr@gmail.com

 my GAE app too shutdown every tow minutes when no request!
 so when my app init that is terrible, because spring init need 15s!
 so my answer is:
 create a cron:every one minutes to run once,It's work very good!(every tow
 minutes don't keep my app online, It's still shutdown!)


 --
 Ikai Lan
 Developer Programs Engineer, Google App Engine

-- 

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: This App Engine is a JOKE

2010-01-14 Thread Nick Johnson (Google)
On Thu, Jan 14, 2010 at 5:38 AM, WallyDD shaneb...@gmail.com wrote:

 It would be nice if people could use some actual examples as to why
 app engine is a joke. One problem with emails doesn't cut it. The time
 limit has been discussed until we are all sick of it.

 I am not convinced that Google has a lot of money making websites on
 it (whether they make money through the hosting fees or the adsense
 revenue).

 Next up I will go and figure out why I keep getting all these timeouts
 in my logfile. I hope this isn't a case of a hosting provider
 overloading their server.

 For my two cents (slightly off topic);
 No big company is using it exclusively for their website needs.
 Bestbuy uses it for some very small part. The whitehouse? I wonder
 what that is about.
 Google also blocks GAE to quite a few countries yet points fingers at
 the Chinese Govt. Why doesn't Google give Hillary the finger?


This is not correct. We do not block any App Engine site for any country or
region. Any blocking is entirely due to third parties between the user and
our servers.

-Nick Johnson



 On Jan 12, 8:41 am, mateusz mateusz.r...@gmail.com wrote:
  Standard servlet, sometimes work sometimes not throwing: Request was
  aborted after waiting too long to attempt to service your request. -
  I think it's when application is waken up from sleeping, but no
  pattern - strange;
  Another joke, when I am sending emails from appliacation, it's
  sometimes send sometimes NOT, without exceptions; if I send to google
  account - it's delivered in a second; when I send to other account
  (not gmail), I have to wait long time to be delivered;
 
  It's wasting time to think that you can use google app engine as
  production environment event for the smallest form based application.
 
  Do sth with it or close that business;

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






-- 
Nick Johnson, Developer Programs Engineer, App Engine
Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number:
368047
-- 

You received this message because you are subscribed to the Google Groups "Google App Engine" group.

To post to this group, send email to google-appeng...@googlegroups.com.

To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.



Re: [google-appengine] Bulk Updates

2010-01-14 Thread Nick Johnson (Google)
Hi,

On Thu, Jan 14, 2010 at 6:07 AM, Patrick Twohig
patr...@namazustudios.comwrote:

 Perhaps I didn't explain my use case entirely well enough.  Basically it's
 a leaderboard (high scores table) for an online game.  After thinking a
 little more GAEly I came up with the following solution.  I was curious if
 anybody had any comments or critiques for my approach.

 Create a WeeklyLeaderboardEntry (or similarly named kind).  That
 basically contains the player's score and the player's unique name.  And use
 it as follows:

 Make some code that establishes a sequence of weeks.  Let's say the number
 of weeks since the Epoch.  For instance if it's January 3, 1970, the current
 week is 0.  If it's January 8, 1970 it's week 1 and so on.

 When player finishes game:
 1) Look for WeeklyLeaderboardEntry with the current.  If it exists, skip to
 step 4. (Maybe name the entitye PlayerName-Sequence).
 2) Create WeeklyLeaderboardEntry for the current week.
 3) Queue the entity to be deleted a week from now.
 4) Set the player's current high score to that entity.
 5) Persist object to be updated later in case the player plays another game

 When displaying the leaderboard:
 1) Query for WeeklyLeaderboardEntries
 2) Filter out ones not pertaining to the current week
 3) Sort highest score to lowest

 This way the following holds true:

- When the user is updating his/her high score he/she is only working a
single entity.  I never need to do bulk updates in a cron job or anything.
- I don't need to write a cron job to go through a whole mess of
leaderboard entities trying to reset the counter for everbody at once.
- When the week rolls over it appears to happen atomically because I
just restrict the query to the current week.  There may be stale entry
objects but those will get deleted at he app engine's leisure.

 My only questions/concerns:

- Is it okay to queue something to be deleted after a week? Will the
task queue accept a timeout for that length of time?


Timeouts can be for up to a month. Queueing a task per entry is somewhat
inefficient, however - you'd be better running a series of tasks at the end
of the week that query for old entries and delete them in batches.


-
- Will the task queue keep up with clearing out stale entities as fast
as they can be created


That depends on the rate of creation. Batch operations will allow you to
sustain a much higher rate with fewer resources.

-Nick Johnson



- ?



 On Wed, Jan 13, 2010 at 7:28 PM, Eric Ka Ka Ng ngk...@gmail.com wrote:

 how about batch update using db.put()?

 following is extracted from

 http://googleappengine.blogspot.com/2009/06/10-things-you-probably-didnt-know-about.html


 For example, take a look at this common pattern:

 for entity in MyModel.all().filter(color =,
old_favorite).fetch(100):
  entity.color = new_favorite
  entity.put()


 Doing the update this way requires one datastore round trip for the
 query, plus one additional round trip for each updated entity - for a
 total of up to 101 round trips! In comparison, take a look at this
 example:

 updated = []
 for entity in MyModel.all().filter(color =,
old_favorite).fetch(100):
  entity.color = new_favorite
  updated.append(entity)
 db.put(updated)

 By adding two lines, we've reduced the number of round trips required
 from 101 to just 2!



 - eric


 2010/1/14 Patrick Twohig patr...@namazustudios.com:
  So I'm looking at trying to reset large amounts of data en masse.  Say I
  want to reset a counter on every account each week, how would I go about
  implementing something like that?  Would I have to go through each
 object,
  update it, and store it?  If that's the case, how do I go about doing so
  without killing my quota or running up my usage extremely high?
 
  Thanks,
  Patrick.
 
  --
  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.comgoogle-appengine%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/google-appengine?hl=en.






 --
 Patrick H. Twohig.

 Namazu Studios
 P.O. Box 34161
 San Diego, CA 92163-4161

 Office: 619.862.2890 x100
 Cell: 619.453.5075
 Twitter: @svm_invictvs
 IRC: svm_invic...@irc.freenode.net ##java, #android-dev, #iphonedev,
 #appengine

 http://www.namazustudios.com/

 This communication, and any 

[google-appengine] Re: This App Engine is a JOKE

2010-01-14 Thread Thanasis
Thanks for the clarification.

On Jan 14, 10:19 am, Nick Johnson (Google) nick.john...@google.com
wrote:
 This is not correct. We do not block any App Engine site for any country or
 region. Any blocking is entirely due to third parties between the user and
 our servers.

 -Nick Johnson

 --
 Nick Johnson, Developer Programs Engineer, App Engine
 Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number:
 368047
-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.




[google-appengine] Re: This App Engine is a JOKE

2010-01-14 Thread WallyDD


Rubbish.

Do you want some proof?

 This is not correct. We do not block any App Engine site for any country or
 region. Any blocking is entirely due to third parties between the user and
 our servers.

 -Nick Johnson







  On Jan 12, 8:41 am, mateusz mateusz.r...@gmail.com wrote:
   Standard servlet, sometimes work sometimes not throwing: Request was
   aborted after waiting too long to attempt to service your request. -
   I think it's when application is waken up from sleeping, but no
   pattern - strange;
   Another joke, when I am sending emails from appliacation, it's
   sometimes send sometimes NOT, without exceptions; if I send to google
   account - it's delivered in a second; when I send to other account
   (not gmail), I have to wait long time to be delivered;

   It's wasting time to think that you can use google app engine as
   production environment event for the smallest form based application.

   Do sth with it or close that business;

  --
  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%2Bunsubscrib 
  e...@googlegroups.com
  .
  For more options, visit this group at
 http://groups.google.com/group/google-appengine?hl=en.

 --
 Nick Johnson, Developer Programs Engineer, App Engine
 Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number:
 368047
-- 
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: This App Engine is a JOKE

2010-01-14 Thread WallyDD
http://code.google.com/p/googleappengine/issues/detail?id=1072

On Jan 14, 4:19 pm, Nick Johnson (Google) nick.john...@google.com
wrote:
 On Thu, Jan 14, 2010 at 5:38 AM, WallyDD shaneb...@gmail.com wrote:
  It would be nice if people could use some actual examples as to why
  app engine is a joke. One problem with emails doesn't cut it. The time
  limit has been discussed until we are all sick of it.

  I am not convinced that Google has a lot of money making websites on
  it (whether they make money through the hosting fees or the adsense
  revenue).

  Next up I will go and figure out why I keep getting all these timeouts
  in my logfile. I hope this isn't a case of a hosting provider
  overloading their server.

  For my two cents (slightly off topic);
  No big company is using it exclusively for their website needs.
  Bestbuy uses it for some very small part. The whitehouse? I wonder
  what that is about.
  Google also blocks GAE to quite a few countries yet points fingers at
  the Chinese Govt. Why doesn't Google give Hillary the finger?

 This is not correct. We do not block any App Engine site for any country or
 region. Any blocking is entirely due to third parties between the user and
 our servers.

 -Nick Johnson







  On Jan 12, 8:41 am, mateusz mateusz.r...@gmail.com wrote:
   Standard servlet, sometimes work sometimes not throwing: Request was
   aborted after waiting too long to attempt to service your request. -
   I think it's when application is waken up from sleeping, but no
   pattern - strange;
   Another joke, when I am sending emails from appliacation, it's
   sometimes send sometimes NOT, without exceptions; if I send to google
   account - it's delivered in a second; when I send to other account
   (not gmail), I have to wait long time to be delivered;

   It's wasting time to think that you can use google app engine as
   production environment event for the smallest form based application.

   Do sth with it or close that business;

  --
  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%2Bunsubscrib 
  e...@googlegroups.com
  .
  For more options, visit this group at
 http://groups.google.com/group/google-appengine?hl=en.

 --
 Nick Johnson, Developer Programs Engineer, App Engine
 Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number:
 368047
-- 
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: This App Engine is a JOKE

2010-01-14 Thread Nickolas Daskalou
Wow, reading the comments on that issue scares me. Does Google really block
App Engine access in those countries, or are those countries blocking GAE
IPs?


2010/1/14 WallyDD shaneb...@gmail.com

 http://code.google.com/p/googleappengine/issues/detail?id=1072

 On Jan 14, 4:19 pm, Nick Johnson (Google) nick.john...@google.com
 wrote:
  On Thu, Jan 14, 2010 at 5:38 AM, WallyDD shaneb...@gmail.com wrote:
   It would be nice if people could use some actual examples as to why
   app engine is a joke. One problem with emails doesn't cut it. The time
   limit has been discussed until we are all sick of it.
 
   I am not convinced that Google has a lot of money making websites on
   it (whether they make money through the hosting fees or the adsense
   revenue).
 
   Next up I will go and figure out why I keep getting all these timeouts
   in my logfile. I hope this isn't a case of a hosting provider
   overloading their server.
 
   For my two cents (slightly off topic);
   No big company is using it exclusively for their website needs.
   Bestbuy uses it for some very small part. The whitehouse? I wonder
   what that is about.
   Google also blocks GAE to quite a few countries yet points fingers at
   the Chinese Govt. Why doesn't Google give Hillary the finger?
 
  This is not correct. We do not block any App Engine site for any country
 or
  region. Any blocking is entirely due to third parties between the user
 and
  our servers.
 
  -Nick Johnson
 
 
 
 
 
 
 
   On Jan 12, 8:41 am, mateusz mateusz.r...@gmail.com wrote:
Standard servlet, sometimes work sometimes not throwing: Request was
aborted after waiting too long to attempt to service your request. -
I think it's when application is waken up from sleeping, but no
pattern - strange;
Another joke, when I am sending emails from appliacation, it's
sometimes send sometimes NOT, without exceptions; if I send to google
account - it's delivered in a second; when I send to other account
(not gmail), I have to wait long time to be delivered;
 
It's wasting time to think that you can use google app engine as
production environment event for the smallest form based application.
 
Do sth with it or close that business;
 
   --
   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.comgoogle-appengine%2Bunsubscrib
 e...@googlegroups.com
   .
   For more options, visit this group at
  http://groups.google.com/group/google-appengine?hl=en.
 
  --
  Nick Johnson, Developer Programs Engineer, App Engine
  Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration
 Number:
  368047

 --
 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] Bulk Updates

2010-01-14 Thread Patrick Twohig
Ah yeah, deleting in bulk in a cron job or ongoing task would definitely
work. I dunno why that didn't dawn on me earlier.  Thanks Nick!

On Thu, Jan 14, 2010 at 12:21 AM, Nick Johnson (Google) 
nick.john...@google.com wrote:

 Hi,

 On Thu, Jan 14, 2010 at 6:07 AM, Patrick Twohig patr...@namazustudios.com
  wrote:

 Perhaps I didn't explain my use case entirely well enough.  Basically it's
 a leaderboard (high scores table) for an online game.  After thinking a
 little more GAEly I came up with the following solution.  I was curious if
 anybody had any comments or critiques for my approach.

 Create a WeeklyLeaderboardEntry (or similarly named kind).  That
 basically contains the player's score and the player's unique name.  And use
 it as follows:

 Make some code that establishes a sequence of weeks.  Let's say the number
 of weeks since the Epoch.  For instance if it's January 3, 1970, the current
 week is 0.  If it's January 8, 1970 it's week 1 and so on.

 When player finishes game:
 1) Look for WeeklyLeaderboardEntry with the current.  If it exists, skip
 to step 4. (Maybe name the entitye PlayerName-Sequence).
 2) Create WeeklyLeaderboardEntry for the current week.
 3) Queue the entity to be deleted a week from now.
 4) Set the player's current high score to that entity.
 5) Persist object to be updated later in case the player plays another
 game

 When displaying the leaderboard:
 1) Query for WeeklyLeaderboardEntries
 2) Filter out ones not pertaining to the current week
 3) Sort highest score to lowest

 This way the following holds true:

- When the user is updating his/her high score he/she is only working
a single entity.  I never need to do bulk updates in a cron job or 
 anything.
- I don't need to write a cron job to go through a whole mess of
leaderboard entities trying to reset the counter for everbody at once.
- When the week rolls over it appears to happen atomically because I
just restrict the query to the current week.  There may be stale entry
objects but those will get deleted at he app engine's leisure.

 My only questions/concerns:

- Is it okay to queue something to be deleted after a week? Will the
task queue accept a timeout for that length of time?


 Timeouts can be for up to a month. Queueing a task per entry is somewhat
 inefficient, however - you'd be better running a series of tasks at the end
 of the week that query for old entries and delete them in batches.


-
- Will the task queue keep up with clearing out stale entities as fast
as they can be created


 That depends on the rate of creation. Batch operations will allow you to
 sustain a much higher rate with fewer resources.

 -Nick Johnson



- ?



 On Wed, Jan 13, 2010 at 7:28 PM, Eric Ka Ka Ng ngk...@gmail.com wrote:

 how about batch update using db.put()?

 following is extracted from

 http://googleappengine.blogspot.com/2009/06/10-things-you-probably-didnt-know-about.html


 For example, take a look at this common pattern:

 for entity in MyModel.all().filter(color =,
old_favorite).fetch(100):
  entity.color = new_favorite
  entity.put()


 Doing the update this way requires one datastore round trip for the
 query, plus one additional round trip for each updated entity - for a
 total of up to 101 round trips! In comparison, take a look at this
 example:

 updated = []
 for entity in MyModel.all().filter(color =,
old_favorite).fetch(100):
  entity.color = new_favorite
  updated.append(entity)
 db.put(updated)

 By adding two lines, we've reduced the number of round trips required
 from 101 to just 2!



 - eric


 2010/1/14 Patrick Twohig patr...@namazustudios.com:
  So I'm looking at trying to reset large amounts of data en masse.  Say
 I
  want to reset a counter on every account each week, how would I go
 about
  implementing something like that?  Would I have to go through each
 object,
  update it, and store it?  If that's the case, how do I go about doing
 so
  without killing my quota or running up my usage extremely high?
 
  Thanks,
  Patrick.
 
  --
  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 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.comgoogle-appengine%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/google-appengine?hl=en.






 --
 Patrick H. Twohig.

 Namazu Studios
 P.O. Box 

[google-appengine] Re: Error when running Guestbook

2010-01-14 Thread Wesley Chun (Google)
greetings maly!

as netbeans isn't officially supported, i checked with another App
Engine team member. he looked at your error and thinks that there may
be something wrong with your Netbeans setup as the Guestbook code is
fairly bulletproof. here is a link to a tutorial on using App Engine
with Netbeans:

http://rocky.developerblogs.com/tutorials/getting-started-google-app-engine-netbeans

good luck!
-- wesley
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Core Python Programming, Prentice Hall, (c)2007,2001
Python Fundamentals, Prentice Hall, (c)2009
   http://corepython.com

wesley.j.chun :: wesc+...@google.com
developer relations :: google app engine
-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-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] Running some code immediately before a Datastore put()?

2010-01-14 Thread Nickolas Daskalou
I have a property of a Model that is a hash of another property of the same
Model, eg:

class MyModel(db.Model):
  something = db.StringProperty()
  something_hash = db.StringProperty()
  def generate_hash(self):
self.something_hash = sha1(self.something)

I want generate_hash() to be automatically called just before the entity is
put() into the Datastore, without the developer having to explicitly call
entity.generate_hash().

I know I can create a put() method that makes such a call and then calls
put() on the superclass, but (a) is that the best way to do it, and (b) if
the put() is part of a batch put (eg. via db.put(entities)), will the put()
method of each model instance still be called?

Nick
-- 

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] Running some code immediately before a Datastore put()?

2010-01-14 Thread Eric Ka Ka Ng
would a PreCallHook works for your case?

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

- eric

2010/1/14 Nickolas Daskalou n...@daskalou.com:
 I have a property of a Model that is a hash of another property of the same
 Model, eg:

 class MyModel(db.Model):
   something = db.StringProperty()
   something_hash = db.StringProperty()
   def generate_hash(self):
     self.something_hash = sha1(self.something)

 I want generate_hash() to be automatically called just before the entity is
 put() into the Datastore, without the developer having to explicitly call
 entity.generate_hash().

 I know I can create a put() method that makes such a call and then calls
 put() on the superclass, but (a) is that the best way to do it, and (b) if
 the put() is part of a batch put (eg. via db.put(entities)), will the put()
 method of each model instance still be called?

 Nick

 --
 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: How to test my application with local database

2010-01-14 Thread Ian Marshall
Hi ivanceras,


At least I'm having a progress here
---
Good!


Here is the Postgresql error log

Sorry, I know nothing about Postgresql. I shall leave comments about
this part of your post to others.


Here is the error logs
--
I think that the clue is in your own statement Due to maybe it is not
allowed in app engine white list. Examining your stake trace, we have
the DataNucleus RDBMS making a connection with/using the MySQL Java
connector. This is fine, but Google AppEngine (GAE) code is also
involved here. It shouldn't be.

As you know, GAE will not allow use of MySQL directly as the
datastore. Somehow you are involving GAE, when I guess that instead
you want to run your web app in Eclipse whilst connecting to your
MySQL database. In that case, you cannot run this app in GAE.

When I use NetBeans, I launch my web app from within NetBeans with my
MySQL connection configured as per my jdoconfig.xml file using a
development Persistence Manager Factory (PMF) name. When I am ready to
run the web app from within my local GAE development server, I change
the PMF name used in my code by configuration and rebuild my app. My
builder constructs my \war folder every time, so now after building I
simply launch my GAE server (using a command in a Windows command
prompt window) whilst pointing to the correct folder. There is now no
MySQL involvement with the web app, and my datastore is now a local
BigTable database.

Am I on the right lines, and does this help you?


Conclusion
--
If anyone out there uses Eclipse and a MySQL database for developer
testing before unleashing on a local GAE development server, I am sure
that ivanceras would welcome your contribution.


Cheers,

Ian
-- 
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: This App Engine is a JOKE

2010-01-14 Thread OvermindDL1
On Thu, Jan 14, 2010 at 2:04 AM, Nickolas Daskalou n...@daskalou.com wrote:
 Wow, reading the comments on that issue scares me. Does Google really block
 App Engine access in those countries, or are those countries blocking GAE
 IPs?

It is mostly other countries blocking GAE.  If even one site on that
IP is not politically great for them, they tend to block it all.
Quite frankly I have no clue how the citizens let such a government
evolve...

GAE does block a couple due to embargos and such though I think, but
do not quote me.
-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-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: This App Engine is a JOKE

2010-01-14 Thread WallyDD
Here is a page from a user in Syria;
http://imgur.com/WGtuI

Only China blocks GAE.
The rest are blocked by google.

 Quite frankly I have no clue how the citizens let such a government
 evolve...
Are we talking about the entire US government or just Hillary?


On Jan 14, 5:56 pm, OvermindDL1 overmind...@gmail.com wrote:
 On Thu, Jan 14, 2010 at 2:04 AM, Nickolas Daskalou n...@daskalou.com wrote:
  Wow, reading the comments on that issue scares me. Does Google really block
  App Engine access in those countries, or are those countries blocking GAE
  IPs?

 It is mostly other countries blocking GAE.  If even one site on that
 IP is not politically great for them, they tend to block it all.
 Quite frankly I have no clue how the citizens let such a government
 evolve...

 GAE does block a couple due to embargos and such though I think, but
 do not quote me.
-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-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: This App Engine is a JOKE

2010-01-14 Thread OvermindDL1
On Thu, Jan 14, 2010 at 3:16 AM, WallyDD shaneb...@gmail.com wrote:
 Here is a page from a user in Syria;
 http://imgur.com/WGtuI

 Only China blocks GAE.
 The rest are blocked by google.

 Quite frankly I have no clue how the citizens let such a government
 evolve...
 Are we talking about the entire US government or just Hillary?

offtopic

Heh, any government I guess?

Reminds me of the quote:
  When the government fears the public, you have democracy.
  When the public fears the government, you have tyranny.
-- 
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: How I can predict or calculate overhead in Datastorage. For me now it looks like 900% or real stored data. Or its simple multiplayed by 10?

2010-01-14 Thread Петр Воронов
Many thanks. I will try.

2010/1/13 dburns drrnb...@gmail.com:
 Every single one of those properties is indexed by default.  Do you
 really need to be able to search or sort by every property?  If not,
 add indexed=False to the parameter list for each property where an
 index isn't required.

 That will affect new entries, but won't affect the existing data.  To
 update the existing data (to reduce space), you would have to traverse
 over all the entities and simply get and put them.

 On Jan 13, 6:09 am, Петр Воронов chemo...@gmail.com wrote:
 Hi Google and all.
 It's my third post about difference datastore size in Datastore
 Statistics and Total Stored Data in Dashboard (so and in Quota or
 Billing).
 Now I have in Statistic:
   Size of all entities 29 MBytes
 In Total Stored Data
 29% - 0.29 of 1.00 GBytes

 So I have overhead - 900%.
 I don't use any own created index.
 I have only two type of Kind

 class MarketStats(db.Model):
     typeID = db.IntegerProperty(required=True)
     regionID = db.IntegerProperty()
     solarSystemID = db.IntegerProperty(required=True)
     updated = db.DateTimeProperty()
     ordersSell = db.IntegerProperty(default=0)
     minSellPrice = db.IntegerProperty(default=0)
     maxSellPrice = db.IntegerProperty(default=0)
     averageSellPrice = db.IntegerProperty(default=0)
     medianSellPrice = db.IntegerProperty(default=0)
     volSellRemaining = db.IntegerProperty(default=0)
     volSellEntered = db.IntegerProperty(default=0)
     newestSellOrder = db.DateProperty(default=None)
     oldestSellOrder = db.DateProperty(default=None)
     ordersBuy = db.IntegerProperty(default=0)
     minBuyPrice = db.IntegerProperty(default=0)
     maxBuyPrice = db.IntegerProperty(default=0)
     averageBuyPrice = db.IntegerProperty(default=0)
     medianBuyPrice = db.IntegerProperty(default=0)
     volBuyRemaining = db.IntegerProperty(default=0)
     volBuyEntered = db.IntegerProperty(default=0)
     newestBuyOrder = db.DateProperty(default=None)
     oldestBuyOrder = db.DateProperty(default=None)

 class MarketHistory(MarketStats):
     date = db.DateProperty(required=True)

 All items of MarketStats work as Parents for some amount of MarketHistory 
 items.

 All of this has keys name build by
 %06d%09d % (typeID,solarSystemID) for MarketStats
 date.isoformat()+%06d%09d % (typeID,solarSystemID) for MarketHistory

 Please help how I can decrease datastore usage in Dashboard?
 Which tips and tricks I can use?
 Or it's simple multiply data from Statistic by 10 ?

 Best regards,
  Chem.

 --
 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: This App Engine is a JOKE

2010-01-14 Thread nickmilon
Locke ,

May be you are right I am not that experienced, but since I have been
around programming since IBM 360 370 era,  machines you probably have
only seen in technology museums, and I tough the subject for years
etc. etc.  and I still make a living from this job, means I am only
lucky. By the way my good lack helped me yesterday too when my latest
appl hosted on GAE was reviewed as Mashup of the day by
programmableweb.
Anyway - I will repeat here one more time what I posted some time ago
on the same subject.

GAE is another kind of animal - it has lots of visrtues and some
limitations compared to conventional hosting. Most of the limitations
engineering wise are the  result of its virtues, some others can be
rectified and I am sure there will be progress on that in future.
In my opinion for a large percentage of Web appls its virtues  far
outnumber its limitations. We as engineers must utilize the tool we
have in the best way we can.

Talking about scaling, I would emphasize automatic scaling.
Talking about Economic terms I want to draw your attention to that
GAE is a very attractive solution just because you can calculate your
costs up to cpu_ms and byte units, this factor alone can lead to
business models never heard off before.
A byproduct of the above is that GAE is the most Green platform
around.

Well if you think of all the above for a while before you come back
with an other GAE=joke thread.

Happy coding

Nick

On Jan 14, 5:49 am, Locke locke2...@gmail.com wrote:
 Nick, you must have very little experience programming if you can't
 think of a reason for a process to run for more than thirty seconds.
 Ever hear of background tasks? Cron? TaskQueue? Ever use URLFetch?
 That eats your execution time no matter how efficient your app is.
 Right now, appengine just does not scale. There are way too many hard
 limits and rate limits.

 It makes sense to rate-limit free users. It does NOT make sense to
 rate-limit paying customers. Cloud computing is supposed to scale.

 On Jan 13, 6:19 pm, nickmilon nickmi...@gmail.com wrote:



  Thanasis

  take it easy - it was just a joke (may be of a bad taste but, as you
  mentioned it was not my day) , and nothing to do with your English the
  intention was just to make you think that sometimes we write bad code
  in a harry and then blame the infrastructure or whatever.

  Getting to GAE now, this late start symptom has been covered in other
  threads here and there are explanations - solutions which I will not
  repeat.
  I have huge pages with more than 60 KB of js and some more of CSS and
  3rd party js etc etc, and which I have not even optimized yet, still
  hot start or cold start never exceeds 3'' including DNS lookups for
  complete load  you can try it herehttp://www.geognos.com/geo/en/cc/af.html
  or try  http://milon.appspot.com/stravon/db/cc/83.212.217.149latest
  performs a fetch from 100K+ records that include the complete IP
  allocations database and since nobody is using it  you can be sure you
  will get a cold start.

  Besides, I have seen other people here complain about their appls been
  slow and I verified it my self, the miracle is same applications
  became very fast in a couple of weeks time - I do not think the
  infrastructure improved that much meanwhile, just they have rewritten
  their code in a better way.

  Now this is my experience and that of many others with whom I talk
  about GAE, I can't exclude the possibility that you people complaining
  have a kind of bad lack and your Apps ride on a bad server or anything
  else.
  Still I think you got to know better GAE before you start
  complaining,  study the docs read the previous posts and if you have
  something special to solve come back here and describe your problem
  without any remarks, I am sure you will find people willing to help,
  or...  you are free to switch to a conventional hosting platform if
  you feel better there, staying here just complaining that GAE is joke
  it is not helpful neither too you nor to the community.

  Happy coding

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




[google-appengine] How can i view my application data?

2010-01-14 Thread Siddharth
Persistence management provided by GAE is great. However i am facing
some practical issues wrt this.
1. In my development environment, I would like to view the application
data. There are many reasons one of them being for debugging. Is there
any viewer for my application data?
2. Similarly i would like to view my application data after deploying
my application on GAE. How do i do it ?
-- 
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: How can i view my application data?

2010-01-14 Thread Adam
You can use the Development Console (http://code.google.com/appengine/
docs/python/tools/devserver.html#The_Development_Console),
It has a tool for looking into the Datastore.

On Jan 14, 8:35 am, Siddharth spatnai...@gmail.com wrote:
 Persistence management provided by GAE is great. However i am facing
 some practical issues wrt this.
 1. In my development environment, I would like to view the application
 data. There are many reasons one of them being for debugging. Is there
 any viewer for my application data?
 2. Similarly i would like to view my application data after deploying
 my application on GAE. How do i do it ?
-- 
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: Cron jobs fail with error Request was aborted after waiting too long to attempt to service your request.

2010-01-14 Thread Jason C
My understanding of this is that it's a general machine load issue and
depends on the traffic to the applications that are co-homed with
yours.

In the past, if you posted your App ID, G looked into it and adjusted
resources (perhaps manually?).

Given the radio silence, perhaps they are looking at the issue at a
deeper level?

j

On Jan 13, 10:14 pm, Abhinav Bhagwat abhinavbhag...@gmail.com wrote:
 With so many people experiencing this, I expect at least someone from google
 to acknowledge this and tell us if our code/design is incorrect or this
 is because of some bug in the GAE. I am ready to wait for a fix, but at
 least some one needs to tell where are things going wrong.

 Jason (Google), you were going to look into this. What happened? Do we have
 any update?

 Regards,
 Abhinav



 On Thu, Jan 14, 2010 at 4:55 AM, John_Idol giovanni.id...@gmail.com wrote:
  Guys - I get the exact same error both on a cron job (no particular
  pattern and very little being done - 4 queries which return nothing
  since my db is empty + sending an email at the end) and other normal
  calls.
  I have no clue of the reason why. I deployed the exact same app 4
  months ago and none of this was happening, it went offline then
  recently re-deployed (end of december) and I am seeing this problem.

  Puzzling!

  On Dec 14 2009, 12:11 pm, Abhi abhinavbhag...@gmail.com wrote:
   Sometimes my cron jobs fail with a HTTP 500 error and message:-

   Request was aborted after waiting too long to attempt to service your
   request. Most likely, this indicates that you have reached your
   simultaneous dynamic request limit. This is almost always due to
   excessively high latency in your app. Please seehttp://
  code.google.com/appengine/docs/quotas.htmlfor more details.

   When this happens the logs show that the job took about 10086ms of CPU
   time. The cron is the only job running in the application and it fires
   one request every 5 minutes. I don't see any reason of why the quota
   for simultaneous request should be exceed by this one req/5 minutes
   application. There is nothing else this application is doing.

   If i access the same page (which has admin only permissions - so i am
   sure no one else can access it) from a browser it never fails.

   Can someone help me with this?

  --
  You received this message because you are subscribed to the Google Groups
  Google App Engine group.
  To post to this group, send email to google-appeng...@googlegroups.com.
  To unsubscribe from this group, send email to
  google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2Bunsubscrib 
  e...@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] Google App Engine won’t recogni ze facebook package unless I rename it

2010-01-14 Thread Andrew Bialecki
I'm trying to intergrate Facebook Connect into an GAE app. I've got a basic
folder structure like so:

/gae-root
/myapp
/templates
/etc
app.yaml
settings.py

and I tried to add the PyFacebook library like so:

/gae-root
/myapp
/templates
/etc
/facebook
/djangofb
app.yaml
settings.py

I thought this would work, but now when I try to import facebook it throws a
module not found error. What's even weirder is that if I rename the
directory from facebook to foo, the import now works but I'll hit errors
later when I try to get the current logged in user.

Literally all I did was move the directory into my folder structure and try
an import. What am I missing? Sorry if this is an easy question.
-- 

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: This App Engine is a JOKE

2010-01-14 Thread qburst
We have been developing our internal HR and invoicing app in GAE for
the last 1.5 years.  This system used to be stable.  Of late, that has
changed.  We are getting  random server errors (timeouts may be), at
least 50% of the time. This has made the application quite unusable.

Is anyone else seeing these errors with increased frequency,
especially during the last two weeks? We are not paying for any usage
at the moment. Did Google reduce the free limits recently?
-- 
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] Sending emails - taskqueue is too quick?

2010-01-14 Thread Emanuel Berglund
I posted a while back about getting an OverQuotaError when sending
out 74 emails in quick succession.
It turned out I was breaking the 8 emails per second cap, to solve
this I was told to use a task queue.

I've now set up a task queue and have created a specific mail queue in
my queue.yml for sending emails out.
I use the following configuration with the aim to send out 8 emails
per minute, and I'm trying to not use the bucket by setting it to 0.

- name: mail-queue
  rate: 8/m
  bucket_size: 0


But, when I run a test and send out emails to 28 people, it seems it's
still sending out emails at a very high rate. It sends them out at
about 10 emails per second based on the information on the ETA of the
tasks in the queue in the live App Engine panel.

This isn't paced out to 8 emails per minute and I'm afraid I might go
over my qota and get the OverQuotaError again. Since I am sending out
a newsletter I really can't afford to have to restart it again and
risk sending the same letter twice to a number of people.

My account doesn't have billing activated but has had the free quota
bumped up.
-- 
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] Sending emails - taskqueue is too quick?

2010-01-14 Thread Joshua Smith
Just enable billing, and crank down what you are willing to pay to a tiny 
number.  The free caps on email then jump way up.

On Jan 14, 2010, at 9:49 AM, Emanuel Berglund wrote:

 I posted a while back about getting an OverQuotaError when sending
 out 74 emails in quick succession.
 It turned out I was breaking the 8 emails per second cap, to solve
 this I was told to use a task queue.
 
 I've now set up a task queue and have created a specific mail queue in
 my queue.yml for sending emails out.
 I use the following configuration with the aim to send out 8 emails
 per minute, and I'm trying to not use the bucket by setting it to 0.
 
 - name: mail-queue
 rate: 8/m
 bucket_size: 0
 
 
 But, when I run a test and send out emails to 28 people, it seems it's
 still sending out emails at a very high rate. It sends them out at
 about 10 emails per second based on the information on the ETA of the
 tasks in the queue in the live App Engine panel.
 
 This isn't paced out to 8 emails per minute and I'm afraid I might go
 over my qota and get the OverQuotaError again. Since I am sending out
 a newsletter I really can't afford to have to restart it again and
 risk sending the same letter twice to a number of people.
 
 My account doesn't have billing activated but has had the free quota
 bumped up.
 -- 
 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: This App Engine is a JOKE

2010-01-14 Thread Lucifer
In China, it really blocked by Gov. We cannot access Youtube,
Facebook, Twitter especially in some special period, We cannot
access whole *.appsopt.com

For the process have to take long time to run, it have to be broken
down into small piece of tasks. This is basic theory of cloud
computing. Map-Reduce is what products of Google are based on. You can
see AppEngine's docs or other articles, increase parallelism is the
most important design target.



On Jan 14, 5:04 pm, Nickolas Daskalou n...@daskalou.com wrote:
 Wow, reading the comments on that issue scares me. Does Google really block
 App Engine access in those countries, or are those countries blocking GAE
 IPs?

 2010/1/14 WallyDD shaneb...@gmail.com



 http://code.google.com/p/googleappengine/issues/detail?id=1072

  On Jan 14, 4:19 pm, Nick Johnson (Google) nick.john...@google.com
  wrote:
   On Thu, Jan 14, 2010 at 5:38 AM, WallyDD shaneb...@gmail.com wrote:
It would be nice if people could use some actual examples as to why
app engine is a joke. One problem with emails doesn't cut it. The time
limit has been discussed until we are all sick of it.

I am not convinced that Google has a lot of money making websites on
it (whether they make money through the hosting fees or the adsense
revenue).

Next up I will go and figure out why I keep getting all these timeouts
in my logfile. I hope this isn't a case of a hosting provider
overloading their server.

For my two cents (slightly off topic);
No big company is using it exclusively for their website needs.
Bestbuy uses it for some very small part. The whitehouse? I wonder
what that is about.
Google also blocks GAE to quite a few countries yet points fingers at
the Chinese Govt. Why doesn't Google give Hillary the finger?

   This is not correct. We do not block any App Engine site for any country
  or
   region. Any blocking is entirely due to third parties between the user
  and
   our servers.

   -Nick Johnson

On Jan 12, 8:41 am, mateusz mateusz.r...@gmail.com wrote:
 Standard servlet, sometimes work sometimes not throwing: Request was
 aborted after waiting too long to attempt to service your request. -
 I think it's when application is waken up from sleeping, but no
 pattern - strange;
 Another joke, when I am sending emails from appliacation, it's
 sometimes send sometimes NOT, without exceptions; if I send to google
 account - it's delivered in a second; when I send to other account
 (not gmail), I have to wait long time to be delivered;

 It's wasting time to think that you can use google app engine as
 production environment event for the smallest form based application.

 Do sth with it or close that business;

--
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%2Bunsubscrib
 e...@googlegroups.comgoogle-appengine%2Bunsubscrib
  e...@googlegroups.com
.
For more options, visit this group at
   http://groups.google.com/group/google-appengine?hl=en.

   --
   Nick Johnson, Developer Programs Engineer, App Engine
   Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration
  Number:
   368047

  --
  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%2Bunsubscrib 
  e...@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] Re: How to test my application with local database

2010-01-14 Thread Ikai L (Google)
Hey everyone,

I can't see this ending well. App Engine's datastore is NOT an RDBMS. It is
schemaless. There are already enough differences between using the local
datastore mock and the production datastore. Introducing MySQL as the local
development backend is just going to introduce a lot of unnecessary risk in
your project and a lot of wackiness as soon as you go into production. I'm
not even sure how your indexes can be generated, or how you can catch all
the hard errors that will be thrown when you work with transactions for
entities not in an entity group, or indexed List properties.

I'm sure you have a good reason for wanting to do this, but the bad really
outweigh the good here.

On Thu, Jan 14, 2010 at 1:54 AM, Ian Marshall ianmarshall...@gmail.comwrote:

 Hi ivanceras,


 At least I'm having a progress here
 ---
 Good!


 Here is the Postgresql error log
 
 Sorry, I know nothing about Postgresql. I shall leave comments about
 this part of your post to others.


 Here is the error logs
 --
 I think that the clue is in your own statement Due to maybe it is not
 allowed in app engine white list. Examining your stake trace, we have
 the DataNucleus RDBMS making a connection with/using the MySQL Java
 connector. This is fine, but Google AppEngine (GAE) code is also
 involved here. It shouldn't be.

 As you know, GAE will not allow use of MySQL directly as the
 datastore. Somehow you are involving GAE, when I guess that instead
 you want to run your web app in Eclipse whilst connecting to your
 MySQL database. In that case, you cannot run this app in GAE.

 When I use NetBeans, I launch my web app from within NetBeans with my
 MySQL connection configured as per my jdoconfig.xml file using a
 development Persistence Manager Factory (PMF) name. When I am ready to
 run the web app from within my local GAE development server, I change
 the PMF name used in my code by configuration and rebuild my app. My
 builder constructs my \war folder every time, so now after building I
 simply launch my GAE server (using a command in a Windows command
 prompt window) whilst pointing to the correct folder. There is now no
 MySQL involvement with the web app, and my datastore is now a local
 BigTable database.

 Am I on the right lines, and does this help you?


 Conclusion
 --
 If anyone out there uses Eclipse and a MySQL database for developer
 testing before unleashing on a local GAE development server, I am sure
 that ivanceras would welcome your contribution.


 Cheers,

 Ian

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






-- 
Ikai Lan
Developer Programs Engineer, Google App Engine
-- 

You received this message because you are subscribed to the Google Groups "Google App Engine" group.

To post to this group, send email to google-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] Sending emails - taskqueue is too quick?

2010-01-14 Thread Eli Jones
Why don't you just configure it like so:

-name:mail-queue
  rate:8/m
  bucket_size:8

Now.. this is presuming that when you add a task to this mail-queue.. the
task is configured to send 1 e-mail to 1 recipient.

Though, you could create a recursive task queue that would work something
like this:

Let,

 N = number of recipients
 M = batch number

When ready to start emailing.. fire off task: MailTask(1)

Where,

MailTask(M) =
  1. Send emails to recipients M, M+1, M+2, ..., M+7
  2. If M+8  N, Goto Step 4.  Else Goto Step 3.
  3. Schedule MailTask(M+8) to run in 61 Seconds
  4. Success

Or you could have it email one recipient at a time and reschedule itself to
run M+1 in 8 seconds.  That way.. if there is an error during the Task and
it automatically restarts.. you won't get a duplicated email sent out to
more than one person.

Though, you'd also need to give each task a unique name like
str(M)+_NewsletterVersion to ensure that you didn't double up any tasks on
the off chance that there was a timeout during the Task Add stage (I've had
this happen.. Task Add timed out.. but the Task had been added.. so the
previous task started over.. and added the next task again.  Thus, the
recursive task had forked into two task streams.)

On Thu, Jan 14, 2010 at 9:49 AM, Emanuel Berglund 
emanuel.bergl...@gmail.com wrote:

 I posted a while back about getting an OverQuotaError when sending
 out 74 emails in quick succession.
 It turned out I was breaking the 8 emails per second cap, to solve
 this I was told to use a task queue.

 I've now set up a task queue and have created a specific mail queue in
 my queue.yml for sending emails out.
 I use the following configuration with the aim to send out 8 emails
 per minute, and I'm trying to not use the bucket by setting it to 0.

 - name: mail-queue
  rate: 8/m
  bucket_size: 0


 But, when I run a test and send out emails to 28 people, it seems it's
 still sending out emails at a very high rate. It sends them out at
 about 10 emails per second based on the information on the ETA of the
 tasks in the queue in the live App Engine panel.

 This isn't paced out to 8 emails per minute and I'm afraid I might go
 over my qota and get the OverQuotaError again. Since I am sending out
 a newsletter I really can't afford to have to restart it again and
 risk sending the same letter twice to a number of people.

 My account doesn't have billing activated but has had the free quota
 bumped up.

 --
 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: Cron jobs fail with error Request was aborted after waiting too long to attempt to service your request.

2010-01-14 Thread Jorge
I must say this is a worrisome answer.

There are *lots* of posts about this issue. My understanding is *lots*
of people are experiencing the problem. I understand GAE is in a
preview state and I was assuming Google was in the process of fixing
this for future releases.

But if Google assumes it is normal GAE apps will crash because the
hosting servers become overloaded, then I am really worried about
having picked up GAE to run my application!

Jorge Gonzalez


On Jan 14, 10:15 am, Jason C jason.a.coll...@gmail.com wrote:
 My understanding of this is that it's a general machine load issue and
 depends on the traffic to the applications that are co-homed with
 yours.

 In the past, if you posted your App ID, G looked into it and adjusted
 resources (perhaps manually?).

 Given the radio silence, perhaps they are looking at the issue at a
 deeper level?

 j

 On Jan 13, 10:14 pm, Abhinav Bhagwat abhinavbhag...@gmail.com wrote:

  With so many people experiencing this, I expect at least someone from google
  to acknowledge this and tell us if our code/design is incorrect or this
  is because of some bug in the GAE. I am ready to wait for a fix, but at
  least some one needs to tell where are things going wrong.

  Jason (Google), you were going to look into this. What happened? Do we have
  any update?

  Regards,
  Abhinav

  On Thu, Jan 14, 2010 at 4:55 AM, John_Idol giovanni.id...@gmail.com wrote:
   Guys - I get the exact same error both on a cron job (no particular
   pattern and very little being done - 4 queries which return nothing
   since my db is empty + sending an email at the end) and other normal
   calls.
   I have no clue of the reason why. I deployed the exact same app 4
   months ago and none of this was happening, it went offline then
   recently re-deployed (end of december) and I am seeing this problem.

   Puzzling!

   On Dec 14 2009, 12:11 pm, Abhi abhinavbhag...@gmail.com wrote:
Sometimes my cron jobs fail with a HTTP 500 error and message:-

Request was aborted after waiting too long to attempt to service your
request. Most likely, this indicates that you have reached your
simultaneous dynamic request limit. This is almost always due to
excessively high latency in your app. Please seehttp://
   code.google.com/appengine/docs/quotas.htmlfor more details.

When this happens the logs show that the job took about 10086ms of CPU
time. The cron is the only job running in the application and it fires
one request every 5 minutes. I don't see any reason of why the quota
for simultaneous request should be exceed by this one req/5 minutes
application. There is nothing else this application is doing.

If i access the same page (which has admin only permissions - so i am
sure no one else can access it) from a browser it never fails.

Can someone help me with this?

   --
   You received this message because you are subscribed to the Google Groups
   Google App Engine group.
   To post to this group, send email to google-appeng...@googlegroups.com.
   To unsubscribe from this group, send email to
   google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2Bunsubscrib
e...@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: Cron jobs fail with error Request was aborted after waiting too long to attempt to service your request.

2010-01-14 Thread Jorge
Sorry,

I thought you were Jason (Google), not Jason C.

I still hope this issue is high in Google priorities!

Cheers,

Jorge Gonzalez


On Jan 14, 1:43 pm, Jorge athenas...@gmail.com wrote:
 I must say this is a worrisome answer.

 There are *lots* of posts about this issue. My understanding is *lots*
 of people are experiencing the problem. I understand GAE is in a
 preview state and I was assuming Google was in the process of fixing
 this for future releases.

 But if Google assumes it is normal GAE apps will crash because the
 hosting servers become overloaded, then I am really worried about
 having picked up GAE to run my application!

 Jorge Gonzalez

 On Jan 14, 10:15 am, Jason C jason.a.coll...@gmail.com wrote:

  My understanding of this is that it's a general machine load issue and
  depends on the traffic to the applications that are co-homed with
  yours.

  In the past, if you posted your App ID, G looked into it and adjusted
  resources (perhaps manually?).

  Given the radio silence, perhaps they are looking at the issue at a
  deeper level?

  j

  On Jan 13, 10:14 pm, Abhinav Bhagwat abhinavbhag...@gmail.com wrote:

   With so many people experiencing this, I expect at least someone from 
   google
   to acknowledge this and tell us if our code/design is incorrect or this
   is because of some bug in the GAE. I am ready to wait for a fix, but at
   least some one needs to tell where are things going wrong.

   Jason (Google), you were going to look into this. What happened? Do we 
   have
   any update?

   Regards,
   Abhinav

   On Thu, Jan 14, 2010 at 4:55 AM, John_Idol giovanni.id...@gmail.com 
   wrote:
Guys - I get the exact same error both on a cron job (no particular
pattern and very little being done - 4 queries which return nothing
since my db is empty + sending an email at the end) and other normal
calls.
I have no clue of the reason why. I deployed the exact same app 4
months ago and none of this was happening, it went offline then
recently re-deployed (end of december) and I am seeing this problem.

Puzzling!

On Dec 14 2009, 12:11 pm, Abhi abhinavbhag...@gmail.com wrote:
 Sometimes my cron jobs fail with a HTTP 500 error and message:-

 Request was aborted after waiting too long to attempt to service your
 request. Most likely, this indicates that you have reached your
 simultaneous dynamic request limit. This is almost always due to
 excessively high latency in your app. Please seehttp://
code.google.com/appengine/docs/quotas.htmlfor more details.

 When this happens the logs show that the job took about 10086ms of CPU
 time. The cron is the only job running in the application and it fires
 one request every 5 minutes. I don't see any reason of why the quota
 for simultaneous request should be exceed by this one req/5 minutes
 application. There is nothing else this application is doing.

 If i access the same page (which has admin only permissions - so i am
 sure no one else can access it) from a browser it never fails.

 Can someone help me with this?

--
You received this message because you are subscribed to the Google 
Groups
Google App Engine group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to
google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2Bunsubscrib
 e...@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: Running some code immediately before a Datastore put()?

2010-01-14 Thread Devel63
Nick,

I've been faced with your exact situation.  I have to say I don't
understand PreCallHook, and maybe that would be the best approach, but
here's what I do know.

Overriding put is a bad idea, and as you point out, the override
will not be called in a batch put.

I found that the most elegant solution was to derive a new type of
db.Property, and override its get_value_for_datastore.  Then GAE will
automatically do what you want regardless of how the entity is being
put.


On Jan 14, 1:51 am, Eric Ka Ka Ng ngk...@gmail.com wrote:
 would a PreCallHook works for your case?

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

 - eric

 2010/1/14 Nickolas Daskalou n...@daskalou.com:

  I have a property of a Model that is a hash of another property of the same
  Model, eg:

  class MyModel(db.Model):
    something = db.StringProperty()
    something_hash = db.StringProperty()
    def generate_hash(self):
      self.something_hash = sha1(self.something)

  I want generate_hash() to be automatically called just before the entity is
  put() into the Datastore, without the developer having to explicitly call
  entity.generate_hash().

  I know I can create a put() method that makes such a call and then calls
  put() on the superclass, but (a) is that the best way to do it, and (b) if
  the put() is part of a batch put (eg. via db.put(entities)), will the put()
  method of each model instance still be called?

  Nick

  --
  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] Query resultset order reliable if no order clause provided?

2010-01-14 Thread Erem
Hey all,

Let's say the results of a datastore query are not ordered by any
particular variable. Can I nonetheless rely upon the results being in
the same order when I run the query again in the future?

Rephrased:
I run a query Q without any ordering clause. It produces and will
always produce a set of result entities R.

Although R has no particular order, am I guaranteed Q will always
produce R in the same order it did the first time?

Thanks!

Erem
-- 
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] Sending emails - taskqueue is too quick?

2010-01-14 Thread Emanuel Berglund
Thanks for your reply,

Supposedly the bucket_size: should be 1 and not 8 according to this post
http://groups.google.co.uk/group/google-appengine/browse_thread/thread/3d64511a517cffc1/64fe290597597511?lnk=gstq=mail+taskqueue#64fe290597597511

But I tried it anyway and it had no effect, it's still sending out about 10
emails per _second_ in my test, instead of the 8 per minute that I need.

I don't think the second alternative would work either since there is a time
limit of 30 seconds per request and it would probably trigger a deadline
exceeded exception.
http://groups.google.co.uk/group/google-appengine/browse_thread/thread/28e7ecde894c59a9/896fbdcf0d836296?lnk=gstq=mail+taskqueue#896fbdcf0d836296

Surely there must be some way to get App-Engine to send out emails at a
certain rate without hitting the OverQuotaError? Anyone who successfully
implemented it?



On Thu, Jan 14, 2010 at 7:31 PM, Eli Jones eli.jo...@gmail.com wrote:

 Why don't you just configure it like so:

 -name:mail-queue
   rate:8/m
   bucket_size:8

 Now.. this is presuming that when you add a task to this mail-queue.. the
 task is configured to send 1 e-mail to 1 recipient.

 Though, you could create a recursive task queue that would work something
 like this:

 Let,

  N = number of recipients
  M = batch number

 When ready to start emailing.. fire off task: MailTask(1)

 Where,

 MailTask(M) =
   1. Send emails to recipients M, M+1, M+2, ..., M+7
   2. If M+8  N, Goto Step 4.  Else Goto Step 3.
   3. Schedule MailTask(M+8) to run in 61 Seconds
   4. Success

 Or you could have it email one recipient at a time and reschedule itself to
 run M+1 in 8 seconds.  That way.. if there is an error during the Task and
 it automatically restarts.. you won't get a duplicated email sent out to
 more than one person.

 Though, you'd also need to give each task a unique name like
 str(M)+_NewsletterVersion to ensure that you didn't double up any tasks on
 the off chance that there was a timeout during the Task Add stage (I've had
 this happen.. Task Add timed out.. but the Task had been added.. so the
 previous task started over.. and added the next task again.  Thus, the
 recursive task had forked into two task streams.)

 On Thu, Jan 14, 2010 at 9:49 AM, Emanuel Berglund 
 emanuel.bergl...@gmail.com wrote:

 I posted a while back about getting an OverQuotaError when sending
 out 74 emails in quick succession.
 It turned out I was breaking the 8 emails per second cap, to solve
 this I was told to use a task queue.

 I've now set up a task queue and have created a specific mail queue in
 my queue.yml for sending emails out.
 I use the following configuration with the aim to send out 8 emails
 per minute, and I'm trying to not use the bucket by setting it to 0.

 - name: mail-queue
  rate: 8/m
  bucket_size: 0


 But, when I run a test and send out emails to 28 people, it seems it's
 still sending out emails at a very high rate. It sends them out at
 about 10 emails per second based on the information on the ETA of the
 tasks in the queue in the live App Engine panel.

 This isn't paced out to 8 emails per minute and I'm afraid I might go
 over my qota and get the OverQuotaError again. Since I am sending out
 a newsletter I really can't afford to have to restart it again and
 risk sending the same letter twice to a number of people.

 My account doesn't have billing activated but has had the free quota
 bumped up.

 --

 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.comgoogle-appengine%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/google-appengine?hl=en.




-- 
---
Visit my personal websites:
http://www.musicpilgrimages.com
http://www.countryplug.com
-- 

You received this message because you are subscribed to the Google Groups "Google App Engine" group.

To post to this group, send email to google-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] PersistenceManager.getObjectsById(*)

2010-01-14 Thread Patrick Twohig
Why doesn't the family of methods PersistenceManager.getObjectsById actually
perform a bulk fetch from the datastore?  Are there future plans to
implement it as a bulk fetch?

-- 
Patrick H. Twohig.

Namazu Studios
P.O. Box 34161
San Diego, CA 92163-4161

Office: 619.862.2890 x100
Cell: 619.453.5075
Twitter: @svm_invictvs
IRC: svm_invic...@irc.freenode.net ##java, #android-dev, #iphonedev,
#appengine

http://www.namazustudios.com/

This communication, and any attachments, shall be considered confidential
and proprietary information of Namazu Studios LLC.  This message, and
attachments, are intended for the listed recipients only.  If you are not
one of the intended recipients, please destroy all copies of this
communication.
-- 

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] CMS on google app engine: conflict with reseller agreement?

2010-01-14 Thread James Watkins
I am in the process of creating a CMS on the google app engine. The
CMS is called Purenode. It is a node-based interface for designing the
database, logic, and visual aspects of a website. I would hope to
provide two export features of this product:

1. A way to export a node workflow as a single .py file that can then
be deployed to the google app engine manually.
2. A way to give users an account on the Purenode site that would
allow them to have a mysite.purenode.com similar to what Wordpress
does with blogs. Additionally, users would be able to connect this to
a domain of their own, using a CNAME.

Obviously, option 1 is not a problem. But option 2 is giving us some
trouble. To my company, option 2 is a deal-breaker. If we can't get
something to work out, then we'll have to look into other
possibilities. Can anyone provide me with information about this? Can
I get in contact with someone high up in google that could possibly
work out a deal of some kind to get this to work?
-- 
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] Sending emails - taskqueue is too quick?

2010-01-14 Thread Eli Jones
You won't get a timeout.. unless it takes longer than 30 seconds to send a
single e-mail.

The task runs.. sending a single e-mail (or 8, I presume it can do 8 in 30
seconds as well).. then it adds a new Task to the queue to handle the next
batch of email(s) and schedules the task to start up 60 seconds (or maybe 75
seconds if you're extra cautious) from now.

If a request to send out 8 emails and add a task to a queue is taking longer
than 30 seconds, something is wrong.


On Thu, Jan 14, 2010 at 3:19 PM, Emanuel Berglund 
emanuel.bergl...@gmail.com wrote:

 Thanks for your reply,

 Supposedly the bucket_size: should be 1 and not 8 according to this post

 http://groups.google.co.uk/group/google-appengine/browse_thread/thread/3d64511a517cffc1/64fe290597597511?lnk=gstq=mail+taskqueue#64fe290597597511

 But I tried it anyway and it had no effect, it's still sending out about 10
 emails per _second_ in my test, instead of the 8 per minute that I need.

 I don't think the second alternative would work either since there is a
 time limit of 30 seconds per request and it would probably trigger a
 deadline exceeded exception.

 http://groups.google.co.uk/group/google-appengine/browse_thread/thread/28e7ecde894c59a9/896fbdcf0d836296?lnk=gstq=mail+taskqueue#896fbdcf0d836296

 Surely there must be some way to get App-Engine to send out emails at a
 certain rate without hitting the OverQuotaError? Anyone who successfully
 implemented it?



 On Thu, Jan 14, 2010 at 7:31 PM, Eli Jones eli.jo...@gmail.com wrote:

 Why don't you just configure it like so:

 -name:mail-queue
   rate:8/m
   bucket_size:8

 Now.. this is presuming that when you add a task to this mail-queue.. the
 task is configured to send 1 e-mail to 1 recipient.

 Though, you could create a recursive task queue that would work something
 like this:

 Let,

  N = number of recipients
  M = batch number

 When ready to start emailing.. fire off task: MailTask(1)

 Where,

 MailTask(M) =
   1. Send emails to recipients M, M+1, M+2, ..., M+7
   2. If M+8  N, Goto Step 4.  Else Goto Step 3.
   3. Schedule MailTask(M+8) to run in 61 Seconds
   4. Success

 Or you could have it email one recipient at a time and reschedule itself
 to run M+1 in 8 seconds.  That way.. if there is an error during the Task
 and it automatically restarts.. you won't get a duplicated email sent out to
 more than one person.

 Though, you'd also need to give each task a unique name like
 str(M)+_NewsletterVersion to ensure that you didn't double up any tasks on
 the off chance that there was a timeout during the Task Add stage (I've had
 this happen.. Task Add timed out.. but the Task had been added.. so the
 previous task started over.. and added the next task again.  Thus, the
 recursive task had forked into two task streams.)

 On Thu, Jan 14, 2010 at 9:49 AM, Emanuel Berglund 
 emanuel.bergl...@gmail.com wrote:

 I posted a while back about getting an OverQuotaError when sending
 out 74 emails in quick succession.
 It turned out I was breaking the 8 emails per second cap, to solve
 this I was told to use a task queue.

 I've now set up a task queue and have created a specific mail queue in
 my queue.yml for sending emails out.
 I use the following configuration with the aim to send out 8 emails
 per minute, and I'm trying to not use the bucket by setting it to 0.

 - name: mail-queue
  rate: 8/m
  bucket_size: 0


 But, when I run a test and send out emails to 28 people, it seems it's
 still sending out emails at a very high rate. It sends them out at
 about 10 emails per second based on the information on the ETA of the
 tasks in the queue in the live App Engine panel.

 This isn't paced out to 8 emails per minute and I'm afraid I might go
 over my qota and get the OverQuotaError again. Since I am sending out
 a newsletter I really can't afford to have to restart it again and
 risk sending the same letter twice to a number of people.

 My account doesn't have billing activated but has had the free quota
 bumped up.

 --

 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.comgoogle-appengine%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/google-appengine?hl=en.




 --
 ---
 Visit my personal websites:
 http://www.musicpilgrimages.com
 

[google-appengine] Re: How to test my application with local database

2010-01-14 Thread Ian Marshall
Thanks for that warning, Ikai. Noted. I am aware of many of the
difference between MySQL and the GAE datastore (mock or production).
And when I see your reasons all at once, it does make me cringe at my
choice of MySQL as my local dev back-end datastore. Regular runs under
my local GAE dev server should catch most issues early (here's
hoping).

Can you think of suitable local datastores that I could use when
running my Java web app from my NetBeans IDE under Tomcat whilst
coding?

Regards,

Ian
-- 
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] performance using thousands of small entities in an entity group?

2010-01-14 Thread Scott Southworth
The docs only suggest using a 'single user's worth of data'. My current plan
would use one entity group per user, but could contain several thousand
small (mostly 1kb) entities in each group.

Does anyone have any experience or expectation as to how this would affect
performance? Note that there should not be any multi-user contention for
these entities.

Thanks,
Scott Southworth
-- 

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] performance using thousands of small entities in an entity group?

2010-01-14 Thread djidjadji
Why do these small entities need to be a child of the Main entity?
What do you gain with the parent-child relation?
If none, then don't use (large) entity groups.
There is not much storage gain in elimination of an object reference,
because the key of the child will be larger because it has a parent.

2010/1/14 Scott Southworth scott.southwo...@gmail.com:
 The docs only suggest using a 'single user's worth of data'. My current plan
 would use one entity group per user, but could contain several thousand
 small (mostly 1kb) entities in each group.

 Does anyone have any experience or expectation as to how this would affect
 performance? Note that there should not be any multi-user contention for
 these entities.

 Thanks,
 Scott Southworth

 --
 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] Query resultset order reliable if no order clause provided?

2010-01-14 Thread djidjadji
If no order is specified it will be ordered according to Key.
So yes, the results will be always the same for the same query, if no
objects are created or deleted.

2010/1/14 Erem ehb...@gmail.com:
 Hey all,

 Let's say the results of a datastore query are not ordered by any
 particular variable. Can I nonetheless rely upon the results being in
 the same order when I run the query again in the future?

 Rephrased:
 I run a query Q without any ordering clause. It produces and will
 always produce a set of result entities R.

 Although R has no particular order, am I guaranteed Q will always
 produce R in the same order it did the first time?

 Thanks!

 Erem

 --
 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] performance using thousands of small entities in an entity group?

2010-01-14 Thread Scott Southworth
I need to be able to make transaction safe changes across the data at some
times...
Theoretically using any small combination of entities within the group.

On Thu, Jan 14, 2010 at 4:41 PM, djidjadji djidja...@gmail.com wrote:

 Why do these small entities need to be a child of the Main entity?
 What do you gain with the parent-child relation?
 If none, then don't use (large) entity groups.
 There is not much storage gain in elimination of an object reference,
 because the key of the child will be larger because it has a parent.

 2010/1/14 Scott Southworth scott.southwo...@gmail.com:
  The docs only suggest using a 'single user's worth of data'. My current
 plan
  would use one entity group per user, but could contain several thousand
  small (mostly 1kb) entities in each group.
 
  Does anyone have any experience or expectation as to how this would
 affect
  performance? Note that there should not be any multi-user contention for
  these entities.
 
  Thanks,
  Scott Southworth
 
  --
  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.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] performance using thousands of small entities in an entity group?

2010-01-14 Thread 风笑雪
You can use Distributed Transaction:
http://code.google.com/events/io/2009/sessions/DesignDistributedTransactionLayerAppEngine.html
http://blog.notdot.net/2009/9/Distributed-Transactions-on-App-Engine

2010/1/15 Scott Southworth scott.southwo...@gmail.com:
 I need to be able to make transaction safe changes across the data at some
 times...
 Theoretically using any small combination of entities within the group.

 On Thu, Jan 14, 2010 at 4:41 PM, djidjadji djidja...@gmail.com wrote:

 Why do these small entities need to be a child of the Main entity?
 What do you gain with the parent-child relation?
 If none, then don't use (large) entity groups.
 There is not much storage gain in elimination of an object reference,
 because the key of the child will be larger because it has a parent.

 2010/1/14 Scott Southworth scott.southwo...@gmail.com:
  The docs only suggest using a 'single user's worth of data'. My current
  plan
  would use one entity group per user, but could contain several thousand
  small (mostly 1kb) entities in each group.
 
  Does anyone have any experience or expectation as to how this would
  affect
  performance? Note that there should not be any multi-user contention for
  these entities.
 
  Thanks,
  Scott Southworth
 
  --
  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.





 --
 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: com.google.appengine.tools.admin.AdminException: Unable to update app: Version not ready.

2010-01-14 Thread Wesley Chun (Google)
greetings RKVS Raman,

are you still having this problem? this situation doesn't happen very
often. here are some related posts from months back FYI:

http://groups.google.com/group/google-appengine-java/browse_thread/thread/806f69fff149a5eb
http://groups.google.com/group/google-appengine-java/browse_thread/thread/473e994755ff53a5

usually, it is because a large file is being uploaded... are you
sending any over when you deploy?

-- wesley
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Core Python Programming, Prentice Hall, (c)2007,2001
Python Fundamentals, Prentice Hall, (c)2009
   http://corepython.com

wesley.j.chun :: wesc+...@google.com
developer relations :: google app engine
-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-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] Twitter Streaming API on AppEngine

2010-01-14 Thread vivpuri
Is there any way one can consume data from Twitter Streaming API -
http://apiwiki.twitter.com/Streaming-API-Documentation - on AppEngine?
-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.




[google-appengine] Re: This App Engine is a JOKE

2010-01-14 Thread Mike
We've noticed a lot of timeouts too recently... however these aren't
reported in the logs. The app just doesn't return results. Has been
happening in the last 2 weeks. Very frustrating.

Database timeouts (which are recorded in the logs) are also pretty
unacceptable.


On Jan 14, 10:27 pm, qburst pratha...@gmail.com wrote:
 We have been developing our internal HR and invoicing app in GAE for
 the last 1.5 years.  This system used to be stable.  Of late, that has
 changed.  We are getting  random server errors (timeouts may be), at
 least 50% of the time. This has made the application quite unusable.

 Is anyone else seeing these errors with increased frequency,
 especially during the last two weeks? We are not paying for any usage
 at the moment. Did Google reduce the free limits recently?
-- 
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: dev_appserver.py issue. When I deploy to app engine the code works fine. Please help

2010-01-14 Thread dburns
Looks like you are running Python26.  I did initially too, but ran
into troubles.  Things have been smooth since I installed 2.5 instead
(which is what they recommend).

On Jan 13, 8:46 pm, adamjamesdrew same theikl...@gmail.com wrote:
 2010-01-13 20:44:04 Running command: [u'C:\\Python26\\python.exe',
 u'C:\\Program Files\\Google\\google_appengine\\dev_appserver.py', '--
 admin_console_server=', '--port=8081', u'C:\\Documents and Settings\
 \adam\\My Documents\\flockr\\appengine\\testapp\\engineapp']
 C:\Program Files\Google\google_appengine\google\appengine\tools
 \appcfg.py:41: DeprecationWarning: the sha module is deprecated; use
 the hashlib module instead
   import sha
 INFO     2010-01-14 01:44:05,280 py_zipimport.py:108] zipimporter('C:\
 \Python26\\lib\\site-packages\\simplejson-2.0.9-py2.6-win32.egg',
 'simplejson\\')
 Traceback (most recent call last):
   File C:\Program Files\Google\google_appengine\dev_appserver.py,
 line 67, in module
     run_file(__file__, globals())
   File C:\Program Files\Google\google_appengine\dev_appserver.py,
 line 63, in run_file
     execfile(script_path, globals_)
   File C:\Program Files\Google\google_appengine\google\appengine\tools
 \dev_appserver_main.py, line 82, in module
     from google.appengine.tools import appcfg
   File C:\Program Files\Google\google_appengine\google\appengine\tools
 \appcfg.py, line 59, in module
     from google.appengine.tools import bulkloader
   File C:\Program Files\Google\google_appengine\google\appengine\tools
 \bulkloader.py, line 112, in module
     from google.appengine.ext import key_range as key_range_module
   File C:\Program Files\Google\google_appengine\google\appengine\ext
 \key_range\__init__.py, line 24, in module
     import simplejson
   File C:\Python26\lib\site-packages\simplejson-2.0.9-py2.6-win32.egg
 \simplejson\__init__.py, line 108, in module
   File C:\Program Files\Google\google_appengine\google\appengine\dist
 \py_zipimport.py, line 213, in load_module
     exec code in mod.__dict__
   File C:\Python26\lib\site-packages\simplejson-2.0.9-py2.6-win32.egg
 \simplejson\decoder.py, line 7, in module
   File C:\Program Files\Google\google_appengine\google\appengine\dist
 \py_zipimport.py, line 213, in load_module
     exec code in mod.__dict__
   File C:\Python26\lib\site-packages\simplejson-2.0.9-py2.6-win32.egg
 \simplejson\scanner.py, line 5, in module
   File C:\Program Files\Google\google_appengine\google\appengine\dist
 \py_zipimport.py, line 213, in load_module
     exec code in mod.__dict__
   File C:\Python26\lib\site-packages\simplejson-2.0.9-py2.6-win32.egg
 \simplejson\_speedups.py, line 7, in module
   File C:\Python26\lib\site-packages\simplejson-2.0.9-py2.6-win32.egg
 \simplejson\_speedups.py, line 4, in __bootstrap__
   File C:\Python26\lib\site-packages\pkg_resources.py, line 882, in
 resource_filename
     self, resource_name
   File C:\Python26\lib\site-packages\pkg_resources.py, line 1352, in
 get_resource_filename
     return self._extract_resource(manager, zip_path)
   File C:\Python26\lib\site-packages\pkg_resources.py, line 1363, in
 _extract_resource
     zip_stat = self.zipinfo[zip_path]
   File C:\Program Files\Google\google_appengine\google\appengine\dist
 \py_zipimport.py, line 268, in __getitem__
     info = _zipfile_cache[self._archive].getinfo(filename)
   File C:\Python26\lib\zipfile.py, line 821, in getinfo
     'There is no item named %r in the archive' % name)
 KeyError: There is no item named 'simplejson_speedups.pyd' in the
 archive
 2010-01-13 20:44:05 (Process exited with code 1)
-- 
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] CMS on google app engine: conflict with reseller agreement?

2010-01-14 Thread Vinicius Vollrath
James,

Issue 113:
*http://code.google.com/p/googleappengine/issues/detail?id=113*

[ ]'s
Vinicius
-- 

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] ImagesService and Alpha blending.

2010-01-14 Thread Patrick Twohig
I have several images that I want to composite together. Each image has a
completely transparent background, however when I use the ImagesSErvice to
composite them, I end up with the last drawn image on top with a white
background.  It apepars that the ImagesService doesn't support alpha
blending?  Is there a workaround for it?
-- 

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] Chat Time transcript for January 6, 2009

2010-01-14 Thread Jason (Google)
Last Wednesday, the App Engine team hosted the latest session of its
bimonthly IRC office hours. A transcript of the session and a summary
of the topics covered is provided below. The next session will take
place next Wednesday, January 20th from 9:00-10:00 a.m. PST in the
#appengine channel on irc.freenode.net.

- Jason

--SUMMARY---
- Q: Is there any work underway to speed up the index building
process? A: Indexes do not take a set amount of time to build; rather,
the building duration is dependent in part on the amount of traffic
hitting the cluster and the number of other applications that are
building indexes during the same period. But we're always making
optimizations where we can to make it as efficient as possible.
[7:01-7:02, 7:05-7:07, 7:10-7:11, 7:22, 7:24, 7:26, 7:29-7:30, 7:32]

- Q: What is the best way to do aggregate reporting on App Engine
data? A: Trying to retrieve and then store all data in memory is not a
scalable approach -- it may work for small datasets but will increase
latency and start to fail as the size of the data grows. Ultimately
App Engine's datastore is not built for this type of data mining. If
you can't find any reasonable way to split the data into smaller
chunks which can be processed individually and aggregated using the
task queue API, you may consider downloading the data using the bulk
download utility and doing the data mining and report generation on
your local box. [7:13-7:20]

- Q: What should be done in order to ensure an application performs
well when it scales from several users to many hundreds or thousands?
A: If you expect your application to receive a lot of requests, you
should first perform a load test with the expected amount of traffic
before deploying; all billing-enabled apps can handle up to 500 QPS
and you can request higher quota if necessary. You can determine how
well your application will function by using a load testing utility to
ramp up traffic from 0 to the expected level and hold this level for a
period. Inspect your Number of Quota Denials/Second graph (should be
a steady 0) and Milliseconds/Request (latency) graph to guage
whether any changes need to be made before you go live. [7:25-7:27,
7:30]

- Q: In lieu of a true multi-tenant solution, what's the best way to
model data for an application that will be used by multiple clients/
customers? A: This depends on the specific needs of your customers and
the size of your application. If you want to use a single application
ID, you can either separate your kinds by client (e.g.
Users_customer1, Users_customer2) or just use a single kind (Users)
with an extra property indicating which client that entity is
associated with. For larger applications, you may consider deploying a
new application per client, but first you'll need to request an
exemption to clause 4.4 of the App Engine TOS using the form at
http://code.google.com/support/bin/request.py?contact_type=AppEngineMultiInstanceExceptionRequest.
[7:32, 7:34-7:35, 7:39-7:40]

- Discussion on HTTPS support for non-appspot.com domains [7:37, 7:39,
7:43-7:44]

- Q: What's the best way to extend the list of accepted property
types, e.g. adding a decimal data type? A: Check these resources:
http://googleappengine.blogspot.com/2009/07/writing-custom-property-classes.html
and http://www.redredred.com.au/money-database-property-for-google-app-engine/
[7:45, 7:49-7:50]

- Q: What kind of write load can App Engine handle? A: You should
model your data so as to avoid writing to the same entity or entity
group more than once per second on average, but the write throughput
to distinct entity groups is high enough that most developers
shouldn't need to worry. For more on avoiding datastore contention
which can limit write throughput, see 
http://code.google.com/appengine/articles/scaling/contention.html
[7:50, 7:52, 7:54-7:55, 7:58, 8:00-8:01]

- Discussion of the preview release designation; note that apart
from the preview release status, App Engine has graduated from
Google Code Labs and thus any kind of formal turndown wouldn't take
place until 3 years past any deprecation announcement. Therefore,
should App Engine be deprecated in the future, which isn't planned,
hosted apps won't suddenly be disabled. [7:50-7:54]


--FULL TRANSCRIPT---
[7:00pm] daskalou: Let's begin...
[7:01pm] Jason_Google: Hi Everyone. Welcome to the first Chat Time of
the new year! I'll be here for the next hour to answer any App Engine
questions.
[7:01pm] daskalou: Do I have the correct time? Is it 7PM PST now?
[7:01pm] daskalou: sweet
[7:01pm] Jason_Google: Yes indeed.
[7:01pm] daskalou: Q: Any plans on speeding up index building?
[7:02pm] Jason_Google: Index building is always something we're
working on, optimizing the work of the index task workers and so
forth. I don't know of any specific measures being done right now,
only that optimizations are added every few 

[google-appengine] Re: Chat Time transcript for January 6, 2009

2010-01-14 Thread Jason (Google)
Make that January 6th, 2010. :)

- Jason

On Jan 14, 5:30 pm, Jason (Google) apija...@google.com wrote:
 Last Wednesday, the App Engine team hosted the latest session of its
 bimonthly IRC office hours. A transcript of the session and a summary
 of the topics covered is provided below. The next session will take
 place next Wednesday, January 20th from 9:00-10:00 a.m. PST in the
 #appengine channel on irc.freenode.net.

 - Jason

 --SUMMARY---
 - Q: Is there any work underway to speed up the index building
 process? A: Indexes do not take a set amount of time to build; rather,
 the building duration is dependent in part on the amount of traffic
 hitting the cluster and the number of other applications that are
 building indexes during the same period. But we're always making
 optimizations where we can to make it as efficient as possible.
 [7:01-7:02, 7:05-7:07, 7:10-7:11, 7:22, 7:24, 7:26, 7:29-7:30, 7:32]

 - Q: What is the best way to do aggregate reporting on App Engine
 data? A: Trying to retrieve and then store all data in memory is not a
 scalable approach -- it may work for small datasets but will increase
 latency and start to fail as the size of the data grows. Ultimately
 App Engine's datastore is not built for this type of data mining. If
 you can't find any reasonable way to split the data into smaller
 chunks which can be processed individually and aggregated using the
 task queue API, you may consider downloading the data using the bulk
 download utility and doing the data mining and report generation on
 your local box. [7:13-7:20]

 - Q: What should be done in order to ensure an application performs
 well when it scales from several users to many hundreds or thousands?
 A: If you expect your application to receive a lot of requests, you
 should first perform a load test with the expected amount of traffic
 before deploying; all billing-enabled apps can handle up to 500 QPS
 and you can request higher quota if necessary. You can determine how
 well your application will function by using a load testing utility to
 ramp up traffic from 0 to the expected level and hold this level for a
 period. Inspect your Number of Quota Denials/Second graph (should be
 a steady 0) and Milliseconds/Request (latency) graph to guage
 whether any changes need to be made before you go live. [7:25-7:27,
 7:30]

 - Q: In lieu of a true multi-tenant solution, what's the best way to
 model data for an application that will be used by multiple clients/
 customers? A: This depends on the specific needs of your customers and
 the size of your application. If you want to use a single application
 ID, you can either separate your kinds by client (e.g.
 Users_customer1, Users_customer2) or just use a single kind (Users)
 with an extra property indicating which client that entity is
 associated with. For larger applications, you may consider deploying a
 new application per client, but first you'll need to request an
 exemption to clause 4.4 of the App Engine TOS using the form 
 athttp://code.google.com/support/bin/request.py?contact_type=AppEngineM
 [7:32, 7:34-7:35, 7:39-7:40]

 - Discussion on HTTPS support for non-appspot.com domains [7:37, 7:39,
 7:43-7:44]

 - Q: What's the best way to extend the list of accepted property
 types, e.g. adding a decimal data type? A: Check these 
 resources:http://googleappengine.blogspot.com/2009/07/writing-custom-property-c...
 andhttp://www.redredred.com.au/money-database-property-for-google-app-en...
 [7:45, 7:49-7:50]

 - Q: What kind of write load can App Engine handle? A: You should
 model your data so as to avoid writing to the same entity or entity
 group more than once per second on average, but the write throughput
 to distinct entity groups is high enough that most developers
 shouldn't need to worry. For more on avoiding datastore contention
 which can limit write throughput, 
 seehttp://code.google.com/appengine/articles/scaling/contention.html
 [7:50, 7:52, 7:54-7:55, 7:58, 8:00-8:01]

 - Discussion of the preview release designation; note that apart
 from the preview release status, App Engine has graduated from
 Google Code Labs and thus any kind of formal turndown wouldn't take
 place until 3 years past any deprecation announcement. Therefore,
 should App Engine be deprecated in the future, which isn't planned,
 hosted apps won't suddenly be disabled. [7:50-7:54]

 --FULL TRANSCRIPT---
 [7:00pm] daskalou: Let's begin...
 [7:01pm] Jason_Google: Hi Everyone. Welcome to the first Chat Time of
 the new year! I'll be here for the next hour to answer any App Engine
 questions.
 [7:01pm] daskalou: Do I have the correct time? Is it 7PM PST now?
 [7:01pm] daskalou: sweet
 [7:01pm] Jason_Google: Yes indeed.
 [7:01pm] daskalou: Q: Any plans on speeding up index building?
 [7:02pm] Jason_Google: Index building is always something we're
 working on, optimizing the work of 

[google-appengine] Re: This App Engine is a JOKE

2010-01-14 Thread WallyDD
How much proof do you want?
How about I offer free first class tickets to any of the blocked
countries to both Larry and Serge?

And for the timeouts I keep getting? Should I fly Larry, Serge and
everyone on this group to where I am to look at my logs?

On Jan 15, 2:21 am, Locke locke2...@gmail.com wrote:
 Wally, you made the claim. The burden of proof is on you, bro.

 On Jan 14, 3:29 am, WallyDD shaneb...@gmail.com wrote:



  Rubbish.

  Do you want some proof?
-- 
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: Running some code immediately before a Datastore put()?

2010-01-14 Thread Nickolas Daskalou
Thanks guys, both great suggestions.

I'll try and get PreCallHook working because that would allow me to add a
pre_put() method to my Models, and then using these PreCallHooks I can
call pre_put() for each of the entities being put into the Datastore.

Failing that, I'll create a new derived property for my Model and do as
Devel63 said.


2010/1/15 Devel63 danstic...@gmail.com

 Nick,

 I've been faced with your exact situation.  I have to say I don't
 understand PreCallHook, and maybe that would be the best approach, but
 here's what I do know.

 Overriding put is a bad idea, and as you point out, the override
 will not be called in a batch put.

 I found that the most elegant solution was to derive a new type of
 db.Property, and override its get_value_for_datastore.  Then GAE will
 automatically do what you want regardless of how the entity is being
 put.


 On Jan 14, 1:51 am, Eric Ka Ka Ng ngk...@gmail.com wrote:
  would a PreCallHook works for your case?
 
  http://code.google.com/appengine/articles/hooks.html
 
  - eric
 
  2010/1/14 Nickolas Daskalou n...@daskalou.com:
 
   I have a property of a Model that is a hash of another property of the
 same
   Model, eg:
 
   class MyModel(db.Model):
 something = db.StringProperty()
 something_hash = db.StringProperty()
 def generate_hash(self):
   self.something_hash = sha1(self.something)
 
   I want generate_hash() to be automatically called just before the
 entity is
   put() into the Datastore, without the developer having to explicitly
 call
   entity.generate_hash().
 
   I know I can create a put() method that makes such a call and then
 calls
   put() on the superclass, but (a) is that the best way to do it, and (b)
 if
   the put() is part of a batch put (eg. via db.put(entities)), will the
 put()
   method of each model instance still be called?
 
   Nick
 
   --
   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 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.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] Re: Running some code immediately before a Datastore put()?

2010-01-14 Thread Nickolas Daskalou
I'm pretty sure the code on the GAE Hooks article (
http://code.google.com/appengine/articles/hooks.html) is wrong.

4th code snippet, shouldn't the very first line:

def path_appengine():

be moved to the bottom, just above this line:

apiproxy_stub_map.apiproxy.GetPreCallHooks().Append()

?


2010/1/15 Nickolas Daskalou n...@daskalou.com

 Thanks guys, both great suggestions.

 I'll try and get PreCallHook working because that would allow me to add a
 pre_put() method to my Models, and then using these PreCallHooks I can
 call pre_put() for each of the entities being put into the Datastore.

 Failing that, I'll create a new derived property for my Model and do as
 Devel63 said.


 2010/1/15 Devel63 danstic...@gmail.com

 Nick,

 I've been faced with your exact situation.  I have to say I don't
 understand PreCallHook, and maybe that would be the best approach, but
 here's what I do know.

 Overriding put is a bad idea, and as you point out, the override
 will not be called in a batch put.

 I found that the most elegant solution was to derive a new type of
 db.Property, and override its get_value_for_datastore.  Then GAE will
 automatically do what you want regardless of how the entity is being
 put.


 On Jan 14, 1:51 am, Eric Ka Ka Ng ngk...@gmail.com wrote:
  would a PreCallHook works for your case?
 
  http://code.google.com/appengine/articles/hooks.html
 
  - eric
 
  2010/1/14 Nickolas Daskalou n...@daskalou.com:
 
   I have a property of a Model that is a hash of another property of the
 same
   Model, eg:
 
   class MyModel(db.Model):
 something = db.StringProperty()
 something_hash = db.StringProperty()
 def generate_hash(self):
   self.something_hash = sha1(self.something)
 
   I want generate_hash() to be automatically called just before the
 entity is
   put() into the Datastore, without the developer having to explicitly
 call
   entity.generate_hash().
 
   I know I can create a put() method that makes such a call and then
 calls
   put() on the superclass, but (a) is that the best way to do it, and
 (b) if
   the put() is part of a batch put (eg. via db.put(entities)), will the
 put()
   method of each model instance still be called?
 
   Nick
 
   --
   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.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] I can not receive SMS messages

2010-01-14 Thread 1e0n
Hello, administrators,I am sorry I can not receive SMS messages,
please help me!
-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-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: Sending emails - taskqueue is too quick?

2010-01-14 Thread Julian Namaro
What do you get if you specify the rate per second ?
Also are you sure each task sends only one email ?


On Jan 15, 5:19 am, Emanuel Berglund emanuel.bergl...@gmail.com
wrote:
 Thanks for your reply,

 Supposedly the bucket_size: should be 1 and not 8 according to this 
 posthttp://groups.google.co.uk/group/google-appengine/browse_thread/threa...

 But I tried it anyway and it had no effect, it's still sending out about 10
 emails per _second_ in my test, instead of the 8 per minute that I need.

 I don't think the second alternative would work either since there is a time
 limit of 30 seconds per request and it would probably trigger a deadline
 exceeded 
 exception.http://groups.google.co.uk/group/google-appengine/browse_thread/threa...

 Surely there must be some way to get App-Engine to send out emails at a
 certain rate without hitting the OverQuotaError? Anyone who successfully
 implemented it?



 On Thu, Jan 14, 2010 at 7:31 PM, Eli Jones eli.jo...@gmail.com wrote:
  Why don't you just configure it like so:

  -name:mail-queue
rate:8/m
bucket_size:8

  Now.. this is presuming that when you add a task to this mail-queue.. the
  task is configured to send 1 e-mail to 1 recipient.

  Though, you could create a recursive task queue that would work something
  like this:

  Let,

   N = number of recipients
   M = batch number

  When ready to start emailing.. fire off task: MailTask(1)

  Where,

  MailTask(M) =
1. Send emails to recipients M, M+1, M+2, ..., M+7
2. If M+8  N, Goto Step 4.  Else Goto Step 3.
3. Schedule MailTask(M+8) to run in 61 Seconds
4. Success

  Or you could have it email one recipient at a time and reschedule itself to
  run M+1 in 8 seconds.  That way.. if there is an error during the Task and
  it automatically restarts.. you won't get a duplicated email sent out to
  more than one person.

  Though, you'd also need to give each task a unique name like
  str(M)+_NewsletterVersion to ensure that you didn't double up any tasks on
  the off chance that there was a timeout during the Task Add stage (I've had
  this happen.. Task Add timed out.. but the Task had been added.. so the
  previous task started over.. and added the next task again.  Thus, the
  recursive task had forked into two task streams.)

  On Thu, Jan 14, 2010 at 9:49 AM, Emanuel Berglund 
  emanuel.bergl...@gmail.com wrote:

  I posted a while back about getting an OverQuotaError when sending
  out 74 emails in quick succession.
  It turned out I was breaking the 8 emails per second cap, to solve
  this I was told to use a task queue.

  I've now set up a task queue and have created a specific mail queue in
  my queue.yml for sending emails out.
  I use the following configuration with the aim to send out 8 emails
  per minute, and I'm trying to not use the bucket by setting it to 0.

  - name: mail-queue
   rate: 8/m
   bucket_size: 0

  But, when I run a test and send out emails to 28 people, it seems it's
  still sending out emails at a very high rate. It sends them out at
  about 10 emails per second based on the information on the ETA of the
  tasks in the queue in the live App Engine panel.

  This isn't paced out to 8 emails per minute and I'm afraid I might go
  over my qota and get the OverQuotaError again. Since I am sending out
  a newsletter I really can't afford to have to restart it again and
  risk sending the same letter twice to a number of people.

  My account doesn't have billing activated but has had the free quota
  bumped up.

  --

  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.comgoogle-appengine%2bunsubscr...@googlegroups.com
  .
  For more options, visit this group at
 http://groups.google.com/group/google-appengine?hl=en.

 --
 ---
 Visit my personal 
 websites:http://www.musicpilgrimages.comhttp://www.countryplug.com
-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-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: This App Engine is a JOKE

2010-01-14 Thread Nickolas Daskalou
In the future if Google allows us to choose which country our apps are
hosted in and we choose to host outside the US, would that lift this
restriction?


2010/1/15 Wesley Chun (Google) wesc+...@google.com wesc%2b...@google.com

 Cuba, Iran, Iraq, North Korea, Syria, and Sudan are a magical group of
 countries known as the T-6 or Country Group E:1. (it used to be
 T-7 and included Libya.). Businesses based in the US are not allowed
 to export products that fall under the ENC license exception to such
 countries. ENC includes encryption items (includes source code,
 technology and open cryptographic interface) and encryption
 commodities (software and components, network infrastructure
 encryption products, commercial source code and general purpose
 toolkits):

 More on E:1 and ENC
 http://www.bis.doc.gov/encryption/lechart1_sec508.htm (scroll down to
 bottom for definition of E:1 and the license exception type ENC)
 http://www.ecustoms.com/ecustoms-glossary.cfm (look up an easier to
 read definition of the ENC license exception)
 https://bxa.ntis.gov/whatsnewcgi.html?filename=countrygrpe1.asc (see
 SUMMARY section)

 Info about US-based technology companies and this restriction:

 http://www.cisco.com/web/about/doing_business/legal/global_export_trade/faqs.html
 http://www.goarticles.com/cgi-bin/showa.cgi?C=1655904

 The bottom line is that this is not a corporate decision... it's
 federal law.

 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 Core Python Programming, Prentice Hall, (c)2007,2001
 Python Fundamentals, Prentice Hall, (c)2009
   http://corepython.com

 wesley.j.chun :: wesc+...@google.com wesc%2b...@google.com
 developer relations :: google app engine

 --
 You received this message because you are subscribed to the Google Groups
 Google App Engine group.
 To post to this group, send email to google-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] EntityProto instance to Model instance?

2010-01-14 Thread Nickolas Daskalou
How can I convert an EntityProto to a Model instance?

I have a Model method, pre_put(), that I want to call on each Model instance
before it's Put into the Datastore, using hooks (eg:
http://code.google.com/appengine/articles/hooks.html).

My hook code looks like this:

def hook(service, call, request, response):
assert service == 'datastore_v3'
if call == 'Put':
for entity in request.entity_list():
entity.pre_put()

When the hook is called and runs, I get this error:

AttributeError: EntityProto instance has no attribute 'pre_put'

Is there any way to convert the entities in request.entity_list() to their
original Models, manipulate them, and then convert them back to an
EntityProto instance? Or even better, if the EntityProto instances have
references to the actual Model instances which we can access and manipulate?
-- 

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] EntityProto instance to Model instance?

2010-01-14 Thread Kapil Kaisare
As an aside: what is an EntityProto, and is there a link in the GAE
documentation for it?

Regards,
Kaisare, Kapil Sadashiv



On Fri, Jan 15, 2010 at 09:37, Nickolas Daskalou n...@daskalou.com wrote:

 How can I convert an EntityProto to a Model instance?

 I have a Model method, pre_put(), that I want to call on each Model
 instance before it's Put into the Datastore, using hooks (eg:
 http://code.google.com/appengine/articles/hooks.html).

 My hook code looks like this:

 def hook(service, call, request, response):
 assert service == 'datastore_v3'
 if call == 'Put':
 for entity in request.entity_list():
 entity.pre_put()

 When the hook is called and runs, I get this error:

 AttributeError: EntityProto instance has no attribute 'pre_put'

 Is there any way to convert the entities in request.entity_list() to their
 original Models, manipulate them, and then convert them back to an
 EntityProto instance? Or even better, if the EntityProto instances have
 references to the actual Model instances which we can access and manipulate?

 --
 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] Re: This App Engine is a JOKE

2010-01-14 Thread Niklasro.appspot.com
2010/1/12 Thanasis t.deleni...@gmail.com

 I also tend to think that GAE is a very promising environment, but
 it's currently unusable.

 My case:

 A simple, oss related web site, using just jsp tags to include headers/
 footers. It gets about 300 uniques / 1000 pageviews per day. No
 servlets, no processing, nothing like that - just pages.

 And this is what I get:





 
 01-10 05:55AM 31.153 / 500 10342ms 0cpu_ms 0kb Mozilla/5.0 (Macintosh;
 U; Intel Mac OS X 10_5_8; fi-fi) AppleWebKit/531.21.8 (KHTML, like
 Gecko) Version/4.0.4 Safari/531.21.10,gzip(gfe),gzip(gfe)
 82.181.153.104 - - [10/Jan/2010:05:55:41 -0800] GET / HTTP/1.1 500 0
 - Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_8; fi-fi)
 AppleWebKit/531.21.8 (KHTML, like Gecko) Version/4.0.4 Safari/
 531.21.10,gzip(gfe),gzip(gfe) www.smslib.org
 W 01-10 05:55AM 41.496
 Request was aborted after waiting too long to attempt to service your
 request. Most likely, this indicates that you have reached your
 simultaneous dynamic request limit. This is almost always due to
 excessively high latency in your app. Please see
 http://code.google.com/appengine/docs/quotas.html for more details.
 

 If GAE can't handle my site, well... all I can say is LOL. Of course,
 I've switched to a $5 traditional web host.

There're absolute and relative benchmarks. A mod_jk binary compiled
specifically for a physical dedicated will respond very fast when all you
want is performance and presume performance = usability. I too benchmark and
compare $5 traditional and gae apps getting far better absolute scores with
first mentioned and superior relative (yslow) scores with gae calling
unexplained experiments intermittence and experience tradeoff lower absolute
level and greater leverage with gae both lucratively and technically
comparing 512MB virtual dedicated and gae apps on shoestring budget.
 Usecase is more view. App and persistance layers generally superior while I
agree backup, deployment and versioning are tedious. Easy way to edit would
be direct deployment from hg or svn and direct hg or svn edit.



 I will continue to keep an eye on GAE and its development / evolution,
 but after getting such results with simple pages I strongly hesitate
 to use GAE for anything other than experiments.

 --
 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] Re: Running some code immediately before a Datastore put()?

2010-01-14 Thread 风笑雪
You can use aetycoon, example:
http://blog.notdot.net/2009/12/Most-popular-metrics-in-App-Engine

2010/1/15 Nickolas Daskalou n...@daskalou.com:
 I'm pretty sure the code on the GAE Hooks article
 (http://code.google.com/appengine/articles/hooks.html) is wrong.

 4th code snippet, shouldn't the very first line:

 def path_appengine():

 be moved to the bottom, just above this line:

     apiproxy_stub_map.apiproxy.GetPreCallHooks().Append()

 ?


 2010/1/15 Nickolas Daskalou n...@daskalou.com

 Thanks guys, both great suggestions.

 I'll try and get PreCallHook working because that would allow me to add a
 pre_put() method to my Models, and then using these PreCallHooks I can
 call pre_put() for each of the entities being put into the Datastore.

 Failing that, I'll create a new derived property for my Model and do as
 Devel63 said.


 2010/1/15 Devel63 danstic...@gmail.com

 Nick,

 I've been faced with your exact situation.  I have to say I don't
 understand PreCallHook, and maybe that would be the best approach, but
 here's what I do know.

 Overriding put is a bad idea, and as you point out, the override
 will not be called in a batch put.

 I found that the most elegant solution was to derive a new type of
 db.Property, and override its get_value_for_datastore.  Then GAE will
 automatically do what you want regardless of how the entity is being
 put.


 On Jan 14, 1:51 am, Eric Ka Ka Ng ngk...@gmail.com wrote:
  would a PreCallHook works for your case?
 
  http://code.google.com/appengine/articles/hooks.html
 
  - eric
 
  2010/1/14 Nickolas Daskalou n...@daskalou.com:
 
   I have a property of a Model that is a hash of another property of
   the same
   Model, eg:
 
   class MyModel(db.Model):
     something = db.StringProperty()
     something_hash = db.StringProperty()
     def generate_hash(self):
       self.something_hash = sha1(self.something)
 
   I want generate_hash() to be automatically called just before the
   entity is
   put() into the Datastore, without the developer having to explicitly
   call
   entity.generate_hash().
 
   I know I can create a put() method that makes such a call and then
   calls
   put() on the superclass, but (a) is that the best way to do it, and
   (b) if
   the put() is part of a batch put (eg. via db.put(entities)), will the
   put()
   method of each model instance still be called?
 
   Nick
 
   --
   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.






 --
 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] [OT]appspot 都不能访问了??

2010-01-14 Thread 李超
appspot 都不能访问了??

-- 
Best regards,
Lewise
-- 

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] [OT]appspot 都不能访问 了??

2010-01-14 Thread 风笑雪
Sometimes works fine in China, but not always.

You know, we are in China, and we have the GFW.

2010/1/15 李超 lewise@gmail.com:
 appspot 都不能访问了??

 --
 Best regards,
 Lewise

 --
 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: appspot 都不能访问了??

2010-01-14 Thread Wesley Chun (Google)
你好,

the appspot and other Google company servers have rotating sets of IP
addresses, some of which are periodically blocked from within china.
this is the reason why sometimes you can reach it but other times not.
this has been an on-going situation for awhile.

here's another similar situation:
http://groups.google.com/group/google-appengine/browse_thread/thread/9301c315a9236c02

here's a potential solution if you can get it working:
http://groups.google.com/group/google-appengine/browse_thread/thread/c83a316d28eb8ea7

good luck!
-- wesley
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Core Python Programming, Prentice Hall, (c)2007,2001
Python Fundamentals, Prentice Hall, (c)2009
   http://corepython.com

wesley.j.chun :: wesc+...@google.com
developer relations :: google app engine

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-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: Authorization

2010-01-14 Thread osrdg
You need to build role authorisation modules on your own.

On Jan 14, 3:11 am, Amit Piplani amit.pipl...@gmail.com wrote:
 Hi,

 If we use Google authentication feature for application developed
 using the Google App engine platform, then application is limited with
 2 roles- general or admin.

 In case of application requiring multiple roles feature, then is
 customer authentication needs to be done? How will requestHandler
 forward the authentication request to customer login handler?

 --Amit--
-- 
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: This App Engine is a JOKE

2010-01-14 Thread WallyDD
Many thanks Wesley for the clarification and an acknowledgment of the
issue.
We can all wait and see what Hillary has to say next week.

http://www.moneycontrol.com/news/technology/us-state-dept-to-unveil-internet-policy_435366.html

On Jan 15, 11:11 am, Wesley Chun (Google) wesc+...@google.com
wrote:
 Cuba, Iran, Iraq, North Korea, Syria, and Sudan are a magical group of
 countries known as the T-6 or Country Group E:1. (it used to be
 T-7 and included Libya.). Businesses based in the US are not allowed
 to export products that fall under the ENC license exception to such
 countries. ENC includes encryption items (includes source code,
 technology and open cryptographic interface) and encryption
 commodities (software and components, network infrastructure
 encryption products, commercial source code and general purpose
 toolkits):

 More on E:1 and 
 ENChttp://www.bis.doc.gov/encryption/lechart1_sec508.htm(scroll down to
 bottom for definition of E:1 and the license exception type 
 ENC)http://www.ecustoms.com/ecustoms-glossary.cfm(look up an easier to
 read definition of the ENC license 
 exception)https://bxa.ntis.gov/whatsnewcgi.html?filename=countrygrpe1.asc(see
 SUMMARY section)

 Info about US-based technology companies and this 
 restriction:http://www.cisco.com/web/about/doing_business/legal/global_export_tra...http://www.goarticles.com/cgi-bin/showa.cgi?C=1655904

 The bottom line is that this is not a corporate decision... it's
 federal law.

 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 Core Python Programming, Prentice Hall, (c)2007,2001
 Python Fundamentals, Prentice Hall, (c)2009
    http://corepython.com

 wesley.j.chun :: wesc+...@google.com
 developer relations :: google app engine
-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-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.