[appengine-java] Using custom dynamic URLs in GAE Java web-app
Hello, We have a requirement wherein we would like to use a dynamic URL which is custom created based on certain values of an object in the datastore. We are trying to build a multi-tenant application on GAE/J where the namespace is based on the value stored in one of the properties of the object. For e.g. If our landing page is: http://www.mygaejapp.com/user/login.jsp we would then like to fwd the user to a dynamic URL such as this: http://www.mygaejapp.com/company-name/user/enter-data.jsp The company-name part of the URL is not part of the filesystem but needs to dynamically added based on the properties of an object on the login page. I came across this module: http://tuckey.org/urlrewrite/ but it seems here an XML needs to be updated each time a new company- name is added and then the application needs to be reloaded in the app-server context. This doesnt seem like a feasible and scalable solution. Hence, I was wondering if there are any other ways that we can accomplish this task of being able to use dynamic URLs based on an object property without having to update any XMLs or reloading the application? Also, we are trying to build an automated SaaS app, hence manual intervention is not feasible. Any inputs will be greatly appreciated! -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: [appengine-java] Using custom dynamic URLs in GAE Java web-app
Did you try struts2? It suits your requirement. On Tue, Jan 18, 2011 at 1:34 PM, rsutaria rsuta...@gmail.com wrote: Hello, We have a requirement wherein we would like to use a dynamic URL which is custom created based on certain values of an object in the datastore. We are trying to build a multi-tenant application on GAE/J where the namespace is based on the value stored in one of the properties of the object. For e.g. If our landing page is: http://www.mygaejapp.com/user/login.jsp we would then like to fwd the user to a dynamic URL such as this: http://www.mygaejapp.com/company-name/user/enter-data.jsp The company-name part of the URL is not part of the filesystem but needs to dynamically added based on the properties of an object on the login page. I came across this module: http://tuckey.org/urlrewrite/ but it seems here an XML needs to be updated each time a new company- name is added and then the application needs to be reloaded in the app-server context. This doesnt seem like a feasible and scalable solution. Hence, I was wondering if there are any other ways that we can accomplish this task of being able to use dynamic URLs based on an object property without having to update any XMLs or reloading the application? Also, we are trying to build an automated SaaS app, hence manual intervention is not feasible. Any inputs will be greatly appreciated! -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.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-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: How can I paginate backwards using a JDO query cursor?
I shall press ahead with storing the web-safe string of each cursor in a stack kept in the user's session object, and using this to provide backwards pagination. On Jan 17, 8:31 pm, Ian Marshall ianmarshall...@gmail.com wrote: Does anyone fancy exercising their little grey cells on this fine Monday? I have an entity with relevant fields declared as: @PersistenceCapable(identityType = IdentityType.APPLICATION, detachable = true) public class Thing implements Serializable { private static final long serialVersionUID = 1L; @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) @Extension(vendorName=datanucleus, key=gae.encoded-pk, value=true) private String sEncodedKey; @Persistent @Extension(vendorName=datanucleus, key=gae.pk-id, value=true) private Long loID; @Persistent private Date dtCreated; } I want to display pages of my persistent entity to the user, which each page having, say, 20 items displayed. I want to use the class JDOCursorHelper (and stick with JDO if possible). The GAE/J documentation shows me how I can paginate forwards: · Query the first 21 entities and store in an ArrayListThing. · If 21 are returned, set a there are more entities flag and discard the 21st entity from the list, otherwise reset the flag. · Show the 20 entities. · Store the cursor as a web-safe string. · If the user hits Next (enabled if the flag is set) then: · retrieve the cursor from the web-safe string. · get the next 21 entities · etc. The fun starts if I want to allow the user to paginate the previous pages. One method that I can think of stores the web-safe string of each cursor in a list kept in the user's session object. As Next is hit, the cursor just generated can be pushed onto the list. To traverse backwards, I pop (delete) the latest cursor string from the session's list and then use the previous one (now the latest) to produce the previous page's items. Can anyone think of a smarter way to paginate backwards without storing a list of web-safe cursor strings in a user's session? (I could generate an additional persistent field which holds the concatenated string values [dtCreated to milliseconds using Calendar] + | + sEncodedKey but the GAE/J article for this says that this way is no longer recommended.) Regards, Ian -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: Using custom dynamic URLs in GAE Java web-app
Hi, I don't know per se for JSP that I don't use. What I can say though is that dynamic url are fully possible with regular java: you have to use patterns rather than full-URL in definitions of your web.xml For example, what I use personally for my plain java servlets: servlet servlet-nametaskExecutor/servlet-name servlet-classMypackage/MyClass/servlet-class /servlet servlet-mapping servlet-nametaskExecutor/servlet-name url-pattern/q/*/url-pattern /servlet-mapping in that case, all urls of type appid.appspot.com/q/whatever will go to MyClass behind TaskExecutor hope it helps didier On Jan 18, 9:09 am, romesh soni soni.rom...@gmail.com wrote: Did you try struts2? It suits your requirement. On Tue, Jan 18, 2011 at 1:34 PM, rsutaria rsuta...@gmail.com wrote: Hello, We have a requirement wherein we would like to use a dynamic URL which is custom created based on certain values of an object in the datastore. We are trying to build a multi-tenant application on GAE/J where the namespace is based on the value stored in one of the properties of the object. For e.g. If our landing page is:http://www.mygaejapp.com/user/login.jsp we would then like to fwd the user to a dynamic URL such as this: http://www.mygaejapp.com/company-name/user/enter-data.jsp The company-name part of the URL is not part of the filesystem but needs to dynamically added based on the properties of an object on the login page. I came across this module: http://tuckey.org/urlrewrite/ but it seems here an XML needs to be updated each time a new company- name is added and then the application needs to be reloaded in the app-server context. This doesnt seem like a feasible and scalable solution. Hence, I was wondering if there are any other ways that we can accomplish this task of being able to use dynamic URLs based on an object property without having to update any XMLs or reloading the application? Also, we are trying to build an automated SaaS app, hence manual intervention is not feasible. Any inputs will be greatly appreciated! -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.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-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: Using custom dynamic URLs in GAE Java web-app
Thanks. I am not too familiar with Struts 2. But I am trying out the wildcard mappings as given here: http://struts.apache.org/2.1.8/docs/wildcard-mappings.html On Jan 18, 1:09 pm, romesh soni soni.rom...@gmail.com wrote: Did you try struts2? It suits your requirement. On Tue, Jan 18, 2011 at 1:34 PM, rsutaria rsuta...@gmail.com wrote: Hello, We have a requirement wherein we would like to use a dynamic URL which is custom created based on certain values of an object in the datastore. We are trying to build a multi-tenant application on GAE/J where the namespace is based on the value stored in one of the properties of the object. For e.g. If our landing page is:http://www.mygaejapp.com/user/login.jsp we would then like to fwd the user to a dynamic URL such as this: http://www.mygaejapp.com/company-name/user/enter-data.jsp The company-name part of the URL is not part of the filesystem but needs to dynamically added based on the properties of an object on the login page. I came across this module: http://tuckey.org/urlrewrite/ but it seems here an XML needs to be updated each time a new company- name is added and then the application needs to be reloaded in the app-server context. This doesnt seem like a feasible and scalable solution. Hence, I was wondering if there are any other ways that we can accomplish this task of being able to use dynamic URLs based on an object property without having to update any XMLs or reloading the application? Also, we are trying to build an automated SaaS app, hence manual intervention is not feasible. Any inputs will be greatly appreciated! -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.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-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Sevlet 3.0 support?
Now that containers such as JBoss and Tomcat are updated I am wondering if Servlet 3.0 support is on the GAE/J teams road map. 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-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: [appengine-java] can't retreive one-to-may objetcs, JPA
What do you mean by need to access to the subjects field before closing the em?. Do you mean, with the em, retreive the list of subjects and the add them to the list of books?. (That's a workaround, but it is not efficient), It's supposed to retreive the books completly with their subjetcs also, I might be doing something wrong in the Entities. Please soome help. On 18 January 2011 00:30, Stephen Johnson onepagewo...@gmail.com wrote: I don't do JPA, but If it's like JDO and you have lazy loading then don't you need to access the subjects field before you close your entity manager to get the subjects loaded? Just a thought. On Mon, Jan 17, 2011 at 3:51 PM, kidowell crui...@gmail.com wrote: I cannot retreive the Listsubjects from book. The save and update of a book when a subject changes its fine, the problem is when retreiving books, It doeesnt retreive their subjects. I need help. Here;s the code. @Entity @Table(name = book) public class Book implements Serializable, IsSerializable { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Key id; private String bookName; private String comment; @OneToMany(mappedBy=book,cascade = CascadeType.ALL) private ListSubject subjects; //setters and getters -- @Entity @Table(name = subject) public class Subject implements Serializable, IsSerializable { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Key id; private String name; private int visible; @Basic private Text content; @Basic @ManyToOne private Book book; // setters and getters public ListBook getBooks() throws GeneralException, BookNotFoundException, NullParameterException { entityManager = EMF.get().createEntityManager(); ListBook list; try { String sql = SELECT b FROM Book b; list = entityManager.createQuery(sql).getResultList(); //this list is retreived with the books but without their subjects } catch (Exception e) { throw new GeneralException(Exception in method getBookes: + e.getMessage()); } finally { if (entityManager.isOpen()) { entityManager.close(); } } if (list == null || list.isEmpty()) { throw new BookNotFoundException(Book not found in method getBookes); } return list; } Please, I need some help. Cheers. -- Kido. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.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-java@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. -- Cesar Ruiz. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: [appengine-java] Mutation pool bug?
Thank you, Stephen. This works. I could not locate this earlier in the mapreduce documentation. Regards, Arun From: Stephen Johnson onepagewo...@gmail.com To: google-appengine-java@googlegroups.com Sent: Sun, 16 January, 2011 1:33:31 AM Subject: Re: [appengine-java] Mutation pool bug? Do you have this defined in your mapper class? @Override public void taskCleanup(Context context) { try { // make sure to call super classes taskCleanup so that the DatastoreMutationPool // gets flushed properly otherwise puts/deletes can be lost; super.taskCleanup(context); } catch (Exception ex) { log.severe(ex.toString()); } } On Fri, Jan 14, 2011 at 11:34 PM, armanuj arun_rama...@yahoo.com wrote: Hi, I had earlier posted an issue such as out of mapper quota earlier (link below). I had about 260 entities being mapped (for a start), and not entities were getting updated. I was using the mutation pool for updates in the map routine. On further investigations, it appears that the mutation pool flushes after every 100 entities in it, and does not do so for the last batch of entities. Out of the 260 entities, everytime 60 entities would NOT be updated, but 200 would be. This appeared to be true even if your entity count was a multiple of 100 - the last 100 were not getting updated. However, this issue does not exist if I get rid of mutation pool, and put entities directly to the datastore - all entities are updated always. Is this is a bug, or is there something I am not doing correctly with mutation pools? The mutation pool code is fairly simple (mutationPool.put(entity)) - just as in Ikai's mapper blog post. Appreciate your help with this. Regards, Arun Earlier post: http://groups.google.com/group/google-appengine-java/browse_thread/thread/fe7fd75e2fa19a7e/a94b0efc6e50c361?hl=enlnk=gstq=out+of+mapper+quota#a94b0efc6e50c361 -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: How to completely erase the datastore of an app
Hi meyertee, I followed your hint and I were able to deploy a new Python version, but now I'm not able to use Datastore Admin, because an error is shown, telling me that I'm not corretly authenticated!! /_ah/datastore_admin/?app_id=xxx 500 0ms 0cpu_ms 0kb Mozilla/5.0 (Windows; U; Windows NT 5.1; it; rv:1.9.2.13) Gecko/20101203 Firefox/ 3.6.13 ( .NET CLR 3.5.30729),gzip(gfe) 151.21.125.227 - - [17/Jan/2011:10:20:00 -0800] GET /_ah/ datastore_admin/?app_id=xxx HTTP/1.1 500 0 - Mozilla/5.0 (Windows; U; Windows NT 5.1; it; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13 ( .NET CLR 3.5.30729),gzip(gfe) 99.latest.xxx.appspot.com ms=1 cpu_ms=0 api_cpu_ms=0 W01-17 10:20AM 00.511 Authentication for the Google Apps domain zzz can only be performed when requests are served from a subdomain of that domain or it has been approved through the Google Apps Control Panel. See http://code.google.com/appengine/articles/auth.html Any hint??? Thank you very much! Bye CRI On 2 Gen, 13:15, meyertee meyer...@gmail.com wrote: You can use the Datastore Admin tool available to Python apps that came with App Engine 1.3.8 to delete data more easily:http://googleappengine.blogspot.com/2010/10/new-app-engine-sdk-138-in... (under Delete all (or a part) of your application’s data) As it says in the blog post you can use it for Java apps, too. I created a simple Python application version as version number 1, then uploaded the actual Java app as version 2 and set that as the default version. Works great. If you're new to Python like I am there's a little how-to for Java-devs here:https://groups.google.com/d/topic/google-appengine-java/aRLhRzADuF4/d... Once you've done that, you can use the command line utility to remove all unused indexes: appcfg.py vacuum_indexes app-root/ More options are described here:http://code.google.com/appengine/docs/python/tools/uploadinganapp.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-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: [appengine-java] can't retreive one-to-may objetcs, JPA
What I mean is that before you close the entity manager you would need to loop through your list and call the getSubjects() accessor method to cause the entity manager to load the subjects. I am not a JPA developer but I did a quick google search on JPA and it seems that indeed the default fetch option is lazy (any JPA people please chime in if I'm wrong or is different on GAE). It seems that the other option (which I'm not sure is supported on GAE with JPA) is to change the default loading by using FetchType.EAGER in your @OneToMany annotation. I hope this helps, Stephen On Tue, Jan 18, 2011 at 4:46 AM, Cesar Ruiz crui...@gmail.com wrote: What do you mean by need to access to the subjects field before closing the em?. Do you mean, with the em, retreive the list of subjects and the add them to the list of books?. (That's a workaround, but it is not efficient), It's supposed to retreive the books completly with their subjetcs also, I might be doing something wrong in the Entities. Please soome help. On 18 January 2011 00:30, Stephen Johnson onepagewo...@gmail.com wrote: I don't do JPA, but If it's like JDO and you have lazy loading then don't you need to access the subjects field before you close your entity manager to get the subjects loaded? Just a thought. On Mon, Jan 17, 2011 at 3:51 PM, kidowell crui...@gmail.com wrote: I cannot retreive the Listsubjects from book. The save and update of a book when a subject changes its fine, the problem is when retreiving books, It doeesnt retreive their subjects. I need help. Here;s the code. @Entity @Table(name = book) public class Book implements Serializable, IsSerializable { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Key id; private String bookName; private String comment; @OneToMany(mappedBy=book,cascade = CascadeType.ALL) private ListSubject subjects; //setters and getters -- @Entity @Table(name = subject) public class Subject implements Serializable, IsSerializable { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Key id; private String name; private int visible; @Basic private Text content; @Basic @ManyToOne private Book book; // setters and getters public ListBook getBooks() throws GeneralException, BookNotFoundException, NullParameterException { entityManager = EMF.get().createEntityManager(); ListBook list; try { String sql = SELECT b FROM Book b; list = entityManager.createQuery(sql).getResultList(); //this list is retreived with the books but without their subjects } catch (Exception e) { throw new GeneralException(Exception in method getBookes: + e.getMessage()); } finally { if (entityManager.isOpen()) { entityManager.close(); } } if (list == null || list.isEmpty()) { throw new BookNotFoundException(Book not found in method getBookes); } return list; } Please, I need some help. Cheers. -- Kido. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.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-java@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. -- Cesar Ruiz. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.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-java@googlegroups.com. To unsubscribe from this group, send email to
Re: [appengine-java] Mutation pool bug?
Cool! Glad it solved your issue. I'm not sure if it's really documented any where or just implied someplace. I ran in to the same issue a year ago when I started mapreduce and I can't remember how I figured out to do that. On Tue, Jan 18, 2011 at 5:00 AM, Arun Ramanujapuram arun_rama...@yahoo.comwrote: Thank you, Stephen. This works. I could not locate this earlier in the mapreduce documentation. Regards, Arun -- *From:* Stephen Johnson onepagewo...@gmail.com *To:* google-appengine-java@googlegroups.com *Sent:* Sun, 16 January, 2011 1:33:31 AM *Subject:* Re: [appengine-java] Mutation pool bug? Do you have this defined in your mapper class? @Override public void taskCleanup(Context context) { try { // make sure to call super classes taskCleanup so that the DatastoreMutationPool // gets flushed properly otherwise puts/deletes can be lost; super.taskCleanup(context); } catch (Exception ex) { log.severe(ex.toString()); } } On Fri, Jan 14, 2011 at 11:34 PM, armanuj arun_rama...@yahoo.com wrote: Hi, I had earlier posted an issue such as out of mapper quota earlier (link below). I had about 260 entities being mapped (for a start), and not entities were getting updated. I was using the mutation pool for updates in the map routine. On further investigations, it appears that the mutation pool flushes after every 100 entities in it, and does not do so for the last batch of entities. Out of the 260 entities, everytime 60 entities would NOT be updated, but 200 would be. This appeared to be true even if your entity count was a multiple of 100 - the last 100 were not getting updated. However, this issue does not exist if I get rid of mutation pool, and put entities directly to the datastore - all entities are updated always. Is this is a bug, or is there something I am not doing correctly with mutation pools? The mutation pool code is fairly simple (mutationPool.put(entity)) - just as in Ikai's mapper blog post. Appreciate your help with this. Regards, Arun Earlier post: http://groups.google.com/group/google-appengine-java/browse_thread/thread/fe7fd75e2fa19a7e/a94b0efc6e50c361?hl=enlnk=gstq=out+of+mapper+quota#a94b0efc6e50c361 -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.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-java@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-java@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-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: [appengine-java] Re: Thread inside servlet
Hi there, If there is something I want to run every 30 minute can I do something like this: doGet(...) { while(true){ fecthDataFromTwitter(); Thread.sleap(30*60*1000); } } -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Datastore viewer not working
Hello all I am using Tapestry 5.0.19 with the java app engine SDK 1.4.0. When I attempt to access the local datastore admin tool at http://localhost:/_ah/admin, the result is that the request is sent to tapestry and the home page is displayed. It would be convenient to be able to use the datastore admin tools. I am guessing the problem is caused by my web.xml file somehow, but I don't fully understand how. Thank you for any possible insights into my issue. My web.xml looks like this: ?xml version=1.0 encoding=utf-8? web-app xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns=http://java.sun.com/xml/ns/javaee; xmlns:web=http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd; xsi:schemaLocation=http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd; version=2.5 context-param param-nametapestry.app-package/param-name param-valuecom.javagwtapp/param-value /context-param filter filter-nameapp/filter-name filter-classorg.apache.tapestry5.TapestryFilter/filter-class /filter filter-mapping filter-nameapp/filter-name url-pattern/*/url-pattern /filter-mapping /web-app -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] SortedSet and comparator-name JDO extension
I have a one to many relationship in which I'd like to store the many side in a sorted set, e.g. : @PersistenceCapable(identityType = IdentityType.APPLICATION, detachable = true) public class Foo { @Persistent(mappedBy = foo) private SortedSetBar bars; } The datanucleus documentation indicates that there is an extension named comparator-name that should allow me to specify the comparator to use for the given sorted set. Thus, my first pass at this was: @Persistent(mappedBy = foo) @Extension(vendor=datanucleus, key=comparator-name value=foo.bar.MyComparatorClass) private SortedSetBar bars; Alternatively, since I wasn't sure where the @Extension should be marked, I also tried: @Persistent( mappedBy = foo, extensions = { @Extension(vendor=datanucleus, key=comparator-name value=foo.bar.MyComparatorClass) } ) private SortedSetBar bars; However, in both cases my application blows up with a class cast exeption and JDO reports that Bar does not implement Comparable. What is the correct way to specify this extension so that JDO can use the correct comparator for the SortedSet ? -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] basic understanding of PersistenceManger
Hi I'm a newbie in App Engine. Right now, I am trying to develop an application myself, but my basic understanding is weak. So someone, please clarify my knowledge. The question is HOW to store the data and to know what is stored. Say, I have my own class like, GCalendar(String date, String day, String time, String content) The variable date can be either a Date object or simply a String object as long as the information (such as 2010/12/14) can be stored and retrieved. Since an instance of this class represents one event, I want an array of this class like, ListGCalendargcalendar = new ArrayListGCalendar(); After obtaining data, I want to store them into Bigtable, so //- PersistenceManager pm = PMF.get().getPersistenceManager(); for (int j = 0; j gcalendar.size(); j++){ try { pm = PMF.get().getPersistenceManager(); pm.makePersistent(gcalendar.get(j)); } finally { pm.close(); } } //- Is this enough? The reason I'm asking is that I have no idea what is being stored as the instance, namely pm. GCalendar object, maybe? Once the program is executed, it seems like some data is stored, even if a part of it produces errors. How can I erase the entire data in order to start from scratch? If I can find out what is now stored with PersistenceManager, it seems easier to continue fixing errors. soujirou -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Need some points on implementing REST API for chess-like game
Hi folks! I just got started with Google App engine (using Java) and it's great! I'm trying to develop a backend for an asynchronous turn-based game I'm working on in my spare time. My plan was to develop a REST-ish API that my game client would consume poll periodically for updates. You can picture the game as a kind of chess game with only one multi- purpose pawn for each player (their character). Each player takes a turn to make his move (attack, defense, etc), until one of the characters dies. Pretty basic. Now it's the first time I'm writing a backend on top of being a google app engine newbie, so there are a few areas I'm still a bit uncertain about. I would really appreciate if some of you knowledgeable folks could spare a bit of your time to give some advices on how to best design this server. I'm using Objectify and the basic javax.servlet framework to receive and submit requests. Here are my questions: 1) A game between two players can theoretically last days. From what I understand, I should store each player's move in the datastore, correct? My initial reflex was to just keep the game session data in the memcache but then I read that it was not a correct use-case, as it the oldest cached elements can be removed from the cache at any time to make room for newer data in case it's running low on memory. Also, I should not simply be storing this data in my java objects (instance memory) as idle instances of my app can be killed at any time by google app engine to free up resources, is that correct? 2) I'm going to need some way to identify individual users and save persistent progress stats (level, experience, etc). I was thinking of rolling a simple User class and prompt new players to create an account with username password. What is the best way of storing that sensitive data (mp5 hash I suppose?). Also, how can I ensure that a move request comes from the desired user? Do I need to use some kind of secret key delivered to the user upon login and that would have to be included in all subsequent requests? Do I just check the requester IP? If so, how do you handle people behind corporate routers seen as a single IP by the outside world? 3) Is it ok to have the game client poll for game status update every 5 seconds? Data sent back by the server would, for instance, include the most recent move of the other player and manage player turn assignment. Thanks, I'll probably have more questions later! :) -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] javax.mail can't resolve import
I'm trying to use the various components of javax.mail in a GWT app, and I'm stumped as to how to get these imports to resolve. I don't have any errors showing up in the Eclipse editor (I used to, but don't any more for some reason), but the errors show up when I run the app as a web application on my local machine, and also when I run it from appspot. I am trying to add it to my classpath (project properties - libraries) but I don't know where to find it in a jar file. How does one know where to look? Is this even necessary? [DEBUG] [pcrequest] - Validating newly compiled units [ERROR] [pcrequest] - Errors in 'file:/C:/java_projects/PCRequest/src/ com/tempusnova/kohls/client/EmailRequest.java' [ERROR] [pcrequest] - Line 8: The import javax.mail cannot be resolved [ERROR] [pcrequest] - Line 9: The import javax.mail cannot be resolved [ERROR] [pcrequest] - Line 10: The import javax.mail cannot be resolved [ERROR] [pcrequest] - Line 11: The import javax.mail cannot be resolved [ERROR] [pcrequest] - Line 12: The import javax.mail cannot be resolved [ERROR] [pcrequest] - Line 13: The import javax.mail cannot be resolved [ERROR] [pcrequest] - Line 14: The import javax.mail cannot be resolved [ERROR] [pcrequest] - Line 24: Session cannot be resolved to a type [ERROR] [pcrequest] - Line 24: Session cannot be resolved [ERROR] [pcrequest] - Line 30: Message cannot be resolved to a type [ERROR] [pcrequest] - Line 30: MimeMessage cannot be resolved to a type [ERROR] [pcrequest] - Line 31: InternetAddress cannot be resolved to a type [ERROR] [pcrequest] - Line 32: Message cannot be resolved [ERROR] [pcrequest] - Line 32: InternetAddress cannot be resolved to a type [ERROR] [pcrequest] - Line 35: Transport cannot be resolved [ERROR] [pcrequest] - Line 37: AddressException cannot be resolved to a type [ERROR] [pcrequest] - Line 39: MessagingException cannot be resolved to a type [INFO] [pcrequest] - Module pcrequest has been loaded I'm using a java email class similar to the following: http://code.google.com/appengine/docs/java/mail/usingjavamail.html Any ideas would be appreciated! Thanks -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Struggling w/datastore relationship
Hello, I'm writing a replacement for del.icio.us on GAE, and am really struggling with what the right way to do the User / URL / Tag relationship: Here's what I'm referencing for my idea: http://code.google.com/appengine/articles/modeling.html My thought is to have three Entity's: User URL Tag Then use a relationship model for the inter-relationships: class UserURLTags(db.Model): userURLs = db.ReferenceProperty(User, required=True, collection_name='urls') userTags = db.ReferenceProperty(User, required=True, collection_name='tags') urlUsers = db.ReferenceProperty(URL, required=True, collection_name='users') urlTags = db.ReferenceProperty(URL, required=True, collection_name='tags') tagUsers = db.ReferenceProperty(Tag, required=True, collection_name='users') tagURLs = db.ReferenceProperty(Tag, required=True, collection_name='urls') The idea behind this is to allow lookups for each of the following: User's URLs (get all of user xyz's URLs) User's Tags URL's Tags (get all of the tags for URL 'abc') URL's Users Tag's URLs (get all of the URLs tagged with 'efg') Tag's Users Is this just a terrible mis-understanding of the proper way of doing this association? Thanks in advance! -Ben -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Refresh your UI without redeploying to appspot
I developed this generally useful HttpServlet that fetches your application's static content (html, javascript, images, css) from any external web server. It also maintains a copy of the content in memcache and provides an admin-only interface to refresh the copy. I am using it to rapidly deploy changes to my user interface by serving my content directly from SVN, and external javascript libraries (ext-js, prototype-js, protovis) from an internal web server. This significantly reduces the number of deployments in an Agile development environment. This servlet is easily wired into your web.xml and requires little configuration to start working. code: http://goo.gl/jHnee configuration: http://goo.gl/K6dQb blog: http://addama.wordpress.com/2011/01/09/ui-rapid-deployment-in-appspot/ Hope you find this useful! Hector Rovira Institute for Systems Biology Seattle WA Addama is open source software offered under the Apache v2 license -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] java.lang.ClassCastException:
Hi. I keep getting an error, the code follows the error message. The problem seems to occur at ★★★HERE. after ListGCalendar calendars = (ListGCalendar) query.execute(); calendars is StreamingQueryResult object. Does the error mean that I cannot cast this object to String or Date? Could anyone help me? Thanks in advance. soichi //error message java.lang.ClassCastException: java.lang.String cannot be cast to java.util.Date at com.soichi.rainbows.GCalendar.jdoReplaceField(GCalendar.java) at com.soichi.rainbows.GCalendar.jdoReplaceFields(GCalendar.java) at org.datanucleus.state.JDOStateManagerImpl.replaceFields(JDOStateManagerImpl.java: 2772) at org.datanucleus.state.JDOStateManagerImpl.replaceFields(JDOStateManagerImpl.java: 2791) at org.datanucleus.store.appengine.DatastorePersistenceHandler.fetchObject(DatastorePersistenceHandler.java: 480) at org.datanucleus.store.appengine.query.DatastoreQuery.entityToPojo(DatastoreQuery.java: 565) at org.datanucleus.store.appengine.query.DatastoreQuery.entityToPojo(DatastoreQuery.java: 520) at org.datanucleus.store.appengine.query.DatastoreQuery.access $300(DatastoreQuery.java:110) at org.datanucleus.store.appengine.query.DatastoreQuery $6.apply(DatastoreQuery.java:638) at org.datanucleus.store.appengine.query.DatastoreQuery $6.apply(DatastoreQuery.java:630) at org.datanucleus.store.appengine.query.LazyResult.resolveNext(LazyResult.java: 94) at org.datanucleus.store.appengine.query.LazyResult.get(LazyResult.java: 81 ... //--- //a part of the code that produces the error Query query = pm.newQuery(GCalendar.class); query.setOrdering(date desc); ListGCalendar calendars = (ListGCalendar) query.execute(); resp.setContentType(text/html); resp.setCharacterEncoding(utf-8); resp.getWriter().print(render(calendars)); // private String render(ListGCalendar calendars) { StringBuffer sb = new StringBuffer(); SimpleDateFormat sdf = new SimpleDateFormat(/MM/dd); sb.append(head); for (GCalendar calendar : calendars){ // ★★★HERE String tmp = sdf.format(calendar.getDate()); sb.append(MessageFormat.format(memoTmpl, tmp, calendar.getYoubi(), calendar.getTime(), calendar.getNaiyou())); } sb.append(tail); return sb.toString(); } // -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Field is not stored
Hi I have a class, which has list of other objects. Looks like this @PersistenceCapable public class Category { @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Key key; @Persistent private String name; @Persistent private String url; @Persistent(mappedBy = category) private ListItem items = new LinkedListItem(); } @PersistenceCapable public class Item { @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Key key; @Persistent private Category category; ... } When I create new category I save it in the store: Category category = new Category(req.getParameter(categoryName), req.getParameter(categoryUrl)); try { pm.makePersistent(category); } finally { pm.close(); } When I need a category I get it by key: PersistenceManager pm = PMF.get().getPersistenceManager(); Category category = pm.getObjectById(Category.class, categoryKey); And here I have a problems. The items field is null. I thought it was because of items type was List (interface). So I've changed it to LinkedList, but it changed nothing. Another thought was also that the list was empty so it wasn't saved. I added one item at the moment of category creation like this|: Category category = new Category(req.getParameter(categoryName), req.getParameter(categoryUrl)); category.getItems().add(new Item()); try { pm.makePersistent(category); } finally { pm.close(); } Still it doesn't save. As far as I understand it's a usual way of using linked lists. Should it work like that or I should save each item separately and then retrieve them directly from the store? -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: Need some points on implementing REST API for chess-like game
Hi Didier, thanks for your reply. I forgot to mention that my game client is a stand-alone application (desktop mobile), not a regular web page, so I'm quite restricted in term of web capabilities on the client side. Right now, all I can do is GET POST http requests, and possibly provide additional header data. 2) Does the login service allow me to register new accounts and authenticate users via my own user interface, or is it only possible to do so by redirecting to an existing google web page for login/ account creation? What I'm looking for is a user management framework/ API that allows me to check if a user exists, if he's signed in, create a new account, and sign in an existing account. Is that what google login service can provide? What do they mean by accounts on your own Google Apps domains? 3) From the doc I gather that one needs some functionalities provided by JavaScript to properly/easily use this feature. Is it possible to implement this without too much troubles if all I have at my disposal is access to raw socket functionalities? My game is not going to be very fast paced, and I think I don't need to poll for new events faster than every 5 or 10 seconds. Would it still be beneficial to use the Channel API? Thanks for your help, On Jan 18, 7:07 pm, Didier Durand durand.did...@gmail.com wrote: Hi, 1) You are right: storing in ds is required in your case 2) You could use the Google Login service: very secured and will take care of login persistence for you Seehttp://code.google.com/appengine/docs/java/users/ 3) Channel API is done to meet you needs (even at very high rate of polling): seehttp://code.google.com/appengine/docs/java/channel/overview.html regards didier On Jan 17, 9:32 pm, Spk william.rava...@googlemail.com wrote: Hi folks! I just got started with Google App engine (using Java) and it's great! I'm trying to develop a backend for an asynchronous turn-based game I'm working on in my spare time. My plan was to develop a REST-ish API that my game client would consume poll periodically for updates. You can picture the game as a kind of chess game with only one multi- purpose pawn for each player (their character). Each player takes a turn to make his move (attack, defense, etc), until one of the characters dies. Pretty basic. Now it's the first time I'm writing a backend on top of being a google app engine newbie, so there are a few areas I'm still a bit uncertain about. I would really appreciate if some of you knowledgeable folks could spare a bit of your time to give some advices on how to best design this server. I'm using Objectify and the basic javax.servlet framework to receive and submit requests. Here are my questions: 1) A game between two players can theoretically last days. From what I understand, I should store each player's move in the datastore, correct? My initial reflex was to just keep the game session data in the memcache but then I read that it was not a correct use-case, as it the oldest cached elements can be removed from the cache at any time to make room for newer data in case it's running low on memory. Also, I should not simply be storing this data in my java objects (instance memory) as idle instances of my app can be killed at any time by google app engine to free up resources, is that correct? 2) I'm going to need some way to identify individual users and save persistent progress stats (level, experience, etc). I was thinking of rolling a simple User class and prompt new players to create an account with username password. What is the best way of storing that sensitive data (mp5 hash I suppose?). Also, how can I ensure that a move request comes from the desired user? Do I need to use some kind of secret key delivered to the user upon login and that would have to be included in all subsequent requests? Do I just check the requester IP? If so, how do you handle people behind corporate routers seen as a single IP by the outside world? 3) Is it ok to have the game client poll for game status update every 5 seconds? Data sent back by the server would, for instance, include the most recent move of the other player and manage player turn assignment. Thanks, I'll probably have more questions later! :) -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] How do I expire tasks in a queue?
In some situations mostly when there is some App Engine Task Queue issue (it shows status as Elevated) I see some of my queues get too big causing issues on my real-time requests, which often, in the logs I see fail, since the request is waiting for too long to be processed. I was wondering if I could have an expiry time set for the tasks in the queue so that the tasks are not run after a given time. Should I be using task-age-limit in the queue.xml to set the expiry time? Does the task get dropped from the queue after the expiry is reached ? -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: Bulk log download
Nobody? -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: [appengine-java] Re: Need some points on implementing REST API for chess-like game
A couple words of advice: Nearly any third-party authentication system will require that you perform the login process in a web browser, but you should still use one even for desktop apps. Systems that ask you to create a login are almost anachronistic these days. Use google login, or facebook login if you are feeling adventurous. You'll need to use a web browser widget to perform the login, get an access token out of it, and use that for further requests. If you're building mobile apps, Facebook's SDK for iPhone and Android abstract this process away easily. I don't know if you can easily reverse engineer appengine's channel API for use from your client code. But if you are happy with polling, you might find Objectify's builtin memcache integration handy. It will transparently cache your entity data in the memcache for cheap and efficient reads. Jeff On Tue, Jan 18, 2011 at 11:05 AM, Spk william.rava...@googlemail.com wrote: Hi Didier, thanks for your reply. I forgot to mention that my game client is a stand-alone application (desktop mobile), not a regular web page, so I'm quite restricted in term of web capabilities on the client side. Right now, all I can do is GET POST http requests, and possibly provide additional header data. 2) Does the login service allow me to register new accounts and authenticate users via my own user interface, or is it only possible to do so by redirecting to an existing google web page for login/ account creation? What I'm looking for is a user management framework/ API that allows me to check if a user exists, if he's signed in, create a new account, and sign in an existing account. Is that what google login service can provide? What do they mean by accounts on your own Google Apps domains? 3) From the doc I gather that one needs some functionalities provided by JavaScript to properly/easily use this feature. Is it possible to implement this without too much troubles if all I have at my disposal is access to raw socket functionalities? My game is not going to be very fast paced, and I think I don't need to poll for new events faster than every 5 or 10 seconds. Would it still be beneficial to use the Channel API? Thanks for your help, On Jan 18, 7:07 pm, Didier Durand durand.did...@gmail.com wrote: Hi, 1) You are right: storing in ds is required in your case 2) You could use the Google Login service: very secured and will take care of login persistence for you Seehttp://code.google.com/appengine/docs/java/users/ 3) Channel API is done to meet you needs (even at very high rate of polling): seehttp://code.google.com/appengine/docs/java/channel/overview.html regards didier On Jan 17, 9:32 pm, Spk william.rava...@googlemail.com wrote: Hi folks! I just got started with Google App engine (using Java) and it's great! I'm trying to develop a backend for an asynchronous turn-based game I'm working on in my spare time. My plan was to develop a REST-ish API that my game client would consume poll periodically for updates. You can picture the game as a kind of chess game with only one multi- purpose pawn for each player (their character). Each player takes a turn to make his move (attack, defense, etc), until one of the characters dies. Pretty basic. Now it's the first time I'm writing a backend on top of being a google app engine newbie, so there are a few areas I'm still a bit uncertain about. I would really appreciate if some of you knowledgeable folks could spare a bit of your time to give some advices on how to best design this server. I'm using Objectify and the basic javax.servlet framework to receive and submit requests. Here are my questions: 1) A game between two players can theoretically last days. From what I understand, I should store each player's move in the datastore, correct? My initial reflex was to just keep the game session data in the memcache but then I read that it was not a correct use-case, as it the oldest cached elements can be removed from the cache at any time to make room for newer data in case it's running low on memory. Also, I should not simply be storing this data in my java objects (instance memory) as idle instances of my app can be killed at any time by google app engine to free up resources, is that correct? 2) I'm going to need some way to identify individual users and save persistent progress stats (level, experience, etc). I was thinking of rolling a simple User class and prompt new players to create an account with username password. What is the best way of storing that sensitive data (mp5 hash I suppose?). Also, how can I ensure that a move request comes from the desired user? Do I need to use some kind of secret key delivered to the user upon login and that would have to be included in all subsequent requests? Do I just check the requester IP? If so, how do you handle people behind corporate routers seen as
[appengine-java] GWT - Sending initial objects to the client
Hello, My application design is GWT embedded in JSP's. I have few JSP's and few GWT modules. I want to send few Objectify objects back to the client for every HTTP request. I discovered the following choices. Two are from this article http://googlewebtoolkit.blogspot.com/2010/10/using-dynamic-host-page-for-gwt-apps.html Official support for something along the lines of what Pat Niemeyer suggestedhttp://www.techhui.com/profiles/blogs/simpler-and-speedier-gwt-withor Lombardi is doing http://jectbd.com/?p=1329 would provide a great method for speeding up module startup when using JSPs or Servlets. 3. Sending JSON objects back to the client from Server.(I am still evaluating a Java-JSON library that works well with Objectify) Please share your thoughts on the three choices. -Aswath http://www.AccountingGuru.in -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: How do I expire tasks in a queue?
Hi, You can also use task-retry-limit and various backoff params to adjust the retry process of your tasks See /appengine/docs/java/config/ queue.html#Configuring_Retry_Attempts_for_Failed_Task I usually personally prefer to decide from within the task itself by using the X-AppEngine-TaskRetryCount http header. When it has reached a given value, the task stops itself and terminate. It gives you more flexibility (you can read parameter tables or do other stuff to decide) than the static parameters of queue.xml See http://code.google.com/appengine/docs/java/taskqueue/overview.html#Task_Request_Headers. regards didier On Jan 18, 10:04 pm, rishi khanna greenowl...@gmail.com wrote: In some situations mostly when there is some App Engine Task Queue issue (it shows status as Elevated) I see some of my queues get too big causing issues on my real-time requests, which often, in the logs I see fail, since the request is waiting for too long to be processed. I was wondering if I could have an expiry time set for the tasks in the queue so that the tasks are not run after a given time. Should I be using task-age-limit in the queue.xml to set the expiry time? Does the task get dropped from the queue after the expiry is reached ? -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: Need some points on implementing REST API for chess-like game
Hi Spk, [to access the datastore, I recommend you to use Objectify - my personal choice - developped by Jeff Schnitzer that answered above - JDO/JPA investment by Google is now less and they push packages like Objectify and other alternatives] About your complements 1) The google login service is the one you are used to if you use any Google Service (Gmail, Reader, etc..). Same capabilities: registration, sign-in, management of permanent connexion. As Jeff said, very important to reuse existing services: users are reluctant to create yet another userid / password. In addition, using a famous provider (visible from login screen) inspires trust. 2) You may try to embed javascript in your application via an embedded js interpreter like Rhino if you desktop is written in Java. You have to consider the benefits of Channel API from a back-end standpoint not a front-end: speed of polling per client is not so relevant as how many client. You have to project your aggregated polling speed. If high, then a regular plain polling may become too much quickly! This choice is probably important for you as your application is a desktop one: if you make the wrong decision and you need to change your polling, it may be difficult as you app is downloaded and installed on many clients that will control when they update. I would definitely give web/html a second chance. especially when you think about the new offline, workers and graphical capabilities of html5. Avoiding when possible a plain old app is a must these days. regards didier On Jan 19, 2:26 am, Jeff Schnitzer j...@infohazard.org wrote: A couple words of advice: Nearly any third-party authentication system will require that you perform the login process in a web browser, but you should still use one even for desktop apps. Systems that ask you to create a login are almost anachronistic these days. Use google login, or facebook login if you are feeling adventurous. You'll need to use a web browser widget to perform the login, get an access token out of it, and use that for further requests. If you're building mobile apps, Facebook's SDK for iPhone and Android abstract this process away easily. I don't know if you can easily reverse engineer appengine's channel API for use from your client code. But if you are happy with polling, you might find Objectify's builtin memcache integration handy. It will transparently cache your entity data in the memcache for cheap and efficient reads. Jeff On Tue, Jan 18, 2011 at 11:05 AM, Spk william.rava...@googlemail.com wrote: Hi Didier, thanks for your reply. I forgot to mention that my game client is a stand-alone application (desktop mobile), not a regular web page, so I'm quite restricted in term of web capabilities on the client side. Right now, all I can do is GET POST http requests, and possibly provide additional header data. 2) Does the login service allow me to register new accounts and authenticate users via my own user interface, or is it only possible to do so by redirecting to an existing google web page for login/ account creation? What I'm looking for is a user management framework/ API that allows me to check if a user exists, if he's signed in, create a new account, and sign in an existing account. Is that what google login service can provide? What do they mean by accounts on your own Google Apps domains? 3) From the doc I gather that one needs some functionalities provided by JavaScript to properly/easily use this feature. Is it possible to implement this without too much troubles if all I have at my disposal is access to raw socket functionalities? My game is not going to be very fast paced, and I think I don't need to poll for new events faster than every 5 or 10 seconds. Would it still be beneficial to use the Channel API? Thanks for your help, On Jan 18, 7:07 pm, Didier Durand durand.did...@gmail.com wrote: Hi, 1) You are right: storing in ds is required in your case 2) You could use the Google Login service: very secured and will take care of login persistence for you Seehttp://code.google.com/appengine/docs/java/users/ 3) Channel API is done to meet you needs (even at very high rate of polling): seehttp://code.google.com/appengine/docs/java/channel/overview.html regards didier On Jan 17, 9:32 pm, Spk william.rava...@googlemail.com wrote: Hi folks! I just got started with Google App engine (using Java) and it's great! I'm trying to develop a backend for an asynchronous turn-based game I'm working on in my spare time. My plan was to develop a REST-ish API that my game client would consume poll periodically for updates. You can picture the game as a kind of chess game with only one multi- purpose pawn for each player (their character). Each player takes a turn to make his move (attack, defense, etc), until one of the characters dies. Pretty basic. Now it's the
[google-appengine] Lightweight Groovy on the Google App Engine by Tim Berglund at GIDS 2011
You love Groovy and you're a believer in cloud computing. For a larger project you might choose Grails and hosting on Amazon EC2, but what if you want to take advantage of the nearly massless deployments of a cloud provider like the Google App Engine? You could make Grails work, but it's not always the best fit. Web Application Specialist Tim Berglund is coming to Bangalore this April to speak on GAELYK at India’s Great Indian Developer Summit which is to be held from 19 to 22 April, 2010 at IISC Campus, Bangalore. Gaelyk is a lightweight Groovy web application framework built specifically for the Google App Engine. In this session, he'll talk through the simple abstractions it offers, then show how easy it is to code and deploy a useful application to the cloud. Tim Berglund is a developer, consultant, and trainer who builds web applications with open-source tools, especially Groovy and Grails. Tim specializes in helping clients through periods of technology transition, with interests spanning web applications, business integration, data architecture, and software architecture. In all these engagements, he is especially passionate about helping developers improve in their craft. Tim is an international conference speaker at venues such as The Server Side Symposium Europe, The Scandinavian Developer Conference, and No Fluff Just Stuff. He also speaks at user groups in the United States, and helps lead IASA Denver and the Denver Open Source User Group (DOSUG). For further information on GIDS 2011, please visit the summit on the web http://www.developersummit.com/ -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Re: throttle_code=2
We are seeing this to, and I don't know exactly what it means either. Occasionally it seems to mean that the average latency of requests is too high, and that's why more instances are not being spun up. I opened this request: http://code.google.com/p/googleappengine/issues/detail?id=4405 and as I mention there, it sometimes also happens when the request latency seems just fine, so it's unclear why instance spinup is being throttled. On Jan 18, 8:48 am, Brandon Wirtz drak...@digerat.com wrote: Tonight I'm getting a LOT of throttle_code=2 in my log, and whenever that happens URL Fetch seems to stop working. How do I avoid these weird throttles? Since they seem to cause my users to not be served anything, which makes me sad. -Brandon -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Night processing for map-reduce?
Is there any concept of night processing within GAE? I realize that if a system is world-wide, it is 24x7 and it is never night. But if I wanted to do some map-reduce jobs, is there any cost savings or performance benefit to running them off-hours (supposing most of our user-base is in the USA)? Thanks, Neal -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Re: Night processing for map-reduce?
I suppose it depends on the rates of your app. See the graph in the dashboard, it will help to find free hours. On 18 ene, 15:26, NealWalters nealwalt...@nealwalters.com wrote: Is there any concept of night processing within GAE? I realize that if a system is world-wide, it is 24x7 and it is never night. But if I wanted to do some map-reduce jobs, is there any cost savings or performance benefit to running them off-hours (supposing most of our user-base is in the USA)? Thanks, Neal -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] What design has better perfomance?
Actually I'm using key_names intensively in my app, instead of using ReferenceProperty. I store them in StringProperty when indexes needed, and TextProperty otherwise; so I am not worried about indexes. My handlers works with them in URLs, example: /profiles/[key name of the account]/edit /downloads/[key name of the download] ... And I use it when listing downloads for example, not need to query for the data, only using the key_name to build URLs. So I'm wondering if using ReferenceProperty would have better performance in general. The alternative could be using the whole key (ag) or using the key_name of the Key object to build URLs and render them. Which of both ways it's better for perfomance? -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Re: Cross Origin Resource Sharing and login:admin urls
The @login_required decorator works only for GET , It is mentioned in that page. So i am using the first method u suggested Thanks a lot for the help . On Jan 18, 11:25 am, Robert Kluin robert.kl...@gmail.com wrote: Yeah, if you need to be able to allow some requests without cookies to a 'secure' url you'll need to use a lower-level solution like those. The options in app.yaml are higher-level. Robert On Tue, Jan 18, 2011 at 00:17, Silencer devassyh...@gmail.com wrote: Thanks Robert , Those solutions look better coding to me. So i will have to anyway remove login:admin for URL's destined to be used for Cross Domain Resource Sharing. Even login:required will also fail right ? Because preflight request is never send with cookies. So basically i have to implement url securing myself. On Jan 17, 11:19 pm, Robert Kluin robert.kl...@gmail.com wrote: Securing your URLs in code is OK, provided you're doing it consistently perhaps using a decorator, or in a base AdminHandler. This will let you allow some calls or respond differently to non-admin calls. You might also want to check out the users.is_current_user_admin() function. http://code.google.com/appengine/docs/python/users/functions.html And, I would also suggest looking at the @login_required decorator. You could just write a @admin_required decorator. http://code.google.com/appengine/docs/python/tools/webapp/utilmodule Robert On Mon, Jan 17, 2011 at 12:33, Silencer devassyh...@gmail.com wrote: i have two apps let us call it app1 and app2 ; Assume that i have logged in as admin in both apps. in my work-flow i have to do a POST request from app1 rendered page (http://app1.appspot.com/sourcepage ) to and apps url (http://app2.appspot.com/updatedata) . http://app2.appspot.com/updatedataisa url secured by login:admin in the app.yaml file Now in FF3.6 , when such an ajax request is done using jQuery , FF3.6 will first send a Preflighted request ( OPTIONS request ) . This request is sent without cookies. So appengine returns a redirect as response. Although i have implemented the options(self) function for the request, the control never reaches there So the original POST is not send at all. i read in some article that the credentials will not be sent with the Preflighted request So in that case is there a way to make options request alone to pass through for admin urls ? TO get my workflow done at last i removed login:admin from app.yaml and checks for user logged in and compare email id's to a set of allowed admins. I know it is bad programming , but still. Is there any thing that i miss ? Please help -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Re: Authentication and XMPP
Robert is correct. The XMPP API does not provide an XMPP service for your users to log into; it provides a way for your app to participate in the XMPP network. It is analogous to the email API. Your users don't get email accounts with your app, but your app can send email to their existing accounts. The same is true of the XMPP API. Your app can send XMPP traffic, but users have to have a place to receive it. Michael -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Re: Authentication and XMPP
The Channel API is interesting, but it seems purpose built for javascript. I could probably be made to work in other situations, but it seems like it would be a hack. You ask what I am trying to accomplish: I would like a situation where a client app (written in any language) can access both my rest API and XMPP services with a single set of credentials, or, indeed, at all. For example, it would be nice if they could type their username and password into the app and be able to connect to both the ReST API and the XMPP services offered by google Talk. Asking them to sign up for another service is not an option -- they should only have to sign up for one service at most (Ideally they should just be able to connect from an existing social network). Now, because GAE offers access to google accounts, this essentially breaks down into four questions: which authentication method and which service. 1a. How would a user log on to ReST services using Google Accounts? This isn't clear to me. It seems that a Cookie is required from a web logon, which really doesn't work for a web service. 1b. How would a user log on to XMPP services using Google Accounts? Presumably a simple username/password situation would work fine. 2a. How would a user log on to ReST services using Build-your-own Accounts? Anything can be done here. OAuth seems like the logical choice. 2b. How would a user log on to XMPP services using Build-your-own Accounts? User or Service would have to create an account on a separate service/ server since there is no way to create a Google Talk account. So, Robert, you are quite right, I /have/ conflated access to and control of XMPP service. But perhaps you can see why I made that mistake. Does anyone have any suggestions for an XMPP service I pay for that scales well (I am not anticipating millions of users, but it's nice to be prepared) and has a simple API for adding/removing users? thanks, bjorn On Jan 17, 11:24 pm, Robert Kluin robert.kl...@gmail.com wrote: Having access to an XMPP service and running an XMPP service are two totally different things. To use App Engine's XMPP service, your users just need some type of jabber account to communicate with your app. The service provider handles user-authentication, you could probably ask for a pin or something to verify the user. I am a bit unclear on what you are tying to do though, you mention using Google Talk and a custom client. I've written apps that have XMPP interfaces user can access via Google Talk (or their preferred client), it works well. Look at the channel API for an example of a 'custom client' that uses XMPP on the back-end (well, partially at least). Robert On Mon, Jan 17, 2011 at 21:05, bejayoharen bj...@xowave.com wrote: Thanks for your feedback. I should have guessed. I'm not sure if there's much point for me in developing the REST architecture on GAE and then using something else for XMPP -- especially if I have to manage users across the systems. The XMPP implementation is... not well thought out :( bjorn On Jan 16, 5:21 pm, Ryan ryanleeschnei...@gmail.com wrote: Last I looked GAE's XMPP is limited to just sending message/ stanzas to your application, and having the application respond with a reply message/. If you want to do anything more complicated with XMPP you have to use your own servers or server components on some other infrastructure. That said, you could still develop the REST interface on GAE, and have your own XMPP server component act as a proxy to the REST interface by marshaling incoming iq/ request/responses to the REST interface. Running your own XMPP servers on cheap linux hosts and/or scaling server capacity with Rackspace or Amazon seems like a viable solution (with all your data load on GAE you can just use as many of the cheapest Amazon/Rackspace instances you need to maintain client connections). I'd love to see full support for XMPP on GAE, but given XMPP's stateful nature I doubt we'll see it any time soon, if at all. Thanks, Ryan On Jan 16, 9:04 am, Bjorn Roche bj...@xowave.com wrote: Hey all, I am planning to build a web app that provides ReST and XMPP to custom-built clients. GAE seems like a good choice as google talk is supposed to be part of the package, but I'm confused about how authentication works with web vs XMPP. I realize I can either do my own authentication or use google accounts for the web services. With Google accounts authentication, how would the clients authenticate into XMPP? Would it be sufficient to ask the user for username/password? I assume that would get the user into XMPP, but not the web services, since google protects its account login services when doing this on the web. If this does work, what are the implications? I'm not going to be able to build in features like facebook connect, etc, right? What about portability away from
[google-appengine] Re: What design has better perfomance?
Now what do you mean by performance how quick of a response, how much space it takes or how cheap it is? I know for space it is cheaper to use string than reference with or without indexes. For cost and speed reference to my understanding will be not be worst than what you are doing might be slightly better. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
Re: [google-appengine] Re: Cross Origin Resource Sharing and login:admin urls
Yes, it does. But you can take a look at its code to put something together for your use-case. http://code.google.com/p/googleappengine/source/browse/trunk/python/google/appengine/ext/webapp/util.py#39 Robert On Tue, Jan 18, 2011 at 10:51, Silencer devassyh...@gmail.com wrote: The @login_required decorator works only for GET , It is mentioned in that page. So i am using the first method u suggested Thanks a lot for the help . On Jan 18, 11:25 am, Robert Kluin robert.kl...@gmail.com wrote: Yeah, if you need to be able to allow some requests without cookies to a 'secure' url you'll need to use a lower-level solution like those. The options in app.yaml are higher-level. Robert On Tue, Jan 18, 2011 at 00:17, Silencer devassyh...@gmail.com wrote: Thanks Robert , Those solutions look better coding to me. So i will have to anyway remove login:admin for URL's destined to be used for Cross Domain Resource Sharing. Even login:required will also fail right ? Because preflight request is never send with cookies. So basically i have to implement url securing myself. On Jan 17, 11:19 pm, Robert Kluin robert.kl...@gmail.com wrote: Securing your URLs in code is OK, provided you're doing it consistently perhaps using a decorator, or in a base AdminHandler. This will let you allow some calls or respond differently to non-admin calls. You might also want to check out the users.is_current_user_admin() function. http://code.google.com/appengine/docs/python/users/functions.html And, I would also suggest looking at the @login_required decorator. You could just write a @admin_required decorator. http://code.google.com/appengine/docs/python/tools/webapp/utilmodule Robert On Mon, Jan 17, 2011 at 12:33, Silencer devassyh...@gmail.com wrote: i have two apps let us call it app1 and app2 ; Assume that i have logged in as admin in both apps. in my work-flow i have to do a POST request from app1 rendered page (http://app1.appspot.com/sourcepage ) to and apps url (http://app2.appspot.com/updatedata) . http://app2.appspot.com/updatedataisa url secured by login:admin in the app.yaml file Now in FF3.6 , when such an ajax request is done using jQuery , FF3.6 will first send a Preflighted request ( OPTIONS request ) . This request is sent without cookies. So appengine returns a redirect as response. Although i have implemented the options(self) function for the request, the control never reaches there So the original POST is not send at all. i read in some article that the credentials will not be sent with the Preflighted request So in that case is there a way to make options request alone to pass through for admin urls ? TO get my workflow done at last i removed login:admin from app.yaml and checks for user logged in and compare email id's to a set of allowed admins. I know it is bad programming , but still. Is there any thing that i miss ? Please help -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Re: Night processing for map-reduce?
I can only see it helping if you get errors from entities being locked, or you run into the 30 active request limit. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Multiple blob uploads in single POST form?
Hi, I want to upload multiple, varying number of blobs with a single POST request. It seems that as of April of last year, this wasn't supported, and someone has posted a JavaScript workaround: http://blog.notdot.net/2010/04/Implementing-a-dropbox-service-with-the-Blobstore-API-part-3-Multiple-upload-support. I couldn't find any information on the official GAE docs as to whether or not this is still the case. Before I dive into the workaround above, could someone confirm that GAE still does not support multiple blob uploads? Thanks, Jawon -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Storing Array of Objects in GAE-JDO
Hi All, I have situation where I need to store array of objects in datastore. Its like I have one table called TransData(which is persisted) which has one column of AppData object(which points to AppData class which is not persisted). Now what I need is one Trans data will have 'n' no. of App data (length, duration). Now instead of saving as two separate tables, I need to make use of one table(though i'm using 2 POJO class), by saving the object of AppData in TransData. So that column will be having array of objects of AppData which will have the AppData pair(length,duration). But i'm getting error java.lang.IllegalArgumentException: appDataObj: com.prototype.model.AppData is not a supported property type. Code is shown below //TransData--code package com.prototype.model; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import com.google.appengine.api.datastore.Key; import javax.jdo.annotations.IdGeneratorStrategy; import javax.jdo.annotations.PersistenceCapable; import javax.jdo.annotations.Persistent; import javax.jdo.annotations.PrimaryKey; import com.prototype.model.AppData; @PersistenceCapable public class TransData { @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Key transDataRow_Id; @Persistent private int transData_Id; @Persistent private int header_Id; @Persistent private ListAppData appDataObj; private long applength; private long appDuration; public TransData(){ } public TransData(int transData_Id,int header_Id,long applength,long appDuration){ this.transData_Id=transData_Id; this.header_Id=header_Id; this.applength=applength; this.appDuration=appDuration; System.out.println(this.applength==+this.applength+ this.appDuration==+this.appDuration); appDataObj = new ArrayListAppData(); //Line 1- System.out.println(Initial size of appDataObj: + appDataObj.size());//-Line 2--- appDataObj.add(new AppData(this.applength, this.appDuration));//- Line 3- //--When I'm removing the lines marked (1,2,3 ) above its showing inserted successfully. But when I try to get data its displaying 0 as the value even though I have entered value.That is i'm getting the values of transaction details(transDataRow_Id,transData_Id, header_Id)...also when I check the admin page for datastore viewer I'm able to find the values applength appDuration..but still not able to receive it. so i made the changes by including the above 3 lines feeling that the values are not isnerted to appDataObject arraylist.The getData() function is also added below... System.out.println(Size of appDataObj after additions: + appDataObj.size()); } // Accessors for the fields. JDO doesn't use these, but your application does. public Key getKey() { return transDataRow_Id; } public long getAppsLength(AppData app) { System.out.println(inside getAppsLength() value=+app.getAppLength()); return app.getAppLength(); } public long getAppsDuration(AppData app) { System.out.println(inside getAppsDuration() value=+app.getAppDuration()); return app.getAppDuration(); } public void setAppsLength(AppData app) { app.setAppLength(applength); } public void setAppsDuration(AppData app) { app.setAppLength(applength); } public int getTransDataId() { System.out.println(inside TransData getTransDataId()); return transData_Id; } public void setTransDataId(int transData_Id) { System.out.println(inside TransData setTransDataId()); this.transData_Id = transData_Id; } public int getHeaderId() { System.out.println(inside TransData getHeaderId()); return header_Id; } public void setHeaderId(int header_Id) { System.out.println(inside TransData setHeaderId()); this.header_Id = header_Id; } } //- Finish // AppData code package com.prototype.model; public class AppData { private long applength; private long appDuration; public AppData(){ } public AppData(long applength,long appDuration){ System.out.println(inside AppData constructor); this.applength=applength; this.appDuration=appDuration;
[google-appengine] Re: __scatter__ property
__scatter__ also shows up in the autogenerated bulkloader.yaml file When I downloaded the data, in the output xml the __scatter__ field was left empty and when I tried to import it into my dev server it gave the error BadPropertyError: __scatter__ is a reserved property name. -- Jayesh On Jan 12, 3:22 pm, C?sar de Tassis Filho ctass...@gmail.com wrote: Hi. I can see __scatter__ property when I go to Datastore Statistics too in most of my applications. In addition, the same day I started seeing that property in stats GAE started showing Datastore Statistics in apps that had, in the past, data stored but doesn't have anymore (like ctassisf AppID). Is this a bug too? Thanks! -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] App Engine Stalling on Windows XP
I'm very new to App Engine so thanks in advance for your patience Whenever I run an app locally (via the 'Run' button on the App Launcher), sometimes when I try to load the page it will stall indefinitely. I'll have to refresh usually once and it will load instantly. Every 1-3 requests I make it stalls again. I couldn't find any information about this so is it a known bug or something I have configured incorrectly? Thanks in advance! -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Data not refreshed after an insert or update
Hi, I'm currently developing a small application with GWT + GAE. I have a first entity Operation which contains another entity Category as a property. With GWT, I use a CellTable to display all my Operations and it works fine. In this celltable, I use a SelectionCell in order to change the Category value. So, when I change the operation's category value, an update is immediatly done on the datastore, through a RPC service call. And it works, because, when I list the values in the datastore, I can see that the update is really done. But, when I refresh my celltable, the old data is still there, as if no change had been made. Sometimes, I refresh again, and it's good, the new data appears, and a time after, it's the old one etc... I don't understand ! I thought it could be the datastore replication which would make some time to replicate everywhere, but I'm not sure it's the real problem. I tried to move on the High Replication feature of GAE, but nothing changed. Any idea ? -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] 30 seconds limitation
Hi, I am new to GAE. I am going to develop an app using GAE which will be calling web services that are reside on the cloud but not in GAE. Those web services may require more than 30 seconds to serve successfully. I would like to know about the following. Does the 30 seconds deadline is applicable for those services that are developed using GAE or it is applicable for any web request that are invoked in GAE environment? Thanks in advance. Govindan -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Re: i have one version that can not delete.
I'm having a similar problem deleting version 2 of cko-checksum. Could you delete this also, please? Thanks, Chris On Jan 5, 10:57 am, Ikai Lan (Google) ikai.l+gro...@google.com wrote: I've deleted it for you. -- Ikai Lan Developer Programs Engineer, Google App Engine Blogger:http://googleappengine.blogspot.com Reddit:http://www.reddit.com/r/appengine Twitter:http://twitter.com/app_engine On Wed, Jan 5, 2011 at 4:22 AM, hoamon hoa...@gmail.com wrote: My app id: bio-enzyme-v2, and the version name is 330-8b8e3c62. Every time i get the message: Server Error A server error has occurred. when i delete it. how can i do? -- You 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-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Details about the HTTPS features
I'm looking into serving traffic over HTTPS, but there is a lot of specs that I can't find in docs. What version of SSL (or TLS) is it? Is Google the certificate publisher? etc. Have I missed something, or has someone of you done this type of homework already? /Per -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
Re: [google-appengine] Datastore and Geo search and GQL limitations workarounds
Hi Robert, my search range it's between 5 and 100km, so I was thinking to use a small grid and retrive the 9 cells around the point by using the IN operator. Then, I have seen on the documentation that using the IN operator actually split the original query in N subqueries (9 in my case) so I guess I need to run some performance test. Cesare On 15 January 2011 07:52, Robert Kluin robert.kl...@gmail.com wrote: Hi Cesare, The underlying concept to your idea is basically the same; most techniques use an approach based on the idea that if you store a lower-resolution point, you can figure out what else is close since they might also be at that lower-res point. Your idea is basically a version of the bounding-boxes approach. http://code.google.com/appengine/articles/geosearch.html If you do not want to use one of the existing solutions, make sure you consider cases when your original point is very close to the edge of your box. If you don't you'll miss some close results. Robert On Tue, Jan 11, 2011 at 18:01, Cesare Montresor cesare.montre...@gmail.com wrote: Hi, my name it's Cesare, I'm new to GAE (3 days) and this group as well, I would like to take this opportunity to say hello to everybody :) I guess that many many peaople had the same ploblem of mine, because of the limitations of GQL about using an inequality operator on more than 1 property and so the problem of retriving location within a given range. I barelly evaluated GeoModel (http://code.google.com/p/geomodel/) but seams to me that it's big and anyway doesn't really solve the problem of filtering the data on GQL end only. I would like to have an optionion from you guys about this very simple idea that I go this morning under the shower ... :) The idea it's basically to round latitude and longitude to integer (for to float few decimals) and use this value as tag so in this way i will be able to pull the data from the datastore just by using = or IN operator to retrive the locations in a specific area. it's an hash table but not with unique hash, on 2 different fields. In this way the dataset in not the smallest as possible, you may need to refine the seach in the code, but should be small enough. That's all, I will be happy to get ideas, improvments, suggestion and criticism as well :) Thanks, Cesare Montresor -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
Re: [google-appengine] modifying an existing datamodel in the future.
Hm, actually, he's talking about Java, where the situation is completely different. AFAIK there is *another* SQL-like language (this one much closer to real SQL) that is part of a standard (not App Engine specific) way of accessing databases. IIUC this is part of JDO -- search for Datanucleus and SQL and you'll find it. JDO and Datanucleus are not App Engine specific (and not written by us). However in App Engine certain queries (e.g. Joins) are not supported. But I don't think we have the option of not calling it SQL. Still, thanks for forwarding this -- I do understand that GQL is controversial (several users have already pleaded to keep it). --Guido On Mon, Jan 17, 2011 at 21:01, Robert Kluin robert.kl...@gmail.com wrote: Guido, Just wanted to point this post out, it is a good example of what several people recently mentioned about GQL and how it leads to confusion with SQL. I think this line summarizes some people's confusion well: use them with googles app engine sql language. I don't have any good suggestions for a solution, since I know many people really like *G*QL. Other than maybe changing the name to something not SQL sounding, maybe... EFL -- Entity Finding Language ... :) Robert On Mon, Jan 17, 2011 at 10:11, Steel City Phantom scpha...@gmail.com wrote: im writing a new app. currently its a LAMP app, heavy on AJAX, but once this prototype is done and running i want to rewrite it as an enterprise level application. im looking at GAE as a back end (more because ive never done it before and it looks cool than anything else, free hosting doesn't hurt either) but im struggling with the data store stuff. the biggest problem i have so far is changing the data store once its deployed. here is what i understand so far, tell me where im wrong cuz im sure i am 1 - create your entity objects (this is java) 2 - when deployed, GAE will create the data store based on the entity objects in your WAR file. 3 - use them with googles app engine sql language. now, if i want to change the model update your entity objects with your new fields or whatever and deploy. now GAE should maintain the existing data and update the objects. or am i completely off base in thinking like a relational database system. is it more as a base relational system that stores blobs and i can store whatever i want in them? second, what if i have a drastic change to the data model that requires some translation sql to implement? is there some kind of screen where i can query and update the existing data model manually and translate the data into the new model or do i have to do it in the application code. -- You want it fast, cheap, or right. Pick two!! -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- --Guido van Rossum (python.org/~guido) -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Re: Anyone see a bounce forwarded from the mail service?
Today I was experimenting with GAEJ Mail service and observed following: 1. Initially I was getting only bounced messages in my Gmail inbox (which was the admin of the app of course) which was expected and desired/required. 2. Just within an hour of so, I started getting all mails in my mailbox - sent successfully or bounced (without even telling me that they had bounced). I deliberately tried with weird long mail IDs so they do bounce. It is never expected to receive all mails in my mailbox as per the docs. Please guide... On Dec 18 2010, 12:34 am, A. Stevko andy.ste...@gmail.com wrote: Digging thru the tickets, My guess is nobody has seen an email bounce since mid 2009. If you want to be a good responsible email citizen please starhttp://code.google.com/p/googleappengine/issues/detail?id=1800 so that you can handle address typos. On Thu, Dec 16, 2010 at 9:09 PM, A. Stevko andy.ste...@gmail.com wrote: Does anyone get bounced email delivered to the From: address as per the spec the error message is sent by email to the address of the sender for the message. Ever since my public launch, I've been sending out lots (many thousands) of emails but have never seen a bounce from the mail service. The app is set up to BCC certain messages to our supp...@ninuku.com google apps account so that we can track the site's activity. The email below definitely has a bad TO address. Here are the headers: Delivered-To: supp...@ninuku.com Received: by 10.216.244.140 with SMTP id m12cs59454wer; Wed, 15 Dec 2010 15:21:03 -0800 (PST) Received: by 10.150.97.1 with SMTP id u1mr10964756ybb.74.1292455262592; Wed, 15 Dec 2010 15:21:02 -0800 (PST) Return-Path: 3xu0jtrajbweojovlv-bsdijwjtuhnbjm.dpntvqqpsuojovlv@m3kw2wvrgufz5godrsrytgd7.apphosting.bounces.google.com Received: from mail-gw0-f71.google.com (mail-gw0-f71.google.com[74.125.83.71]) by mx.google.com with ESMTP id h21si3751294yha.107.2010.12.15.15.21.02; Wed, 15 Dec 2010 15:21:02 -0800 (PST) Received-SPF: pass (google.com: domain of 3XU0JTRAJBwEojovlv-bsdijwjtuhnbjm.dpntvqqpsuojovlv@m3kw2wvrgufz5godrsrytgd7.apphosting.bounces.google.comdesignates 74.125.83.71 as permitted sender) client-ip=74.125.83.71; Authentication-Results: mx.google.com; spf=pass (google.com: domain of 3XU0JTRAJBwEojovlv-bsdijwjtuhnbjm.dpntvqqpsuojovlv@m3kw2wvrgufz5godrsrytgd7.apphosting.bounces.google.comdesignates 74.125.83.71 as permitted sender) smtp.mail= 3xu0jtrajbweojovlv-bsdijwjtuhnbjm.dpntvqqpsuojovlv@m3kw2wvrgufz5godrsrytgd7.apphosting.bounces.google.com Received: by gwj18 with SMTP id 18so1928582gwj.10 for supp...@ninuku.com; Wed, 15 Dec 2010 15:21:02 -0800 (PST) MIME-Version: 1.0 Received: by 10.42.164.9 with SMTP id e9mr406464icy.63.1292455261780; Wed, 15 Dec 2010 15:21:01 -0800 (PST) Reply-To: Ninuku Support supp...@ninuku.com X-Google-Appengine-App-Id: ninuku-archivist Message-ID: 90e6ba6e8ab0c4398004977b3...@google.com Date: Wed, 15 Dec 2010 23:21:01 + Subject: Your Ninuku Archivist Chapter is Ready to view. From: Ninuku Archivist supp...@ninuku.com To: southernt...@aol.com Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes I have another test account on our system with the email address j...@plumber.test Again, supp...@ninuku.com has never seen a bounce report for any email sent to this obviously dummy address. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Google App Engine Apple Push Notificantion Server (SSL raw socket)
Hi, I'm writing the back-end of and iPhone application that will require a massive (I hope) use of the push notification technology from apple. The interface with the push notification server is made by opening a raw socket and sending a binary message to the apple server, by using ssl and a custom certificate. Unfortunately this will be a free application so i can't afford to pay to Urbanairship (that offer web APIs) for each notification I send. At the moment my only idea it's deploy a bridge somewhere outside the cloud to do this, but I really don't like it... Any idea or workaround ? Thanks, Cesare -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Re: How to implement 'Mark All Read' feature in appengine
@Sameer A bit-map for holding the list of read/unread is a pretty common and widely used pattern. http://en.wikipedia.org/wiki/Bit_array Also see data structure and algorithm books. You can think of the bitmap as a compact list of all read/unread assuming that the entries can be encoded with a key that increments or something like that. Then, and this is the part I don't know how to do offhand, if you could efficiently get an actual list from that bitmap (expanding it), then you could do a batch get by key. Something more realistic might be to find the first 0, then get the next n 0's, get those in batch by key, then get whatever else might be needed using an ajax pattern, i.e. later. I am not sure this advances the discussion any. The idea is half-baked at best. On Jan 17, 12:28 pm, sameer.mhatre sam77...@gmail.com wrote: @Jay As you have mentioned in the post about bit-map or other compressed data structure to hold read/unread info. Can you give an example for it or else any link which provides implementation for bit-map thing. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Bursts of Error-Code 104 during datastore-put every few days
Hi, I have a strange problem in my application. Everything works normally for days, but then suddenly there are bursts of DeadlineEceededError Exceptions (like 20 in a row). All are thrown during datastore put operation. But interestingly in many different types of datastore puts. And the error happens in calls that usually never take more than about 250ms. Also it says in the error log: A serious problem was encountered with the process that handled this request, causing it to exit. This is likely to cause a new process to be used for the next request to your application. If you see this message frequently, you may be throwing exceptions during the initialization of your application. (Error code 104) Some additional information: - I am using the channel api in the application - My cpu-quota reaches about 50% at the end of the day - The problem has been persisting for about a month now, it happens on average 3 times a week - The call that triggers the DeadlineExceededError is a trivial database lookup. Timing of a typical call without the error is: ms=192 cpu_ms=243 api_cpu_ms=220 cpm_usd=0.006793 Here is the error-log message: 01-15 12:22PM 01.342 [...] 500 31283ms 208cpu_ms 21api_cpu_ms 0kb gzip(gfe) 194.29.236.66 - - [15/Jan/2011:12:22:32 -0800] GET [...] HTTP/1.1 500 0 - gzip(gfe) [...] ms=31283 cpu_ms=208 api_cpu_ms=22 cpm_usd=0.005802 pending_ms=2629 exit_code=104 E 01-15 12:22PM 32.601 And the framework-part of the stacktrace from the error-log: class 'google.appengine.runtime.DeadlineExceededError': Traceback (most recent call last): [...] File /base/python_runtime/python_lib/versions/1/google/appengine/ ext/db/__init__.py, line 895, in put return datastore.Put(self._entity, config=config) File /base/python_runtime/python_lib/versions/1/google/appengine/ api/datastore.py, line 404, in Put return _GetConnection().async_put(config, entities, extra_hook).get_result() File /base/python_runtime/python_lib/versions/1/google/appengine/ datastore/datastore_rpc.py, line 601, in get_result self.check_success() File /base/python_runtime/python_lib/versions/1/google/appengine/ datastore/datastore_rpc.py, line 570, in check_success self.wait() File /base/python_runtime/python_lib/versions/1/google/appengine/ datastore/datastore_rpc.py, line 560, in wait apiproxy_stub_map.UserRPC.wait_all(self.__rpcs) File /base/python_runtime/python_lib/versions/1/google/appengine/ api/apiproxy_stub_map.py, line 617, in wait_all finished = cls.wait_any(rpcs) File /base/python_runtime/python_lib/versions/1/google/appengine/ api/apiproxy_stub_map.py, line 593, in wait_any running.__rpc.Wait() File /base/python_runtime/python_lib/versions/1/google/appengine/ api/apiproxy_rpc.py, line 112, in Wait rpc_completed = self._WaitImpl() File /base/python_runtime/python_lib/versions/1/google/appengine/ runtime/apiproxy.py, line 116, in _WaitImpl rpc_completed = _apphosting_runtime___python__apiproxy.Wait(self) W 01-15 12:22PM 32.611 A serious problem was encountered with the process that handled this request, causing it to exit. This is likely to cause a new process to be used for the next request to your application. If you see this message frequently, you may be throwing exceptions during the initialization of your application. (Error code 104) Any help would be appreciated. Christian -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Re: Channel API Under the hoods and OpenSocial/Facebook development
I believe splitting functionality between 2 AppEngine applications goes against the AppEngine TOS. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Data not refreshed after an insert or update
Hi, I'm currently developing a small application with GWT + GAE. I have a first entity Operation which contains another entity Category as a property. With GWT, I use a CellTable to display all my Operations and it works fine. In this celltable, I use a SelectionCell in order to change the Category value. So, when I change the operation's category value, an update is immediatly done on the datastore, through a RPC service call. And it works, because, when I list the values in the datastore, I can see that the update is really done. But, when I refresh my celltable, the old data is still there, as if no change had been made. Sometimes, I refresh again, and it's good, the new data appears, and a time after, it's the old one etc... I don't understand ! I thought it could be the datastore replication which would make some time to replicate everywhere, but I'm not sure it's the real problem. I tried to move on the High Replication feature of GAE, but nothing changed. Any idea ? -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Apple Push Notification Service integration
Is it possible to use Apple Push Notification Service with GAE yet? The issue http://code.google.com/p/googleappengine/issues/detail?id=1164 has been quiet recently I see the main hurdle was that Apple requires you to use certs provided by them. Is URL Fetch (Python or Java) able to support this yet? Best wishes, Dan -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
Re: [google-appengine] Task Queue errors on deployment
Chris, Here's one thing to try: delete a few queues from the admin console and reupload. The maximum number of queues is 100, and you have 102 queues defined. Delete 2 queues from the admin console and reupload your xml file. -- Ikai Lan Developer Programs Engineer, Google App Engine Blogger: http://googleappengine.blogspot.com Reddit: http://www.reddit.com/r/appengine Twitter: http://twitter.com/app_engine On Sat, Jan 15, 2011 at 9:14 PM, Chris Vaughn chrisvaugh...@gmail.comwrote: Thanks Robert. I used 10 queues for the last 10 months or so. When I updated to 1.4.0 I changed some code to use all 100 queues. After I made this change everything continued working and all 100 queues were being used. I didn't rename any existing queues I only added additional ones. I think the last thing I did before I noticed it wasn't working is that I added a python app so that I could use some of the datastore tools that are python only. Days later I uploaded new code to my JAVA instance with no changes to queue.xml and received the error for the first time. I also noticed at this time that I could not go to the Task Queue Admin Console because I was getting a 500 error. That issue was since fixed with under issue 4342http://code.google.com/p/googleappengine/issues/detail?id=4342 -- You 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-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Re: choice internationalization
Thanks for replying Zeynel. I've read this article before but I could not understand how can it help me because it does not have any citation on Django or GA. Usually, in pure Python/Django, I use the u' notation and forms and templates understand that the string is unicode. But on GA, it's not working. Do you have any specific suggestion/tip on the above code ? Josir Gomes On Jan 18, 2:23 am, Zeynel azeyn...@gmail.com wrote: Can this be helpful to youhttp://www.stereoplex.com/blog/python-unicode-and-unicodedecodeerror On Jan 17, 10:53 pm, Josir josi...@gmail.com wrote: Hi folks, I have the following code: _CHOICES_FORMATION = ( 'Administração', 'Design Gráfico', 'Jornalismo', 'Marketing', 'Outras', ) class Contact(db.Model): name = db.StringProperty(verbose_name='Nome', required=True) email = db.EmailProperty(verbose_name='E-mail', required=True) phone = db.StringProperty(verbose_name='Telefone') formation = db.StringProperty( verbose_name=u'Formação', choices=_CHOICES_FORMATION, default=_CHOICES_FORMATION[0]) When I try to run it, I got File /home/josir/sist/google_appengine/google/appengine/ext/db/ djangoforms.py, line 170, in get_form_field choices.append((str(choice), unicode(choice))) UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 10: ordinal not in range(128) To fix it, I tried: 1) u'Administração', 2) insert the header: #!/usr/bin/env python # -*- coding: utf-8 -*- # coding=utf-8 But both solution didn't work. How can I use latin (portuguese) characters on choice field ? Thanks in advance, Josir. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
Re: [google-appengine] Task Queue errors on deployment
Thanks Ikai. I really appreciate the help. Looks like I'm stuck... I tried to delete a few queues that I'm not using and I get this notification... Before a queue can be deleted, it must be removed from the application's queue.yaml (Python) or queue.xml (Java) file. The problem is I can't upload my queue.xml file because I it says I have more then 100 queues. Is it possible for you to delete a couple? If so please delete mailman-queue-97, mailman-queue-98, mailman-queue-99. I'm really curious how I ended up with 102 queues. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Timestamps and scalability
Quoting Ikai Just be aware of monotonically increasing indexes like timestamps: if you have an application with a high write rate that has a timestamp, this will cause the persistence unit storing the indexes to be unable to be autosplit easily across multiple hardware instances and you will take a performance hit. The solution here is, again, to shard the timestamp by prefixing a value to distribute the writes. This was in another threat and was left out of the conversation. From my perspective, this is a huge improvement since most of the times we have to deal timestamps. We handle an application that uses the problematic approach and it's just a bottle neck. We are starting to switch this and notice two things: - it will be nice if the data store implementation can supply the functionality needed to shard it (since seems like a change down deep in the layer). - What would be the best approach to solve this sharding? would unix timestamps would be enough for this? Appreciate your feedback -- http://about.me/david.mora -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Re: How to implement 'Mark All Read' feature in appengine
@Jay Thanks for your reply. This is really helpful to me to solve my problem. I was quite aware of how the bit map works and all. But not able to co-relate my problem to this. Thanks again. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
Re: [google-appengine] Multiple blob uploads in single POST form?
It should work. If you look at the example at http://code.google.com/appengine/docs/python/blobstore/overview.html#Complete_Sample_App, you see the HTML code has the following snippet: input type=file name=file which is then used to extract the blob information: upload_files = self.get_uploads('file') So what you can do is add multiple 'input type=file' form controls (but using different 'name' attributes) . Then, if you don't set the field_name parameter (in this case 'file'), get_uploads() will return blob information for all uploaded files. Or you can manually extract the blob information for every single input control from the HTML using the corresponding 'name' attribute value. cheers, robert On Sun, Jan 16, 2011 at 9:54 AM, Jawon jawonl...@gmail.com wrote: Hi, I want to upload multiple, varying number of blobs with a single POST request. It seems that as of April of last year, this wasn't supported, and someone has posted a JavaScript workaround: http://blog.notdot.net/2010/04/Implementing-a-dropbox-service-with-the-Blobstore-API-part-3-Multiple-upload-support . I couldn't find any information on the official GAE docs as to whether or not this is still the case. Before I dive into the workaround above, could someone confirm that GAE still does not support multiple blob uploads? Thanks, Jawon -- You 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-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
Re: [google-appengine] Details about the HTTPS features
Goto https://test.appspot.com/ in your browser. and you can use investigate the certificate. Usually by clicking the padlock. On 17 January 2011 07:58, Pelle perkarlb...@gmail.com wrote: I'm looking into serving traffic over HTTPS, but there is a lot of specs that I can't find in docs. What version of SSL (or TLS) is it? Is Google the certificate publisher? etc. Have I missed something, or has someone of you done this type of homework already? /Per -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Re: Google App Engine Apple Push Notificantion Server (SSL raw socket)
There's no completely free solution for this. You'd either have to write your own server (time cost) and run it out of your home, deploy a server to some other cloud service (not free), or use a service like Urban Airship (not free). The good news is that Urban Airship offers a lot of free messages per month (can't remember how many), so you could at least get started using their service. They have a really nice REST API that works really well with something like App Engine. Also, I'm pretty sure that even if your app was wildly successful a couple of AdMob ads in the app would cover the cost of using something like Urban Airship. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Re: 30 seconds limitation
Govindad, Your code running on GAE has two types of time limitations - Web Requests serving clients are limited to 30 seconds. Code invoked by scheduled cron jobs or code invoked by GAE Task mechanism is limited to 10 minutes. Now when your code needs to fetch data from 3rd party services/servers you use GAE's UrlFetch functionality. UrlFetch has a default deadline of 5 seconds, and it can be programmatically set to a maximum of 10 seconds. Read about UrlFetch here: http://code.google.com/appengine/docs/java/urlfetch/overview.html Michael Weinberg On Jan 18, 12:00 am, govin...@ciglobalsolutions.com govin...@ciglobalsolutions.com wrote: Hi, I am new to GAE. I am going to develop an app using GAE which will be calling web services that are reside on the cloud but not in GAE. Those web services may require more than 30 seconds to serve successfully. I would like to know about the following. Does the 30 seconds deadline is applicable for those services that are developed using GAE or it is applicable for any web request that are invoked in GAE environment? Thanks in advance. Govindan -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Re: App Engine Stalling on Windows XP
I known some users have problems with Chrome, because it uses parallel downloads to finish quicker, but the local server is only one thread, so from time to time, again only sometimes, hangs until it is refreshed. But not that high rate. Try cleaning the navigator cache. PD: It would be useful to know your navigator too. On 14 ene, 21:36, Ryan zen...@gmail.com wrote: I'm very new to App Engine so thanks in advance for your patience Whenever I run an app locally (via the 'Run' button on the App Launcher), sometimes when I try to load the page it will stall indefinitely. I'll have to refresh usually once and it will load instantly. Every 1-3 requests I make it stalls again. I couldn't find any information about this so is it a known bug or something I have configured incorrectly? Thanks in advance! -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
Re: [google-appengine] Re: choice internationalization
In the unicode() call you must specify the encoding used, to decode the string to a unicode one. Or pass it a unicode string. example unicode(s,'utf-8') The Django code uses the default encoding string ascii. Or make a list of objects with a __unicode__() method that returns the unicode version of the string. You could build your choices list with unicode strings _CHOICES_FORMATION = ( unicode('Administração','latin_1'), unicode('Design Gráfico','latin_1'), unicode('Jornalismo','latin_1'), unicode('Marketing','latin_1'), unicode('Outras','latin_1'), ) Or use the encoding name that is used to edit the file. 2011/1/18 Josir josi...@gmail.com: Thanks for replying Zeynel. I've read this article before but I could not understand how can it help me because it does not have any citation on Django or GA. Usually, in pure Python/Django, I use the u' notation and forms and templates understand that the string is unicode. But on GA, it's not working. Do you have any specific suggestion/tip on the above code ? Josir Gomes On Jan 18, 2:23 am, Zeynel azeyn...@gmail.com wrote: Can this be helpful to youhttp://www.stereoplex.com/blog/python-unicode-and-unicodedecodeerror On Jan 17, 10:53 pm, Josir josi...@gmail.com wrote: Hi folks, I have the following code: _CHOICES_FORMATION = ( 'Administração', 'Design Gráfico', 'Jornalismo', 'Marketing', 'Outras', ) class Contact(db.Model): name = db.StringProperty(verbose_name='Nome', required=True) email = db.EmailProperty(verbose_name='E-mail', required=True) phone = db.StringProperty(verbose_name='Telefone') formation = db.StringProperty( verbose_name=u'Formação', choices=_CHOICES_FORMATION, default=_CHOICES_FORMATION[0]) When I try to run it, I got File /home/josir/sist/google_appengine/google/appengine/ext/db/ djangoforms.py, line 170, in get_form_field choices.append((str(choice), unicode(choice))) UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 10: ordinal not in range(128) To fix it, I tried: 1) u'Administração', 2) insert the header: #!/usr/bin/env python # -*- coding: utf-8 -*- # coding=utf-8 But both solution didn't work. How can I use latin (portuguese) characters on choice field ? Thanks in advance, Josir. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
Re: [google-appengine] What design has better perfomance?
Hi Ernesto, There will be nearly no difference in performance between the fetching by key_name and vs a ReferenceProperty. The only performance difference is that key_name will be converted to a key before the fetch, so any difference would be *very* small. The key_name will use less space to store, since it does not include the app-id, namespace, or kind name (keys include all of those things). Robert On Tue, Jan 18, 2011 at 10:48, Ernesto Karim Oltra ernestoka...@gmail.com wrote: Actually I'm using key_names intensively in my app, instead of using ReferenceProperty. I store them in StringProperty when indexes needed, and TextProperty otherwise; so I am not worried about indexes. My handlers works with them in URLs, example: /profiles/[key name of the account]/edit /downloads/[key name of the download] ... And I use it when listing downloads for example, not need to query for the data, only using the key_name to build URLs. So I'm wondering if using ReferenceProperty would have better performance in general. The alternative could be using the whole key (ag) or using the key_name of the Key object to build URLs and render them. Which of both ways it's better for perfomance? -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
Re: [google-appengine] Night processing for map-reduce?
Hi Neal, I can think of one possible advantage: if your background work does lots and lots of datastore inserts, the various temporary 'backups' and 'slow downs' that happen would not happen during your peak hours. Not sure there would really be any direct savings though. Robert On Tue, Jan 18, 2011 at 09:26, NealWalters nealwalt...@nealwalters.com wrote: Is there any concept of night processing within GAE? I realize that if a system is world-wide, it is 24x7 and it is never night. But if I wanted to do some map-reduce jobs, is there any cost savings or performance benefit to running them off-hours (supposing most of our user-base is in the USA)? Thanks, Neal -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
Re: [google-appengine] Data not refreshed after an insert or update
Hi Bertrand, I do not use GWT, so can't provide any guidance with it, but it sounds like a caching issue. Does GWT do any client-side caching? Are you using server-side caching? You might try adding some logging to your server-side code, then when the issue pops up check your logs and see if the values match. Robert On Tue, Jan 18, 2011 at 06:05, Bertrand b.legallu...@gmail.com wrote: Hi, I'm currently developing a small application with GWT + GAE. I have a first entity Operation which contains another entity Category as a property. With GWT, I use a CellTable to display all my Operations and it works fine. In this celltable, I use a SelectionCell in order to change the Category value. So, when I change the operation's category value, an update is immediatly done on the datastore, through a RPC service call. And it works, because, when I list the values in the datastore, I can see that the update is really done. But, when I refresh my celltable, the old data is still there, as if no change had been made. Sometimes, I refresh again, and it's good, the new data appears, and a time after, it's the old one etc... I don't understand ! I thought it could be the datastore replication which would make some time to replicate everywhere, but I'm not sure it's the real problem. I tried to move on the High Replication feature of GAE, but nothing changed. Any idea ? -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
Re: [google-appengine] Task Queue errors on deployment
Hi Chris, I have disabled the three queues: mailman-queue-97, mailman-queue-98, mailman-queue-99. You should be able to delete these queues from admin-console now. On 19 January 2011 04:56, Chris Vaughn chrisvaugh...@gmail.com wrote: Thanks Ikai. I really appreciate the help. Looks like I'm stuck... I tried to delete a few queues that I'm not using and I get this notification... Before a queue can be deleted, it must be removed from the application's queue.yaml (Python) or queue.xml (Java) file. The problem is I can't upload my queue.xml file because I it says I have more then 100 queues. Is it possible for you to delete a couple? If so please delete mailman-queue-97, mailman-queue-98, mailman-queue-99. I'm really curious how I ended up with 102 queues. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- Greg Darke -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
Re: [google-appengine] Timestamps and scalability
Hi David, What is your question? Ikai is saying that instead of writing a series of entities with indexed values like 1, 2, 3, 4, 5, you should write something like: a1, f2, a3, z4, b5. That way the updated to the index will (hopefully) occur in different areas of the index. I do not see how using unix timestamps is going to help, since the timestamp is a (sequential) monotonically increasing value. In the case of a timestamp, if you always query based on the timestamp and some other value, perhaps you could add a new property to your entities that is a composite of those two fields, then don't index the actual timestamp. Robert On Tue, Jan 18, 2011 at 13:30, David Mora dla.m...@gmail.com wrote: Quoting Ikai Just be aware of monotonically increasing indexes like timestamps: if you have an application with a high write rate that has a timestamp, this will cause the persistence unit storing the indexes to be unable to be autosplit easily across multiple hardware instances and you will take a performance hit. The solution here is, again, to shard the timestamp by prefixing a value to distribute the writes. This was in another threat and was left out of the conversation. From my perspective, this is a huge improvement since most of the times we have to deal timestamps. We handle an application that uses the problematic approach and it's just a bottle neck. We are starting to switch this and notice two things: - it will be nice if the data store implementation can supply the functionality needed to shard it (since seems like a change down deep in the layer). - What would be the best approach to solve this sharding? would unix timestamps would be enough for this? Appreciate your feedback -- http://about.me/david.mora -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Re: Deal Breaker: App not visible in China
Hi Will! I'm not sure how reverse proxies work, but does it mean that ALL requests, including those coming from other countries (not China), are going to pass through the reverse proxy? Or is there a way to set up a reverse proxy that handles the requests coming from China only. Thanks! Albert -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
RE: [google-appengine] Re: throttle_code=2
My app is basically just an Reverse Caching Proxy When the problem starts I get things like 72.14.194.49 - - [18/Jan/2011:15:29:17 -0800] GET /2010/12/product-reviews/site-reviews/is-your-college-bookstore-making-you-f eel-used-rent-textbooks-online-rather-than-on-a-college-campus/ HTTP/1.1 500 124 - AppEngine-Google; (+http://code.google.com/appengine; appid: drakaalfirst),gzip(gfe),gzip(gfe),gzip(gfe) www.xyhd.tv ms=19012 cpu_ms=23 api_cpu_ms=0 cpm_usd=0.000720 pending_ms=9152 throttle_code=2 In my case it looks like IP 72.14.194.49 a Google Bot came through made 3680 requests in 33 minutes and triggered the throttling. When that happens it seems other people randomly get throttled too. -Original Message- From: google-appengine@googlegroups.com [mailto:google-appengine@googlegroups.com] On Behalf Of mathijs Sent: Tuesday, January 18, 2011 3:41 AM To: Google App Engine Subject: [google-appengine] Re: throttle_code=2 We are seeing this to, and I don't know exactly what it means either. Occasionally it seems to mean that the average latency of requests is too high, and that's why more instances are not being spun up. I opened this request: http://code.google.com/p/googleappengine/issues/detail?id=4405 and as I mention there, it sometimes also happens when the request latency seems just fine, so it's unclear why instance spinup is being throttled. On Jan 18, 8:48 am, Brandon Wirtz drak...@digerat.com wrote: Tonight I'm getting a LOT of throttle_code=2 in my log, and whenever that happens URL Fetch seems to stop working. How do I avoid these weird throttles? Since they seem to cause my users to not be served anything, which makes me sad. -Brandon -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
Re: [google-appengine] Re: Deal Breaker: App not visible in China
Certainly its possible - using DNS. http://www.google.com/search?q=geo+targeting+dns basically set it up so users from China when asking for address of your domain, get the IP address of the proxy, but everyone else gets a cname to ghs.google.com Or even more elaborate setups... On 18 January 2011 23:19, Albert albertpa...@gmail.com wrote: Hi Will! I'm not sure how reverse proxies work, but does it mean that ALL requests, including those coming from other countries (not China), are going to pass through the reverse proxy? Or is there a way to set up a reverse proxy that handles the requests coming from China only. Thanks! Albert -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
Re: [google-appengine] Re: Google App Engine Apple Push Notificantion Server (SSL raw socket)
Hi Calvin, a very good call about the 1.000.000 free messages/months on Urban Airship, I didn't knew at all (shame on me) I think in this phase I will definitely try their service. Thanks, Cesare On 19 January 2011 06:00, Calvin calvin.r...@gmail.com wrote: There's no completely free solution for this. You'd either have to write your own server (time cost) and run it out of your home, deploy a server to some other cloud service (not free), or use a service like Urban Airship (not free). The good news is that Urban Airship offers a lot of free messages per month (can't remember how many), so you could at least get started using their service. They have a really nice REST API that works really well with something like App Engine. Also, I'm pretty sure that even if your app was wildly successful a couple of AdMob ads in the app would cover the cost of using something like Urban Airship. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Task Queue Stored Task Bytes is incorrect and/or not up-to-date.
On the Task Queues page for my application, it shows: Task Queue Stored Task Bytes 96% 100,666,135 of 104,857,600 But, all of my queues are empty. I just ran tens of thousands of deferred tasks to delete a bunch of entities in batches of 50 (bunch = around 400,000.. so that's around 10,000 deferred tasks). Each deferred task was just running a db.delete() against 50 keys.. and they were taking around 200ms - 400ms to run. (Some peaked at around 3 to 4 seconds). So.. it seems that the Stored Task Bytes value is a little funky. Any plans to make this value more up-to-date? My presumption is that Stored Task Bytes should reflect the storage taken up by scheduled tasks that have no yet run. And, that once a scheduled task successfully runs, the Stored Task Bytes value gets updated. I added total_storage_limit: 1.0G at the top of my queue.yaml as a temporary work-around.. (to give more breathing room in case I hit the hard limit at 100MB) But, it would be nice if Stored Task Bytes reflected the actual bytes for current stored and scheduled tasks. So, right now it shows: Task Queue Stored Task Bytes 9% 100,666,135 of 1,073,741,824 My app-id is: me-finance Thanks for any assistance. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
Re: [google-appengine] Timestamps and scalability
Just one thing to be careful of: Timestamps are not monotonically increasing values in appengine; Google makes no guarantee of clock skew between different servers so you can easily have timestamps written out of order. This doesn't affect your/Ikai's point about index population, though. How bad is this performance hit? Many applications must query on indexed timestamp (or other semi-consistently increasing) values so there's no way to shard this. What is the practical limit on write throughput? Jeff On Tue, Jan 18, 2011 at 3:04 PM, Robert Kluin robert.kl...@gmail.com wrote: Hi David, What is your question? Ikai is saying that instead of writing a series of entities with indexed values like 1, 2, 3, 4, 5, you should write something like: a1, f2, a3, z4, b5. That way the updated to the index will (hopefully) occur in different areas of the index. I do not see how using unix timestamps is going to help, since the timestamp is a (sequential) monotonically increasing value. In the case of a timestamp, if you always query based on the timestamp and some other value, perhaps you could add a new property to your entities that is a composite of those two fields, then don't index the actual timestamp. Robert On Tue, Jan 18, 2011 at 13:30, David Mora dla.m...@gmail.com wrote: Quoting Ikai Just be aware of monotonically increasing indexes like timestamps: if you have an application with a high write rate that has a timestamp, this will cause the persistence unit storing the indexes to be unable to be autosplit easily across multiple hardware instances and you will take a performance hit. The solution here is, again, to shard the timestamp by prefixing a value to distribute the writes. This was in another threat and was left out of the conversation. From my perspective, this is a huge improvement since most of the times we have to deal timestamps. We handle an application that uses the problematic approach and it's just a bottle neck. We are starting to switch this and notice two things: - it will be nice if the data store implementation can supply the functionality needed to shard it (since seems like a change down deep in the layer). - What would be the best approach to solve this sharding? would unix timestamps would be enough for this? Appreciate your feedback -- http://about.me/david.mora -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] How to effect change of model in the production server?
I changed my model from class Item(db.Model): title = db.StringProperty() url = db.StringProperty() date = db.DateTimeProperty(auto_now_add=True) author = db.UserProperty() vote = db.IntegerProperty(default=1) to class SiteUser(db.Model): user = db.UserProperty() total_votes = db.IntegerProperty(default=1) liked_items = db.StringProperty() class Item(db.Model): user_who_liked_this_item = db.UserProperty() title = db.StringProperty() url = db.StringProperty() date = db.DateTimeProperty(auto_now_add=True) points = db.IntegerProperty(default=1) to keep track of the user voting. Development server gracefully accepted the change and created the new table and columns. But when I deploy the new version I see that the old model persists. I uploaded the new version as version 2, but still nothing changed. I don't care about the data already on the site, I just want to have the new version up and running. How do I do this? Thanks! -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Set a default deadline for urlfetch?
Hi, My app (in Python) uses the ZSI SOAP library to make SOAP calls to an external server that is not under my control. From what I can tell, the SOAP requests take about 5 seconds - enough that I consistently run into the 5 second deadline of GAE's urlfetch. Because I'm using the ZSI library, I am unclear about where the urlfetch request call is being made, although I do have access to the source code. Is there a way to override the default deadline of the urlfetch library? Here is the error log: ApplicationError: 5 Traceback (most recent call last): File /base/python_runtime/python_lib/versions/1/google/appengine/ ext/webapp/__init__.py, line 517, in __call__ handler.post(*groups) File /base/data/home/apps/opalapp/1.347730236397102974/ handlers.py, line 162, in post res = c.launchJob(cmd_args, inputs) File /base/data/home/apps/opalapp/1.347730236397102974/ opalclient.py, line 122, in launchJob resp = self.appServicePort.launchJob(req) File ./client/AppService_client.py, line 60, in launchJob response = self.binding.Receive(launchJobResponse.typecode) File ./client/ZSI/client.py, line 545, in Receive self.ReceiveSOAP(**kw) File ./client/ZSI/client.py, line 428, in ReceiveSOAP if not self.IsSOAP(): File ./client/ZSI/client.py, line 420, in IsSOAP self.ReceiveRaw() File ./client/ZSI/client.py, line 387, in ReceiveRaw response = self.h.getresponse() File /base/python_runtime/python_dist/lib/python2.5/httplib.py, line 197, in getresponse self._allow_truncated, self._follow_redirects) File /base/python_runtime/python_lib/versions/1/google/appengine/ api/urlfetch.py, line 241, in fetch return rpc.get_result() File /base/python_runtime/python_lib/versions/1/google/appengine/ api/apiproxy_stub_map.py, line 530, in get_result return self.__get_result_hook(self) File /base/python_runtime/python_lib/versions/1/google/appengine/ api/urlfetch.py, line 331, in _get_fetch_result raise DownloadError(str(err)) DownloadError: ApplicationError: 5 Thank you, Jawon Lee -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
Re: [google-appengine] Set a default deadline for urlfetch?
Hi Jawon, You can do this by using an API call hook, like so: def urlfetch_timeout_hook(service, call, request, response): if call != 'Fetch': return # Make the default deadline 10 seconds instead of 5. if not request.has_deadline(): request.set_deadline(10.0) apiproxy_stub_map.apiproxy.GetPreCallHooks().Append( 'urlfetch_timeout_hook', urlfetch_timeout_hook, 'urlfetch') On Wed, Jan 19, 2011 at 2:41 PM, Jawon jawonl...@gmail.com wrote: Hi, My app (in Python) uses the ZSI SOAP library to make SOAP calls to an external server that is not under my control. From what I can tell, the SOAP requests take about 5 seconds - enough that I consistently run into the 5 second deadline of GAE's urlfetch. Because I'm using the ZSI library, I am unclear about where the urlfetch request call is being made, although I do have access to the source code. Is there a way to override the default deadline of the urlfetch library? Here is the error log: ApplicationError: 5 Traceback (most recent call last): File /base/python_runtime/python_lib/versions/1/google/appengine/ ext/webapp/__init__.py, line 517, in __call__ handler.post(*groups) File /base/data/home/apps/opalapp/1.3477302363 tel:+13477302363 97102974/ handlers.py, line 162, in post res = c.launchJob(cmd_args, inputs) File /base/data/home/apps/opalapp/1.3477302363 tel:+13477302363 97102974/ opalclient.py, line 122, in launchJob resp = self.appServicePort.launchJob(req) File ./client/AppService_client.py, line 60, in launchJob response = self.binding.Receive(launchJobResponse.typecode) File ./client/ZSI/client.py, line 545, in Receive self.ReceiveSOAP(**kw) File ./client/ZSI/client.py, line 428, in ReceiveSOAP if not self.IsSOAP(): File ./client/ZSI/client.py, line 420, in IsSOAP self.ReceiveRaw() File ./client/ZSI/client.py, line 387, in ReceiveRaw response = self.h.getresponse() File /base/python_runtime/python_dist/lib/python2.5/httplib.py, line 197, in getresponse self._allow_truncated, self._follow_redirects) File /base/python_runtime/python_lib/versions/1/google/appengine/ api/urlfetch.py, line 241, in fetch return rpc.get_result() File /base/python_runtime/python_lib/versions/1/google/appengine/ api/apiproxy_stub_map.py, line 530, in get_result return self.__get_result_hook(self) File /base/python_runtime/python_lib/versions/1/google/appengine/ api/urlfetch.py, line 331, in _get_fetch_result raise DownloadError(str(err)) DownloadError: ApplicationError: 5 Thank you, Jawon Lee -- You 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. -- 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-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
Re: [google-appengine] Timestamps and scalability
Good point Jeff. From what I've seen it can be pretty serious, and the limit seems to be much lower than you might expect. It probably depends on exactly what you're doing (like many things GAE), but you might bump into issues every hundred, or two hundred, thousand entities from what I've seen. Which is not a big deal with low write-rate apps, but if you are trying to collect data or doing some type of processing it can easily catch you. The issue really flares up if you're trying to sustain writes your app's datastore while it is doing the back-end stuff, because it gets bogged down for a few seconds, which can cause serious problems in the app in general. As I understand, the HR datastore might help to reduce the impact of this. I've not tested it though. Robert On Tue, Jan 18, 2011 at 20:38, Jeff Schnitzer j...@infohazard.org wrote: Just one thing to be careful of: Timestamps are not monotonically increasing values in appengine; Google makes no guarantee of clock skew between different servers so you can easily have timestamps written out of order. This doesn't affect your/Ikai's point about index population, though. How bad is this performance hit? Many applications must query on indexed timestamp (or other semi-consistently increasing) values so there's no way to shard this. What is the practical limit on write throughput? Jeff On Tue, Jan 18, 2011 at 3:04 PM, Robert Kluin robert.kl...@gmail.com wrote: Hi David, What is your question? Ikai is saying that instead of writing a series of entities with indexed values like 1, 2, 3, 4, 5, you should write something like: a1, f2, a3, z4, b5. That way the updated to the index will (hopefully) occur in different areas of the index. I do not see how using unix timestamps is going to help, since the timestamp is a (sequential) monotonically increasing value. In the case of a timestamp, if you always query based on the timestamp and some other value, perhaps you could add a new property to your entities that is a composite of those two fields, then don't index the actual timestamp. Robert On Tue, Jan 18, 2011 at 13:30, David Mora dla.m...@gmail.com wrote: Quoting Ikai Just be aware of monotonically increasing indexes like timestamps: if you have an application with a high write rate that has a timestamp, this will cause the persistence unit storing the indexes to be unable to be autosplit easily across multiple hardware instances and you will take a performance hit. The solution here is, again, to shard the timestamp by prefixing a value to distribute the writes. This was in another threat and was left out of the conversation. From my perspective, this is a huge improvement since most of the times we have to deal timestamps. We handle an application that uses the problematic approach and it's just a bottle neck. We are starting to switch this and notice two things: - it will be nice if the data store implementation can supply the functionality needed to shard it (since seems like a change down deep in the layer). - What would be the best approach to solve this sharding? would unix timestamps would be enough for this? Appreciate your feedback -- http://about.me/david.mora -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
Re: [google-appengine] Timestamps and scalability
Hi David, I was the Googler to originally observe this, in the form of 'hot tablets' on Bigtable. The specific problem only occurs, in my experience, at write rates in excess of a couple of hundred QPS, and in situations where all of those writes are being directed to a single tablet (row range). This is a level of write traffic that few, users are likely to encounter. The issue also occurs at slightly lower traffic levels if the ID of the entity is being auto-allocated, due to the higher overhead of writing the entire entity instead of just an index row. This is usually trivially alleviated by switching to key names - either randomly allocated (such as a UUID) or based on something that isn't monotonic, such as email address. What level of writes are you experiencing the issue at, and how did you determine that this was the cause of your issue? -Nick Johnson On Wed, Jan 19, 2011 at 5:30 AM, David Mora dla.m...@gmail.com wrote: Quoting Ikai Just be aware of monotonically increasing indexes like timestamps: if you have an application with a high write rate that has a timestamp, this will cause the persistence unit storing the indexes to be unable to be autosplit easily across multiple hardware instances and you will take a performance hit. The solution here is, again, to shard the timestamp by prefixing a value to distribute the writes. This was in another threat and was left out of the conversation. From my perspective, this is a huge improvement since most of the times we have to deal timestamps. We handle an application that uses the problematic approach and it's just a bottle neck. We are starting to switch this and notice two things: - it will be nice if the data store implementation can supply the functionality needed to shard it (since seems like a change down deep in the layer). - What would be the best approach to solve this sharding? would unix timestamps would be enough for this? Appreciate your feedback -- http://about.me/david.mora -- You 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. -- 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-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
Re: [google-appengine] How to redirect to referring page?
I would strongly recommend avoiding relying on the 'referer' field for anything like this. It'll be unreliable - what if the user opened the vote page in a new tab? What if the user has referers disabled? Instead, pass the continue URL in to the handler, or have separate URLs based on the origin, or use AJAX, so the user doesn't have to leave the page they voted from in the first place. -Nick Johnson On Tue, Jan 18, 2011 at 4:52 AM, Zeynel azeyn...@gmail.com wrote: Hi, I just added a new page /hot to sort by number of votes to articles. VoteHandler handles the vote with item.vote +=1 item.put() self.redirect(/newest) but now the new page /hot also refers to this VoteHandler. After writing the new vote to the database I need to redirect to either /hot or /newest depending on the referrer. I searched the group and stackoverflow http://stackoverflow.com/search?page=2tab=relevanceq=redirect%20google%20app%20engine but I could not find the answer. Can anyone direct me to the right reference? Thanks. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.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-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Re: How to effect change of model in the production server?
As Nick Johnson pointed out http://stackoverflow.com/questions/4731657/google-app-engine-is-not-creating-table-python I had to enter at least one record. Thanks. On Jan 18, 9:43 pm, Zeynel azeyn...@gmail.com wrote: I changed my model from class Item(db.Model): title = db.StringProperty() url = db.StringProperty() date = db.DateTimeProperty(auto_now_add=True) author = db.UserProperty() vote = db.IntegerProperty(default=1) to class SiteUser(db.Model): user = db.UserProperty() total_votes = db.IntegerProperty(default=1) liked_items = db.StringProperty() class Item(db.Model): user_who_liked_this_item = db.UserProperty() title = db.StringProperty() url = db.StringProperty() date = db.DateTimeProperty(auto_now_add=True) points = db.IntegerProperty(default=1) to keep track of the user voting. Development server gracefully accepted the change and created the new table and columns. But when I deploy the new version I see that the old model persists. I uploaded the new version as version 2, but still nothing changed. I don't care about the data already on the site, I just want to have the new version up and running. How do I do this? Thanks! -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Re: Deal Breaker: App not visible in China
Thanks so much! On Jan 19, 7:43 am, Barry Hunter barrybhun...@gmail.com wrote: Certainly its possible - using DNS.http://www.google.com/search?q=geo+targeting+dns basically set it up so users from China when asking for address of your domain, get the IP address of the proxy, but everyone else gets a cname to ghs.google.com Or even more elaborate setups... On 18 January 2011 23:19, Albert albertpa...@gmail.com wrote: Hi Will! I'm not sure how reverse proxies work, but does it mean that ALL requests, including those coming from other countries (not China), are going to pass through the reverse proxy? Or is there a way to set up a reverse proxy that handles the requests coming from China only. Thanks! Albert -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] What is the purpose of upload in url handlers?
In the example below, why is this redundancy necessary? I don't understand why it needs to be declared separately. handlers: - url: /(.*\.(?:css|ico|png|txt)) static_files: static/\1 upload: static/(.*\.(?:css|ico|png|txt)) -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
Re: [google-appengine] What is the purpose of upload in url handlers?
Hi, The upload parameter is necessary because it's impractical to determine the set of files to upload based on the static_files directive alone: static_files can contain substitution parameters from the regular expression in 'url', and there's no way to tell which strings could be inserted with those substitution parameters. -Nick Johnson On Wed, Jan 19, 2011 at 4:45 PM, pdknsk pdk...@googlemail.com wrote: In the example below, why is this redundancy necessary? I don't understand why it needs to be declared separately. handlers: - url: /(.*\.(?:css|ico|png|txt)) static_files: static/\1 upload: static/(.*\.(?:css|ico|png|txt)) -- You 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. -- 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-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
Re: [google-appengine] Timestamps and scalability
Hi, Thank you all for the responses: @Robert: Yes, i forgot to say that it will be easier to manipulate a prefix using unix timestamps (aa234958494, ab23459059234) rather than a time structure + prefix. Which is tricky also, since most of the times you handle dates are either because ordering or expiring. So using the prefixed timestamps for indexing and the actual timestamp for business operations can lead to some unwanted behaviors or implementations (if not well described, i know). @Nick Well, the whole situation was really difficult for us due to the nature of the application: We handle a normal traffic around 500 requests per second constantly but there are peak times that traffic burst twice at least. We did ask for feedback later ( i joined the team later last year) and what we found is that some of the structures were designed following some relational patterns. For example, the most conflicting structure is a model that keeps track of current location of the user, geoboxes (we use geobox model for location proximity), some business information and the last activity of the user (timestamp) which is updated every time the user wants to load more content (sort of a bad online presence approach). Even worst, that structure was part of a group and transactions are constant to either sign in people (create or update) of sign off (delete = i know, deletes are expensive). So bottom line: entity in a group + contant updates of the timestamp + transactions + deletes + not usage of task queues = performance was really poor (and we are aware of the design problem) We have already taken actions, like some usage of memcache for some quick reads and theres an incoming patch that avoids so many updates. Following we are unplugging that structure to be parent and do not depend on hierarchies and signing people in and out using task queues (and avoiding deletes). While we were there we considered Ikai's suggestion for the timestamps (so we can take the most advantage of the patch) and realized during profiling that when our latency increases is due to this single update to timestamps (when it is in bad condition reaches up to 1450 ms of latency = no more sharding for us, when we normally handle a latency of 450 ms). Thats currently our best guess right now, since we can't go under the whole hood to see if thats actually a root cause for a small percentage of the whole performance decrease (so if you have something else to share in order to diagnose it, it is more than welcomed :) ) After some patches we were able to decrease the QPS to almost 1 per second (Really low) but thats just an aggregated number for the whole traffic and there are sometimes (and i know this) that hunders are executed per second when peak times are reached and people signs in/out. On 18 January 2011 22:12, Nick Johnson (Google) nick.john...@google.com wrote: Hi David, I was the Googler to originally observe this, in the form of 'hot tablets' on Bigtable. The specific problem only occurs, in my experience, at write rates in excess of a couple of hundred QPS, and in situations where all of those writes are being directed to a single tablet (row range). This is a level of write traffic that few, users are likely to encounter. The issue also occurs at slightly lower traffic levels if the ID of the entity is being auto-allocated, due to the higher overhead of writing the entire entity instead of just an index row. This is usually trivially alleviated by switching to key names - either randomly allocated (such as a UUID) or based on something that isn't monotonic, such as email address. What level of writes are you experiencing the issue at, and how did you determine that this was the cause of your issue? -Nick Johnson On Wed, Jan 19, 2011 at 5:30 AM, David Mora dla.m...@gmail.com wrote: Quoting Ikai Just be aware of monotonically increasing indexes like timestamps: if you have an application with a high write rate that has a timestamp, this will cause the persistence unit storing the indexes to be unable to be autosplit easily across multiple hardware instances and you will take a performance hit. The solution here is, again, to shard the timestamp by prefixing a value to distribute the writes. This was in another threat and was left out of the conversation. From my perspective, this is a huge improvement since most of the times we have to deal timestamps. We handle an application that uses the problematic approach and it's just a bottle neck. We are starting to switch this and notice two things: - it will be nice if the data store implementation can supply the functionality needed to shard it (since seems like a change down deep in the layer). - What would be the best approach to solve this sharding? would unix timestamps would be enough for this? Appreciate your feedback -- http://about.me/david.mora -- You received this message because you are subscribed to the Google Groups Google App
Re: [google-appengine] Task Queue Stored Task Bytes is incorrect and/or not up-to-date.
Hi Eli, There is a delay between a task executing and the quota being reclaimed. This is documented at http://code.google.com/appengine/docs/python/taskqueue/overview.html#Quotas_and_Limits. Once a task has been executed or deleted, the storage used by that task is reclaimed. The reclaiming of storage quota for tasks happens at regular intervals, and this may not be reflected in the storage quota immediately after the task is deleted. On 19 January 2011 11:41, Eli Jones eli.jo...@gmail.com wrote: On the Task Queues page for my application, it shows: Task Queue Stored Task Bytes 96% 100,666,135 of 104,857,600 But, all of my queues are empty. I just ran tens of thousands of deferred tasks to delete a bunch of entities in batches of 50 (bunch = around 400,000.. so that's around 10,000 deferred tasks). Each deferred task was just running a db.delete() against 50 keys.. and they were taking around 200ms - 400ms to run. (Some peaked at around 3 to 4 seconds). So.. it seems that the Stored Task Bytes value is a little funky. Any plans to make this value more up-to-date? My presumption is that Stored Task Bytes should reflect the storage taken up by scheduled tasks that have no yet run. And, that once a scheduled task successfully runs, the Stored Task Bytes value gets updated. I added total_storage_limit: 1.0G at the top of my queue.yaml as a temporary work-around.. (to give more breathing room in case I hit the hard limit at 100MB) But, it would be nice if Stored Task Bytes reflected the actual bytes for current stored and scheduled tasks. So, right now it shows: Task Queue Stored Task Bytes 9% 100,666,135 of 1,073,741,824 My app-id is: me-finance Thanks for any assistance. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- Greg Darke -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.