[google-appengine] Re: Stuck Index
Is index building a once-off thing that happens when a new index is uploaded to the production site, or does this also apply after every single put() or delete() call to the Datastore? I hope it's the former and not the latter, as this would be a deal breaker for a lot of companies looking to move/create their applicatons on GAE. If it is the former, is there an ETA on when the index building time will come down to an acceptable level (in the seconds rather than hours)? Nick On Dec 3, 8:07 pm, Nick Johnson (Google) nick.john...@google.com wrote: Hi Prashant, The time taken to build an index depends more on the indexes in the queue ahead of yours than the size of your index. Index building may take up to 12-24 hours at busy times. -Nick Johnson On Wed, Dec 2, 2009 at 8:56 PM, Prashant antsh...@gmail.com wrote: It's more than an hr. and index still building just for 2 record, I guess it is stuck. appid - gaewcms ; index - _Content_ (Uri asc, Weight asc, Added desc) -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- Nick Johnson, Developer Programs Engineer, App Engine Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number: 368047 -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Datastore contention
After reading these two articles: Avoiding datastore contention: http://code.google.com/appengine/articles/scaling/contention.html Sharding counters: http://code.google.com/appengine/articles/sharding_counters.html I'm a little confused at to what causes datastore contention, and how to design around this. The Avoiding datastore contention article states that datastore contention occurs when a single entity or entity group is updated too rapidly. Yet the Sharding counters article seems to suggest that you can rapidly update entities of the same kind (and hence entity group), as long as they have different key names. Which it is? For example, if I am expecting 100 comments/second to an article I've written (let's assume I'm a really good writer), and the Comment class is its own entity group, can I safely put() all comments into the datastore as they arrive using this Comment class, or am I better off sharding them into separate classes (eg. Comment1, Comment2, ..., CommentN) so that the comments are distributed across N entity groups? -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Re: Datastore contention
On Dec 11, 7:37 pm, Jeff Schnitzer j...@infohazard.org wrote: An entity group is a group of objects, not classes. Ah, this makes more sense. Thanks Jeff! Nick -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Index updating time as number of entities grows
I've read that the time for a Datastore query is independent of the number of entities in an app, which is great. However, does index updating take longer as the number of entities increases? Eg. If I'm making a high score tracking system (a Player kind with one of the properties being high_score) and want to order by the highest score for each player, as I update a player's high score will the index be updated in the same amount of time if there were 100 Player entities as it would if there were 100,000,000 Player entities? I already know that the put() time will not change because it returns before the index has been updated, I'm just concerned at how long the high scores table (Player.all().order(-high_score)) will take to reflect the changes. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Re: Index updating time as number of entities grows
Hi Nick, Thanks for your incredible continued support in these groups! Re: put() returning after indexes are updated - I confused myself with the milestone A/B scenario from the transaction isolation article (http://code.google.com/appengine/articles/ transaction_isolation.html), thanks for clearing that up. Just to make sure I'm understanding correctly, if I do something like: # Get the top 2 Players players = Player.all().order(-high_score).fetch(2) # Move 2nd place above 1st place players[1].high_score = players[0].high_score + 1 players[1].put() # Get the #1 Player (which should be the player that was 2nd) player = Players.all().order(-high_score).fetch(1)[0] will the time taken to run this script be basically the same with 100 Player entities as it would with 100,000,000? If this is the case then, much like low carb beer, the Datastore is truly a modern day miracle. Nick On Dec 16, 3:46 am, Nick Johnson (Google) nick.john...@google.com wrote: Hi Nickolas, On Tue, Dec 15, 2009 at 6:39 AM, Nickolas Daskalou n...@daskalou.comwrote: I've read that the time for a Datastore query is independent of the number of entities in an app, which is great. However, does index updating take longer as the number of entities increases? No, the time required for a datastore put is also independent of the size of the datastore. Eg. If I'm making a high score tracking system (a Player kind with one of the properties being high_score) and want to order by the highest score for each player, as I update a player's high score will the index be updated in the same amount of time if there were 100 Player entities as it would if there were 100,000,000 Player entities? I already know that the put() time will not change because it returns before the index has been updated, I'm just concerned at how long the high scores table (Player.all().order(-high_score)) will take to reflect the changes. Indexes are updated synchronously - eg, before the put operation completes. -Nick Johnson -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- Nick Johnson, Developer Programs Engineer, App Engine Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number: 368047 -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Re: Application ID
Are you using a Google Apps account? If so, visit the home page of this group: http://groups.google.com/group/google-appengine Read the bold paragraph that starts with If you've created an application. Nick On Dec 16, 11:20 am, Marco Antonio da Silva Castanheira mcastanhe...@globo.com wrote: Hi, I'm new on App Engine. I developed my first application, called *artezel*, but when I tried create the application on App Engine, an error has ocurred. The application was not created, but the id, artezel, is now unavailable. How I can turn this id available 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-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Re: why make adding a domain so difficult?
Yeah, I agree. The process of adding a domain to your app should be simplified. On Dec 21, 9:42 am, Locke locke2...@gmail.com wrote: If I own the appid appid and the domin domian.com and I want to usewww.domain.comwith appid.appspot.com, then why the heck can't I simply prove my ownership by setting the CNAME appid- owner.www.domain.comthen pointingwww.domin.comto ghs.google.com? Why make me jump through all the hoops with Google Apps, a service I have no intention of using? KISS! /me sees Sorry, you've reached a login page for a domain that isn't using Google Apps again and bangs his head against the keyboard nmsxzdwccfdxcsfsddxcsfvxfvdxcv -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Images API questions
In Python, if we're using the composite() function from the Images API, is the size of each image layer allowed to be = 1MB, or does the combined size of all the image layers have to be = 1MB (eg. 10 x 100KB layers is allowed, but 11 x 100KB is not)? Can we use Blobstores when using composite()? Exactly when is the LargeImageError exception thrown? Eg. the answers to 1. and 2. below are Yes, but what about 3. and 4.? 1. If 1MB of data is passed as the image_data before any transforms/ composites are done? 2. If the final output data is 1MB? 3. Can the exception be thrown during the processing of the transforms/ composites, even if the final output data is = 1MB? If Yes, what are the conditions that cause this? 4. If Yes to 3. = When using a Blobstore for image transforms, is the upper limit for a LargeImageError exception higher than if the image data is passed via the Image constructor? -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Re: Lost app-id after activating my account with Google Apps
You've tried both: https://appengine.google.com/ and https://appengine.google.com/a/mydomain.com ? On Dec 19, 6:49 am, FriesenPress fpad...@friesenpress.com wrote: I've lost my app-id friesen-press in my App Engine account after I activated a Google Apps account using my App Engine account. I had to reactivate the account and after I was reactivated my existing app-id is missing. I would really like to get friesen-press back since it's the closest name I could get that represented our domain name friesenpress.com If anyone can help it would be much appreciated - I've already linked up my Apps account to the now missing app-id. -will -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Re: Zero (0) is not being printed on screen with self.response.out.write
Have you tried: self.response.out.write(str(0)) ? On Dec 22, 5:11 pm, Phoenix peece...@gmail.com wrote: Hi.. this is the code I'm using.. self.response.out.write(0) and 0 is not being on screen.. even if this 0 an Integer is in some variable.. like this.. new_index = 0 self.response.out.write(new_index) and nothing comes on screen.. can anyone have any idea? 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-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Re: Zero (0) is not being printed on screen with self.response.out.write
My guess is that zero is not being printed because the internals of self.response.out.write probably look something like this: def write(output): if output: # Spit it out else: # Do not spit out anything Since your zero effectively returns false in the above if condition, nothing is printed out. Conclusion: Always convert the final output to a string before sending it to self.response.out.write (since it's sent to the browser as a string anyway). On Dec 22, 9:44 pm, Phoenix peece...@gmail.com wrote: Thanks for your concern Wesley.. Yes.. by screen I meant browser As I had said in my first message, printing the 0 on browser isn't my objective. I am actually write services in which I just get the input, process it and send the processed output in JSON format. So, in this I do not need to write anything on the browser using server side script. But the thing is, the code I wrote didn't work and I needed it debug it by writing each and every relevant thing on the browser. And printing that zero comes here.. I tried something like self.response.out.write(str(0)) and 0 is there on the screen.. but I generally do not need to do this with any other value.. let it be a python list or dictionary.. so I'm just not able to know the reason or logic behind this.. By the way, a good news.. ! That service for which I was writing that code is done. It's working.. :) But that cofusion of mine is still intact.. :( why that zero is not coming? Thanks, Chirag S Pithadiya. On Dec 22, 2:47 pm, Wesley Chun wesc+...@google.com wrote: greetings! i've read your messages and would like to find out more about what you are trying to do. i will try to help anyway, based on what you have written so far. if you are explicitly writing out a response as text/plain, you still need to write out a string, regardless of the value. you mention using print vs. write. when you're developing a web application, you cannot simply use print because that is intended for a user and *is* output to the screen. with Google App Engine, you're writing a *web application*, and in such cases, there is no screen output. rather than a terminal window, the end consumer of the data you write out is to a web browser. now if by screen, you mean web browser, then please disregard what i just said above, because it wasn't clear what you meant by screen. for web applications, you must output either plain text (MIME file type text/plain) or standard HTML (MIME type text/html). regardless of whether you use 0, 1, 100, or 1000, as integer literals, or as a value of a variable 'new_index', you need to convert it to a string first, i.e., str(0), str(100), str(new_index). also, if you write this out directly, then the output will be text/plain. if you want it to look nice in a web browser, you need to enclose the value in valid HTML: self.response.out.write('HTMLBODY%d/BODY/HTML' % new_index) or something similar. if this doesn't answer your question, hopefully it will help you get started. or if your problem is completely different, please give us more information so we can help you better. thanks! -wesley - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Core Python Programming, Prentice Hall, (c)2007,2001 Python Fundamentals, Prentice Hall, (c)2009 http://corepython.com wesley.j.chun :: wesc+...@google.com developer relations :: google app engine On Mon, Dec 21, 2009 at 11:47 PM, Phoenix peece...@gmail.com wrote: It works.. but it's of no use to me.. I need to use a variable which can have 0 as a value and while debugging I need to be sure whether the value of this variable is coming correctly or not.. It works with print but not working with write.. print the 0 isn't my objective.. but I'm just confused why I can't print 0...) Any other integer is being printed.. then why this issue with 0? thanks for your reply.. On Dec 22, 12:43 pm, Nickolas Daskalou n...@daskalou.com wrote: Have you tried: self.response.out.write(str(0)) ? On Dec 22, 5:11 pm, Phoenix peece...@gmail.com wrote: Hi.. this is the code I'm using.. self.response.out.write(0) and 0 is not being on screen.. even if this 0 an Integer is in some variable.. like this.. new_index = 0 self.response.out.write(new_index) and nothing comes on screen.. can anyone have any idea? 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-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Re: Images API questions
*BUMP* On Dec 21, 3:57 pm, Nickolas Daskalou n...@daskalou.com wrote: In Python, if we're using the composite() function from theImagesAPI, is the size of each image layer allowed to be = 1MB, or does the combined size of all the image layers have to be = 1MB (eg. 10 x 100KB layers is allowed, but 11 x 100KB is not)? Can we use Blobstores when using composite()? Exactly when is the LargeImageError exception thrown? Eg. the answers to 1. and 2. below are Yes, but what about 3. and 4.? 1. If 1MB of data is passed as the image_data before any transforms/ composites are done? 2. If the final output data is 1MB? 3. Can the exception be thrown during the processing of the transforms/ composites, even if the final output data is = 1MB? If Yes, what are the conditions that cause this? 4. If Yes to 3. = When using a Blobstore for image transforms, is the upper limit for a LargeImageError exception higher than if the image data is passed via the Image constructor? -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Re: Sessions
How are you setting the sessions? If you're using cookies, are you adding an expires value (that's set in the future)? Without an expires value, cookies will be cleared when the web browser is closed. On Dec 22, 6:44 am, hemodroid hemodr...@gmail.com wrote: It seems like sessions do not last after you close your browser. Is it their normal behaviour? -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Re: Zero (0) is not being printed on screen with self.response.out.write
Happy Christmas!! :) On Dec 22, 11:41 pm, Phoenix peece...@gmail.com wrote: yeah.. Nickolas.. You'r right.. :) I tried self.response.out.write(False) and nothing printed on browser.. and tried this as well: class test(webapp.RequestHandler): def testDef(self): v = 2 if v == 1: return 1 else: return 0 def get(self): p = self.testDef() self.response.out.write(p) Again, the browser window is blank.. So this is something which I haven't read in any book or tutorial that a False value without explicitly converted to a String does not get printed on browser.. :) Thanks for your reply.. Happy Christmas.. :) On Dec 22, 4:46 pm, Nickolas Daskalou n...@daskalou.com wrote: My guess is that zero is not being printed because the internals of self.response.out.write probably look something like this: def write(output): if output: # Spit it out else: # Do not spit out anything Since your zero effectively returns false in the above if condition, nothing is printed out. Conclusion: Always convert the final output to a string before sending it to self.response.out.write (since it's sent to the browser as a string anyway). On Dec 22, 9:44 pm, Phoenix peece...@gmail.com wrote: Thanks for your concern Wesley.. Yes.. by screen I meant browser As I had said in my first message, printing the 0 on browser isn't my objective. I am actually write services in which I just get the input, process it and send the processed output in JSON format. So, in this I do not need to write anything on the browser using server side script. But the thing is, the code I wrote didn't work and I needed it debug it by writing each and every relevant thing on the browser. And printing that zero comes here.. I tried something like self.response.out.write(str(0)) and 0 is there on the screen.. but I generally do not need to do this with any other value.. let it be a python list or dictionary.. so I'm just not able to know the reason or logic behind this.. By the way, a good news.. ! That service for which I was writing that code is done. It's working.. :) But that cofusion of mine is still intact.. :( why that zero is not coming? Thanks, Chirag S Pithadiya. On Dec 22, 2:47 pm, Wesley Chun wesc+...@google.com wrote: greetings! i've read your messages and would like to find out more about what you are trying to do. i will try to help anyway, based on what you have written so far. if you are explicitly writing out a response as text/plain, you still need to write out a string, regardless of the value. you mention using print vs. write. when you're developing a web application, you cannot simply use print because that is intended for a user and *is* output to the screen. with Google App Engine, you're writing a *web application*, and in such cases, there is no screen output. rather than a terminal window, the end consumer of the data you write out is to a web browser. now if by screen, you mean web browser, then please disregard what i just said above, because it wasn't clear what you meant by screen. for web applications, you must output either plain text (MIME file type text/plain) or standard HTML (MIME type text/html). regardless of whether you use 0, 1, 100, or 1000, as integer literals, or as a value of a variable 'new_index', you need to convert it to a string first, i.e., str(0), str(100), str(new_index). also, if you write this out directly, then the output will be text/plain. if you want it to look nice in a web browser, you need to enclose the value in valid HTML: self.response.out.write('HTMLBODY%d/BODY/HTML' % new_index) or something similar. if this doesn't answer your question, hopefully it will help you get started. or if your problem is completely different, please give us more information so we can help you better. thanks! -wesley - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Core Python Programming, Prentice Hall, (c)2007,2001 Python Fundamentals, Prentice Hall, (c)2009 http://corepython.com wesley.j.chun :: wesc+...@google.com developer relations :: google app engine On Mon, Dec 21, 2009 at 11:47 PM, Phoenix peece...@gmail.com wrote: It works.. but it's of no use to me.. I need to use a variable which can have 0 as a value and while debugging I need to be sure whether the value of this variable is coming correctly or not.. It works with print but not working with write.. print the 0 isn't my objective.. but I'm just confused why I can't print 0...) Any other integer is being printed.. then why this issue with 0? thanks for your reply.. On Dec 22, 12:43 pm, Nickolas Daskalou n...@daskalou.com wrote: Have you
[google-appengine] Re: Images API questions
Thanks Jason, I'll play with it and see how I go :) On Dec 24, 12:19 pm, Jason (Google) apija...@google.com wrote: I just threw together a small test application and it looks like the combined size of all image inputs has to be less than 1 MB. So in other words, you can composite 10 100 KB images but not 11 or higher. I haven't explicitly tested composite with the Blobstore service, but I'll make an educated guess that this will work, yes. Composite operates on image objects, and you can create an image object from a Blobstore key using images.Image(blob_key=blob_key). Since other transformations work with Blobstore keys, I don't see why composite should be any different -- let me know if it is, and I'll file a bug. Keep in mind that the final output size still has to be under 1 MB regardless. As long as the image inputs to the transformations are within the data size limits (when using Blobstore keys, this limit is the same as the maximum allowed Blob size) AND the output is smaller than 1 MB, you shouldn't see any exceptions thrown during the actual processing, at least not from the call itself. Of course, the other quotas (e.g. requests have to complete in 30 seconds, etc.) still apply. http://code.google.com/appengine/docs/python/images/overview.html#Tra... Cheers! - Jason On Sun, Dec 20, 2009 at 8:57 PM, Nickolas Daskalou n...@daskalou.comwrote: In Python, if we're using the composite() function from the Images API, is the size of each image layer allowed to be = 1MB, or does the combined size of all the image layers have to be = 1MB (eg. 10 x 100KB layers is allowed, but 11 x 100KB is not)? Can we use Blobstores when using composite()? Exactly when is the LargeImageError exception thrown? Eg. the answers to 1. and 2. below are Yes, but what about 3. and 4.? 1. If 1MB of data is passed as the image_data before any transforms/ composites are done? 2. If the final output data is 1MB? 3. Can the exception be thrown during the processing of the transforms/ composites, even if the final output data is = 1MB? If Yes, what are the conditions that cause this? 4. If Yes to 3. = When using a Blobstore for image transforms, is the upper limit for a LargeImageError exception higher than if the image data is passed via the Image constructor? -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Re: How to test my application with local database
You can't use MySQL or any other traditional RDBMS with App Engine, you'll need to use Google's Datastore: http://code.google.com/appengine/docs/java/datastore/ On Jan 2, 7:04 pm, mobject mobj...@gmail.com wrote: Hello, I would like to test my app with local db before deploying to APPEngine but I could not config my jdo to connect to my local Mysql database. Could anyone help me on this ? Thank you in advance, mobject -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Using different frameworks depending on the hostname?
This is probably a pure Python question. Is it possible to use a different framework depending on what hostname the request was made to? For example: api.mydomain.com (API service) - webapp admin.mydomain.com (Backend administration) - app-engine-patch (AEP) The data model needs to be the same for each framework (worst case would require a duplicated models.py file, which is ok). We want AEP for its admin capabilities for admin.mydomain.com, but we want responses from api.mydomain.com to be as fast as possible so we'd prefer to use webapp, which responds faster than AEP on cold requests (requests where there is no app caching yet). -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
Re: [google-appengine] exception in min() of python
I'm guessing you assigned min to an integer value beforehand, eg: min = 123 if x1 min( x2, x3 ): 2010/1/5 saintthor saintt...@gmail.com code: if x1 min( x2, x3 ): gets an exception: TypeError: 'int' object is not callable x1,x2,x3 are floats. change the code to: if x1 x2 and x1 x3: everything is OK. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
Re: [google-appengine] Re: Using different frameworks depending on the hostname?
Thanks johnwlockwood. I ended up doing this: app.yaml: - url: /.* script: main.py main.py: import os import re regex_api_site = re.compile('^api\.(localhost|mydomain\.com)$') regex_admin_site = re.compile('^admin\.(localhost|mydomain\.com)$') handlers_map = [ {'regex':regex_api_site, 'handler':'WEBAPP'}, {'regex':regex_admin_site, 'handler':'APP_ENGINE_PATCH'}, ] def main(): http_host = os.environ['SERVER_NAME'] handler = None for handler_info in handlers_map: if handler_info['regex'].match(http_host): if handler_info['handler'] == 'WEBAPP': # main_webapp.py is in the root application directory from main_webapp import main as handler elif handler_info['handler'] == 'APP_ENGINE_PATCH': from common.appenginepatch.main import main as handler break if not handler: import logging logging.critical('No handler found for HTTP host %s',http_host) return 1 # Not sure if this is the correct way to return failure return handler() if __name__ == '__main__': main() This seems to work well, although I haven't tried sharing models yet. 2010/1/7 johnwlockwood johnwlockw...@gmail.com you setup the app.yaml to send urls starting with /admin/ to a python file that loads app-engine-patch and everything else to a main.py that loads webapp. something like: - url: /admin/.* script: app_engine_patch_loader.py login: admin - url: /.* script: main.py secure: never Then in your django urls.py handle /admin On Jan 4, 9:15 pm, Nickolas Daskalou n...@daskalou.com wrote: This is probably a pure Python question. Is it possible to use a different framework depending on what hostname the request was made to? For example: api.mydomain.com (API service) - webapp admin.mydomain.com (Backend administration) - app-engine-patch (AEP) The data model needs to be the same for each framework (worst case would require a duplicated models.py file, which is ok). We want AEP for its admin capabilities for admin.mydomain.com, but we want responses from api.mydomain.com to be as fast as possible so we'd prefer to use webapp, which responds faster than AEP on cold requests (requests where there is no app caching yet). -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
Re: [google-appengine] Re: api to determine if application is running on a development server?
What about: import os if 'Development' == os.environ['SERVER_SOFTWARE][:11]: # On dev server else: # On production server Does that work for you johnwlockwood? 2010/1/7 johnwlockwood johnwlockw...@gmail.com OK, that doesn't seem to work. I personally do this, and I know it works: import os PROJECT_ROOT = os.path.abspath(os.path.dirname(__file__)) if not PROJECT_ROOT.startswith(/base/data/home/apps/MYAPPNAME): DEVELOPMENT = True DEBUG = True GOOGLE_MAPS_API_KEY = VSE... else: DEVELOPMENT = False DEBUG = False GOOGLE_MAPS_API_KEY = GER... On Jan 6, 5:40 pm, johnwlockwood johnwlockw...@gmail.com wrote: You can use: if os.environ['SERVER_SOFTWARE'].contains('Development') -John On Jan 2, 10:26 pm, Jeremy Faller jeremy.fal...@gmail.com wrote: Hello all: I've been fooling with AppEngine and the Google Maps APIs, and I'm running into a bit of a snag. The Google Maps APIs require a 'key' url parameter. The key parameter is hashed to your domain name, so if I've got a img tag from localhost, the key differs than from when I'm running on the Google servers. I'd like to programmatically switch the key depending on whether I'm running in the development server on my localhost, or on Google's infrastructure. Does anyone know an API that I can call that will tell me if I'm running in debug mode or not? Specifically, I'm looking for (in python): _LOCALHOST_KEY= 'ABQInfs7bKE82qgb3Zc2YyS- oBT2yXp_ZAY8_ufC3CFXhHIE1NvwkxSySz_REpPq-4WZA27OwgbtyR3VcA' _MY_DOMAIN_KEY = 'xyzpdq' def GoogleMapsKey(): if IsRunningLocalHost(): # What's this API? return _LOCALHOST_KEY return _MY_DOMAIN_KEY Thanks in advance. Regards, Jeremy Faller -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
Re: [google-appengine] Re: Quota on number of entity types / kinds?
You could get the dev server to update index.yaml with the dynamic indexes by running a query on the dev Datastore that would require the desired index on your dynamic entity kind. However if it's not possible to know all the dynamic entity kinds you'll need on the live server, then this wouldn't work. What about creating a base PolyModel class, and have all your dynamic entity kinds inherit from that? 2010/1/9 RyanD r...@dewell.org Hmm, nevermind, I see the issue in the issue tracker related to an Index Management API. I guess I'm not the only one. Starring it. On Jan 8, 1:46 pm, RyanD r...@dewell.org wrote: One followup question to the case described above: If I want entity types that are application controlled, and dynamically created through the low level API (as described above), then there is no way to create indexes unless there is also some kind of low level API for index creation. As it stands the index files appear to be a static part of the uploaded application files, which wouldn't work with dynamically create entity types. Am I understanding this index limitation correctly? If so, are there any long term plans for a low level index API? Ryan On Nov 19 2009, 11:53 am, Ikai L (Google) ika...@google.com wrote: Ryan, The answer to both of your questions is no with a gotcha. Unlike an RDBMS in which tables can enforce some degree of the concept of Type, BigTable has no concept of type or tables. Entities are mapped by an Entity index, which in turn is also stored in BigTable. Searchable/filterable fields on an entity also generate indexes, and composite indexes are also generated depending on what queries are being done. There is no limit to the amount of entities you can store, but you will only be able to retrieve 1000 with any given query until we release cursor support in an upcoming release. We'll be publishing an article that describes how the data store works underneath the hood soon. I'll post it when it goes live. On Sat, Nov 14, 2009 at 5:55 PM, RyanD r...@dewell.org wrote: A couple of quota questions: 1) Mainly: I'm looking to develop an application that has an *unbounded* number of entity types / kinds (by using the low level Java API). Is this possible, or is there some limit to the number of entity types / kinds that an application may have? 2) Any limit on the number of entries for a single entity type / kind? Thanks, Ryan -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.comgoogle-appengine%2Bunsubscrib e...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=. -- Ikai Lan Developer Programs Engineer, Google App Engine -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
Re: [google-appengine] Server locations of Google App Engine
This is not available right now. I think there were talks of looking into this in the future. Google guys feel free to chime in. 2010/1/12 rbginge rhbol...@codecircle.com Is it possible to configure your app so that it is served from Europe? I am trying to access a web service that only accepts requests from certain countries. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
Re: [google-appengine] Re: This App Engine is a JOKE
Wow, reading the comments on that issue scares me. Does Google really block App Engine access in those countries, or are those countries blocking GAE IPs? 2010/1/14 WallyDD shaneb...@gmail.com http://code.google.com/p/googleappengine/issues/detail?id=1072 On Jan 14, 4:19 pm, Nick Johnson (Google) nick.john...@google.com wrote: On Thu, Jan 14, 2010 at 5:38 AM, WallyDD shaneb...@gmail.com wrote: It would be nice if people could use some actual examples as to why app engine is a joke. One problem with emails doesn't cut it. The time limit has been discussed until we are all sick of it. I am not convinced that Google has a lot of money making websites on it (whether they make money through the hosting fees or the adsense revenue). Next up I will go and figure out why I keep getting all these timeouts in my logfile. I hope this isn't a case of a hosting provider overloading their server. For my two cents (slightly off topic); No big company is using it exclusively for their website needs. Bestbuy uses it for some very small part. The whitehouse? I wonder what that is about. Google also blocks GAE to quite a few countries yet points fingers at the Chinese Govt. Why doesn't Google give Hillary the finger? This is not correct. We do not block any App Engine site for any country or region. Any blocking is entirely due to third parties between the user and our servers. -Nick Johnson On Jan 12, 8:41 am, mateusz mateusz.r...@gmail.com wrote: Standard servlet, sometimes work sometimes not throwing: Request was aborted after waiting too long to attempt to service your request. - I think it's when application is waken up from sleeping, but no pattern - strange; Another joke, when I am sending emails from appliacation, it's sometimes send sometimes NOT, without exceptions; if I send to google account - it's delivered in a second; when I send to other account (not gmail), I have to wait long time to be delivered; It's wasting time to think that you can use google app engine as production environment event for the smallest form based application. Do sth with it or close that business; -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com . To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.comgoogle-appengine%2Bunsubscrib e...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- Nick Johnson, Developer Programs Engineer, App Engine Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number: 368047 -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Running some code immediately before a Datastore put()?
I have a property of a Model that is a hash of another property of the same Model, eg: class MyModel(db.Model): something = db.StringProperty() something_hash = db.StringProperty() def generate_hash(self): self.something_hash = sha1(self.something) I want generate_hash() to be automatically called just before the entity is put() into the Datastore, without the developer having to explicitly call entity.generate_hash(). I know I can create a put() method that makes such a call and then calls put() on the superclass, but (a) is that the best way to do it, and (b) if the put() is part of a batch put (eg. via db.put(entities)), will the put() method of each model instance still be called? Nick -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
Re: [google-appengine] Re: Running some code immediately before a Datastore put()?
Thanks guys, both great suggestions. I'll try and get PreCallHook working because that would allow me to add a pre_put() method to my Models, and then using these PreCallHooks I can call pre_put() for each of the entities being put into the Datastore. Failing that, I'll create a new derived property for my Model and do as Devel63 said. 2010/1/15 Devel63 danstic...@gmail.com Nick, I've been faced with your exact situation. I have to say I don't understand PreCallHook, and maybe that would be the best approach, but here's what I do know. Overriding put is a bad idea, and as you point out, the override will not be called in a batch put. I found that the most elegant solution was to derive a new type of db.Property, and override its get_value_for_datastore. Then GAE will automatically do what you want regardless of how the entity is being put. On Jan 14, 1:51 am, Eric Ka Ka Ng ngk...@gmail.com wrote: would a PreCallHook works for your case? http://code.google.com/appengine/articles/hooks.html - eric 2010/1/14 Nickolas Daskalou n...@daskalou.com: I have a property of a Model that is a hash of another property of the same Model, eg: class MyModel(db.Model): something = db.StringProperty() something_hash = db.StringProperty() def generate_hash(self): self.something_hash = sha1(self.something) I want generate_hash() to be automatically called just before the entity is put() into the Datastore, without the developer having to explicitly call entity.generate_hash(). I know I can create a put() method that makes such a call and then calls put() on the superclass, but (a) is that the best way to do it, and (b) if the put() is part of a batch put (eg. via db.put(entities)), will the put() method of each model instance still be called? Nick -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com . To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
Re: [google-appengine] Re: Running some code immediately before a Datastore put()?
I'm pretty sure the code on the GAE Hooks article ( http://code.google.com/appengine/articles/hooks.html) is wrong. 4th code snippet, shouldn't the very first line: def path_appengine(): be moved to the bottom, just above this line: apiproxy_stub_map.apiproxy.GetPreCallHooks().Append() ? 2010/1/15 Nickolas Daskalou n...@daskalou.com Thanks guys, both great suggestions. I'll try and get PreCallHook working because that would allow me to add a pre_put() method to my Models, and then using these PreCallHooks I can call pre_put() for each of the entities being put into the Datastore. Failing that, I'll create a new derived property for my Model and do as Devel63 said. 2010/1/15 Devel63 danstic...@gmail.com Nick, I've been faced with your exact situation. I have to say I don't understand PreCallHook, and maybe that would be the best approach, but here's what I do know. Overriding put is a bad idea, and as you point out, the override will not be called in a batch put. I found that the most elegant solution was to derive a new type of db.Property, and override its get_value_for_datastore. Then GAE will automatically do what you want regardless of how the entity is being put. On Jan 14, 1:51 am, Eric Ka Ka Ng ngk...@gmail.com wrote: would a PreCallHook works for your case? http://code.google.com/appengine/articles/hooks.html - eric 2010/1/14 Nickolas Daskalou n...@daskalou.com: I have a property of a Model that is a hash of another property of the same Model, eg: class MyModel(db.Model): something = db.StringProperty() something_hash = db.StringProperty() def generate_hash(self): self.something_hash = sha1(self.something) I want generate_hash() to be automatically called just before the entity is put() into the Datastore, without the developer having to explicitly call entity.generate_hash(). I know I can create a put() method that makes such a call and then calls put() on the superclass, but (a) is that the best way to do it, and (b) if the put() is part of a batch put (eg. via db.put(entities)), will the put() method of each model instance still be called? Nick -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
Re: [google-appengine] Re: This App Engine is a JOKE
In the future if Google allows us to choose which country our apps are hosted in and we choose to host outside the US, would that lift this restriction? 2010/1/15 Wesley Chun (Google) wesc+...@google.com wesc%2b...@google.com Cuba, Iran, Iraq, North Korea, Syria, and Sudan are a magical group of countries known as the T-6 or Country Group E:1. (it used to be T-7 and included Libya.). Businesses based in the US are not allowed to export products that fall under the ENC license exception to such countries. ENC includes encryption items (includes source code, technology and open cryptographic interface) and encryption commodities (software and components, network infrastructure encryption products, commercial source code and general purpose toolkits): More on E:1 and ENC http://www.bis.doc.gov/encryption/lechart1_sec508.htm (scroll down to bottom for definition of E:1 and the license exception type ENC) http://www.ecustoms.com/ecustoms-glossary.cfm (look up an easier to read definition of the ENC license exception) https://bxa.ntis.gov/whatsnewcgi.html?filename=countrygrpe1.asc (see SUMMARY section) Info about US-based technology companies and this restriction: http://www.cisco.com/web/about/doing_business/legal/global_export_trade/faqs.html http://www.goarticles.com/cgi-bin/showa.cgi?C=1655904 The bottom line is that this is not a corporate decision... it's federal law. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Core Python Programming, Prentice Hall, (c)2007,2001 Python Fundamentals, Prentice Hall, (c)2009 http://corepython.com wesley.j.chun :: wesc+...@google.com wesc%2b...@google.com developer relations :: google app engine -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] EntityProto instance to Model instance?
How can I convert an EntityProto to a Model instance? I have a Model method, pre_put(), that I want to call on each Model instance before it's Put into the Datastore, using hooks (eg: http://code.google.com/appengine/articles/hooks.html). My hook code looks like this: def hook(service, call, request, response): assert service == 'datastore_v3' if call == 'Put': for entity in request.entity_list(): entity.pre_put() When the hook is called and runs, I get this error: AttributeError: EntityProto instance has no attribute 'pre_put' Is there any way to convert the entities in request.entity_list() to their original Models, manipulate them, and then convert them back to an EntityProto instance? Or even better, if the EntityProto instances have references to the actual Model instances which we can access and manipulate? -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
Re: [google-appengine] EntityProto instance to Model instance?
Does anyone have an answer for this? Google guys? 2010/1/15 Kapil Kaisare kksm19820...@gmail.com As an aside: what is an EntityProto, and is there a link in the GAE documentation for it? Regards, Kaisare, Kapil Sadashiv On Fri, Jan 15, 2010 at 09:37, Nickolas Daskalou n...@daskalou.comwrote: How can I convert an EntityProto to a Model instance? I have a Model method, pre_put(), that I want to call on each Model instance before it's Put into the Datastore, using hooks (eg: http://code.google.com/appengine/articles/hooks.html). My hook code looks like this: def hook(service, call, request, response): assert service == 'datastore_v3' if call == 'Put': for entity in request.entity_list(): entity.pre_put() When the hook is called and runs, I get this error: AttributeError: EntityProto instance has no attribute 'pre_put' Is there any way to convert the entities in request.entity_list() to their original Models, manipulate them, and then convert them back to an EntityProto instance? Or even better, if the EntityProto instances have references to the actual Model instances which we can access and manipulate? -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
Re: [google-appengine] how to download my own project hosted on Google app engine
No, you can't currently do that. There's an entry for it in the issue tracker, star it if you like: http://code.google.com/p/googleappengine/issues/detail?id=1047 2010/1/18 jaljal jallouli.mo...@gmail.com Hi, I want to download my own project hosted on Google app engine because I had losted it. Can I do that ? Thanks -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
Re: [google-appengine] Re: EntityProto instance to Model instance?
Since these are not documented online anywhere, is it possible these functions may change in the future (and hence break my code)? 2010/1/18 Andy Freeman ana...@earthlink.net Search in google/appengine/ext/db/__init__.py for protobuf functions. On Jan 16, 9:21 pm, Nickolas Daskalou n...@daskalou.com wrote: Does anyone have an answer for this? Google guys? 2010/1/15 Kapil Kaisare kksm19820...@gmail.com As an aside: what is an EntityProto, and is there a link in the GAE documentation for it? Regards, Kaisare, Kapil Sadashiv On Fri, Jan 15, 2010 at 09:37, Nickolas Daskalou n...@daskalou.com wrote: How can I convert an EntityProto to a Model instance? I have a Model method, pre_put(), that I want to call on each Model instance before it's Put into the Datastore, using hooks (eg: http://code.google.com/appengine/articles/hooks.html). My hook code looks like this: def hook(service, call, request, response): assert service == 'datastore_v3' if call == 'Put': for entity in request.entity_list(): entity.pre_put() When the hook is called and runs, I get this error: AttributeError: EntityProto instance has no attribute 'pre_put' Is there any way to convert the entities in request.entity_list() to their original Models, manipulate them, and then convert them back to an EntityProto instance? Or even better, if the EntityProto instances have references to the actual Model instances which we can access and manipulate? -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com google-appengine%2bunsubscrib...@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.comgoogle-appengine%2bunsubscr...@googlegroups.com google-appengine%2bunsubscrib...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.- Hide quoted text - - Show quoted text - -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
Re: [google-appengine] Re: EntityProto instance to Model instance?
Will do, thanks Andy. 2010/1/18 Andy Freeman ana...@earthlink.net I asked that question wrt db.class_for_kind and was told that it was safe to assume that it would always be there. I'd guess that model_from_protobuf should be safe as well. File a bug requesting that it be added to the documented function list. On Jan 17, 6:26 pm, Nickolas Daskalou n...@daskalou.com wrote: Since these are not documented online anywhere, is it possible these functions may change in the future (and hence break my code)? 2010/1/18 Andy Freeman ana...@earthlink.net Search in google/appengine/ext/db/__init__.py for protobuf functions. On Jan 16, 9:21 pm, Nickolas Daskalou n...@daskalou.com wrote: Does anyone have an answer for this? Google guys? 2010/1/15 Kapil Kaisare kksm19820...@gmail.com As an aside: what is an EntityProto, and is there a link in the GAE documentation for it? Regards, Kaisare, Kapil Sadashiv On Fri, Jan 15, 2010 at 09:37, Nickolas Daskalou n...@daskalou.com wrote: How can I convert an EntityProto to a Model instance? I have a Model method, pre_put(), that I want to call on each Model instance before it's Put into the Datastore, using hooks (eg: http://code.google.com/appengine/articles/hooks.html). My hook code looks like this: def hook(service, call, request, response): assert service == 'datastore_v3' if call == 'Put': for entity in request.entity_list(): entity.pre_put() When the hook is called and runs, I get this error: AttributeError: EntityProto instance has no attribute 'pre_put' Is there any way to convert the entities in request.entity_list() to their original Models, manipulate them, and then convert them back to an EntityProto instance? Or even better, if the EntityProto instances have references to the actual Model instances which we can access and manipulate? -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com google-appengine%2bunsubscrib...@googlegroups.com google-appengine%2bunsubscrib...@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.comgoogle-appengine%2bunsubscr...@googlegroups.com google-appengine%2bunsubscrib...@googlegroups.com google-appengine%2bunsubscrib...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.-Hide quoted text - - Show quoted text - -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com . To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com google-appengine%2bunsubscrib...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.- Hide quoted text - - Show quoted text - -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
Re: [google-appengine] Re: EntityProto instance to Model instance?
I've managed to get this going, with the help of the comments in this thread and Nick Johnson's blog post ( http://blog.notdot.net/2009/11/API-call-hooks-for-fun-and-profit). My hook code now looks like this: def hook(service, call, request, response): assert service == 'datastore_v3' if call == 'Put': for i in range(request.entity_size()): entity_pb = request.mutable_entity(i) entity = db.model_from_protobuf(entity_pb) try: entity.pre_put() entity_pb.CopyFrom(db.model_to_protobuf(entity)) except: pass This seems highly inefficient though, because before an entity is put into the Datastore, it's converted from a Model instance to an EntityProto instance, then back to a Model instance and finally back to an EntityProto instance (Model-EntityProto-Model-EntityProto). Google guys, is there a more efficient way to do this? 2010/1/18 Nickolas Daskalou n...@daskalou.com Will do, thanks Andy. 2010/1/18 Andy Freeman ana...@earthlink.net I asked that question wrt db.class_for_kind and was told that it was safe to assume that it would always be there. I'd guess that model_from_protobuf should be safe as well. File a bug requesting that it be added to the documented function list. On Jan 17, 6:26 pm, Nickolas Daskalou n...@daskalou.com wrote: Since these are not documented online anywhere, is it possible these functions may change in the future (and hence break my code)? 2010/1/18 Andy Freeman ana...@earthlink.net Search in google/appengine/ext/db/__init__.py for protobuf functions. On Jan 16, 9:21 pm, Nickolas Daskalou n...@daskalou.com wrote: Does anyone have an answer for this? Google guys? 2010/1/15 Kapil Kaisare kksm19820...@gmail.com As an aside: what is an EntityProto, and is there a link in the GAE documentation for it? Regards, Kaisare, Kapil Sadashiv On Fri, Jan 15, 2010 at 09:37, Nickolas Daskalou n...@daskalou.com wrote: How can I convert an EntityProto to a Model instance? I have a Model method, pre_put(), that I want to call on each Model instance before it's Put into the Datastore, using hooks (eg: http://code.google.com/appengine/articles/hooks.html). My hook code looks like this: def hook(service, call, request, response): assert service == 'datastore_v3' if call == 'Put': for entity in request.entity_list(): entity.pre_put() When the hook is called and runs, I get this error: AttributeError: EntityProto instance has no attribute 'pre_put' Is there any way to convert the entities in request.entity_list() to their original Models, manipulate them, and then convert them back to an EntityProto instance? Or even better, if the EntityProto instances have references to the actual Model instances which we can access and manipulate? -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com google-appengine%2bunsubscrib...@googlegroups.com google-appengine%2bunsubscrib...@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.comgoogle-appengine%2bunsubscr...@googlegroups.com google-appengine%2bunsubscrib...@googlegroups.com google-appengine%2bunsubscrib...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.-Hide quoted text - - Show quoted text - -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com google-appengine%2bunsubscrib...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.- Hide quoted text - - Show quoted text - -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr
Re: [google-appengine] Re: EntityProto instance to Model instance?
Ok, cheers Nick. 2010/1/20 Nick Johnson (Google) nick.john...@google.com Hi Nickolas, On Tue, Jan 19, 2010 at 1:09 AM, Nickolas Daskalou n...@daskalou.comwrote: I've managed to get this going, with the help of the comments in this thread and Nick Johnson's blog post ( http://blog.notdot.net/2009/11/API-call-hooks-for-fun-and-profit). My hook code now looks like this: def hook(service, call, request, response): assert service == 'datastore_v3' if call == 'Put': for i in range(request.entity_size()): entity_pb = request.mutable_entity(i) entity = db.model_from_protobuf(entity_pb) try: entity.pre_put() entity_pb.CopyFrom(db.model_to_protobuf(entity)) except: pass This seems highly inefficient though, because before an entity is put into the Datastore, it's converted from a Model instance to an EntityProto instance, then back to a Model instance and finally back to an EntityProto instance (Model-EntityProto-Model-EntityProto). Google guys, is there a more efficient way to do this? Monkeypatching the db module to call pre_put in the appropriate place would be a better way to do this, though it's subject to breakage as the API changes. -Nick Johnson 2010/1/18 Nickolas Daskalou n...@daskalou.com Will do, thanks Andy. 2010/1/18 Andy Freeman ana...@earthlink.net I asked that question wrt db.class_for_kind and was told that it was safe to assume that it would always be there. I'd guess that model_from_protobuf should be safe as well. File a bug requesting that it be added to the documented function list. On Jan 17, 6:26 pm, Nickolas Daskalou n...@daskalou.com wrote: Since these are not documented online anywhere, is it possible these functions may change in the future (and hence break my code)? 2010/1/18 Andy Freeman ana...@earthlink.net Search in google/appengine/ext/db/__init__.py for protobuf functions. On Jan 16, 9:21 pm, Nickolas Daskalou n...@daskalou.com wrote: Does anyone have an answer for this? Google guys? 2010/1/15 Kapil Kaisare kksm19820...@gmail.com As an aside: what is an EntityProto, and is there a link in the GAE documentation for it? Regards, Kaisare, Kapil Sadashiv On Fri, Jan 15, 2010 at 09:37, Nickolas Daskalou n...@daskalou.com wrote: How can I convert an EntityProto to a Model instance? I have a Model method, pre_put(), that I want to call on each Model instance before it's Put into the Datastore, using hooks (eg: http://code.google.com/appengine/articles/hooks.html). My hook code looks like this: def hook(service, call, request, response): assert service == 'datastore_v3' if call == 'Put': for entity in request.entity_list(): entity.pre_put() When the hook is called and runs, I get this error: AttributeError: EntityProto instance has no attribute 'pre_put' Is there any way to convert the entities in request.entity_list() to their original Models, manipulate them, and then convert them back to an EntityProto instance? Or even better, if the EntityProto instances have references to the actual Model instances which we can access and manipulate? -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com google-appengine%2bunsubscrib...@googlegroups.com google-appengine%2bunsubscrib...@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.comgoogle-appengine%2bunsubscr...@googlegroups.com google-appengine%2bunsubscrib...@googlegroups.com google-appengine%2bunsubscrib...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.-Hidequoted text - - Show quoted text - -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com google-appengine%2bunsubscrib...@googlegroups.com . For more options, visit this group
Re: [google-appengine] Re: Scalability problem in GAE
Hi mani, I have a question. How did you get appstats to not require an admin login in production? Nick 2010/1/20 mani doraisamy mdorais...@orangescape.com Same request, but another query has degraded from 45ms to 846ms: http://247-test.appspot.com/stats/details?time=1263968821144 http://247-test.appspot.com/stats/details?time=1263908256446 thanks, mani On Jan 20, 4:00 pm, mani doraisamy mdorais...@orangescape.com wrote: Sorry. I got the degradation wrong. Datastore degrades from 40ms to 1283ms. thanks, mani On Jan 20, 3:48 pm, mani doraisamy mdorais...@orangescape.com wrote: Here are the stats for the same request at 05:37 Vs 10:49 on 2010-01-19: http://247-test.appspot.com/stats/details?time=1263908256446http://24... It just returns 2 entities. But the datastore query degrades from 256ms to 1760ms (6.8x degradation). Memcache also seems to degrade, but not as much as datastore. Any suggestions? thanks, mani On Jan 19, 4:18 pm, mani doraisamy mdorais...@orangescape.com wrote: Thanks for the link, Danny. This is the best profiling tool i have used. Well done, Guido! Will get back with the performance data for off-peak Vs peak hours. thanks, mani On Jan 17, 9:37 pm, Danny Tuppeny da...@tuppeny.com wrote: Have you identified what part of your page is taking additional time? Guido van Rossum wrote a library called Appstats to help profile time spent on API calls. I'd recommend setting it up (it works in production) to see if you can identify where this time is being spent. I wrote a short article about Appstats on my blog with some screenshots showing the sort of data you can get out of it: http://blog.dantup.com/2010/01/profiling-google-app-engine-with-appstats Hope this helps. Danny On Jan 16, 8:24 pm, mani doraisamy mdorais...@orangescape.com wrote: Recently, we have been running into frequent performance problems, especially between 7-10pm IST. Requests that used to take 600ms are taking almost 4 secs. - Has anyone faced similar problems recently? - What is the limit for memcache per account? How do we find the cache expiry pattern? (actual expiry Vs specified expiry) thanks, mani -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
Re: [google-appengine] Re: Scalability problem in GAE
Technical. I tried editing the appstats code to turn off this admin user requirement, but I kept getting a 500 error. 2010/1/21 mani doraisamy mdorais...@orangescape.com Is that a technical question or process question? On Jan 20, 4:35 pm, Nickolas Daskalou n...@daskalou.com wrote: Hi mani, I have a question. How did you get appstats to not require an admin login in production? Nick 2010/1/20 mani doraisamy mdorais...@orangescape.com Same request, but another query has degraded from 45ms to 846ms: http://247-test.appspot.com/stats/details?time=1263968821144 http://247-test.appspot.com/stats/details?time=1263908256446 thanks, mani On Jan 20, 4:00 pm, mani doraisamy mdorais...@orangescape.com wrote: Sorry. I got the degradation wrong. Datastore degrades from 40ms to 1283ms. thanks, mani On Jan 20, 3:48 pm, mani doraisamy mdorais...@orangescape.com wrote: Here are the stats for the same request at 05:37 Vs 10:49 on 2010-01-19: http://247-test.appspot.com/stats/details?time=1263908256446http://24. .. It just returns 2 entities. But the datastore query degrades from 256ms to 1760ms (6.8x degradation). Memcache also seems to degrade, but not as much as datastore. Any suggestions? thanks, mani On Jan 19, 4:18 pm, mani doraisamy mdorais...@orangescape.com wrote: Thanks for the link, Danny. This is the best profiling tool i have used. Well done, Guido! Will get back with the performance data for off-peak Vs peak hours. thanks, mani On Jan 17, 9:37 pm, Danny Tuppeny da...@tuppeny.com wrote: Have you identified what part of your page is taking additional time? Guido van Rossum wrote a library called Appstats to help profile time spent on API calls. I'd recommend setting it up (it works in production) to see if you can identify where this time is being spent. I wrote a short article about Appstats on my blog with some screenshots showing the sort of data you can get out of it: http://blog.dantup.com/2010/01/profiling-google-app-engine-with-appstats Hope this helps. Danny On Jan 16, 8:24 pm, mani doraisamy mdorais...@orangescape.com wrote: Recently, we have been running into frequent performance problems, especially between 7-10pm IST. Requests that used to take 600ms are taking almost 4 secs. - Has anyone faced similar problems recently? - What is the limit for memcache per account? How do we find the cache expiry pattern? (actual expiry Vs specified expiry) thanks, mani -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com . To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.comgoogle-appengine%2Bunsubscrib e...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
Re: [google-appengine] Problem using 'www' as subdomain for app url
It might be a problem with Google Sites in Google Apps. Search this group for similar problems and see the answers related to Google Sites. Not 100% sure on this but give it a go. Nick 2010/1/24 Alex alexle...@googlemail.com Hi, I have a google appengine app which I want to access via mydomain.com. I have succesfully set up the CNAME record and subdomain for access as mysubdomain.mydomain.com. However if the subdomain is 'www' it does not work. Have you any idea what the problem is? When I enter 'www' into 'Add new URL' for my GAE app it does not appear in the access list of url, nor is there an error message. Any other subdomain name works fine. I am sure I have seen documentation somewhere which says 'www' should work. Any help appreciated Alex -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
Re: [google-appengine] unable to add app to domain
There could be a number of reasons why this isn't working. Eg: 1. When you first created your app did you choose to restrict it to a Google Apps domain? If so, I think you can only add that Google Apps domain as a domain for your app. AFAIK, this cannot be changed once an App Engine app has been created. 2. Is the user you've logged into your Google Apps account with an administrator for your App Engine app? If not, add them and try again. 3. Is the Google Apps user different to the App Engine user, and you're accessing from the same browser? If so, try logging into each account from a separate browser and try again. (this one's from my experience) 4. Are you trying to add a naked domain (a domain with no sub-domain, not even a www)? This is not possible right now. Although I'm guessing App Engine would already tell you this if you tried adding it in the Admin Console. 5. It could have something to do with Google Sites already serving that domain in your Google Apps. Search this forum for some of the Google Sites problems and solutions. Nick 2010/1/31 brian br...@iheardata.com I am trying to add my own app (created by logging in to appengine with my apps-for-domains account) to my own domain. I have tried doing this by entering my app-id from the Google Apps Dashboard add more services page, as well as from the app's own Versions page with the Add Domain... button. In both cases, I am eventually brought to the You have requested that... terms and conditions page. I check the box next to I accept and click the Activate this service button... and am redirected back to the terms and conditions page. I can do this over and over, and am unable to get past the terms and conditions page. help? /brian -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
Re: [google-appengine] Re: unable to add app to domain
Hmmm well I'm out of ideas, sorry. Wait for one of the Googlers to reply. Nick On 31/01/2010, at 2:54 PM, brian br...@iheardata.com wrote: On Jan 30, 10:22 pm, Nickolas Daskalou n...@daskalou.com wrote: There could be a number of reasons why this isn't working. Eg: 1. When you first created your app did you choose to restrict it to a Google Apps domain? If so, I think you can only add that Google Apps domain as a domain for your app. AFAIK, this cannot be changed once an App Engine app has been created. The app is setup to use authentication from regular google accounts. 2. Is the user you've logged into your Google Apps account with an administrator for your App Engine app? If not, add them and try again. Yes. It's the same user. 3. Is the Google Apps user different to the App Engine user, and you're accessing from the same browser? If so, try logging into each account from a separate browser and try again. (this one's from my experience) Again, the appengine user and the apps-for-domains user are the same. 4. Are you trying to add a naked domain (a domain with no sub- domain, not even a www)? This is not possible right now. Although I'm guessing App Engine would already tell you this if you tried adding it in the Admin Console. 5. It could have something to do with Google Sites already serving that domain in your Google Apps. Search this forum for some of the Google Sites problems and solutions. Read my original message again. I'm not even getting up to the step where I pick the subdomain. /brian -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google- appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en . -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Memcache: Should we save Model instance or protocol buffer?
Is it better/safer to store a Model instance into Memcache directly (Method 1 below), or should we convert it to a protocol buffer first, then store it (Method 2 below)? Method 1: memcache.set(cache_key, entity) ... entity = memcache.get(cache_key) Method 2: memcache.set(cache_key, db.model_to_protobuf(entity)) ... entity = db.protobuf_to_model(memcache.get(cache_key)) I'm assuming Method 2 results in a smaller Memcache footprint, yes? Nick -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
Re: [google-appengine] Re: Memcache: Should we save Model instance or protocol buffer?
Perfect, thanks Sylvain. :) Nick On 5 February 2010 03:11, Sylvain sylvain.viv...@gmail.com wrote: I think the answer (and more) is here : http://blog.notdot.net/2009/9/Efficient-model-memcaching On Feb 4, 10:43 am, Nickolas Daskalou n...@daskalou.com wrote: Is it better/safer to store a Model instance into Memcache directly (Method 1 below), or should we convert it to a protocol buffer first, then store it (Method 2 below)? Method 1: memcache.set(cache_key, entity) ... entity = memcache.get(cache_key) Method 2: memcache.set(cache_key, db.model_to_protobuf(entity)) ... entity = db.protobuf_to_model(memcache.get(cache_key)) I'm assuming Method 2 results in a smaller Memcache footprint, yes? Nick -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
Re: [google-appengine] Re: Memcache: Should we save Model instance or protocol buffer?
Thanks Andy. Do you know what happens to a RefenceProperty that has already had the referenced entity loaded on the Model instance? Does the referenced entity also get saved in the ProtocolBuffer, or is only its key saved? On 5 February 2010 16:54, Andy Freeman ana...@earthlink.net wrote: Note that memcaching a protocol buffer has interesting consequences. One is that the auto-now datetime properties are updated when the protocol buffer is created. This update is just on the protocol buffer - it doesn't affect the datastore copy. http://code.google.com/p/googleappengine/issues/detail?id=2402 On Feb 4, 8:11 am, Sylvain sylvain.viv...@gmail.com wrote: I think the answer (and more) is here : http://blog.notdot.net/2009/9/Efficient-model-memcaching On Feb 4, 10:43 am, Nickolas Daskalou n...@daskalou.com wrote: Is it better/safer to store a Model instance into Memcache directly (Method 1 below), or should we convert it to a protocol buffer first, then store it (Method 2 below)? Method 1: memcache.set(cache_key, entity) ... entity = memcache.get(cache_key) Method 2: memcache.set(cache_key, db.model_to_protobuf(entity)) ... entity = db.protobuf_to_model(memcache.get(cache_key)) I'm assuming Method 2 results in a smaller Memcache footprint, yes? Nick- Hide quoted text - - Show quoted text - -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Re: Watermarking with Image Composite
Hey Google, has this been fixed in the new SDK? On Jul 31 2009, 1:40 pm, Rodrigo Moraes rodrigo.mor...@gmail.com wrote: On Jun 3, 8:08 pm, Mick wrote: Just tested and it worked on appspot. awesome! but is there a workaround to get it work correctly on dev? Hi Mick. I had this same problem today (no transparency in png's when using composite()), and got a quick fix. If you want to pach the SDK until it is fixed, here's how. in google.appengine.api.images.images_stub.py, on lines 114-116, you'll find: alpha = options.opacity() * 255 mask = Image.new(L, source.size, alpha) canvas.paste(source, (x_offset, y_offset), mask) replace it with... if source.mode == 'RGBA': canvas.paste(source, (x_offset, y_offset), source) else: alpha = options.opacity() * 255 mask = Image.new(L, source.size, alpha) canvas.paste(source, (x_offset, y_offset), mask) that's it. -- rodrigo -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
Re: [google-appengine] 1.3.1 SDK Prerelease - help us verify
Where did you find the documentation for how to use these two new features? On 08/02/2010, at 12:45 PM, Ross M Karchner rosskarch...@gmail.com wrote: I'm loving cursors and transactional tasks (which may be the geekiest sentence I've ever written)-- I hope send_mail is next to get transactional treatment. On Wed, Feb 3, 2010 at 5:03 PM, Ikai Lan i...@google.com wrote: Hello App Engine Developers, As part of our ongoing efforts to improve release quality and transparency, we will start prereleasing SDKs for early testing. We hope this gives developers a chance to participate in our release process by trying out new changes and sending feedback. As of this morning, the prerelease SDK for our next release, 1.3.1, is available in the familiar download location (note that the filename ends in 'prerelease.zip'): http://code.google.com/p/googleappengine/downloads/list If you're interested, please download and give it a try locally with your favorite App Engine code. Please note that, as a prerelease, this SDK is not yet supported and still subject to change. Thus, please don't take critical dependencies or make substantial changes to production apps based on this SDK. Importantly, this prerelease is purely for the SDK and is intended for local testing and development in dev_appserver. The server-side of App Engine (our production environment) is not at 1.3.1, so deploying with this SDK is not yet supported. In the future, we might enable a complete SDK and server test environment for prereleases. Please try 1.3.1 for local development and send us your feedback! Thanks, App Engine Team Python = - New support for Datastore Query Cursors - New support for Transactional Task Creation - Additional file extensions permitted when sending mail including .doc and .xls http://code.google.com/p/googleappengine/issues/detail?id=494 - New Grab Tail added to Memcache API - Support for Custom Admin Console pages - New month and synchronized syntax for Cron configuration - Application Stats library now included in with SDK - Bulk Loader supports bulk downloading all kinds simultaneously - appcfg.py validates SSL certificates for HTTPS connections - Support for ETags, If-matches, If-not-matches HTTP Headers, as well as 304 error codes now available on static files (not available on the dev_appserver or Blobstore blobs) http://code.google.com/p/googleappengine/issues/detail?id=575 Java = - Datastore Query Cursors - Transactional Tasks - Additional file extensions permitted when sending mail including .doc and .xsl http://code.google.com/p/googleappengine/issues/detail?id=494 - Grab Tail added to Memcache API - Support for Custom Admin Console pages - Java Precompilation is now on by default. - Developers can opt-out of precompilation by setting the flag in appengine-web.xml precompilation-enabledfalse/precompilation-enabled - New built-in support for unit testing (see appengine-testing.jar) http://code.google.com/p/googleappengine/issues/detail?id=326 - net.sf.jsr107 package included as an alternative to the low-level Memcache API - javax.annotation.Resource/Resources added to the package whitelist - New month and synchronized syntax for Cron configuration - URLFetch supports asynchronous requests - http://code.google.com/p/googleappengine/issues/detail?id=1899 - appcfg.sh uses HTTPS for application deployment - appcfg.sh adds request_logs --append - Changes to the order queries without a specified sort order are returned. Only queries that use IN will see different results. - Added support for multiple != filters on the same property - Improved support for keys-only queries when using IN and != filters - Support for ETags, If-matches, If-not-matches HTTP Headers, as well as 304 error codes now available on static files (not available on the dev_appserver or Blobstore blobs) http://code.google.com/p/googleappengine/issues/detail?id=575 - Fixed issue where the maximum transform count was enforced for composite operations http://code.google.com/p/googleappengine/issues/detail?id=1656 - Fixed issue with whitespace on the end of strings in web.xml http://code.google.com/p/googleappengine/issues/detail?id=2242 - Fixed Not Found issue when defining error-page in web.xml http://code.google.com/p/googleappengine/issues/detail?id=1477 - Fixed issue when defining welcome-file-list in web.xml http://code.google.com/p/googleappengine/issues/detail?id=1249 - Fixed issue where cancelling a deployment in progress would unintentionally delete packages http://code.google.com/p/googleappengine/issues/detail?id=2255 - Fixed issue with QuotaService.getCpuTimeInMegaCycles() returning 0 http://code.google.com/p/googleappengine/issues/detail?id=2639 - Fixed issue where JSP exceptions will be incorrectly cast causing a ClassCastException http://code.google.com/p/googleappengine/issues/detail?id=1438 -- Ikai Lan Developer Programs Engineer, Google App
Re: [google-appengine] 1.3.1 SDK Prerelease - help us verify
Thanks Ross, this is very helpful. :) Nick On 8 February 2010 13:13, Ross M Karchner rosskarch...@gmail.com wrote: Poking around the code, and trial an error. For transactional tasks, just add transactional=True to any tasks you create in a transaction-- if the transaction fails, the task won't be created. For cursors, after doing a fetch() on a Query, .cursor() (on the Query itself , not the results) will return a big ugly string that acts as the cursor. Later (probably in a separate handler), use .with_cursor(the_cursor) to modify the query. When you fetch, it will pick up where the previous fetch left off. Excerpted from my code: subscriber_q=Query(subscriptions.models.Subscription, keys_only=True).filter('site =', edition.site).filter('newsletter =', edition.newsletter).filter('active =', True) if request.form.has_key('cursor'): subscriber_q=subscriber_q.with_cursor(request.form['cursor']) subscribers=subscriber_q.fetch(BATCH_SIZE) (it might look a little funny since I'm using YARO for my request object http://lukearno.com/projects/yaro/) On Sun, Feb 7, 2010 at 8:51 PM, Nickolas Daskalou n...@daskalou.comwrote: Where did you find the documentation for how to use these two new features? On 08/02/2010, at 12:45 PM, Ross M Karchner rosskarch...@gmail.com wrote: I'm loving cursors and transactional tasks (which may be the geekiest sentence I've ever written)-- I hope send_mail is next to get transactional treatment. On Wed, Feb 3, 2010 at 5:03 PM, Ikai Lan i...@google.com i...@google.com wrote: Hello App Engine Developers, As part of our ongoing efforts to improve release quality and transparency, we will start prereleasing SDKs for early testing. We hope this gives developers a chance to participate in our release process by trying out new changes and sending feedback. As of this morning, the prerelease SDK for our next release, 1.3.1, is available in the familiar download location (note that the filename ends in 'prerelease.zip'): http://code.google.com/p/googleappengine/downloads/list http://code.google.com/p/googleappengine/downloads/list If you're interested, please download and give it a try locally with your favorite App Engine code. Please note that, as a prerelease, this SDK is not yet supported and still subject to change. Thus, please don't take critical dependencies or make substantial changes to production apps based on this SDK. Importantly, this prerelease is purely for the SDK and is intended for local testing and development in dev_appserver. The server-side of App Engine (our production environment) is not at 1.3.1, so deploying with this SDK is not yet supported. In the future, we might enable a complete SDK and server test environment for prereleases. Please try 1.3.1 for local development and send us your feedback! Thanks, App Engine Team Python = - New support for Datastore Query Cursors - New support for Transactional Task Creation - Additional file extensions permitted when sending mail including .doc and .xls http://code.google.com/p/googleappengine/issues/detail?id=494 http://code.google.com/p/googleappengine/issues/detail?id=494 - New Grab Tail added to Memcache API - Support for Custom Admin Console pages - New month and synchronized syntax for Cron configuration - Application Stats library now included in with SDK - Bulk Loader supports bulk downloading all kinds simultaneously - appcfg.py validates SSL certificates for HTTPS connections - Support for ETags, If-matches, If-not-matches HTTP Headers, as well as 304 error codes now available on static files (not available on the dev_appserver or Blobstore blobs) http://code.google.com/p/googleappengine/issues/detail?id=575 http://code.google.com/p/googleappengine/issues/detail?id=575 Java = - Datastore Query Cursors - Transactional Tasks - Additional file extensions permitted when sending mail including .doc and .xsl http://code.google.com/p/googleappengine/issues/detail?id=494 http://code.google.com/p/googleappengine/issues/detail?id=494 - Grab Tail added to Memcache API - Support for Custom Admin Console pages - Java Precompilation is now on by default. - Developers can opt-out of precompilation by setting the flag in appengine-web.xml precompilation-enabledfalse/precompilation-enabled - New built-in support for unit testing (see appengine-testing.jar) http://code.google.com/p/googleappengine/issues/detail?id=326 http://code.google.com/p/googleappengine/issues/detail?id=326 - net.sf.jsr107 package included as an alternative to the low-level Memcache API - javax.annotation.Resource/Resources added to the package whitelist - New month and synchronized syntax for Cron configuration - URLFetch supports asynchronous requests - http://code.google.com/p/googleappengine/issues/detail?id=1899 http://code.google.com/p/googleappengine/issues/detail?id=1899
[google-appengine] Application versions code - completely separate or diff'd?
I know we're able to access different versions of our apps using a URL like: http://VERSION.latest.APPID.appspot.com My question is: Is the code for each version totally separate from other versions, or are only the files that have been changed between versions separated (in which case files that have NOT changed between versions are served from the same file/cached file for all versions of the app)? To make it more clear, suppose I have two files in my app (settings.py and main.py), and two versions, 1 and 2: settings.py (which is identical for both versions): ... last_version = None ... main.py (for app version 1): ... import settings if settings.last_version is None: settings.last_version = 1 assert settings.last_version == 1 ... main.py (for app version 2): ... import settings if settings.last_version is None: settings.last_version = 2 assert settings.last_version == 2 ... If I visit 1.latest.myappid.appspot.com first and then 2.latest.myappid.appspot.com (while the app version 1 is still in the App Engine cache), will the assert fail because version 1 and 2 are accessing the same settings.py? Nick -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
Re: [google-appengine] Application versions code - completely separate or diff'd?
Ah, runtime was the word I was looking for. Thanks Nick. :) Nick (not you, me) On 8 February 2010 22:38, Nick Johnson (Google) nick.john...@google.comwrote: Hi Nickolas, Different versions of your app get completely different runtimes. Changing a global variable as in your example does not change the file, only the value in the loaded module. -Nick Johnson On Mon, Feb 8, 2010 at 7:34 AM, Nickolas Daskalou n...@daskalou.comwrote: I know we're able to access different versions of our apps using a URL like: http://VERSION.latest.APPID.appspot.com My question is: Is the code for each version totally separate from other versions, or are only the files that have been changed between versions separated (in which case files that have NOT changed between versions are served from the same file/cached file for all versions of the app)? To make it more clear, suppose I have two files in my app (settings.py and main.py), and two versions, 1 and 2: settings.py (which is identical for both versions): ... last_version = None ... main.py (for app version 1): ... import settings if settings.last_version is None: settings.last_version = 1 assert settings.last_version == 1 ... main.py (for app version 2): ... import settings if settings.last_version is None: settings.last_version = 2 assert settings.last_version == 2 ... If I visit 1.latest.myappid.appspot.com first and then 2.latest.myappid.appspot.com (while the app version 1 is still in the App Engine cache), will the assert fail because version 1 and 2 are accessing the same settings.py? Nick -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- Nick Johnson, Developer Programs Engineer, App Engine Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number: 368047 -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
Re: [google-appengine] Re: 1.3.1 SDK Prerelease - help us verify
Will we be able to construct our own cursors much the same way that we are able to construct our own Datastore keys (Key.from_path())? Also along the same lines, will we be able to deconstruct a cursor to get its components (offset, start_inclusive etc.), as we can now do with keys ( key.name(), key.id(), key.kind() etc.)? 2010/2/9 Nick Johnson (Google) nick.john...@google.com 2010/2/9 Stephen sdea...@gmail.com I'm asking if it's wise to store it as a query parameter embedded in a web page. You're right that it's unwise. Depending on how you construct your query, a user could potentially modify the cursor they send to you to return results from any query your datastore is capable of performing, which could result in you revealing information to the user that they shouldn't know. You should either store the cursor on the server-side, or encrypt it before sending it to the client. I was going to mention something about this in my post, but it slipped my mind. -Nick Johnson On Feb 9, 12:26 am, Ikai L (Google) ika...@google.com wrote: A cursor serializes to a Base64 encoded String, so you can store it anywhere you want to store strings: Memcached, Datastore, etc. You can even pass it as an URL parameter to task queues. 2010/2/8 Stephen sdea...@gmail.com Ah right, Nick's blog does say start_key and not offset. My bad. Maybe there will be warnings in the upcoming documentation, but my first instinct was to embed the serialised cursor in the HTML as the 'next' link. But that doesn't look like a good idea as Nick's decoded query shows what's embedded: PrimaryScan { start_key: shell\000TestModel\000foo\000\232bar\000\200 start_inclusive: true } keys_only: false First, you may or may not want to leak this info. Second, could this be altered on the client to change the query in any way that's undesirable? Once you have a cursor, where do you store it so you can use it again? On Feb 8, 10:17 pm, Ikai L (Google) ika...@google.com wrote: I got beaten to this answer. No, there is no traversal to get to the offset. BigTable has an underlying mechanism for range queries on keys. Indexes are essentially a key comprised of a concatenation of application ID, entity type, column, value. When a filter operation is performed, the datastore looks for a range matching this criteria, returning the set of keys. A cursor also adds the datastore key of the entity so it is possible to serialize where to begin the query. This is actually a bit awkward to explain without visuals. You can watch Ryan Barrett's talk here: http://www.youtube.com/watch?v=tx5gdoNpcZM Hopefully, we'll be able to post an article at some point in the future explaining how cursors work. 2010/2/8 Alkis Evlogimenos ('Αλκης Ευλογημένος) evlogime...@gmail.com There is no offset. The protocol buffer stores a start_key and a boolean denoting if this start key is inclusive or not. The performance of continuing the fetch from a cursor should be the same as the performance of the first entities you got from a query. On Mon, Feb 8, 2010 at 4:33 PM, Stephen sdea...@gmail.com wrote: On Feb 8, 7:06 pm, Ikai L (Google) ika...@google.com wrote: The official docs are pending, but here's Nick Johnson to the rescue: http://blog.notdot.net/2010/02/New-features-in-1-3-1-prerelease-Cursors What are the performance characteristics of cursors? The serialised cursor shows that it stores an offset. Does that mean that if the offset is one million, one million rows will have to be skipped before the next 10 are returned? This will be faster than doing it in your app, but not as quick as the existing bookmark techniques which use the primary key index. Or is the server-side stateful, like a typical SQL implementation of cursors? In which case, are there any limits to the number of active cursors? Or what if a cursor is resumed some time in the future; will it work at all, or work slower? -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com google-appengine%2bunsubscr...@googlegroups.comgoogle-appengine%252bunsubscr...@googlegroups.com google-appengine%2bunsubscr...@googlegroups.comgoogle-appengine%252bunsubscr...@googlegroups.com google-appengine%252bunsubscr...@googlegroups.comgoogle-appengine%25252bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- Alkis -- You received this
Re: [google-appengine] Re: 1.3.1 SDK Prerelease - help us verify
I'd want to do this so that I could include parts of the cursor (such as the offset) into a URL without including other parts (eg. the model kind and filters). I could then reconstruct the cursor on the server side based on what was passed into the URL. For example, if I was searching for blog comments that contained the word the (with the default order being the creation time, descending), the URL might look like this: myblog.com/comments/?q=the With model: class Comment(db.Model): created_at = db.DateTimeProperty(auto_now_add=True) words = db.StringListProperty() # A list of all the words in a comment (forget about exploding indexes for now) ... The query object for this URL might look something like: q = Comment.all().filter('words',self.request.get('q')).order('-created_at') To get to the 1001st comment, it'd be good if the URL looked something like this: myblog.com/comments/?q=theskip=1000 instead of: myblog.com/comments/?q=thecursor=[something ugly] so that when the request comes in, I can do this: q = Comment.all().filter('words',self.request.get('q')).order('-created_at') cursor_template = q.cursor_template() cursor = db.Cursor.from_template(cursor_template,offset=int(self.request.get('skip'))) (or something along these lines) Does that make sense? On 10 February 2010 01:03, Nick Johnson (Google) nick.john...@google.comwrote: Hi Nickolas, 2010/2/9 Nickolas Daskalou n...@daskalou.com Will we be able to construct our own cursors much the same way that we are able to construct our own Datastore keys (Key.from_path())? No, not practically speaking. Also along the same lines, will we be able to deconstruct a cursor to get its components (offset, start_inclusive etc.), as we can now do with keys (key.name(), key.id(), key.kind() etc.)? While you could do this, there's no guarantees that it'll work (or continue to work), as you'd be digging into internal implementation details. Why do you want to do this? -Nick Johnson 2010/2/9 Nick Johnson (Google) nick.john...@google.com 2010/2/9 Stephen sdea...@gmail.com I'm asking if it's wise to store it as a query parameter embedded in a web page. You're right that it's unwise. Depending on how you construct your query, a user could potentially modify the cursor they send to you to return results from any query your datastore is capable of performing, which could result in you revealing information to the user that they shouldn't know. You should either store the cursor on the server-side, or encrypt it before sending it to the client. I was going to mention something about this in my post, but it slipped my mind. -Nick Johnson On Feb 9, 12:26 am, Ikai L (Google) ika...@google.com wrote: A cursor serializes to a Base64 encoded String, so you can store it anywhere you want to store strings: Memcached, Datastore, etc. You can even pass it as an URL parameter to task queues. 2010/2/8 Stephen sdea...@gmail.com Ah right, Nick's blog does say start_key and not offset. My bad. Maybe there will be warnings in the upcoming documentation, but my first instinct was to embed the serialised cursor in the HTML as the 'next' link. But that doesn't look like a good idea as Nick's decoded query shows what's embedded: PrimaryScan { start_key: shell\000TestModel\000foo\000\232bar\000\200 start_inclusive: true } keys_only: false First, you may or may not want to leak this info. Second, could this be altered on the client to change the query in any way that's undesirable? Once you have a cursor, where do you store it so you can use it again? On Feb 8, 10:17 pm, Ikai L (Google) ika...@google.com wrote: I got beaten to this answer. No, there is no traversal to get to the offset. BigTable has an underlying mechanism for range queries on keys. Indexes are essentially a key comprised of a concatenation of application ID, entity type, column, value. When a filter operation is performed, the datastore looks for a range matching this criteria, returning the set of keys. A cursor also adds the datastore key of the entity so it is possible to serialize where to begin the query. This is actually a bit awkward to explain without visuals. You can watch Ryan Barrett's talk here: http://www.youtube.com/watch?v=tx5gdoNpcZM Hopefully, we'll be able to post an article at some point in the future explaining how cursors work. 2010/2/8 Alkis Evlogimenos ('Αλκης Ευλογημένος) evlogime...@gmail.com There is no offset. The protocol buffer stores a start_key and a boolean denoting if this start key is inclusive or not. The performance of continuing the fetch from a cursor should be the same as the performance of the first entities you got from a query. On Mon, Feb 8, 2010 at 4:33 PM, Stephen sdea...@gmail.com wrote
Re: [google-appengine] Re: 1.3.1 SDK Prerelease - help us verify
Does the production cursor string contain information about the app id, kind, any filter()s or order()s, and (more importantly) some sort of numerical value that indicates how many records the next query should skip? If so, and if we could extract this information (and then use it again to the reconstruct the cursor), that would make for much cleaner, safer and intuitive URLs than including the entire cursor string (or some sort of encrypted/encoded cursor string replacement). 2010/2/10 Nick Johnson (Google) nick.john...@google.com Hi Nickolas, 2010/2/9 Nickolas Daskalou n...@daskalou.com I'd want to do this so that I could include parts of the cursor (such as the offset) into a URL without including other parts (eg. the model kind and filters). I could then reconstruct the cursor on the server side based on what was passed into the URL. The offset argument you're talking about is specific to the dev_appserver's implementation of cursors. In production, offsets are not used, so this won't work. -Nick Johnson For example, if I was searching for blog comments that contained the word the (with the default order being the creation time, descending), the URL might look like this: myblog.com/comments/?q=the With model: class Comment(db.Model): created_at = db.DateTimeProperty(auto_now_add=True) words = db.StringListProperty() # A list of all the words in a comment (forget about exploding indexes for now) ... The query object for this URL might look something like: q = Comment.all().filter('words',self.request.get('q')).order('-created_at') To get to the 1001st comment, it'd be good if the URL looked something like this: myblog.com/comments/?q=theskip=1000 instead of: myblog.com/comments/?q=thecursor=[something ugly] so that when the request comes in, I can do this: q = Comment.all().filter('words',self.request.get('q')).order('-created_at') cursor_template = q.cursor_template() cursor = db.Cursor.from_template(cursor_template,offset=int(self.request.get('skip'))) (or something along these lines) Does that make sense? On 10 February 2010 01:03, Nick Johnson (Google) nick.john...@google.com wrote: Hi Nickolas, 2010/2/9 Nickolas Daskalou n...@daskalou.com Will we be able to construct our own cursors much the same way that we are able to construct our own Datastore keys (Key.from_path())? No, not practically speaking. Also along the same lines, will we be able to deconstruct a cursor to get its components (offset, start_inclusive etc.), as we can now do with keys (key.name(), key.id(), key.kind() etc.)? While you could do this, there's no guarantees that it'll work (or continue to work), as you'd be digging into internal implementation details. Why do you want to do this? -Nick Johnson 2010/2/9 Nick Johnson (Google) nick.john...@google.com 2010/2/9 Stephen sdea...@gmail.com I'm asking if it's wise to store it as a query parameter embedded in a web page. You're right that it's unwise. Depending on how you construct your query, a user could potentially modify the cursor they send to you to return results from any query your datastore is capable of performing, which could result in you revealing information to the user that they shouldn't know. You should either store the cursor on the server-side, or encrypt it before sending it to the client. I was going to mention something about this in my post, but it slipped my mind. -Nick Johnson On Feb 9, 12:26 am, Ikai L (Google) ika...@google.com wrote: A cursor serializes to a Base64 encoded String, so you can store it anywhere you want to store strings: Memcached, Datastore, etc. You can even pass it as an URL parameter to task queues. 2010/2/8 Stephen sdea...@gmail.com Ah right, Nick's blog does say start_key and not offset. My bad. Maybe there will be warnings in the upcoming documentation, but my first instinct was to embed the serialised cursor in the HTML as the 'next' link. But that doesn't look like a good idea as Nick's decoded query shows what's embedded: PrimaryScan { start_key: shell\000TestModel\000foo\000\232bar\000\200 start_inclusive: true } keys_only: false First, you may or may not want to leak this info. Second, could this be altered on the client to change the query in any way that's undesirable? Once you have a cursor, where do you store it so you can use it again? On Feb 8, 10:17 pm, Ikai L (Google) ika...@google.com wrote: I got beaten to this answer. No, there is no traversal to get to the offset. BigTable has an underlying mechanism for range queries on keys. Indexes are essentially a key comprised of a concatenation of application ID, entity type, column, value. When a filter operation is performed, the datastore looks for a range matching this criteria, returning the set
[google-appengine] Remote API login problem - keep getting HTTP Error 302 Found
After some Googling, I came across this article from SO: http://stackoverflow.com/questions/1555469/appengine-remote-api-unable-to-login It appears as though I fall into the group of users as described by Nick Johnson in the answer that he gave. Is the workaround in Nick's answer still the best way around this issue? -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Admins Emailed quota not working?
I'm sending emails to email addresses that are admins (aka. Admin Console Developers) and those emails are using Recipients Emailed quota instread of Admins Emailed quota. Is this a bug or is my understanding of the Admins Emailed quota wrong? -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Re: Admins Emailed quota not working?
My bad, I think I have to use mail.send_mail_to_admins() instead of mail.send_mail(). Nick On Feb 11, 4:30 am, Nickolas Daskalou n...@daskalou.com wrote: I'm sending emails to email addresses that are admins (aka. Admin Console Developers) and those emails are using Recipients Emailed quota instread of Admins Emailed quota. Is this a bug or is my understanding of the Admins Emailed quota wrong? -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
Re: [google-appengine] Re: App Engine SDK 1.3.1 is out!
Yeah, this is a great release. Well done Google dudes and dudettes! On 11 February 2010 15:32, gops patelgo...@gmail.com wrote: Wow!!! with wildcard and cursor , all thing i need is available, yay!! ( of course map reduce remains,,,but i sense it coming soon.. ) On Feb 11, 5:38 am, appengine-s...@google.com appengine- s...@google.com wrote: For more information on wildcard domain mappings see: http://code.google.com/appengine/docs/domain.html For more information on custom admin console pages see: Java: http://code.google.com/appengine/docs/java/config/appconfig.html#Admi... Python: http://code.google.com/appengine/docs/python/config/appconfig.html#Ad... On Feb 10, 4:30 pm, David W. d...@botanicus.net wrote: On Feb 10, 11:45 pm, Koen Bok k...@madebysofa.com wrote: Great update! Where can we find more info about: -CustomAdminConsole pages Picking through the diffs for 1.3.1, the syntax is: admin_console: pages: - url: /some/protected/url/in/your/app name: My Stats Page - url: /some/protected/url/in/your/app2 name: My Stats Page 2 etc. The extra pages then appear in the column on the left-hand side of the admin panel, under the billing section. - Support for wildcard domain mappings On Feb 11, 12:15 am, Ikai L (Google) ika...@google.com wrote: Check it out! http://googleappengine.blogspot.com/2010/02/app-engine-sdk-131-includ... http://googleappengine.blogspot.com/2010/02/app-engine-sdk-131-includ.. .Here's the post: App Engine SDK 1.3.1, Including Major Improvements to Datastore! http://googleappengine.blogspot.com/2010/02/app-engine-sdk-131-includ... We are excited to announce the release of version 1.3.1 of the App Engine SDK for both Python and Java. While this release contains plenty of new features and fixes, we've concentrated on using our very first SDK release of 2010 to improve the heart of many App Engine applications: the Datastore. Here are the three major improvements that 1.3.1 has in store for datastore users: - *Datastore Query Cursors* - Cursors allow applications to save and 'bookmark' their progress through a query, so that it can be resumed later. This works great in combination with paging URLs, as well as processing in the Task Queue API, but there are many other uses. Watch for an upcoming blog post that explores Cursors in the near future. They're also really handy in the context of the next change... - *No more 1000 result limit* - That's right: with addition of Cursors and the culmination of many smaller Datastore stability and performance improvements over the last few months, we're now confident enough to remove the maximum result limit altogether. Whether you're doing a fetch, iterating, or using a Cursor, there's no limits on the number of results. - *Reduced error rate with Automatic Datastore Retries* - We've heard a lot of feedback that you don't want to deal with the Datastore's sporadic errors. In response, App Engine now automatically retries all datastore calls (with the exception of transaction commits) when your applications encounters a datastore error caused by being unable to reach Bigtable. Datastore retries automatically builds in what many of you have been doing in your code already, and our tests have shown it drastically reduces the number of errors your application experiences (by up to *3-4x error reduction for puts, 10-30x for gets*). But even with our focus on the Datastore, we were able to sneak in a quite a number of other new goodies into 1.3.1 as well: For Python, we've included the *AppStats* RPC instrumentation library. AppStats lets users easily profile the performance of calls from their app to the App Engine backend services to identify and isolate issues such as ineffective caching, bottlenecks, and redundant RPC calls in their app. (A Java version is in beta testing now.) And for Java, we've included a comprehensive new *unit-testing framework* for your App Engine apps. The unit-testing framework enables you to test your application code in a natural, fully supported manner, and also allows you to integrate your App Engine apps into other existing testing and automation frameworks. The list of changes in 1.3.1 goes on and on (CustomAdminConsole pages! Support for wildcard domain mappings! Java precompilation on by default for all applications!), so make sure to downloadhttp://code.google.com/appengine/downloads.html the new version and read our release notes for the complete list (Python http://code.google.com/p/googleappengine/wiki/SdkReleaseNotes ,
Re: [google-appengine] App Engine not listing my apps
If you're logged in using a Google Apps account, visit: https://appengine.google.com/a/your Google Apps domain Nick On 11 February 2010 16:02, Hendy Irawan he...@soluvas.com wrote: When I go to https://appengine.google.com/ I always get redirected to https://appengine.google.com/start and prompted to create a new application. I can create new applications and deploy to an app ID I already created (from my own memory). However I cannot list/manage existing apps. Thank you. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
Re: [google-appengine] Re: App Engine SDK 1.3.1 is out!
Wow, that's huge. Was that a batch get/put (and if so, how many entities?), or just for one single entity? On 11 February 2010 21:19, Brandon Thomson gra...@gmail.com wrote: though I am curious if we can predict how long .get() and .fetch() will potentially block for? Seems like this used to be around 4 seconds in the event of Timeout but I assume it may be longer now. In case anyone is curious, I have logged a .get() that blocked for 21 seconds and a .put() that blocked for 20.5 seconds. So the latency can be much higher now. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
Re: [google-appengine] Remote API login problem - keep getting HTTP Error 302 Found
Thanks Nick. On 12 February 2010 02:43, Nick Johnson (Google) nick.john...@google.comwrote: Hi Nickolas, Yes, that workaround is still accurate. -Nick Johnson On Wed, Feb 10, 2010 at 5:02 PM, Nickolas Daskalou n...@daskalou.comwrote: After some Googling, I came across this article from SO: http://stackoverflow.com/questions/1555469/appengine-remote-api-unable-to-login It appears as though I fall into the group of users as described by Nick Johnson in the answer that he gave. Is the workaround in Nick's answer still the best way around this issue? -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- Nick Johnson, Developer Programs Engineer, App Engine Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number: 368047 -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
Re: [google-appengine] Re: Why i don't use Google App Engine... and don't recomend it to you
Yeah that's one bad thing about developing on App Engine - at times, waiting days for support. On 12 February 2010 15:15, Dennis Peterson dennisbpeter...@gmail.comwrote: It's not google's fault, but on the other hand, deploy at Rackspace and you can call them on the phone and sort things out. On Thu, Feb 11, 2010 at 10:19 PM, Tim Hoffman zutes...@gmail.com wrote: I access appengine from multiple systems' (access to app engineis not tied to a O/S install) Looks like you haven't kept track of you gmail accounts. Hardly googles or appengines fault. T On Feb 12, 3:22 am, ai_...@live.ru ai_...@live.ru wrote: Well it's a short story. I register an account on App Engine. I made a 2-3 sites. Everithing was fine and i was happy :) But one time i reinstall my operating system (you know what system nead to be reainstalled :) ) i get strange error. I coldn't loggin to my account. I search for reasons, make post in tech support but i get nothing. NO ONE from tech support have contact with me. NO ONE!!! But one day i read some smart artice and i finally loged in. But then i faced with other bug. When i try to create new site, i get this message You have no right to work wot this site. After that i didn't see site in my sites list and lose it. So i couldn control him and even edit... I spend 6 months at Google App Engine to get nothing. So... GOOGLE APP ENGINE IS VERRY BAD SERVISE... DON'T USE IT... SAVE YOUR TIME.. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
Re: [google-appengine] downloading a swf
Read Nick Johnson's comments in this thread for an official answer: http://groups.google.com/group/google-appengine/browse_thread/thread/c35f347308e76943 Spoiler: Upload and download time does not count towards the 30 second limit. Nick On 14 February 2010 10:00, Robert Kluin robert.kl...@gmail.com wrote: I think the consensus is that time to download the response, or static files, does not count against your 30 second limit. Robert On Sat, Feb 13, 2010 at 12:35 PM, Olga Pomez dam...@gmail.com wrote: Hello if i have an swf that last in download more than 30 seconds on my server, GAE is not going to be usefull for me , is not it? Thanks very much -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Memcache: key_prefix vs namespace?
What's the difference between key_prefix and namespace when using the Memcache.*_multi() functions? Maybe my understanding of namespace is wrong, but I thought namespace was basically a (string) prefix on the cache key. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
Re: [google-appengine] Memcache: key_prefix vs namespace?
On 17 February 2010 14:14, Ikai L (Google) ika...@google.com wrote: The implementation isn't going to change if it works Is there a list of what's currently working (and hence won't change), and what's not working (and hence may change in the future)? Also, is the namespace simply a string (without restrictions)? Nick - it's just that certain methods involving namespaces return unexpected results. For instance, grab_tail seems to be working incorrectly, pulling from the global LRU rather than the nested namespace LRU. On Tue, Feb 16, 2010 at 7:01 PM, Nickolas Daskalou n...@daskalou.comwrote: Thanks for that explanation Ikai. Since the details are still being worked out, should we not use the namespace argument, in case its implementation suddenly changes? If it is indeed safe to use now (and the namespace argument actually does work and is not just there as a placeholder), what is the data type? A string? On 17 February 2010 08:57, Ikai L (Google) ika...@google.com wrote: Nickolas, I thought the same thing when I first read about namespaces. As it turns out, namespaces with App Engine's memcache instance are not the same thing as prefixes. They are actual namespaces with their own LRU in addition to the global LRU. The details are still being worked out, though, but the idea is that you'll have features like constant time flushing of a namespace and nested namespaces, something you can't do with the distribution of Memcached that is available on the internet. This version of Memcache was necessary to ensure that users could not stomp on other users' memcache data. On Mon, Feb 15, 2010 at 8:11 PM, Nickolas Daskalou n...@daskalou.comwrote: What's the difference between key_prefix and namespace when using the Memcache.*_multi() functions? Maybe my understanding of namespace is wrong, but I thought namespace was basically a (string) prefix on the cache key. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- Ikai Lan Developer Programs Engineer, Google App Engine http://googleappengine.blogspot.com | http://twitter.com/app_engine -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- Ikai Lan Developer Programs Engineer, Google App Engine http://googleappengine.blogspot.com | http://twitter.com/app_engine -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Re: Watermarking with Image Composite
*BUMP* On Feb 5, 6:04 pm, Nickolas Daskalou n...@daskalou.com wrote: Hey Google, has this been fixed in the new SDK? On Jul 31 2009, 1:40 pm, Rodrigo Moraes rodrigo.mor...@gmail.com wrote: On Jun 3, 8:08 pm, Mick wrote: Just tested and it worked on appspot. awesome! but is there a workaround to get it work correctly on dev? Hi Mick. I had this same problem today (no transparency in png's when using composite()), and got a quick fix. If you want to pach the SDK until it is fixed, here's how. in google.appengine.api.images.images_stub.py, on lines 114-116, you'll find: alpha= options.opacity() * 255 mask = Image.new(L, source.size,alpha) canvas.paste(source, (x_offset, y_offset), mask) replace it with... if source.mode == 'RGBA': canvas.paste(source, (x_offset, y_offset), source) else: alpha= options.opacity() * 255 mask = Image.new(L, source.size,alpha) canvas.paste(source, (x_offset, y_offset), mask) that's it. -- rodrigo -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
Re: [google-appengine] Re: Watermarking with Image Composite
Answer: No. However, Rodrigo's fix still works with SDK 1.3.1. On 17 February 2010 14:27, Nickolas Daskalou n...@daskalou.com wrote: *BUMP* On Feb 5, 6:04 pm, Nickolas Daskalou n...@daskalou.com wrote: Hey Google, has this been fixed in the new SDK? On Jul 31 2009, 1:40 pm, Rodrigo Moraes rodrigo.mor...@gmail.com wrote: On Jun 3, 8:08 pm, Mick wrote: Just tested and it worked on appspot. awesome! but is there a workaround to get it work correctly on dev? Hi Mick. I had this same problem today (no transparency in png's when using composite()), and got a quick fix. If you want to pach the SDK until it is fixed, here's how. in google.appengine.api.images.images_stub.py, on lines 114-116, you'll find: alpha= options.opacity() * 255 mask = Image.new(L, source.size,alpha) canvas.paste(source, (x_offset, y_offset), mask) replace it with... if source.mode == 'RGBA': canvas.paste(source, (x_offset, y_offset), source) else: alpha= options.opacity() * 255 mask = Image.new(L, source.size,alpha) canvas.paste(source, (x_offset, y_offset), mask) that's it. -- rodrigo -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
Re: [google-appengine] Memcache: key_prefix vs namespace?
I think I'll follow suit and also stick with prefixing memcache keys with my own namespaces until there's more info on the real namespaces. On 17 February 2010 14:53, Eli Jones eli.jo...@gmail.com wrote: Nickolas, If you poke around in the google/appengine/api/memcache folder and look at the __init__.py file, you see in the comments that namespace is just a string. Sometimes poking around in the .py files can clarify some things.. though, it won't tell you if something will change of course. Since I'm not clear on what namespace ultimately does, I just stick to setting memcache keynames = Model.kind() + Model.key().name() since that should be unique for each application. On Tue, Feb 16, 2010 at 10:22 PM, Nickolas Daskalou n...@daskalou.comwrote: On 17 February 2010 14:14, Ikai L (Google) ika...@google.com wrote: The implementation isn't going to change if it works Is there a list of what's currently working (and hence won't change), and what's not working (and hence may change in the future)? Also, is the namespace simply a string (without restrictions)? Nick - it's just that certain methods involving namespaces return unexpected results. For instance, grab_tail seems to be working incorrectly, pulling from the global LRU rather than the nested namespace LRU. On Tue, Feb 16, 2010 at 7:01 PM, Nickolas Daskalou n...@daskalou.comwrote: Thanks for that explanation Ikai. Since the details are still being worked out, should we not use the namespace argument, in case its implementation suddenly changes? If it is indeed safe to use now (and the namespace argument actually does work and is not just there as a placeholder), what is the data type? A string? On 17 February 2010 08:57, Ikai L (Google) ika...@google.com wrote: Nickolas, I thought the same thing when I first read about namespaces. As it turns out, namespaces with App Engine's memcache instance are not the same thing as prefixes. They are actual namespaces with their own LRU in addition to the global LRU. The details are still being worked out, though, but the idea is that you'll have features like constant time flushing of a namespace and nested namespaces, something you can't do with the distribution of Memcached that is available on the internet. This version of Memcache was necessary to ensure that users could not stomp on other users' memcache data. On Mon, Feb 15, 2010 at 8:11 PM, Nickolas Daskalou n...@daskalou.comwrote: What's the difference between key_prefix and namespace when using the Memcache.*_multi() functions? Maybe my understanding of namespace is wrong, but I thought namespace was basically a (string) prefix on the cache key. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- Ikai Lan Developer Programs Engineer, Google App Engine http://googleappengine.blogspot.com | http://twitter.com/app_engine -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com . To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- Ikai Lan Developer Programs Engineer, Google App Engine http://googleappengine.blogspot.com | http://twitter.com/app_engine -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com
Re: [google-appengine] Re: Why i don't use Google App Engine... and don't recomend it to you
Maybe Google did it on purpose because you're using IE + Bing instead of Chrome + Google? :P No seriously, hopefully this screenshot will make it easier for the Googlers that frequent this group to help you. I have a question for you though (not sure if it's been asked in this thread yet (yes, can't be bothered reading it all)). What email address did you use when you visited https://appengine.google.com/ and it asked you to sign in? Or rather, does the email address you used to access that appengine.google.com page end in @gmail.com or @anotherdomain.com? If it's the latter, have you tried visiting https://appengine.google.com/a/anotherdomain.com? On 18 February 2010 03:14, ai_...@live.ru ai_...@live.ru wrote: I think i have Google acc, but i don't know for shure. When i go to https://appengine.google.com/ and Sign in, then i see a list of ONE site (all other disapear!) and i can create only 2 more sites!!! Here is the proof link http://oleksii.icr-corp.com/gae.png When i try to create new site. I'm sucsessfully create it. But in the very end i get error message You have no right to edit site (or something like that). And then created site become invivible!! And i can't edit it and modify. I even dont see it in sites list When i was tring to modify sites that was created long ago i have same error message and then site become invisible! And after that i don't see site in site list. On 16 фев, 21:56, johnwlockwood johnwlockw...@gmail.com wrote: On Feb 15, 9:36 pm, ai_...@live.ru ai_...@live.ru wrote: Well i like GAE, but this situation is pissing me off. And you even want someone to pay money for THAT? o_O I just want to use servise. I don't want you to suggest somethin. I want you to help me. Is it really hard for Google to help people to use they servises? And please READ THIS ONE MORE TIME.. i think i make it clear that i don't forget passowrd. And i clearly say what error i have. But one day i read some smart artice and i finally loged in. But then i faced with other bug. When i try to create new site, i get this message You have no right to work with this site. After that i You must be leaving out some steps here. let's start from the top: What kind of account do you have? a Google Account or a Google App Account? for a Google Account: You would go tohttps://appengine.google.com/and Sign in. This would bring you to My Applications, which has a list of any applications that belong to this account. Are there any listed there? is so when you click on one. what happens? if not, click 'Create an Application' this should bring you to the 'Create an Application' page. Here you find an available Application Identifier and enter the Application Title. Do that, then click the 'Save' button. What response do you get? didn't see site in my sites list and lose it. So i couldn control him and even edit... On 14 ÆÅ×, 15:57, Danny Tuppeny da...@tuppeny.com wrote: We understand you. We don't understand why you don't respond to people trying to help you. Eg. you posted here: http://groups.google.com/group/google-appengine/browse_thread/thread/... And Wooble made a suggestion (assuming your account was an Apps account), but you never replied. We can't help you if you just complain and then disappear. If you have a problem, try explaining it in more detail. Why can't you login? Do you get an error? Did you forget your password? Have you lost your source code? 2010/2/13 ai_...@live.ru ai_...@live.ru: Well i think NOBODY anderstend me... I WASTE 6 MONTHS for Google App Engine and right now i get nothing. I could not use my sites. I could no edit them. And technical support DOSENT WORK AT ALL I don't care how Google App Engine is good. I CAN'T USE IT!!! So... imagine for a second that you create something huge like Facebook. And one day. You lost control for your apps. Lost your time and money!! Right now i talking that EVERIONE can face with my situation. So... save your time. Use other stable cloud services.- óËÒÙÔØ ÃÉÔÉÒÕÅÍÙÊ ÔÅËÓÔ - - ðÏËÁÚÁÔØ ÃÉÔÉÒÕÅÍÙÊ ÔÅËÓÔ -- Скрыть цитируемый текст - - Показать цитируемый текст - -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to
Re: [google-appengine] Re: Scheduled Maintenance?
My crons aren't running yet. On 18 February 2010 13:56, naan kaz...@gmail.com wrote: cron job starts working now. On Feb 17, 6:49 pm, naan kaz...@gmail.com wrote: It seems cron job isn't working after the maintenance. Is this known issue? On Feb 17, 6:41 pm, Greg g.fawc...@gmail.com wrote: On Feb 18, 3:22 pm, jay kyburz@gmail.com wrote: Is there somewhere other than this list we should be subscribed to to be informed about these ahead of time? This one caught me by surprise. Yes - you can subscribe tohttp:// groups.google.com/group/google-appengine-downtime-notify. This sends you several emails leading up to the maintenance period. On another note, is Google hoping to phase out these maintenance outages eventually? I manage my customer's expectations, but I'm getting increasing kick-back as my application gains in popularity. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
Re: [google-appengine] Re: Scheduled Maintenance?
Refreshing my Logs page in the Admin Console just gave me: Server Error A server error has occurred. Return to Applications screen » https://appengine.google.com/ On 18 February 2010 14:22, mb doit...@gmail.com wrote: Also, XMPP isn't working for my app. It's worked fine the last 3 weeks, now after maintenance it's broken. No changes made to the app in 3 weeks. On Feb 17, 7:14 pm, vivpuri v...@vivekpuri.com wrote: My crons are not running either -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
Re: [google-appengine] Re: Scheduled Maintenance?
On next refresh, the Logs page is now working. Crons are still not, however. On 18 February 2010 14:24, Nickolas Daskalou n...@daskalou.com wrote: Refreshing my Logs page in the Admin Console just gave me: Server Error A server error has occurred. Return to Applications screen » https://appengine.google.com/ On 18 February 2010 14:22, mb doit...@gmail.com wrote: Also, XMPP isn't working for my app. It's worked fine the last 3 weeks, now after maintenance it's broken. No changes made to the app in 3 weeks. On Feb 17, 7:14 pm, vivpuri v...@vivekpuri.com wrote: My crons are not running either -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
Re: [google-appengine] Re: Scheduled Maintenance?
My crons have now been MIA for a full two hours. Will this cron backlog problem occur each time there is maintenance? If so, how long can we expect the Cron executer to take catch up? On 18 February 2010 14:34, App Engine Team appengine.nore...@gmail.comwrote: The Deploy problem is a known issue resulting from today's schedule maintenance. We're currently working on a fix, but there is a work around that should work for most developers: 1. Deploy your application as a new version. Please do not constantly attempt to redeploy your app. Your app is already in the queue even if the deploy script times out. 2. Validate that the new version is active using the version.latest URL 3. Use the Admin Console to switch the active or default application to this version As for Cron jobs, the Cron executor is catching up from a backlog during the outage. Your jobs are not getting dropped, just slow. On Feb 17, 7:28 pm, Eli Jones eli.jo...@gmail.com wrote: I'm hesitant to try a redeploy of my app right now to see if that works.. but I will not that I am getting the Error: Server Error The server encountered an error and could not complete your request when trying to go to Datastore Statistics page. I try refresh and same error. Also, I noticed that this morning.. and as far as I know up to now.. my stats have not updated. So, it has been about 40 hours since the last Statistics update for my app. On Wed, Feb 17, 2010 at 10:22 PM, mb doit...@gmail.com wrote: Also, XMPP isn't working for my app. It's worked fine the last 3 weeks, now after maintenance it's broken. No changes made to the app in 3 weeks. On Feb 17, 7:14 pm, vivpuri v...@vivekpuri.com wrote: My crons are not running either -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com . To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com google-appengine%2bunsubscr...@googlegroups.comgoogle-appengine%252bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
Re: [google-appengine] Re: Scheduled Maintenance?
After 3 hours and 55 minutes, my crons started running again. On 18 February 2010 16:17, Nickolas Daskalou n...@daskalou.com wrote: Update: 3.5 hours on and still no crons executed. On 18 February 2010 14:46, Nickolas Daskalou n...@daskalou.com wrote: My crons have now been MIA for a full two hours. Will this cron backlog problem occur each time there is maintenance? If so, how long can we expect the Cron executer to take catch up? On 18 February 2010 14:34, App Engine Team appengine.nore...@gmail.comwrote: The Deploy problem is a known issue resulting from today's schedule maintenance. We're currently working on a fix, but there is a work around that should work for most developers: 1. Deploy your application as a new version. Please do not constantly attempt to redeploy your app. Your app is already in the queue even if the deploy script times out. 2. Validate that the new version is active using the version.latest URL 3. Use the Admin Console to switch the active or default application to this version As for Cron jobs, the Cron executor is catching up from a backlog during the outage. Your jobs are not getting dropped, just slow. On Feb 17, 7:28 pm, Eli Jones eli.jo...@gmail.com wrote: I'm hesitant to try a redeploy of my app right now to see if that works.. but I will not that I am getting the Error: Server Error The server encountered an error and could not complete your request when trying to go to Datastore Statistics page. I try refresh and same error. Also, I noticed that this morning.. and as far as I know up to now.. my stats have not updated. So, it has been about 40 hours since the last Statistics update for my app. On Wed, Feb 17, 2010 at 10:22 PM, mb doit...@gmail.com wrote: Also, XMPP isn't working for my app. It's worked fine the last 3 weeks, now after maintenance it's broken. No changes made to the app in 3 weeks. On Feb 17, 7:14 pm, vivpuri v...@vivekpuri.com wrote: My crons are not running either -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com google-appengine%2bunsubscr...@googlegroups.comgoogle-appengine%252bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] My app is much faster now
The maintenance on the servers has sped up my app's execution times (and CPU times) by about 5x-10x. Is this because: 1. My app's runtime is kept in memory longer now but it will soon go back to normal? 2. My app's runtime is kept in memory longer now and this will be typical from now on? 3. The servers were upgraded during the maintenance to make them faster/more efficient, and the performance I'm now seeing will be typical from now on? 4. [insert reason]? I really hope it's 2 or 3! Nick -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
Re: [google-appengine] Re: My app is much faster now
I'm getting these times from the Logs page. Can someone from Google comment on why this could be happening? On 19 February 2010 08:10, jay kyburz@gmail.com wrote: Are you using the dashboard to see this improvement in speed. I wonder it its reporting CPU usage incorrectly as well. On Feb 18, 7:50 pm, Nickolas Daskalou n...@daskalou.com wrote: The maintenance on the servers has sped up my app's execution times (and CPU times) by about 5x-10x. Is this because: 1. My app's runtime is kept in memory longer now but it will soon go back to normal? 2. My app's runtime is kept in memory longer now and this will be typical from now on? 3. The servers were upgraded during the maintenance to make them faster/more efficient, and the performance I'm now seeing will be typical from now on? 4. [insert reason]? I really hope it's 2 or 3! Nick -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] How to get a Model's collection_names?
Say I have these Models: class Model1(db.Model): class Model2(db.Model): model1 = db.ReferenceProperty(Model1, collection_name = 'model2s') class Model3(db.Model): model1 = db.ReferenceProperty(Model1, collection_name = 'model3s') Would this be the best way to get all of Model1's collection_names? collection_names = [name for name in dir(Model1) if isinstance(getattr(Model1,name), db.Query)] Is there a better way? -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Admin Console: Logs and Requests not showing up
In the Admin Console I have no logs or requests recorded for about the last 20 hours. Is this a side-effect of yesterday's maintenance? -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Model class of a Query instance?
Is there an official way to get the Model class from a Query instance? I had a look through the online docs and couldn't find anything. In the SDK code however, the Model class of a Query instance can be retrieved from the _model_class attribute of the Query instance, eg: q = MyModel.all() model_class = q._model_class # == MyModel I don't really want to do it this way because since this is not documented anywhere, I'm afraid that this implementation may change in the future. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
Re: [google-appengine] Model class of a Query instance?
Hi Nick, I have something like this: class Foo(db.Model): name = db.StringProperty() ... class Bar(db.Model): foo = db.ReferenceProperty(Foo, collection_name='bars') foo_name = db.StringProperty() class Baz(db.Model): foo = db.ReferenceProperty(Foo, collection_name='bazs') foo_name = db.StringProperty() I have added a hook in my application which calls a post_put() method on all instances that are put() into the Datastore (after they are put, obviously). In the post_put() of a Foo entity, I want to get all reverse referenced Bar and Baz entities, and update their foo_name with the Foo entity's name. However, I only need to update the Bar and Baz entities who's foo_name value != the Foo entity's name. So I could do something like: class Foo(db.Model): ... def post_put(): for collection_name in ('bars', 'bazs'): q = getattr(self, collection_name) q.filter('foo_name !=', self.name) # Fetch, then update. This works fine, except I need to add a new index each time I do this, since q has two filters, one equality (an implied filter('foo =', self)) and one inequality. Instead, I would like to get the Model class associated with each collection_name and just add one inequality filter, ie: class Foo(db.Model): ... def post_put(): for collection_name in ('bars', 'bazs'): model_class = self.get_model_class_for_collection(collection_name) q = model_class.all().filter('foo_name !=', self.name) # Fetch, then update. def get_model_class_for_collection(collection_name): q = getattr(self, collection_name) return q.model_class() # This is the Query method I want This way I do not need to create a new index each time I do this. Can you suggest a similar no-new-index way of doing this? I also thought about doing this (only get_model_class_for_collection() has changed): class Foo(db.Model): ... def post_put(): for collection_name in ('bars','bazs'): model_class = self.get_model_class_for_collection(collection_name) q = model_class.all().filter('foo_name !=', self.name) # Fetch, then update. def get_model_class_for_collection(collection_name): q = getattr(self, collection_name) entity = g.get() return entity.__class__ Forgetting about the extra Datastore get() required, the method above could cause problems when it comes to PolyModel entities, because (correct me if I am wrong) when PolyModel entities come back from the Datastore they are instances of the deepest subclass in the entity's inheritance chain, so returning entity.__class__ (in the last line above) will limit the results of the query (with the single inequality filter) to entity's of the original entity's PolyModel subclass. I hope that makes sense. Nick, I would love to get your ideas on this. Also, I'm no Python expert so if I'm overcomplicating things please let me know. Cheers, Nick On 19 February 2010 22:50, Nick Johnson (Google) nick.john...@google.comwrote: Hi Nickolas, There's no public interface for this. Why do you need to do it? -Nick Johnson On Fri, Feb 19, 2010 at 11:28 AM, Nickolas Daskalou n...@daskalou.comwrote: Is there an official way to get the Model class from a Query instance? I had a look through the online docs and couldn't find anything. In the SDK code however, the Model class of a Query instance can be retrieved from the _model_class attribute of the Query instance, eg: q = MyModel.all() model_class = q._model_class # == MyModel I don't really want to do it this way because since this is not documented anywhere, I'm afraid that this implementation may change in the future. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- Nick Johnson, Developer Programs Engineer, App Engine Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number: 368047 -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http
Re: [google-appengine] Model class of a Query instance?
Thanks for your advice Nick. My actual app is a bit more complex than the example I gave. I'll explain more in my response to your comments below. Will this be an all-or-nothing proposition? Eg, if the put of 'foo' changed the foo_name, they'll all need updating, otherwise none of them will? In that case, you'd be better off checking if it's changed, and updating them all (without the inequality filter) if it did change. Yes, indeed it's all-or-nothing. The above will change every single Bar and Baz entity that doesn't match foo's entity name, though, including those that have nothing to do with the foo you modified. Yep, that's true. In my real app though, I don't want to query on foo's name, but instead on foo's metadata signature, which is a hash of a combination of foo's key and properties (or rather, the properties that reverse-referenced entities duplicate, such as foo's name). Depending on how many Bar and Baz entities there are per Foo, you could just drop the inequality and filter them out once they're fetched. I have ReferenceProperty properties all over the place in my model design, so there are many Foo-type Models, some with up to a dozen different reverse-referenced Bar/Baz-type Models, with each of those Foo-Bar/Baz relations potentially having thousands of entities. Given that you're already hard-coding in the list of collections, you could avoid the need for a 'get_model_class_for_collection' method by replacing the loop with: for model_class in (Bar, Baz): In my real app I'm not hard-coding these (due to the maintenance required as the model design evolves), I'm trying to get them dynamically, see this other thread I created: http://groups.google.com/group/google-appengine/browse_thread/thread/1a6e911f3eff79ed However, I may indeed need to hard-code these if I can't find any satisfactory way of getting all the collection_names dynamically. Now more about my real app... I have a mixin class for Models to inherit from, which looks like this: class ModelCommons(object): def get_metadata_signature(self): return hashlib.sha1('Kind:%s|ID:%s|KeyName:%s|Prop:%s' % ( self.kind(), self.key().id(), self.key().name(), repr(self.get_current_metadata(.hexdigest() def get_current_metadata(self): meta = [] for prop_name in self.__class__.meta_property_names: meta.append((prop_name, getattr(self.__class__, prop_name).get_value_for_datastore(self))) return meta def update_collections_metadata(self): current_metadata_signature = self.get_metadata_signature() for collection_name in self.get_collection_names() # In a perfect world model_class = self.get_model_class_from_collection_name(collection_name) # The magic method I was looking for reference_prop_name = self.get_reverse_reference_property_name_from_collection_name(collection_name) # Another magic method that I need metadatasig_prop_name = '%s_metadata_signature' % reference_prop_name while True: # BEGIN TRANSACTION (not shown) entity = model_class.all().filter('%s !=' % metadatasig_prop_name, current_metadata_signature).get() if not entity: break setattr(entity, reference_prop_name, self) entity.update_reference_property_metadata_for_property(reference_prop_name) entity.put() # END TRANSACTION def update_reference_property_metadata_for_property(self, prop_name): # Implementation not shown, but assume this method also # updates the {{prop_name}}_metadata_signature property. def post_put(self): if self.get_metadata_signature() != self._initial_metadata_signature from google.appengine.ext import deferred deferred.defer(self.update_collections_metadata) # Haven't tried to see if this works, but that's the idea # For the ever-so-boring Author - Article example: class Author(db.Model, ModelCommons): name = db.StringProperty() avatar_url = db.StringProperty() permissions = db.StringListProperty() meta_property_names = ('name', 'avatar_url') # Yuck way to set the initial state. Is there a better way? def __init__(self, *args, **kwds): super(self.__class__, self).__init__(*args, **kwds) self._initial_metadata_signature = self.get_metadata_signature() class Article(db.Model, ModelCommons): title = db.StringProperty() content = db.BlobProperty() author = db.ReferenceProperty(Author, collection_name = 'articles') author_metadata_signature = db.StringProperty() author_name = db.StringProperty() author_avatar_url = db.StringProperty() pre_put(): self.update_reference_property_metadata_for_property('author') I'll also have clean-up tasks just in case the deferred task in post_put() isn't successfully added. If you've followed all that code, when this happens: author = Author(key_name = 'BillyJoel123', name='Billy Joel', avatar_url='http://whatever.com/billy.png', permissions = ['editor','admin']) author.put() article =
[google-appengine] Server error? = The application already has the maximum number of versions
I've been trying to upload a minor version of my app (have tried 3 times in the last 5 minutes) and I'm getting this error using the Mac OS X GoogleAppEngineLauncher app: Error 403: --- begin server output --- Too Many Versions (403) The application already has the maximum number of versions. --- end server output --- There's nothing on my Quotas page that indicates I've exceeded or even getting close to any version limits. The last successful upload of my app occurred about 20 hours ago. App id is sportwurks. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
Re: [google-appengine] Server error? = The application already has the maximum number of versions
I do indeed have 10 different major versions already deployed, however I'm trying to upload a revision of an already existing version, not a new version. I just retried this again and I'm still getting the same error. Can someone at Google please take a look at this? Nick On 28 February 2010 03:19, Robert Kluin robert.kl...@gmail.com wrote: There is a limit on the number of deployed instances for each app, I think it is 10. Just delete an old version. Robert On Feb 27, 2010, at 1:50, Nickolas Daskalou n...@daskalou.com wrote: I've been trying to upload a minor version of my app (have tried 3 times in the last 5 minutes) and I'm getting this error using the Mac OS X GoogleAppEngineLauncher app: Error 403: --- begin server output --- Too Many Versions (403) The application already has the maximum number of versions. --- end server output --- There's nothing on my Quotas page that indicates I've exceeded or even getting close to any version limits. The last successful upload of my app occurred about 20 hours ago. App id is sportwurks. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
Re: [google-appengine] Server error? = The application already has the maximum number of versions
Thanks Eli. That's not exactly what's happening to me but I deleted one of my versions anyway (so I now have 9 deployed), and I'm once again able to update an existing version. Nick On 1 March 2010 14:34, Eli Jones eli.jo...@gmail.com wrote: Not sure if this will help.. but the fix below was suggested here: http://code.google.com/p/googleappengine/issues/detail?id=744 Workaround: The first thing you should do is go to your app's Versions page in the admin console (i.e. https://appengine.google.com/deployment?app_id=YOURAPPID https://appengine.google.com/deployment?app_id=%3CYOURAPPID%3E ). When there, if you see 10 different versions listed, then you will need to delete some of them. However, if you see fewer than 10, then you should also see that currently none of them is set to the default version (i.e. all the radio buttons are unselected). What you should then do is select the version you want to serve, and then hit the Make Default button. Once you have done this, your next appcfg deployment should go through just fine. Apologies for not addressing this earlier. I can tell this was an annoying wall to hit. Unfortunately, it's not possible right now to completely make this never happen again, and some small number of apps will continue to see this issue. Further, it may happen more often if the app does a lot of deployments per day and hits the App Config Service Config App Call Count quota limit. On Sun, Feb 28, 2010 at 10:01 PM, Nickolas Daskalou n...@daskalou.comwrote: I do indeed have 10 different major versions already deployed, however I'm trying to upload a revision of an already existing version, not a new version. I just retried this again and I'm still getting the same error. Can someone at Google please take a look at this? Nick On 28 February 2010 03:19, Robert Kluin robert.kl...@gmail.com wrote: There is a limit on the number of deployed instances for each app, I think it is 10. Just delete an old version. Robert On Feb 27, 2010, at 1:50, Nickolas Daskalou n...@daskalou.com wrote: I've been trying to upload a minor version of my app (have tried 3 times in the last 5 minutes) and I'm getting this error using the Mac OS X GoogleAppEngineLauncher app: Error 403: --- begin server output --- Too Many Versions (403) The application already has the maximum number of versions. --- end server output --- There's nothing on my Quotas page that indicates I've exceeded or even getting close to any version limits. The last successful upload of my app occurred about 20 hours ago. App id is sportwurks. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Trouble subclassing PolyModel
Among other methods, I'm trying to catch the put() method of both db.Model and db.polymodel.PolyModel, so that I can set the entity in Memcache (after it's been put into the Datastore). I'm using the same common mixin class for both. The setup looks something like this: from google.appengine.ext.db.polymodel import PolyModel from google.appengine.ext import db class ModelMixin(object): def __init__(self, *args, **kwds): self.do_something_cool() def do_something_cool(self): ... def put(self, *args, **kwds): super(ModelMixin, self).put(*args, **kwds) memcache.set('EntityKey:'+self.key(), db.model_to_protobuf(self)) class MyModel(ModelMixin, db.Model): def __init__(self, *args, **kwds): db.Model.__init__(self, *args, **kwds) ModelMixin.__init__(self, *args, **kwds) class MyPolyModel(ModelMixin, PolyModel): def __init__(self, *args, **kwds): PolyModel.__init__(self, *args, **kwds) ModelMixin.__init__(self, *args, **kwds) Subclassing from MyModel is working fine, but when I try and subclass MyPolyModel, eg: class Animal(MyPolyModel): ... class Cat(Animal): ... I get this error on the dev appserver (I haven't tried it in production): AttributeError: type object 'Animal' has no attribute '__root_class__' Can someone suggest a way to fix this? I'm also worried that, even if I get this fixed, the entity kind of those subclasses of MyPolyModel will be 'MyPolyModel' instead of eg. 'Animal' (because the direct subclass of PolyModel is MyPolyModel and not Animal). I hope there's a way around that as well, and welcome suggestions. Nick -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Re: Trouble subclassing PolyModel
The code in my example doesn't actually cause the AttributeError to be raised. In my real code, my own PolyModel class is named PolyModel and not MyPolyModel (as the example shows). Renaming my custom PolyModel class from PolyModel to something else (like MyPolyModel) made the error go away (again, haven't tried this in production yet). Strange behaviour... I wonder if this is a Python quirk, something wrong with the App Engine library, or maybe I need to go through Python 101 again... On 3 March 2010 02:46, Nickolas Daskalou n...@daskalou.com wrote: Among other methods, I'm trying to catch the put() method of both db.Model and db.polymodel.PolyModel, so that I can set the entity in Memcache (after it's been put into the Datastore). I'm using the same common mixin class for both. The setup looks something like this: from google.appengine.ext.db.polymodel import PolyModel from google.appengine.ext import db class ModelMixin(object): def __init__(self, *args, **kwds): self.do_something_cool() def do_something_cool(self): ... def put(self, *args, **kwds): super(ModelMixin, self).put(*args, **kwds) memcache.set('EntityKey:'+self.key(), db.model_to_protobuf(self)) class MyModel(ModelMixin, db.Model): def __init__(self, *args, **kwds): db.Model.__init__(self, *args, **kwds) ModelMixin.__init__(self, *args, **kwds) class MyPolyModel(ModelMixin, PolyModel): def __init__(self, *args, **kwds): PolyModel.__init__(self, *args, **kwds) ModelMixin.__init__(self, *args, **kwds) Subclassing from MyModel is working fine, but when I try and subclass MyPolyModel, eg: class Animal(MyPolyModel): ... class Cat(Animal): ... I get this error on the dev appserver (I haven't tried it in production): AttributeError: type object 'Animal' has no attribute '__root_class__' Can someone suggest a way to fix this? I'm also worried that, even if I get this fixed, the entity kind of those subclasses of MyPolyModel will be 'MyPolyModel' instead of eg. 'Animal' (because the direct subclass of PolyModel is MyPolyModel and not Animal). I hope there's a way around that as well, and welcome suggestions. Nick -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Subclassing PolyModel
I've been trying to create a special subclass of PolyModel (that does cool stuff like update Memcache after an entity put()) which my polymodel models can inherit from (instead of inheriting from db.polymodel.PolyModel). This has the nasty side effect though of making that special subclass of PolyModel the root class for my polymodel models. Is there a way around this? Eg. Telling db.polymodel.PolyModel to NOT include the first direct subclass in the class hierarchy that is saved to the Datastore? Or writing my own PolyModel by basically copying db.polymodel and changing code where appropriate? Appreciate any help. Nick -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
Re: [google-appengine] Re: Subclassing PolyModel
Thanks for your reply Rafe. Using non-Model mix-ins seems like the way to go. As with many App Engine developers, my Python experience is equivalent to my App Engine experience, so I appreciated the Python lesson ;) Nick On 5 March 2010 08:52, Rafe slobberch...@gmail.com wrote: There is currently no proper way to do re-root a polymodel the way you are describing. However, there may be a solution for your particular problem. I don't know enough about your actual implementation however you might get away with simply doing a non- Model based mix-in. So, write your memcache utility class AS IF it inherits from PolyModel, but don't actually allow it to do so. Like this: class CoolFeature(object): def put(self): ... clear memcache ... super(CoolFeature, self).put() Now define your root class: class MyModel(CoolFeature, polymodel.PolyModel): ... Here comes the Python lesson, so forgive me if you already know all this ;) The key is that you use 'super' correctly and that you have CoolFeature be the first class your model class inherits from. 'super' allows you to traverse your objects functionality correctly according to the python method resolution order. You can see this order by for any class by studying MyModel.__mro__. This indicates the order which calls to super will traverse your class definitions. If you do: class A(object): def p(self): print 'A' class B(object): def p(self): print 'B' super(B, self).p() class C(B, A): def p(self): print 'C' super(C, self).p() ...calling C().p() will print: C B A You should be able to implement whatever functionality you need this way. Let me know if there are issues with doing that. On Mar 3, 7:40 pm, Nickolas Daskalou n...@daskalou.com wrote: I should state that I can set the entity kind that's saved in the Datastore by adding a kind() method on my real models, however the class list property of the saved entities still includes the special PolyModel subclass in it, and I'm not sure if that's a bad thing or not. On Mar 4, 2:16 pm, Nickolas Daskalou n...@daskalou.com wrote: I've been trying to create a special subclass of PolyModel (that does cool stuff like update Memcache after an entity put()) which my polymodel models can inherit from (instead of inheriting from db.polymodel.PolyModel). This has the nasty side effect though of making that special subclass of PolyModel the root class for my polymodel models. Is there a way around this? Eg. Telling db.polymodel.PolyModel to NOT include the first direct subclass in the class hierarchy that is saved to the Datastore? Or writing my own PolyModel by basically copying db.polymodel and changing code where appropriate? Appreciate any help. Nick -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
Re: [google-appengine] Re: Subclassing PolyModel
Thanks PK, I'll check it out now. Nick On 5 March 2010 19:41, PK p...@gae123.com wrote: Hi Nick, I have been using the pattern described by Rafe very successfully in my app. Regarding the problem you are desribing I have written up how I solved the problem here: http://www.gae123.com/articles/tds/model-mixin.html Read the whole page for the details or just scroll to the bottom for the solution that has worked for me. PK http://www.gae123.com On Mar 4, 10:22 pm, Nickolas Daskalou n...@daskalou.com wrote: Using non-Model mix-ins worked a treat. Thanks again Rafe. There is one small problem I'm hoping you can help me with (again). It's not a show-stopper because I can work around it, however I'm hoping you'd know of a nicer way to do this. Note that it's not only specific to PolyModel, but to db.Model as well. The problem is with adding extra db.* properties to these mix-ins (so that all subclasses that use the mix-in get these extra properties stored in the Datastore). Let's say I change the CoolFeature mix-in to this: class CoolFeature(object): * cool_name = db.StringProperty()* def put(self): self.cool_name = 'Cool ' + self.name super(CoolFeature, self).put() class MyModel(CoolFeature,db.Model): name = db.StringProperty() If I then create an instance of MyModel and try put()'ing it to the Datastore: mm = MyModel(name='blah') mm.put() I get this error: Traceback (most recent call last): ... File /Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/ext/db/__init__.py, line 473, in __set__ setattr(model_instance, self._attr_name(), value) File /Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/ext/db/__init__.py, line 588, in _attr_name return '_' + self.name TypeError: cannot concatenate 'str' and 'NoneType' objects This error occurs both on the dev and production servers. Upon further investigation, the error occurs because the name property of the underlying Property superclass of the cool_name property instance is None. So I then changed the bold line above to: cool_name = db.StringProperty(name='cool_name') This got rid of the error being raised, however the cool_name property was not saved to the Datastore (only the name property was). The workaround is to add the property cool_name to each CoolFeaturesubclass. So it's not terribly bad, but if you know of a better way to accomplish what I'm trying to do, I'd love to hear it. Cheers, Nick On 5 March 2010 12:40, Nickolas Daskalou n...@daskalou.com wrote: Thanks for your reply Rafe. Using non-Model mix-ins seems like the way to go. As with many App Engine developers, my Python experience is equivalent to my App Engine experience, so I appreciated the Python lesson ;) Nick On 5 March 2010 08:52, Rafe slobberch...@gmail.com wrote: There is currently no proper way to do re-root a polymodel the way you are describing. However, there may be a solution for your particular problem. I don't know enough about your actual implementation however you might get away with simply doing a non- Model based mix-in. So, write your memcache utility class AS IF it inherits from PolyModel, but don't actually allow it to do so. Like this: class CoolFeature(object): def put(self): ... clear memcache ... super(CoolFeature, self).put() Now define your root class: class MyModel(CoolFeature, polymodel.PolyModel): ... Here comes the Python lesson, so forgive me if you already know all this ;) The key is that you use 'super' correctly and that you have CoolFeature be the first class your model class inherits from. 'super' allows you to traverse your objects functionality correctly according to the python method resolution order. You can see this order by for any class by studying MyModel.__mro__. This indicates the order which calls to super will traverse your class definitions. If you do: class A(object): def p(self): print 'A' class B(object): def p(self): print 'B' super(B, self).p() class C(B, A): def p(self): print 'C' super(C, self).p() ...calling C().p() will print: C B A You should be able to implement whatever functionality you need this way. Let me know if there are issues with doing that. On Mar 3, 7:40 pm, Nickolas Daskalou n...@daskalou.com wrote: I should state that I can set the entity kind that's saved in the Datastore by adding a kind() method on my real models, however the class list property of the saved entities still includes
Re: [google-appengine] Re: Subclassing PolyModel
c...@your solution, PK! Since db.PropertiedClass is not documented in the official docs, I'm assuming there's a chance that its implemented could change in future releases, and possibly break your code yeah? Can someone from Google please comment on whether db.PropertiedClass is concrete enough to be able to use it in such a manner as described in PK's article? Nick On 5 March 2010 20:18, Nickolas Daskalou n...@daskalou.com wrote: Thanks PK, I'll check it out now. Nick On 5 March 2010 19:41, PK p...@gae123.com wrote: Hi Nick, I have been using the pattern described by Rafe very successfully in my app. Regarding the problem you are desribing I have written up how I solved the problem here: http://www.gae123.com/articles/tds/model-mixin.html Read the whole page for the details or just scroll to the bottom for the solution that has worked for me. PK http://www.gae123.com On Mar 4, 10:22 pm, Nickolas Daskalou n...@daskalou.com wrote: Using non-Model mix-ins worked a treat. Thanks again Rafe. There is one small problem I'm hoping you can help me with (again). It's not a show-stopper because I can work around it, however I'm hoping you'd know of a nicer way to do this. Note that it's not only specific to PolyModel, but to db.Model as well. The problem is with adding extra db.* properties to these mix-ins (so that all subclasses that use the mix-in get these extra properties stored in the Datastore). Let's say I change the CoolFeature mix-in to this: class CoolFeature(object): * cool_name = db.StringProperty()* def put(self): self.cool_name = 'Cool ' + self.name super(CoolFeature, self).put() class MyModel(CoolFeature,db.Model): name = db.StringProperty() If I then create an instance of MyModel and try put()'ing it to the Datastore: mm = MyModel(name='blah') mm.put() I get this error: Traceback (most recent call last): ... File /Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/ext/db/__init__.py, line 473, in __set__ setattr(model_instance, self._attr_name(), value) File /Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/ext/db/__init__.py, line 588, in _attr_name return '_' + self.name TypeError: cannot concatenate 'str' and 'NoneType' objects This error occurs both on the dev and production servers. Upon further investigation, the error occurs because the name property of the underlying Property superclass of the cool_name property instance is None. So I then changed the bold line above to: cool_name = db.StringProperty(name='cool_name') This got rid of the error being raised, however the cool_name property was not saved to the Datastore (only the name property was). The workaround is to add the property cool_name to each CoolFeaturesubclass. So it's not terribly bad, but if you know of a better way to accomplish what I'm trying to do, I'd love to hear it. Cheers, Nick On 5 March 2010 12:40, Nickolas Daskalou n...@daskalou.com wrote: Thanks for your reply Rafe. Using non-Model mix-ins seems like the way to go. As with many App Engine developers, my Python experience is equivalent to my App Engine experience, so I appreciated the Python lesson ;) Nick On 5 March 2010 08:52, Rafe slobberch...@gmail.com wrote: There is currently no proper way to do re-root a polymodel the way you are describing. However, there may be a solution for your particular problem. I don't know enough about your actual implementation however you might get away with simply doing a non- Model based mix-in. So, write your memcache utility class AS IF it inherits from PolyModel, but don't actually allow it to do so. Like this: class CoolFeature(object): def put(self): ... clear memcache ... super(CoolFeature, self).put() Now define your root class: class MyModel(CoolFeature, polymodel.PolyModel): ... Here comes the Python lesson, so forgive me if you already know all this ;) The key is that you use 'super' correctly and that you have CoolFeature be the first class your model class inherits from. 'super' allows you to traverse your objects functionality correctly according to the python method resolution order. You can see this order by for any class by studying MyModel.__mro__. This indicates the order which calls to super will traverse your class definitions. If you do: class A(object): def p(self): print 'A' class B(object): def p(self): print 'B' super(B, self).p() class C(B, A): def p(self): print 'C' super(C, self).p() ...calling C().p
[google-appengine] Is PropertiedClass safe to use?
This is a question for Google employees. Is it safe to use db.PropertiedClass as discussed towards the end of this thread: http://groups.google.com/group/google-appengine/browse_thread/thread/5464457c5a9d5276#a8c15c616f3d1636 ? -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
Re: [google-appengine] Composing Images with GAE + PIL
Is this on the dev server? There's a known issue with transparency on the dev server. Rodrigo's comment in the following thread for how to patch it: http://groups.google.com/group/google-appengine/browse_thread/thread/8c9aef5b96ead12f Nick On 9 March 2010 09:27, Genkido eeca...@gmail.com wrote: I'm trying to make a composite image using the Images module. The idea is that an image is pasted over another, with full opacity, but based on the alpha channel; Composite image is to have the sum of both alphas. However, when I try the following: im1 = images.Image(urlfetch.Fetch(url1).content) im2 = images.Image(urlfetch.Fetch(url2).content) im = images.composite( [(im1, 0, 0, 1.0, images.TOP_LEFT), (im2, 0, 0, 1.0, images.TOP_LEFT)], 201, 201 ) The result is im2. According to PIL's composite, this is to be expected, however, I'm looking for something similar to paste. Is there any way to do what I'm looking for? Thanks! -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Re: Is PropertiedClass safe to use?
Yeah, I've seen posts from 2008 that were using PropertiedClass in a way that is still valid today. Thanks Nick. On Mar 8, 11:25 pm, Nick Johnson (Google) nick.john...@google.com wrote: Hi Nickolas, PropertiedClass is an implementation detail, and as such could change in future. I wouldn't consider such a change very likely, however. -Nick Johnson On Mon, Mar 8, 2010 at 10:41 AM, Nickolas Daskalou n...@daskalou.comwrote: This is a question for Google employees. Is it safe to use db.PropertiedClass as discussed towards the end of this thread: http://groups.google.com/group/google-appengine/browse_thread/thread/... ? -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- Nick Johnson, Developer Programs Engineer, App Engine Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number: 368047 -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
Re: [google-appengine] Datastore contention on indexes?
Hi Nick, Thanks for the reply. I've got a few question below that I'm hoping you can answer. On 10 March 2010 22:10, Nick Johnson (Google) nick.john...@google.comwrote: Hi Nickolas, On Wed, Mar 10, 2010 at 12:28 AM, Nickolas Daskalou n...@daskalou.comwrote: I remember reading a thread not long ago ( http://groups.google.com/group/google-appengine/browse_thread/thread/f69fe7dc4a9bc2ec) about how put()'ing entities with near-sequential key names or IDs could result in Datastore contention, since those entities would most likely be saved on the same Bigtable tablet. One solution in that thread to avoid Datastore contention mentioned setting the key names to a hash (thus achieving non-sequential key names). My question is does this sequential-causes-contention rule also apply to the indexes updated when the entities are put()? I'm assuming the answer is Yes. In theory, yes. However, it would take a much higher write rate than for entity contention before it becomes an issue - so high that you likely do not have to worry about it. Is it higher than the 100s of qps mentioned in that other thread? Is there a rough figure you can give? I've personally observed instances of write contention with sequential key IDs, where a datetime was also being indexed, and contention with entity writes was encountered long before any issues with the index would have become a problem. What was your qps rate before you encountered contention issues? Have you tried the same thing with non-sequential key IDs? If so, what was the qps rate you were able to achieve without contention issues on the datetime index? Nick -Nick Johnson An example of what I mean. Let's say I'm taking snapshots of integer values at particular points in time (say, every 5 minutes). So my model looks like this: class Snapshot(db.Model): datetime = db.DateTimeProperty() value = db.IntegerProperty() def new_snapshot(d,v): return Snapshot(datetime=d, value=v, key_name=sha1('%s-%s-%s %s:%s,%s' % (d.year,d.month,d.day,d.hour,d.min,v)) If I then create 1000 entities which all have the same datetime value but all have different value values, will I still encounter Datastore contention, due to the datetime index being updated with 1000 values that are identical, and hence (if my understanding of indexes is correct) will most likely be written onto the same tablet? Nick -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- Nick Johnson, Developer Programs Engineer, App Engine Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number: 368047 -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
Re: [google-appengine] Datastore contention on indexes?
Great, thanks again Nick! On 10 March 2010 23:47, Nick Johnson (Google) nick.john...@google.comwrote: On Wed, Mar 10, 2010 at 12:35 PM, Nickolas Daskalou n...@daskalou.comwrote: Hi Nick, Thanks for the reply. I've got a few question below that I'm hoping you can answer. On 10 March 2010 22:10, Nick Johnson (Google) nick.john...@google.comwrote: Hi Nickolas, On Wed, Mar 10, 2010 at 12:28 AM, Nickolas Daskalou n...@daskalou.comwrote: I remember reading a thread not long ago ( http://groups.google.com/group/google-appengine/browse_thread/thread/f69fe7dc4a9bc2ec) about how put()'ing entities with near-sequential key names or IDs could result in Datastore contention, since those entities would most likely be saved on the same Bigtable tablet. One solution in that thread to avoid Datastore contention mentioned setting the key names to a hash (thus achieving non-sequential key names). My question is does this sequential-causes-contention rule also apply to the indexes updated when the entities are put()? I'm assuming the answer is Yes. In theory, yes. However, it would take a much higher write rate than for entity contention before it becomes an issue - so high that you likely do not have to worry about it. Is it higher than the 100s of qps mentioned in that other thread? Yes. Is there a rough figure you can give? Since it's never been encountered in a live app, it's hard to say for certain - although that should tell you something about the likelihood of it happening at all. :) I've personally observed instances of write contention with sequential key IDs, where a datetime was also being indexed, and contention with entity writes was encountered long before any issues with the index would have become a problem. What was your qps rate before you encountered contention issues? Have you tried the same thing with non-sequential key IDs? If so, what was the qps rate you were able to achieve without contention issues on the datetime index? The event in question is actually what prompted the addition of that part of the article you're referring to. The user subsequently switched to using well-distributed key names, and the issues went away. I don't know what the exact QPS level was for their tests - high hundreds, at a minimum. -Nick Johnson Nick -Nick Johnson An example of what I mean. Let's say I'm taking snapshots of integer values at particular points in time (say, every 5 minutes). So my model looks like this: class Snapshot(db.Model): datetime = db.DateTimeProperty() value = db.IntegerProperty() def new_snapshot(d,v): return Snapshot(datetime=d, value=v, key_name=sha1('%s-%s-%s %s:%s,%s' % (d.year,d.month,d.day,d.hour,d.min,v)) If I then create 1000 entities which all have the same datetime value but all have different value values, will I still encounter Datastore contention, due to the datetime index being updated with 1000 values that are identical, and hence (if my understanding of indexes is correct) will most likely be written onto the same tablet? Nick -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- Nick Johnson, Developer Programs Engineer, App Engine Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number: 368047 -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- Nick Johnson, Developer Programs Engineer, App Engine Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number: 368047 -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com . For more
Re: [google-appengine] Re: Subclassing PolyModel
Rafe, do you think we'll be seeing a db.ModelMixin anytime in the near future? On 11 March 2010 10:01, Rafe slobberch...@gmail.com wrote: The built-in property classes are not likely to change in future releases. I've already written an article about extending properties and am loath to break peoples existing applications (even though it sometimes happens by mistake - and we then revert those changes): http://code.google.com/appengine/articles/extending_models.html Nice analysis PK. As described, the main problem with your first approach was that properties are not initialized unless they use the Propertied base class. The problem with the Propertied base class is that it is too tied to the actual Datastore implementation. Ideally, there would be a less specific meta-class that simply does property initialization which can be used by other class that do not inherit from models but want to be mixins. This would be ideal: class CoolFeature(db.ModelMixin): my_prop = db.StringProperty() class IUseCoolFeature(CoolFeature, db.Model): ... Or what if you wanted to use it with an Expando? class IUseCoolFeature(CoolFeature, db.Expando): ... Learned quite a bit since releasing db.py. Expando should have been written as a mixin in the first place. On Mar 5, 1:31 am, Nickolas Daskalou n...@daskalou.com wrote: c...@your solution, PK! Since db.PropertiedClass is not documented in the official docs, I'm assuming there's a chance that its implemented could change in future releases, and possibly break your code yeah? Can someone from Google please comment on whether db.PropertiedClass is concrete enough to be able to use it in such a manner as described in PK's article? Nick On 5 March 2010 20:18, Nickolas Daskalou n...@daskalou.com wrote: Thanks PK, I'll check it out now. Nick On 5 March 2010 19:41, PK p...@gae123.com wrote: Hi Nick, I have been using the pattern described by Rafe very successfully in my app. Regarding the problem you are desribing I have written up how I solved the problem here: http://www.gae123.com/articles/tds/model-mixin.html Read the whole page for the details or just scroll to the bottom for the solution that has worked for me. PK http://www.gae123.com On Mar 4, 10:22 pm, Nickolas Daskalou n...@daskalou.com wrote: Using non-Model mix-ins worked a treat. Thanks again Rafe. There is one small problem I'm hoping you can help me with (again). It's not a show-stopper because I can work around it, however I'm hoping you'd know of a nicer way to do this. Note that it's not only specific to PolyModel, but to db.Model as well. The problem is with adding extra db.* properties to these mix-ins (so that all subclasses that use the mix-in get these extra properties stored in the Datastore). Let's say I change the CoolFeature mix-in to this: class CoolFeature(object): * cool_name = db.StringProperty()* def put(self): self.cool_name = 'Cool ' + self.name super(CoolFeature, self).put() class MyModel(CoolFeature,db.Model): name = db.StringProperty() If I then create an instance of MyModel and try put()'ing it to the Datastore: mm = MyModel(name='blah') mm.put() I get this error: Traceback (most recent call last): ... File /Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngi ne-default.bundle/Contents/Resources/google_appengine/google/appengine/ext /db/__init__.py, line 473, in __set__ setattr(model_instance, self._attr_name(), value) File /Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngi ne-default.bundle/Contents/Resources/google_appengine/google/appengine/ext /db/__init__.py, line 588, in _attr_name return '_' + self.name TypeError: cannot concatenate 'str' and 'NoneType' objects This error occurs both on the dev and production servers. Upon further investigation, the error occurs because the name property of the underlying Property superclass of the cool_name property instance is None. So I then changed the bold line above to: cool_name = db.StringProperty(name='cool_name') This got rid of the error being raised, however the cool_name property was not saved to the Datastore (only the name property was). The workaround is to add the property cool_name to each CoolFeaturesubclass. So it's not terribly bad, but if you know of a better way to accomplish what I'm trying to do, I'd love to hear it. Cheers, Nick On 5 March 2010 12:40, Nickolas Daskalou n...@daskalou.com wrote: Thanks for your reply Rafe. Using non-Model mix-ins seems like the way to go. As with many App Engine developers, my Python experience is equivalent
Re: [google-appengine] Pre-release 1.3.2 SDKs available
From the release notes: New feature in the datastore to specify whether to use strong or eventually consistent reads (the default is strong) Didn't think this would be out for quite a while. Very, very cool. :) On 17 March 2010 14:31, Jason (Google) apija...@google.com wrote: Hi Everyone. Just a quick note that we just uploaded pre-release 1.3.2 SDKs for Python and Java to our Google Code project page: http://code.google.com/p/googleappengine/downloads/list Both pre-release SDKs include RELEASE_NOTE files that indicate what's new, but the App Engine back-ends have not yet been updated, so please don't try to use these new features in production just yet. Please test your existing applications locally using the new SDK and report any bugs as soon as possible. Our next general release will likely follow in the next couple of weeks barring any unforeseen issues. Thanks, - Jason -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
Re: [google-appengine] Re: Pre-release 1.3.2 SDKs available
According to the post mortem from the last outage, the eventually consistent option will have higher latency (=bad) than the strongly consistent option, in exchange for higher availability during an unexpected failure (=good). From the post mortem: In response to this outage, we have also decided to make a major infrastructural change in App Engine. Currently, App Engine provides a one-size-fits-all Datastore, that provides low write latency combined with strong consistency, in exchange for lower availability in situations of unexpected failure in one of our serving datacenters. In response to this outage, and feedback from our users, we have begun work on providing two different Datastore configurations: - The current option of low-latency, strong consistency, and lower availability during unexpected failures (like a power outage) - A new option for higher availability using synchronous replication for reads and writes, at the cost of significantly higher latency Can someone from Google please answer these questions: With the eventually consistent option, will both Datastore reads and writes have higher latency, or just writes? Does the higher availability of the eventually consistent option only apply to Datastore reads (ie. writes will have the same availability as with the strongly consistent option during outages)? Nick 2010/3/18 Alkis Evlogimenos ('Αλκης Ευλογημένος) evlogime...@gmail.com Strong means all replicas will have the updates after a write returns and all reads after the write will see those updates. Consistent (or eventually consistent) means that all replicas will eventually have the updates after a write and some reads after the write will see stale/previous versions of the data. Basically it boils down to trading correctness (possibility of stale reads) for better performance. - alkis On Wed, Mar 17, 2010 at 10:48 PM, prgmratlarge yossiele...@gmail.comwrote: What are strong vs consistent reads? On Mar 16, 11:31 pm, Jason (Google) apija...@google.com wrote: Hi Everyone. Just a quick note that we just uploaded pre-release 1.3.2 SDKs for Python and Java to our Google Code project page: http://code.google.com/p/googleappengine/downloads/list Both pre-release SDKs include RELEASE_NOTE files that indicate what's new, but the App Engine back-ends have not yet been updated, so please don't try to use these new features in production just yet. Please test your existing applications locally using the new SDK and report any bugs as soon as possible. Our next general release will likely follow in the next couple of weeks barring any unforeseen issues. Thanks, - Jason -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
Re: [google-appengine] Re: email sent by GAE would be regarded as spam for some email services
Hi Eric, Have you looked at Amazon's Simple Email Service (SES)? http://aws.amazon.com/ses/ Pretty much the same cost as sending email using GAE, except with SES you only get 2,000 free emails if you're sending email from an EC2 instance. I haven't used it myself but apparently they scan outgoing mail to make sure it meets ISP standards. This leads me to believe emails sent via SES would be less likely to be automatically marked as spam than on GAE, since SES's spam-sending-reputation would be lower than GAE's, due to their pre-filtering and rate-limiting. Nick On 21 March 2011 13:51, Eric Ka Ka Ng ngk...@gmail.com wrote: Hi Ernesto, thx for your suggestion! yes, i think it shall work. but in general if we can't ask all our users to add our email to their contact list (or they are not willing to do so), how can emails sent by us prevent to be regarded as spam? all our subject, body etc. are nothing spam-liked, and seems it's the problem of the email server that actually sends the email. anyone share similar case, or has other solution? regards, eric On 19 March 2011 00:12, Ernesto Karim Oltra ernestoka...@gmail.comwrote: Ask the user to add the e-mail from address of your e-mails to their contacts list, so your e-mails would never been sent to spam again (for that users, at least). It's a bit hacky, but can do a great work meanwhile you find another solution. On 18 mar, 07:52, Eric Ka Ka Ng ngk...@gmail.com wrote: we use mail.send_mail() to send some important messages to our users through an app hosted on GAE, in which the 'from' has been set to one of a registered admin for the app. it works quite well for most users, except for some email service provider (e.g. '...@yahoo.com.hk'), they would always automatically treat these emails as spam and put them into spam box of the user's email account (if the user has enabled the spam filtering feature, which is by default ON) . in this case, many of our users do not aware for these important messages (they would seldom look into mails in their spambox) we have tried using different from, subject, body and the results are the same. we suspect that it is the email server does matter, and maybe before there were some other apps hosted on GAE sending spams to like '@ yahoo.com.hk', so '...@yahoo.com.hk' would regard all emails sent from this email server in GAE as spam. do anyone share similar experiences? or there should be other causes? any ideas we can solve this problem? (successfully deliver the email to our users using those email service without being regarded as spam) thx in advanced! - eric -- You 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] Where did Google buy 4.8GHz CPUs?
They're not 4.8GHz. It's more like 2 x 2.4GHz which can only be utilised (currently) by using the Java runtime of GAE, as stated by Greg Darke here: https://groups.google.com/d/msg/google-appengine/z-A6PcplG7M/O-Ke_SVMXoMJ Nick On 16 May 2011 02:29, pdknsk pdk...@googlemail.com wrote: Or is this just against some sort of Pentium = 100 reference value? -- You 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] Appengine Drawing Contest
Lol, that is awesome! On 16/05/2011, at 9:37 PM, Kaan Soral kaanso...@gmail.com wrote: Couldn't resist -- You 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. draw.png -- You 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] Poor performance since the past 2-3 days
Sarang, are you doing any URL fetches, or some other API call that could be taking a long time (but not necessarily consuming CPU)? If not, then given the numbers you've posted (ie. 100's of seconds latency with 1 CPU second consumed), it does look like there could be something wrong with the GAE production servers. Nick On 24 May 2011 06:29, Brandon Wirtz drak...@digerat.com wrote: No. It’s the You aren’t getting any traffic so we aren’t sitting around with empty services to wait for you, feature. And the variation of that feature is, the Pay for us to sit around and wait for you and we will always have an instance waiting for you. Also remember that an instance in the cloud is 1.2 ghz single “Core” if you are running a process on your local machine you could be 10x that speed. *From:* google-appengine@googlegroups.com [mailto: google-appengine@googlegroups.com] *On Behalf Of *Sarang Lakare *Sent:* Monday, May 23, 2011 1:18 PM *To:* google-appengine@googlegroups.com *Subject:* Re: [google-appengine] Poor performance since the past 2-3 days Ok, but I still don't understand why it should take 100 - 500 seconds for the load request to complete! Isn't that a bug? Sarang On Tue, May 24, 2011 at 1:33 AM, Brandon Wirtz drak...@digerat.com wrote: Pay for always on, it will go away. *From:* google-appengine@googlegroups.com [mailto: google-appengine@googlegroups.com] *On Behalf Of *Sarang *Sent:* Monday, May 23, 2011 12:52 PM *To:* google-appengine@googlegroups.com *Subject:* [google-appengine] Poor performance since the past 2-3 days I have a python/django app that works blazing fast on the dev_appserver locally, but is taking painfully long to load on GAE since the last 2-3 days. Can anyone please let me know how to resolve it? Here are the issues: 1. I routinely get 1.2011-05-23 12:17:06.505 / 200 373876ms 793cpu_ms 15kb AppEngine-Google; (+http://code.google.com/appengine) 0.1.0.1 - - [23/May/2011:12:17:06 -0700] GET / HTTP/1.1 200 15939 - AppEngine-Google; ... 2.I2011-05-23 12:17:06.505 This request caused a new process to be started for your application, and thus caused your application code to be loaded for the first time. This request may thus take longer and use more CPU than a typical request for your application. See more within the half hour: 2011-05-23 12:18:09.581 / 200 3062ms 653cpu_ms 15kb AppEngine-Google; (+ http://code.google.com/appengine) 2011-05-23 12:17:06.505 / 200 373876ms 793cpu_ms 15kb AppEngine-Google; (+ http://code.google.com/appengine) 2011-05-23 12:12:43.657 / 500 167275ms 70cpu_ms 1kb Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.65 Safari/534.24,gzip(gfe),gzip(gfe),gzip(gfe) 2011-05-23 11:43:12.087 / 200 503348ms 746cpu_ms 15kb AppEngine-Google; (+ http://code.google.com/appengine) all these for my landing page which loads in a few milliseconds on the local server. I have taken all the precautions documented: cron job, main() in python code, etc. I have the keep_alive cron job running every 1 minute. However, I have observed that many times it does not start every minute and that leads to high load times. Example: 2011-05-23 12:07:49.777 / 200 2999ms 23cpu_ms 15kb AppEngine-Google; (+ http://code.google.com/appengine) 2011-05-23 12:06:46.769 / 200 13ms 0cpu_ms 15kb AppEngine-Google; (+ http://code.google.com/appengine) 2011-05-23 12:05:46.749 / 200 11ms 23cpu_ms 15kb AppEngine-Google; (+ http://code.google.com/appengine) You can observe that the when the spacing between cron jobs is 1minute, the load times suddenly increase. My 2 key questions: 1. Any way for me to profile and find out where the app engine gets stuck when I get those enormously large load times? 2. Any way to ensure cron is fired within a minute? Appreciate any help. Regards, Sarang -- You 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. -- --- Sarang Lakare, Ph.D. myContactID: **2010-1399-1401* http://mycid.in/add/201013991401 -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to
Re: [google-appengine] Re: FAQ for out of preview pricing changes
Hi Greg, Yet another 2nd 'next week' ending has come and gone (for those playing at home, that makes 4 weeks). The application we had been working on has been halted in light of the new pricing announcement, and we have been waiting for some good news for a while now. Is there any update you can give us? I feel your initial announcement was made a little prematurely, and by greedy corporates with dollar signs in their eyes, who are not at all in touch with the App Engine community. If they had been, they would have known that a major selling point of App Engine was its pay for what you use pricing model. As has been mentioned earlier, the new proposed prices are almost absurd when compared with other cloud computing providers. Even if App Engine finally gets full multithreading support, an App Engine instance will still cost over 10x that of an equivalent, less handicapped instance on Amazon EC2. Given the old (current?) pricing scheme, I think the logical thing would have been to start charging users for RAM consumption (which has already been mentioned in other threads). A pay for what you use hosting service can indeed work, just take a look at NearlyFreeSpeech.net. Due to the overhead of running a PaaS as opposed to an IaaS, App Engine obviously cannot be as cheap as EC2, but a 10x price difference is definitely not a true reflection of this overhead. In my opinion, doubling the EC2 price to remove server administration headaches from developers would be reasonable, but beyond that it may not make sense for a developer to pay such a high premium when they can administer an EC2 stack themselves with less restrictions than App Engine, and save a considerable amount of money in the process. Sticking to your guns with this new pricing scheme could be the beginning of the end for App Engine. A company wishing to build the next big app can easily play with the numbers and realise that if they get decent user numbers in the future, the costs of App Engine would be astronomical compared with other cloud computing providers. With more PaaS providers coming into the market, and Google's reputation of being extremely price competitive, the new pricing has definitely been a big shock for most of us. On the other end of the scale, developers looking for a free ride to try out their hobby app are given extremely generous quotas, both with the old and new pricing models. If the need to support these developers has caused the rest of App Engine to become expensive, then I recommend substantially reducing the free quotas down to almost nothing (as a gesture of goodwill, old apps should probably keep their old free quotas). App Engine has been around long enough to have gained good exposure, and the free quotas have played a part in that, but now that the word is out it may be time to become more realistic with the amount of money lost to free riding apps. On a personal note (and as someone else mentioned in this group), I am both disappointed and embarrassed that I not only praised App Engine to other developers, managers and stakeholders when it was an unproven technology, but also that I have spent a considerable amount of time learning the system and new design patterns, along with a substantial amount of time developing on it. If a large change is not made to the new proposed pricing, I daresay the only developers and companies you will see using App Engine will be those that have already committed a large amount of resources on their project, and are too far in to be able to port across to a new system. All it then takes to pull the rug out from under App Engine's feet is someone building a commercial-grade, drop-in replacement for the App Engine stack, and charging a lot less for it. Nick On 6 June 2011 10:58, Gregory D'alesandre gr...@google.com wrote: Sorry it has taken so long, but we are still working on clarifying some of these areas internally, I will send an update soon, thanks for your patience... Greg On Thu, Jun 2, 2011 at 5:29 PM, Vanni Totaro vanni.tot...@gmail.comwrote: Hi Greg, 2nd next week ending :) Any update for us? Regards, Vanni -- You received this message because you are subscribed to the Google Groups Google App Engine group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine/-/alFhQ1RKWE1NWWtK. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at
Re: [google-appengine] Re: SMSLib With Google App Engine
You could use a Pull Queue instead of an email sending/polling system: http://code.google.com/appengine/docs/python/taskqueue/overview-pull.html Nick On 13 July 2011 01:13, Rohit Bhat smashingro...@gmail.com wrote: I'm basically doing this for a project, but I can make use of a dedicated server if need be. The email method is indeed nice and pretty much solves the problem of the GSM module being on a different server. I'll just consult with my other team mates and decide the best option. Thanks for the replies everyone -- You received this message because you are subscribed to the Google Groups Google App Engine group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine/-/XqjsSwab-pUJ. 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.