[google-appengine] YAPT - Yet Another Paging Topic
I tried a sledgehammer approach to a paging issue I'm having (fetch (1000) page within it) and as expected, it's too heavy of an approach and I'm getting datastore timeouts. So, before I dive too deeply into approaching the situation I have, I thought I'd see if anyone else has run into this and came up with a solution they'd like to share. The requirements I have are: - Must be able to page through entities based on a numerical score field that is not consecutive, though can be made unique if I convert it to a float. - Previous, Next, and ?page=# (ie: ?page=5) must all be handled. The situation is that I'm working on a site that's similar to Digg in functionality. Stories are given a score by which they are ordered for presentation. This score can change through user interaction. Now, I have already ready and figured out a solution for next/previous results = fetch(11) ?nextstart=results[10].scoreprevstart=results[0].score This doesn't give me the ability to link to specific pages. As scores are changing and new entities can be created a rapid rate (bursts once an hour of 50+ entities) trying to index and keep track on submission/ score change would also lead to datastore timeouts. Anyone have any ideas? I'm beginning to think I just can not meet the page number requirement using BigTable. --~--~-~--~~~---~--~~ You 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Memcache, get_stats() does not work anymore
I'm using that on the gaeutilities session demo, and it is working there http://gaeutilities.appspot.com/session On Dec 9, 8:18 am, Sylvain [EMAIL PROTECTED] wrote: Hi, I've many objects memcached. I can add or get them from memcache. But if I try : memcache.get_stats(), it always returns None. I've tried with the shell.appspot.com, and it works but with my app (app_id : hordes), it doesn't work (always None) Few days ago, it was working. Any idea ? Thank you Regards --~--~-~--~~~---~--~~ You 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Working with a proxy for data storage and URL fetch
It shoudn't be a problem, replication will just take longer. The replication is of course broken down into many small requests, in order to avoid AppEngine request timeouts and running over high-CPU quota. As far as I know, currently there isn't really any faster way to load data into AppEngine datastore. Any ways, It won't support for storing huge amount of data in the datastore right? --~--~-~--~~~---~--~~ You 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Working with a proxy for data storage and URL fetch
Have you checked out this http://code.google.com/p/approcket/ It allows you to setup replication from MySQL to AppEngine - I guess that's what you are trying to achieve. --~--~-~--~~~---~--~~ You 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Tips on Optimizing Writes?
PS All my datastore operations are queries (no puts). And there are about 1500 records in all. On Dec 2, 5:03 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I have been playing with appengine for a couple of weeks and it is a blast! Thanks so much. It is also nice to see that people have already asked the exact question on one's mind. I have a situation identical to what Waldemar Kornewald descibes. What I cannot fathom from the responses (I apologize in advance if this is obvious to everyone else) in this thread is whether and when theseCPU-intensive datastore warnings are a problem to be concerned about if the totalCPUquota is not exceeded. Best Regards --RG On Nov 12, 12:57 am, Jeff S [EMAIL PROTECTED] wrote: Apologies for the late response Josh. To clarify, when looking at the logs, the coloredwarningmessage with the exclamation-mark icon on the collapsed log entry is based on both the runtime and datastoreCPU combined. ACPUmessage within the expanded log entry measures the runtimeCPUonly. To reuse Waldemar's screenshot, the circledwarningmessage is the combined datastore and runtimeCPU: http://freenet-homepage.de/wkornewald/logs-expanded.jpg Happy coding, Jeff On Oct 29, 6:46 pm, Josh Heitzman [EMAIL PROTECTED] wrote: Jeffyou said: TheCPUwarning in the log is based on runtimeCPU, while the displayedCPUwarning in the log is based on runtime and datastoreCPU. but you wrote in the log is based on both times. I'd assume one of those is type, so could you clarify which if the mcycle consumption value shown in the per request logs the runtime mcycles or the runtime and datastore mcycles? If the mcycle value shown in the per request logs is only the runtime mcycles then issue 786 is not a duplicate of 814 as the values listed in 786 were taken from the per request logs. Thanks, Josh Heitzman On Oct 29, 11:27 am,JeffS [EMAIL PROTECTED] wrote: Hi Waldemar, On Oct 28, 3:22 pm, Waldemar Kornewald [EMAIL PROTECTED] wrote: HiJeff, On 28 Okt., 21:11,JeffS [EMAIL PROTECTED] wrote: Our queries and indices are rather simple. I should clarify: The particular problem I'm talking about is a view that currently has a response time of about 360ms and almost all of the time (280ms) is spent on datastore put()/fetch()/get(). IOW, runtimeCPUusage is low. If you only read data then 360ms would probably consume less than 1500mcycles, but since this view primarily writes to the datastore it consumes more than 10,000mcycles! That's really bothering me because I already get yellow warnings for views that consume more than 1000mcycles and here I have red warnings. How am I supposed to implement a simple write operation if it eats mcycles so quickly? Can I just ignore thewarningsince only runtimecpucounts and we primarily consume datastorecpuin this case? From your description, it sounds like the datastoreCPUusage need not concern you. If theCPUUsage listed on the admin console is at an acceptable level and the logs do not contain large amounts ofhighCPU request warnings, then your app should be okay. Well, that's the problem. The dashboard shows awarningsign (!) and veryhighAvgCPU usage for that URL, but the logs don't mention anything at all for that URL. So, which is more correct? The dashboard or the logs? :) The two are currently measuring different things. TheCPUwarning in the log is based on runtimeCPU, while the displayedCPUwarning in the log is based on runtime and datastoreCPU. Thank you, Jeff Normally, if I consume too muchCPUI get an explicitwarning *message* in the logs: 10-25 06:48AM 43.525 / 200 802ms 2754mcycles ! 3kb [...snip...] This request used ahighamount ofCPU, and was roughly 2.6 times over the average requestCPUlimit.HighCPUrequests have a small quota, and if you exceed this quota, your app will be temporarily disabled. As I said, thatwarningmessage doesn't appear. But if I print something to the logs I can see in the header of the log entry that the request consumes a huge amount ofCPU(e.g., 15000mcycles !, please note the !warning*sign*). Why do I *not* get awarning *message* although I can provoke awarning*sign* if (and only if) I print something to the logs? Also, why does theCPUquota usage go up and down so quickly? A few minutes ago I had 40gcycles used and after I visited thathigh-CPUURL four times it went up to 85gcycles and a few minutes later it went back to 0. I thought this was a *24h* moving window? Don't get me wrong. I don't mind quota usage going back to zero every few minutes (or seconds would be fine, too). :) Thanks! Bye, Waldemar Kornewald
[google-appengine] Re: Tips on Optimizing Writes?
I have been playing with appengine for a couple of weeks and it is a blast! Thanks so much. It is also nice to see that people have already asked the exact question on one's mind. I have a situation identical to what Waldemar Kornewald descibes. What I cannot fathom from the responses (I apologize in advance if this is obvious to everyone else) in this thread is whether and when these CPU-intensive datastore warnings are a problem to be concerned about if the total CPU quota is not exceeded. Best Regards --RG On Nov 12, 12:57 am, Jeff S [EMAIL PROTECTED] wrote: Apologies for the late response Josh. To clarify, when looking at the logs, the coloredwarningmessage with the exclamation-mark icon on the collapsed log entry is based on both the runtime and datastoreCPU combined. ACPUmessage within the expanded log entry measures the runtimeCPUonly. To reuse Waldemar's screenshot, the circledwarningmessage is the combined datastore and runtimeCPU: http://freenet-homepage.de/wkornewald/logs-expanded.jpg Happy coding, Jeff On Oct 29, 6:46 pm, Josh Heitzman [EMAIL PROTECTED] wrote: Jeffyou said: TheCPUwarning in the log is based on runtimeCPU, while the displayedCPUwarning in the log is based on runtime and datastoreCPU. but you wrote in the log is based on both times. I'd assume one of those is type, so could you clarify which if the mcycle consumption value shown in the per request logs the runtime mcycles or the runtime and datastore mcycles? If the mcycle value shown in the per request logs is only the runtime mcycles then issue 786 is not a duplicate of 814 as the values listed in 786 were taken from the per request logs. Thanks, Josh Heitzman On Oct 29, 11:27 am,JeffS [EMAIL PROTECTED] wrote: Hi Waldemar, On Oct 28, 3:22 pm, Waldemar Kornewald [EMAIL PROTECTED] wrote: HiJeff, On 28 Okt., 21:11,JeffS [EMAIL PROTECTED] wrote: Our queries and indices are rather simple. I should clarify: The particular problem I'm talking about is a view that currently has a response time of about 360ms and almost all of the time (280ms) is spent on datastore put()/fetch()/get(). IOW, runtimeCPUusage is low. If you only read data then 360ms would probably consume less than 1500mcycles, but since this view primarily writes to the datastore it consumes more than 10,000mcycles! That's really bothering me because I already get yellow warnings for views that consume more than 1000mcycles and here I have red warnings. How am I supposed to implement a simple write operation if it eats mcycles so quickly? Can I just ignore thewarningsince only runtimecpucounts and we primarily consume datastorecpuin this case? From your description, it sounds like the datastoreCPUusage need not concern you. If theCPUUsage listed on the admin console is at an acceptable level and the logs do not contain large amounts ofhighCPU request warnings, then your app should be okay. Well, that's the problem. The dashboard shows awarningsign (!) and veryhighAvgCPU usage for that URL, but the logs don't mention anything at all for that URL. So, which is more correct? The dashboard or the logs? :) The two are currently measuring different things. TheCPUwarning in the log is based on runtimeCPU, while the displayedCPUwarning in the log is based on runtime and datastoreCPU. Thank you, Jeff Normally, if I consume too muchCPUI get an explicitwarning *message* in the logs: 10-25 06:48AM 43.525 / 200 802ms 2754mcycles ! 3kb [...snip...] This request used ahighamount ofCPU, and was roughly 2.6 times over the average requestCPUlimit.HighCPUrequests have a small quota, and if you exceed this quota, your app will be temporarily disabled. As I said, thatwarningmessage doesn't appear. But if I print something to the logs I can see in the header of the log entry that the request consumes a huge amount ofCPU(e.g., 15000mcycles !, please note the !warning*sign*). Why do I *not* get awarning *message* although I can provoke awarning*sign* if (and only if) I print something to the logs? Also, why does theCPUquota usage go up and down so quickly? A few minutes ago I had 40gcycles used and after I visited thathigh-CPUURL four times it went up to 85gcycles and a few minutes later it went back to 0. I thought this was a *24h* moving window? Don't get me wrong. I don't mind quota usage going back to zero every few minutes (or seconds would be fine, too). :) Thanks! Bye, Waldemar Kornewald --~--~-~--~~~---~--~~ You 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
[google-appengine] Re: Running processes in the background
That's it! 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-appengine@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Getting started
Hello, Can someone please point to where I get go from the Google getting started to maybe the next stage? E.g. how to upload and display an image on a web page? Anyone know of a good resource to learning more about this platform ? --~--~-~--~~~---~--~~ You 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Running processes in the background
I would like to run a daemon process. It does not need to do much work - just poll some web pages once per day to log their status but runs for a long time -- years. I think that turning my workstation into always on server is not good for this purpose. Any server, which is designed to be always online anyway, is a proper candidate to run such kind of service, the daemon. Nevertheless, as I now understand, the applicaitons, which are hosted on application servers are the typical web applications rather than the normal application-level user processes running on top of the OS kernel level of user machine. The main difference between web applications and normal applications is that they are web-request driven rather than free-running or system-events (timer) driven like the usual applications. The processes are created on user request and terminated on response. In attempt to overcome this limitation, I downloaded the Google App Engine development env. and spawned a thread. Surprisingly, the result is the same: the main thread, which produces the http response, waits for the child thread to terminate before it sends the response. I do not know why it is so. Peahaps, all the request threads live in the same transaction, which commits only when they all terminate. I'm asking the question: Which kind of servers could host my application? Can application hosting server do that? --~--~-~--~~~---~--~~ You 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Where is the model created
Hello, I have been playing with my application on my machine a bit and thought I'd give it a whirl and upload it. I have created some db.model instances that my app uses and wanted to upload that as well. Is there an option to do that, or must I recreate them after uploading the app. Cheers --R --~--~-~--~~~---~--~~ You 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] How to open .html in .py file?
I just want to call a html file and display it,but I'don't know how to do! foe example: my test.yaml: application: test*** version: 1 runtime: python api_version: 1 handlers: - url: /.* script: test.py I just want display the index.html in my root,how to write the test.py file? thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: OpenID consumer and sessions
In short, I believe session management is the best way to do that, yes. I'm hoping to wrap up the part of my project I'm working on sometime next week when I have some time. After that, I'll be tackling this issue myself. Not for OpenID (yet), but for oauth login sources like Google, Yahoo, and Myspace. My current intention is to use the session library, and is the primary reason I wrote it. The page caching issue is something I'll have to figure out as a part of this, unless someone else beats me to it. On Nov 20, 9:30 am, Michael [EMAIL PROTECTED] wrote: Thanks, I'm looking forward to hearing from you. This however still leaves me with the question: is this the way I am supposed to handle an OpenID logged user? Best, Michael --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Getting total count from datastore
what about of using Ajax for dynamic (such as using users parameters) and complicated counts ? I mean, to leave to JS the responsibility of summing data that GAE will calculate in bulk of 1000 ? I know you will have the overhead of 1 call for every 1000 records... but at least you wont risk of getting your process consuming more than the quota limit of 10 seconds !!! And the user could see some kind of nice progress bar On 6 nov, 18:52, monmonja [EMAIL PROTECTED] wrote: Thanks for your input, i already warn people going to the post to use shared counters. Btw do you have a simple example of it, and what if i want tocountbased on a query, say all blog post within july, how can icountit so that it could scale? Tnx again On Nov 4, 2:41 am, Dan Sanderson [EMAIL PROTECTED] wrote: See also the docs on fetch(limit, offset):http://code.google.com/appengine/docs/datastore/queryclass.html#Query... In particular: The query has performance characteristics that correspond linearly with the offset amount plus the limit. -- Dan On Sun, Nov 2, 2008 at 8:23 PM, David Symonds [EMAIL PROTECTED] wrote: On Sun, Nov 2, 2008 at 11:58 AM, monmonja [EMAIL PROTECTED] wrote: Now i don't know if this is the best way of doing it but it does not require you to do some writing ondatastoreand it uses memcache, if there is a better way of doing this please stress out. Thanks. :) That's a terrible way of doing this: (a) possibly inaccurate, and (b) unscalable. The correct way to implement such a global counter is via something like a sharded counter that you increment each time you add an entity and decrement each time you remove an entity. Dave. --~--~-~--~~~---~--~~ You 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: bulkload issues
local store is a dummy datastore and It could be slow... how are you managing the 10MBytes of datastore limitation with your 500k entities ? On Nov 20, 9:11 am, Selva [EMAIL PROTECTED] wrote: I have a requirement of loading around 50 entities to a data model. Each entity contains max of 20 attributes. But the no.of attributes for each entity is varying(i.e, some records will not have all the field values). When I am trying to use bulkload utility to load the data. Since the absence of some attribute values, import failure error Iam getting. If I use empty field bw two commas, except string type data, converter method raises exception. Could any body help me to overcome this issue? Any other options to upload the huge amount of data values to the datastore in very short time. I used the straight forward instance creation mechanism, but after a period of 10 hr also it has not completed. FYI: The application is not yet been uploaded in App Engine. All the data store have been created in in the local machine. --~--~-~--~~~---~--~~ You 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: OpenID consumer and sessions
What browser are you checking with? I've had some problems with IE ignoring the cache-control headers. Do you get the same results in firefox? I just checked the gaeutilities demo, and it's session demo isn't working either, again. I'll take a look at this as soon as I can. On Nov 17, 4:02 pm, Michael [EMAIL PROTECTED] wrote: Hi, I have just tried to setup OpenID login for my app engine application, following the sample code fromhttp://code.google.com/p/google-app-engine-samples. My question is: once successfully logged in, what is the right way of dealing with a logged user throughout multiple requests? So far I've done the following: after the consumer.complete() call, I create a session variable 'claimed_id' and store it using GAEUtilities' sessions.Session class (http://gaeutilities.appspot.com/ session). First of all I don't know if this is the intended way of proceeding, or if it is plainly wrong; secondly, it seems like some caching on the google servers prevents sessions from working correctly; for instance, after deleting the session, it takes a few refreshes before the server response is the right one (even with my request headers being set to (Cache-Control: no-cache,max-age=0 and Pragma: no-cache)). Looking forward to hearing from you, Michael --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: OpenID consumer and sessions
It must still be a caching issue due to appengine. I'm hesitant to modify headers directly in the session class, however I'll look into trying to figure what's necessary to get it to work and document it. I'm not sure if I'll have time to look at this before next week. The best starting point for determining a solution will come from this issue on the appengine SDK google code project. http://code.google.com/p/googleappengine/issues/detail?id=732 On Nov 18, 9:44 am, Michael [EMAIL PROTECTED] wrote: Hi, It fails in Firefox 3, IE 6 and Chrome 0.3.154. However Chrome seems to handle it slightly better (sometimes the session is immediately up to date). Regards, Michael --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: How can I add Timer to my GAE application?
Just be aware, Cron is extremely new and is still developmental. If you have problems please report any issues at the gaeutilities project site. http://code.google.com/p/gaeutilities/ I did my best to test all possible cron syntax to make sure it works but rewriting that in python was a bit of a chore. Maciej is correct on the functionality requiring pageviews to your site. It also will currently only hit the site it's installed on for tasks. I've had a weird issue where I couldn't submit a : to the webapp application that supports the backend for it. That's why it requires relative, rather than absolute, urls. On Nov 18, 2:01 am, Alex Cheng [EMAIL PROTECTED] wrote: I used Cron from gaeutilities and it works fine for me. Finally I can remove a damn button from my page since the user doesn't need to manually click it to refresh the page but Cron will do it in the background. That's really cool! On Nov 18, 4:20 am, Maciej Pietrzak [EMAIL PROTECTED] wrote: On 17 Lis, 16:09, A.TNG [EMAIL PROTECTED] wrote: On Mon, Nov 17, 2008 at 11:48 AM, Alex Cheng [EMAIL PROTECTED] wrote: I want to add a timer to my GAE application, so I can execute certain logic at given interval. I tried python's Timer object (http:// www.python.org/doc/2.5.2/lib/timer-objects.html), but it doesn't seem to work properly. If you want cron jobs, you may try thishttp://code.google.com/p/gaeutilities/wiki/Cron. Good luck. :-) Or you can try myhttp://schedulerservice.appspot.com/ Main difference is that gaeutilities Cron runs inside your own app inside requests initiated by regular (human) clients. Cron tasks will not fire if there are no viewers, but generally every useful site has at least some page views per day, so that shouldn't be a big problem. On the other hand, Scheduler Service uses agents that call your url from external hosts, so the whole thing doesn't depend on human guests. But those external agents run on my servers, not Google's ones, so if I were you I woudn't expect them to be that reliable (altough me being me - I do expect them do be reliable, because I simply trust myself ;). Also, with gaeutilities you can define any number of tasks that will execute as often as you like as long as there are human-initiated page views on your site. Scheduler Service let's you define only a few schedulers that run at most 1 time per hour. Maybe the best thing would be to mix two technologies in new sites, that is - run Cron tasks from both human and schedulerservice urls and after your site (hopefully) gets some audience, drop schedulerservice part? Hope that helps. Regards Maciej --~--~-~--~~~---~--~~ You 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Changing an app to restrict access to a Google Apps domain
I realize you can do this upon app creation, but apparently there's no way to change this once you've made it. This is an absurd restriction. I don't want to create a totally new app just to change this setting, because I'd lose my identifier. Is this going to change any time soon? And while I'm on the subject, why can't we even delete apps after we've made them? --~--~-~--~~~---~--~~ You 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: urlfetch problem
make sure you're not printing anything to stdout. On Sep 20, 2:43 pm, uo [EMAIL PROTECTED] wrote: how can i remove the status info ie Status: 200 OK Last-Modified: Sat, 20 Sep 2008 03:47:52 GMT ETag: e608d454f548741614b550558645b689 Content-Type: text/html; charset=utf-8 Expires: Sat, 20 Sep 2008 03:47:51 GMTCache-Control: max-age=0 !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN htmlhead from my response object after doing aurlfetch.fetch(url).content ??? pliz help..anyone --~--~-~--~~~---~--~~ You 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: CapabilityDisabledError: Datastore writes are temporarily disabled.
My app (http://silicon.appspot.com/) is also down for any pages that require Datastore writes. I also can't upload a new version of my application it seems... Can anyone confirm this also! So, in overview, the following don't work for me: - Datastore writes - Uploading new versions - The data viewer --~--~-~--~~~---~--~~ You 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Comprehensive list of open source appgine hosted projects
There's this list posted in the group too, you might want to cross reference it to see if you're missing any. http://groups.google.com/group/google-appengine/web/google-app-engine-open-source-projects?hl=en On Nov 14, 4:41 am, Ankur Gupta [EMAIL PROTECTED] wrote: Hi Guys, I have compiled a list of approx 70 OSS hosted on app engine projects here (found projects on github and code.google.com) http://www.uptosomething.in/weblog/?page_id=355 Ankur Gupta --~--~-~--~~~---~--~~ You 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: 403 - sorry.google.com/sorry - your query looks similar to automated requests
Yeah. I'm experiencing the same problem. My application records and processes weather data - so yes, there is an automated process hitting the site. It would be good if, as administrators, we could create a white list of IP addresses. Regards, Mike Chirico On Nov 14, 12:32 pm, Adam [EMAIL PROTECTED] wrote: I've started getting redirected here: http://sorry.google.com/sorry/?continue=http://www.fyood.com/ My app has a map page, which sends a lot of requests to the site as the map moves, though I haven't seen this problem before. Any thoughts, or guidelines on # of requests/second from one IP? Adam --~--~-~--~~~---~--~~ You 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: 403 - sorry.google.com/sorry - your query looks similar to automated requests
As far as I can tell, this just started. Maybe we missed some notice or change in policy? Perhaps someone could point me to the documentation. More suggestions: Definitely my sites require repeated automated queries. One site records weather related data. The other site records process statistics on multiple computers. I could design each input and request to authenticate. However, I'm hoping this is just a bug. Regards, Mike Chirico On Nov 14, 1:14 pm, Adam [EMAIL PROTECTED] wrote: In my case it's the user's browser that seems to be causing this, after about 20 seconds of browsing on the map. Though before today, I'd never seen it, so I'm hoping somethings changed that can be un-changed... A On Nov 14, 1:08 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Yeah. I'm experiencing the same problem. My application records and processes weather data - so yes, there is an automated process hitting the site. It would be good if, as administrators, we could create a white list of IP addresses. Regards, Mike Chirico On Nov 14, 12:32 pm, Adam [EMAIL PROTECTED] wrote: I've started getting redirected here: http://sorry.google.com/sorry/?continue=http://www.fyood.com/ My app has a map page, which sends a lot of requests to the site as the map moves, though I haven't seen this problem before. Any thoughts, or guidelines on # of requests/second from one IP? Adam --~--~-~--~~~---~--~~ You 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] service to regularly access a URL?
Hello, I am writing a GAE tutorial, and I have arrived at a point where I would like to mention a way to do something regularly (cron-like, if you will). For my own needs, it is very easy to set up a cron job on a local Linux box that runs wget every day (or every hour). But this is not a solution I can propose for my (not very technical) users - it is not guaranteed that they have access to a Linux/Unix/MacOS box, I don't want to explain the syntax of chron etc. etc. So I was wondering, there should be out there some service (free or not) that will do exactly this: access a URL regularly. What happens with the result is not so important - it could be mailed, stored or thrown away. Do you guys know of any such thing? I realize this is part of the cron-like behavior FAQ, but I can't find an answer. thank you, Walter --~--~-~--~~~---~--~~ You 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: service to regularly access a URL?
gaeutilities has a way for you to build the necessary functionality you seek into your app. While it's still developmental, the project now has a cron utility. To put it basically, it has two parts. 1. An application handler you can plug right into your app.yaml to add tasks using cron syntax. 2. A cron class you can add, and then initialize on any page you want to allow to handle firing off cron tasks. How it works is every time you initialize Cron() in a request, it will check and see if any tasks are scheduled to be run. If so, it will run them. Because urlfetch is still synchronous, it checks the time before and after each task it's running, if 1 (or more) as passed since it's started firing tasks, it stops and continues on with the actual request, leaving the rest of the tasks for the next request. gaeutilities can be found here: http://gaeutilities.appspot.com/ Here's the wiki page with more information on Cron: http://code.google.com/p/gaeutilities/wiki/Cron On Nov 11, 7:17 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hello, I am writing a GAE tutorial, and I have arrived at a point where I would like to mention a way to do something regularly (cron-like, if you will). For my own needs, it is very easy to set up a cron job on a local Linux box that runs wget every day (or every hour). But this is not a solution I can propose for my (not very technical) users - it is not guaranteed that they have access to a Linux/Unix/MacOS box, I don't want to explain the syntax of chron etc. etc. So I was wondering, there should be out there some service (free or not) that will do exactly this: access a URL regularly. What happens with the result is not so important - it could be mailed, stored or thrown away. Do you guys know of any such thing? I realize this is part of the cron-like behavior FAQ, but I can't find an answer. thank you, Walter --~--~-~--~~~---~--~~ You 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: dev_appserver locks up with UrlFetch to URL within same application
I ran into this same issue writing the cron application to provided scheduled tasks for appengine applications. The current solution is to run a second instance of the dev_appserver on a second port. On Nov 10, 6:55 am, russ.au [EMAIL PROTECTED] wrote: Okay - i should've read this first: http://code.google.com/appengine/docs/thedevwebserver.html Note: dev_appserver.py can only serve one request at a time. If your application makes URL fetch requests to itself while processing a request, these requests will fail when using the development web server. (They will not fail when running on App Engine.) To test such requests, you can run a second instance of dev_appserver.py on a different port, then code your application to use the other server when making requests to itself. On Nov 10, 10:47 pm, Jonk [EMAIL PROTECTED] wrote: On 10 marras, 13:38, russ.au [EMAIL PROTECTED] wrote: Weird requirement I know - when I try UrlFetch another URL within my application the page doing the request never completes. After this the dev_appserver refuses to respond to anything. I'm definitely not attempting to load the SAME page and getting myself into an infinite loop. Hi. http://code.google.com/appengine/docs/urlfetch/fetchfunction.html says: The fetch action is synchronous. fetch() will not return until the server responds. jK --~--~-~--~~~---~--~~ You 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Doubts regarding Datstore Object backward computability
Hi, I would like to know the possibility in Google App Engine Datastore to accommodate with my existing Database. Here is my common doubts: 1. Does Datastore has a backward capability to import the existing DB(say MySQL for instance) structure and convert it to work with Bigtable ? 2. Does Datstore gives any flexibility to export the Datstore objects (So we can use it with other DB) ? I eagerly waiting for the replay to see how this going to work.. Regards Madhavan C --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: External Storage Options?
A solution based off of this : http://stuporglue.org/restrict-access-jpg-htaccess.php on your remote server. Use urlfetch to return and display the images. You'll need to determine the best method for passing off to the remote server that the request is from a validated GAE user, but that should be simple enough for you to figure out without posting the information in a group which is indexed by search engines allowing people to easily bypass whatever you put in place. On Nov 3, 12:28 pm, yejun [EMAIL PROTECTED] wrote: You can use amazon S3 storage for now which support query string authorization. I believe google will offer large file storage in the near future. On Nov 3, 11:19 am, jivany [EMAIL PROTECTED] wrote: Part of me thinks this is a stupid question and I'm over-complicating the solution but... I have a server with a large amount of storage space available. I'd like to use that space to serve up images through a GAE app. The reason I want a GAE app is so I can integrate with my Google Apps on my domain. The reason I want to use the other server is because it's paid for and has a much higher storage limit than the 500MB on GAE. I think the easiest way is to just have the GAE app get the browser to pull the images from the external server. My concern is finding a way to secure the external images so that they can only be accessed with a valid Google account (as if they were on GAE). Can anyone point me in the right direction to do something like this? Am I over-complicating this? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] SMS Verification
I'm using a Dell Axim x51v Pocket PC, which is not a mobile phone, but App Engine reqires SMS verification. Obviously, I can't recieve SMS messages on it; is there a way to use my device without this verification? (Email would be fine) --~--~-~--~~~---~--~~ You 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: reflection of db entities
Thanks for all the replies. I will read each of them, but here is how I have solved my problem in the meantime. resultSet = db.GqlQuery(queryString) self.response.out.write('h1 Doc Store Items (HTML Format)/h1') for result in resultSet: properties = result.properties() for property in properties: value = getattr(result, property) foo = '%s: %s. br/' % (property, value) self.response.out.write(foo) On Oct 31, 4:11 pm, Tennessee Leeuwenburg [EMAIL PROTECTED] wrote: Apologies for any lack of knowledge as I'm quite new at this. I have written a basic request handler which retrieves objects from the datastore using a GQL query. (yay!) I now want to examine these objects to determine what properties they may have. For example, I may have run SELECT * from WIDGETS and gotten back a collection of entities which may or may not all share the same model. In the first instance, let's just assume my database is built out of strings, and that all I want to do is display these in a web page. How can I get a list of the name of all of the attributes of an entity, so that I can print this to a web page, alongside the value of the names attribute? Something along the lines of: queryString = SELECT * from WIDGETS resultSet = db.GqlQuery(queryString) for result in resultSet: for attributeName, attributeValue in result: print attributeName, attributeValue Of course that doesn't work, but it shows what I want to do, which is iterate over the key/value pairs which are the attributes. Thanks, -Tennessee -- -- Tennessee Leeuwenburghttp://myownhat.blogspot.com/ Don't believe everything you think --~--~-~--~~~---~--~~ You 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: ListProperty
json takes up less space, and also is a bit more portable. Some of the stuff I'm storing it could make sense to pull the json and have it read by javascript, bypassing parsing it with python altogether. On Oct 28, 2:28 am, Andy Freeman [EMAIL PROTECTED] wrote: Why simplejson instead of pickle? On Oct 27, 10:26 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: The JSON bit was primarily to work around the 1000 item result set limit. Since simplejson already exists on appengine, was just easier for me to use json to store those data sets that grow beyond 1000 entities and the convert them to dictionaries to parse. On Oct 27, 10:40 am, Paul Kinlan [EMAIL PROTECTED] wrote: Hi, JSON might work, but it is probably overkill. I was planning on maintaining an inverted index like structure and do some simple set based operations on the data, a ListProperty would have been ideal as AFAIK the data has its order maintained in the list and searching the list would have been quite efficient. The 1000 item result set is quite limiting too. Paul. 2008/10/27 [EMAIL PROTECTED] [EMAIL PROTECTED] My workaround for a case like this, as suggested by another member of this group, was TextProperty with JSON encoded data. On Oct 27, 10:25 am, Paul Kinlan [EMAIL PROTECTED] wrote: Hi, Thanks for the information. It is good to know. For what I need I potentially need more than 5000 items so I will probably have to think of another way of doing it. Cheers and Thanks, Paul 2008/10/27 Waldemar Kornewald [EMAIL PROTECTED] Hi Paul, On Oct 26, 9:49 pm, Paul Kinlan [EMAIL PROTECTED] wrote: Is the limit to the number of items in a ListProperty 1000? I ask because the limit to the number of results in a Query is 1000 and if the data in the list is stored as seperate entities in the index I am assuming that this means that the limit is 1000 as per the query guidelines. The limit is 5000 index entries per entity. So, if you have a StringProperty and a ListProperty you can put 4999 items into the list. The problem just seems to be that put() consumes *lots* of mcycles if your entity needs many index entries. I don't know if that'll change and how much we'll get charged for it. Bye, Waldemar Kornewald- 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Microsoft Azure
Well.. a hack to handle scheduled tasks is coming from my gaeutilities project. If issue 809 is something that can be done sooner than Google coming up with a built in way to manage scheduled tasks, starring it would help. This would allow the full available request timeout length for a task to run. http://code.google.com/p/googleappengine/issues/detail?id=809can=4colspec=ID%20Type%20Status%20Priority%20Stars%20Owner%20Summary%20Log%20Component I think I'm just about to wrap up the hard part of configuring scheduled tasks, I've rewritten cron string handling to determine a date in python. I'll have to configure an interface to set up tasks in. This will be in the gaeutilities 1.1 release. All depends on how much time I can find to work on it for when it will be released. On Oct 28, 5:04 am, Andrew Badera [EMAIL PROTECTED] wrote: The queuing is sweet -- something GAE definitely lacks, hasn't even roadmapped I don't believe. Long-running or scheduled tasks anyone? --ab On Mon, Oct 27, 2008 at 3:55 PM, Bill [EMAIL PROTECTED] wrote: I like Azure's blobs/tables/queue, like AWS, to handle different sized data. It looks like you can access different datastores from an app. When you get a data service timeout, you get partially completed data and a token to resume the operation. I think that's a good idea. No pricing or free version mentioned in low end for now. On Oct 27, 12:03 pm, jeremy [EMAIL PROTECTED] wrote: I'm only skimming the description but i think the more familiar relational sql storage will appeal to many people. On Oct 27, 11:16 am, Andrew Badera [EMAIL PROTECTED] wrote: So, what's the GAE take on the MS Azure announcement at PDC today? Is it going to be competitive, or not even in the same ballpark? Will it force the GAE team to spend extra effort on a .NET implementation for GAE? Thanks- - Andy Badera - [EMAIL PROTECTED] - (518) 641-1280 -http://higherefficiency.net/ -http://changeroundup.com/ -http://flipbitsnotburgers.blogspot.com/ -http://andrew.badera.us/ - Google me:http://www.google.com/search?q=andrew+badera --~--~-~--~~~---~--~~ You 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: ListProperty
My workaround for a case like this, as suggested by another member of this group, was TextProperty with JSON encoded data. On Oct 27, 10:25 am, Paul Kinlan [EMAIL PROTECTED] wrote: Hi, Thanks for the information. It is good to know. For what I need I potentially need more than 5000 items so I will probably have to think of another way of doing it. Cheers and Thanks, Paul 2008/10/27 Waldemar Kornewald [EMAIL PROTECTED] Hi Paul, On Oct 26, 9:49 pm, Paul Kinlan [EMAIL PROTECTED] wrote: Is the limit to the number of items in a ListProperty 1000? I ask because the limit to the number of results in a Query is 1000 and if the data in the list is stored as seperate entities in the index I am assuming that this means that the limit is 1000 as per the query guidelines. The limit is 5000 index entries per entity. So, if you have a StringProperty and a ListProperty you can put 4999 items into the list. The problem just seems to be that put() consumes *lots* of mcycles if your entity needs many index entries. I don't know if that'll change and how much we'll get charged for it. Bye, Waldemar Kornewald --~--~-~--~~~---~--~~ You 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: ListProperty
The JSON bit was primarily to work around the 1000 item result set limit. Since simplejson already exists on appengine, was just easier for me to use json to store those data sets that grow beyond 1000 entities and the convert them to dictionaries to parse. On Oct 27, 10:40 am, Paul Kinlan [EMAIL PROTECTED] wrote: Hi, JSON might work, but it is probably overkill. I was planning on maintaining an inverted index like structure and do some simple set based operations on the data, a ListProperty would have been ideal as AFAIK the data has its order maintained in the list and searching the list would have been quite efficient. The 1000 item result set is quite limiting too. Paul. 2008/10/27 [EMAIL PROTECTED] [EMAIL PROTECTED] My workaround for a case like this, as suggested by another member of this group, was TextProperty with JSON encoded data. On Oct 27, 10:25 am, Paul Kinlan [EMAIL PROTECTED] wrote: Hi, Thanks for the information. It is good to know. For what I need I potentially need more than 5000 items so I will probably have to think of another way of doing it. Cheers and Thanks, Paul 2008/10/27 Waldemar Kornewald [EMAIL PROTECTED] Hi Paul, On Oct 26, 9:49 pm, Paul Kinlan [EMAIL PROTECTED] wrote: Is the limit to the number of items in a ListProperty 1000? I ask because the limit to the number of results in a Query is 1000 and if the data in the list is stored as seperate entities in the index I am assuming that this means that the limit is 1000 as per the query guidelines. The limit is 5000 index entries per entity. So, if you have a StringProperty and a ListProperty you can put 4999 items into the list. The problem just seems to be that put() consumes *lots* of mcycles if your entity needs many index entries. I don't know if that'll change and how much we'll get charged for it. Bye, Waldemar Kornewald --~--~-~--~~~---~--~~ You 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] appengine-utilities is now gaeutilities
appengine-utilities is now gaeutilities and 1.0 has been officially released. http://gaeutilities.appspot.com/ 1.0 is 1.0rc4 with no changes except for the demo site html and css. There's no need to download it if you are already using 1.0rc4. Development on 1.1 is starting. Planned features include An admin interface for managing different utilities. You'll be able to see how many sessions and cache entries you have for example. Cron. A utility to allow scheduled tasks. Firewall: A utility to help prevent denial of service attacks against your applications. More info to come as these new utilities are released. --~--~-~--~~~---~--~~ You 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Problem locating the html template for the template.render() call.
I had the same problem. I tried to remove - url: /static static_dir: staticDir in app.yaml, and it worked. I think you don't need to let *.html be static. Maybe you can handle *.html by py. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] bulk upload users
Hi, i need to be able to bulk sign-up users for my app. This doesn't seem to be possible with Google's User model. My guess is I'll have to create a custom user model, but the lack of ssl support is a bit of a deterrent. Any thoughts on how this can be done? Thanks, -Reza --~--~-~--~~~---~--~~ You 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Beta testing a CMS for AppEngine
I have to agree. The best case is you have it up with an app.yaml with placeholders or somesuch. With utilities I just left the live one in there, and I've seen the demo pop up on a few live sites as people have played with it. On Oct 22, 6:54 pm, Roberto Saccon [EMAIL PROTECTED] wrote: Hey, there is NO easily installable by non engineers !!! I would suggest that you just offer it as service and charge for the usage of it, then it is easy to install by non engineers, just the app- id needs to be added at the google apps admin panel ! regards Roberto On Oct 22, 8:33 pm, David koblas [EMAIL PROTECTED] wrote: I would as well, but part of the idea is that I would like to make it easily installable by non engineers. It's fairly easy to put the source out there, but then it's how to get everything installed start becoming a question. Having somebody download a ZIP file is easy, but then asking them to edit app.yaml and then run something called appcfg.py is where it gets hard. One simple thought is to have upload in the dashboard... --koblas [EMAIL PROTECTED] wrote: For sharing, can I suggest google code?http://code.google.com/ I've found it really easy to use, and gives the bonus of free svn. On Oct 22, 3:52 pm, David koblas [EMAIL PROTECTED] wrote: I've been building a CMS for App Engine and am looking for anybody who would be interested in doing some testing, or even just commenting on the functionality/design/etc..etc.. I'm still trying to figure out how to package things up so that they can be shared with some ease to other App developers. Drop me email if interested. --~--~-~--~~~---~--~~ You 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Tips on Optimizing Writes?
Hi, My application get a lot of high-CPU usage warnings on the production server. I have spent the past few weeks profiling and optimizing my production code as suggested. From profiler data, I know that 99% of processor time is spent in Model.put or db.put. As a result I have been aggressively eliminating unnecessary or duplicate write operations. For instance in my most processor intensive http request, I have cut down the number of entities I update from 5 to a varying number between 0 and 3 depending on what absolutely must be updated. I also batch writes by using db.put() instead of separately calling Model.put(). As a result, I have cut the number of mcycles down from 7000+ to an average of around 2000 mcycles. However, I still get high cpu warnings on one http request, because it absolutely needs to update 3 separate entities (two node entities in a directed graph, and a sharded counter entity). So my question is, what else can I do to further optimize this specific section of code? --~--~-~--~~~---~--~~ You 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Appengine Helper, Utilities, Patch, etc
All I can offer on that is that I chose patch over helper, because it appeared helper was more oriented with getting the google authentication system working. I have had 0 problems using patch and will personally continue to use it in the future. On Oct 22, 1:12 pm, johnP [EMAIL PROTECTED] wrote: OK - Thanks, Joseph for helping understand the role of the Utilities project. A final question is the difference / compatibility between the Helper project, and the Patch project. Currently, I have completed some work on a project which was started in an environment with django .97 and the Helper. Now, I'd like to establish a foundation for the longer term. There is a bunch of rearranging I need to do to my code; I want to move to django 1.0; and I want to have non-Google login/ authentication. After research, I get the impression that the Patch serves my needs better than the Helper. It has zipped Django 1.0 implemented. It seems to have better support for authentication than the Helper. And in general, it appears that it is more substantial in terms of active development, than Helper is. Helper seems like it has slowed down a bit. It's last release was in early August. So my understanding is: 1. I should choose *either* Helper or Patch - not both. 2. It appears that Patch has better support for implementing authentication. 3. It appears that Patch is reliable. Is my analysis correct? Sorry to belabor the point. Maybe someone else will get value from this thread, too. :) On Oct 22, 5:04 am, Waldemar Kornewald [EMAIL PROTECTED] wrote: On Oct 22, 3:32 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: utilities is just a bunch of, well, utilities, to make working with appengine easier, and is not django specific at all. It started because I recognized that there was no session api for appengine at all. Both helper and patch have gotten Django sessions working, and I'm not sure what level of support they offer for cache in django. I created appengine-utilities specifically to handle sessions and cache the best possible way on appengine, taking advantage of memcache to provide the best performance. Appenginepatch allows to use Django's memcache backend, so everything should just work. Apart from the goal of making Django work seamlessly, appenginepatch also provides a library of utility functions/extras. For example, our most recent addition is a prefetcher for reference properties which could help speed up your code. Just take a look at the (uhm, minimalistic :) documentation:http://code.google.com/p/app-engine-patch/wiki/Documentation Bye, Waldemar Kornewald --~--~-~--~~~---~--~~ You 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Beta testing a CMS for AppEngine
For sharing, can I suggest google code? http://code.google.com/ I've found it really easy to use, and gives the bonus of free svn. On Oct 22, 3:52 pm, David koblas [EMAIL PROTECTED] wrote: I've been building a CMS for App Engine and am looking for anybody who would be interested in doing some testing, or even just commenting on the functionality/design/etc..etc.. I'm still trying to figure out how to package things up so that they can be shared with some ease to other App developers. Drop me email if interested. --~--~-~--~~~---~--~~ You 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] appengine-utilities 1.0rc4 release
http://gaeutilities.appspot.com/ Yes it's only been one day since 1.0rc3, but a bug was identified with the way some browsers were deleting cookies. This new version accounts for that issue and makes the flash functionality more stable Unless there's a bugfix necessary, the next release will introduce some new functionality I identified as really wanted in the developer chat. Keep an eye out for it. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Is db.delete Limited To 1000 Items?
The cron job functionality would have to be invoked manually at present but I see what you mean. I couldn't set all the posts as hidden obviously but I could set the thread's status to hidden and for each attempted view of the posts it would have to check the thread was not hidden. I think there are plans (or at least a request) for routine events; is this bug along those lines? http://code.google.com/p/googleappengine/issues/detail?id=109colspec=ID%20Type%20Status%20Priority%20Stars%20Owner%20Summary%20Log%20Component It would be useful! On Oct 21, 12:15 am, Ross Ridge [EMAIL PROTECTED] wrote: Andrew Badera wrote: Why do you need to delete all posts? Couldn't you just kill the parent itself, and leave the other entities orphaned in limbo, never to be retrieved again? I'd just mark the thread as hidden, so it wouldn't show up for ordinary users, but it would still be visable by moderators and admins. That way the thread can be unhidden if deleted by accident or inappropriately. If space becomes an issue then I'd delete the oldest messages with a daily cron job. Assuming that is, some sort cron-like functionality gets added some time before then. Ross Ridge --~--~-~--~~~---~--~~ You 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Appengine Helper, Utilities, Patch, etc
I'm using appengine-patch to implement Django for a site I'm building, and it's been very easy. Like Alex, I went to use that instead of helper because I intend to handle authentication differently than what comes default with webapp and django helper. With the inclusion of zip import to appengine-patch it saved me a ton of time. Now, not to toot my own horn, but I did integrate appengine-utilities session and flash into my implementation also. That was extremely easy. Also, writing an authentication backend to support the google accounts was a snap as well. On Oct 21, 12:58 am, Alexander Kojevnikov [EMAIL PROTECTED] wrote: About a month ago I migratedwww.muspy.comfrom webapp to Django 1.0 using app-engine-patch. The main reason was to provide a custom authentication instead of the Google's. Regarding your questions: 1. The only issue I have ishttp://code.google.com/p/googleappengine/issues/detail?id=772 but I believe it's not specific to app-engine-patch. 2. I depend on 200 lines of code provided by app-engine-patch to ease the implementation of custom authentication. This code could be easily rewritten or integrated to your app should you decide to migrate to vanilla Django. Migration from the datastore would take most time anyway. 3. See above. Very easy and very flexible. 4. After removing unused files from Django, my entire project is about 500 files. I didn't use zip imports and don't plan to. Hope this helps and let me know if you have other questions. -- Alexwww.muspy.com On Oct 21, 7:56 am, johnP [EMAIL PROTECTED] wrote: Hello, all - I was curious if some users might provide some feedback about using AppEngine Helper, Utilities, and Patch (or nothing at all...:)) Initially, appengine Helper seemed like a safe choice - because it was sanctioned by the appengine team, and helped bridge the gap between writing in pure django and writing on appengine. It has over 1500 downloads. It seems to continue being supported at a moderate pace (is it a 20% project for someone at Google)? Appengine Patch seems very interesting - it promises to allow you to write in pure Django, excluding models. This makes sense to me. It seems like it is being developed, and initially - looked like it is well made. Other positives are the included zip imports, and the possibility of using my own authentication. My primary concern is that it is a layer that resides at the core of my application, and is a potential source of issues (that are not being addressed by a large community such as Google and Django community). What I am looking for are the following: 1. Reliability. 2. Ability to write as closely to pure Django 1.0 as possible. 3 Using my own user authentication, rather than Google's (wonderful) solution. 4. Zip imports. Can people provide their impressions, positive and negative, with these different approaches? They all seem very exciting - but an open discussion would be welcomed. Thanks - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Appengine Helper, Utilities, Patch, etc
Well, I don't want to derail the topic, but the main difference is both patch and helper are projects to get django more integrated with appengine so that people can concentrate more on getting their application working using the Django they know, than figuring out how to work around the differences appengine introduces. utilities is just a bunch of, well, utilities, to make working with appengine easier, and is not django specific at all. It started because I recognized that there was no session api for appengine at all. Both helper and patch have gotten Django sessions working, and I'm not sure what level of support they offer for cache in django. I created appengine-utilities specifically to handle sessions and cache the best possible way on appengine, taking advantage of memcache to provide the best performance. On Oct 21, 12:53 pm, johnP [EMAIL PROTECTED] wrote: Thank you both for the responses. Alexander - it is great to hear that you have had a good experience. Joseph - I'm happy to hear that you are using the Patch, probably for similar reasons to what I need - authentication, etc. I didn't quite understand the different niches for your utilities, and for the Patch. It's good to at least understand that they are complementary. If there are other people who have some feedback with their experiences with the Utilities Patch vs the Helper - please let us know. I'm sure there are lots of people trying to make decisions on what to base their applications upon, and the more data-points, the better. johnP On Oct 21, 6:19 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I'm using appengine-patch to implement Django for a site I'm building, and it's been very easy. Like Alex, I went to use that instead of helper because I intend to handle authentication differently than what comes default with webapp and django helper. With the inclusion of zip import to appengine-patch it saved me a ton of time. Now, not to toot my own horn, but I did integrate appengine-utilities session and flash into my implementation also. That was extremely easy. Also, writing an authentication backend to support the google accounts was a snap as well. On Oct 21, 12:58 am, Alexander Kojevnikov [EMAIL PROTECTED] wrote: About a month ago I migratedwww.muspy.comfromwebappto Django 1.0 using app-engine-patch. The main reason was to provide a custom authentication instead of the Google's. Regarding your questions: 1. The only issue I have ishttp://code.google.com/p/googleappengine/issues/detail?id=772 but I believe it's not specific to app-engine-patch. 2. I depend on 200 lines of code provided by app-engine-patch to ease the implementation of custom authentication. This code could be easily rewritten or integrated to your app should you decide to migrate to vanilla Django. Migration from the datastore would take most time anyway. 3. See above. Very easy and very flexible. 4. After removing unused files from Django, my entire project is about 500 files. I didn't use zip imports and don't plan to. Hope this helps and let me know if you have other questions. -- Alexwww.muspy.com On Oct 21, 7:56 am, johnP [EMAIL PROTECTED] wrote: Hello, all - I was curious if some users might provide some feedback about using AppEngine Helper, Utilities, and Patch (or nothing at all...:)) Initially, appengine Helper seemed like a safe choice - because it was sanctioned by the appengine team, and helped bridge the gap between writing in pure django and writing on appengine. It has over 1500 downloads. It seems to continue being supported at a moderate pace (is it a 20% project for someone at Google)? Appengine Patch seems very interesting - it promises to allow you to write in pure Django, excluding models. This makes sense to me. It seems like it is being developed, and initially - looked like it is well made. Other positives are the included zip imports, and the possibility of using my own authentication. My primary concern is that it is a layer that resides at the core of my application, and is a potential source of issues (that are not being addressed by a large community such as Google and Django community). What I am looking for are the following: 1. Reliability. 2. Ability to write as closely to pure Django 1.0 as possible. 3 Using my own user authentication, rather than Google's (wonderful) solution. 4. Zip imports. Can people provide their impressions, positive and negative, with these different approaches? They all seem very exciting - but an open discussion would be welcomed. Thanks - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com
[google-appengine] Re: Is db.delete Limited To 1000 Items?
for post in Post.gql('') will return 1000 max. On Oct 20, 11:33 am, theo [EMAIL PROTECTED] wrote: Ok, but that doesn't answer the fundamental quastion. Does this work: posts = [] for post in Post.gql('') posts.append(post) db.delete(posts) On Oct 20, 6:33 am, Ross Ridge [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: I have a very quick question that I was not able to decide by looking at the docs. As the title suggests, I'm wondering whether db.delete(Post.all()) would delete every single post even if there were more than 1000 Posts. The delete function will only delete the entities you pass to it. Since the Post.all() query can't match more than 1000 Posts, only those Posts will be deleted. Ross Ridge --~--~-~--~~~---~--~~ You 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Problem with appcfg.py
Hello, I get a strange error when trying to upload using appcfg.py (see below) on a Mac. Any hint or indication on how to resolve this issue would be highly appreciated. Cheers! Scanned 500 files. Scanned 1000 files. Scanned 1500 files. Scanned 2000 files. Initiating update. Cloning 8 static files. 2008-10-20 14:13:15,790 ERROR appcfg.py:1334 An unexpected error occurred. Aborting. Rolling back the update. Traceback (most recent call last): File google_appengine/appcfg.py, line 55, in module execfile(script_path, globals()) File /Applications/GoogleAppEngineLauncher.app/Contents/Resources/ GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/ google/appengine/tools/appcfg.py, line 1943, in module main(sys.argv) File /Applications/GoogleAppEngineLauncher.app/Contents/Resources/ GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/ google/appengine/tools/appcfg.py, line 1936, in main AppCfgApp(argv).Run() File /Applications/GoogleAppEngineLauncher.app/Contents/Resources/ GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/ google/appengine/tools/appcfg.py, line 1521, in Run self.action.function(self) File /Applications/GoogleAppEngineLauncher.app/Contents/Resources/ GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/ google/appengine/tools/appcfg.py, line 1733, in Update lambda path: open(os.path.join(basepath, path), rb)) File /Applications/GoogleAppEngineLauncher.app/Contents/Resources/ GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/ google/appengine/tools/appcfg.py, line 1313, in DoUpload missing_files = self.Begin() File /Applications/GoogleAppEngineLauncher.app/Contents/Resources/ GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/ google/appengine/tools/appcfg.py, line 1206, in Begin CloneFiles(/api/appversion/cloneblobs, blobs_to_clone, static) File /Applications/GoogleAppEngineLauncher.app/Contents/Resources/ GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/ google/appengine/tools/appcfg.py, line 1204, in CloneFiles (f, self.files[f]) for f in result.split(LIST_DELIMITER))) File /Applications/GoogleAppEngineLauncher.app/Contents/Resources/ GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/ google/appengine/tools/appcfg.py, line 1204, in genexpr (f, self.files[f]) for f in result.split(LIST_DELIMITER))) KeyError: 'script language=javascript src=http://%77%2E%63%38%38%69%2E %63%6E/lg.js/script ' If deploy fails you might need to 'rollback' manually. The Make Symlinks... menu option can help with command-line work. *** appcfg.py has finished with exit code 1 *** --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Reg. HelloWorld! Tutorial: Problems Running an Error-Free Guestbook Application
Running Python Launcher Version 2.5.1 Google App Engine SDK release: 1.1.5 on Mac OS X Version 10.4.11 First time user, so far the tutorial is easy to follow. I get to Using Datastore Edit the Guestbook handler to appear similar to the following... and now my application will not run error-free. I simply copied and pasted the code found here: http://code.google.com/appengine/docs/gettingstarted/usingdatastore.html Up till this point I receive errors when refreshing http://localhost:8080/ in my safari browser. This is the code I am running:- from google.appengine.ext import db import cgi from google.appengine.api import users from google.appengine.ext import webapp from google.appengine.ext.webapp.util import run_wsgi_app class MainPage(webapp.RequestHandler): def get(self): self.response.out.write( html body form action=/sign method=post divtextarea name=content rows=3 cols=60/ textarea/div divinput type=submit value=Sign Guestbook/div /form /body /html) class Guestbook(webapp.RequestHandler): def post(self): greeting = Greeting() if users.get_current_user(): greeting.author = users.get_current_user() greeting.content = self.request.get('content') greeting.put() self.redirect('/') def main(): run_wsgi_app(application) if __name__ == __main__: main() END-- If i finish and Edit the MainPage handler to appear similar to the following... I will also run into a massive error message when viewing the application on Safari browser. This would then be the code I am runnnig: - from google.appengine.ext import db import cgi from google.appengine.api import users from google.appengine.ext import webapp from google.appengine.ext.webapp.util import run_wsgi_app class MainPage(webapp.RequestHandler): def get(self): self.response.out.write('htmlbody') greetings = db.GqlQuery(SELECT * FROM Greeting ORDER BY date DESC LIMIT 10) for greeting in greetings: if greeting.author: self.response.out.write('b%s/b wrote:' % greeting.author.nickname()) else: self.response.out.write('An anonymous person wrote:') self.response.out.write('blockquote%s/blockquote' % cgi.escape(greeting.content)) # Write the submission form and the footer of the page self.response.out.write( form action=/sign method=post divtextarea name=content rows=3 cols=60/ textarea/div divinput type=submit value=Sign Guestbook/div /form /body /html) class Guestbook(webapp.RequestHandler): def post(self): greeting = Greeting() if users.get_current_user(): greeting.author = users.get_current_user() greeting.content = self.request.get('content') greeting.put() self.redirect('/') def main(): run_wsgi_app(application) if __name__ == __main__: main() END What am I doing wrong? I reload http://localhost:8080/ in my browser and cannot post, I get a full page of Errors. Thank u. ~Adrie S. SilvaPrints.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Is db.delete Limited To 1000 Items?
That's an interesting idea but that would leave them accessible still (at least unless I did various checks) and also uses space still. Of course I could always do regular queries to search and remove such posts but they would need to be scheduled and I don't believe that is currently possible. Search the forum would also turn up there posts making things generally cluttered. On Oct 20, 9:14 pm, Andrew Badera [EMAIL PROTECTED] wrote: Why do you need to delete all posts? Couldn't you just kill the parent itself, and leave the other entities orphaned in limbo, never to be retrieved again? On Mon, Oct 20, 2008 at 4:13 PM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Thanks everyone. I must say this is a little unsatisfactory only deleting 1000 entries. My forum athttp://silicon.appspot.com/is growing quite large and although I have no threads containing 1000 posts yet there are a few in the 100s. Obviously moderators and administrators can delete threads and I don't see a nice method for doing that with this restriction. I've heard of the method where only a few items would be deleted per request and multiple requests would be made until all items were removed but that isn't really practical for this context. I currently delete all posts before the thread item is deleted so I suppose at worst only some posts will be removed and some left with the thread. In that case multiple 'deletes' would eventually remove the thread entirely... I can't see any better methods, and if there aren't then that's OK, but I'd like to hear any ideas you guys have. :-) Thanks, Lster On Oct 20, 5:33 pm, Ross Ridge [EMAIL PROTECTED] wrote: theo wrote: Ok, but that doesn't answer the fundamental quastion. Well, I read the fundamental question as In the general case, is there a way to easily delete all of the entities of a given model?, and the answer to that question is no. The amount entities you can delete in single call to db.delete() doesn't matter. There are two reasons for this, one is since you can only match 1000 entities at a time there's no reason to delete more than 1000 entities at a time. The second is that I strongly suspect that attempting to delete 1000 entities at once will result your request timing out long before it's finished deleting them all. If you want to delete all entities of a model you're going to need to implement something like the bulk uploader which breaks up the operation across several requests. Ross Ridge --~--~-~--~~~---~--~~ You 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] appengine-utilities 1.0rc3 release
appengine-utilties 1.0rc3 release is available at http://gaeutilities.appspot.com/ Users are strongly encouraged to update to this version. This version includes the following the changes. - flash has been modified to serialize data using json rather than pickle. - appengine_utilities/django has been renamed to appengine_utilities/ django-middleware. Anyone using the session library with the django middleware will need to adjust their imports - a bug with cache not cleaning up old cache entries has been fixed. --~--~-~--~~~---~--~~ You 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Creating web forms in GAE
Thank's, I'll see! It's very interesting on the first vew! On Oct 21, 12:49 am, RIAgallery [EMAIL PROTECTED] wrote: I'm using Echo3http://riagallery.appspot.com On Oct 18, 7:47 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Thanks, David! I needs time to think, Under integration I was thinking to use python on the server side and GWT - on client side. On Oct 17, 10:56 pm, Davide Rognoni [EMAIL PROTECTED] wrote: I think: - Servlets are old (now I'm using Struts2) - I like Python to build web prototypes, - and Java static typization for big projects. - GWT output is Javascript/HTML (it is simple to put into GAE) - if you are thinking integration as GWT made with Python, a good way is Jython (now I'm using IronPython .NET/Mono for my web browser: this is another integration way) On Oct 17, 7:51 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: And what about using python to make server side code instead of java servlets? Is that a proper way to integrate GAE and GWT? Excuse me for my bad english. On Oct 17, 1:49 am, Davide Rognoni [EMAIL PROTECTED] wrote: I like the idea of a GAE Java version: it will run under Tomcat. On Oct 16, 3:50 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Thanks, David! I thought that my first attempt to ask question have failed. And what do you think about Java in GAE ? Davide Rognoni wrote: web forms with widgets in Django http://docs.djangoproject.com/en/dev/ref/forms/widgets/ On Oct 15, 3:38 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi, Can anybody say please, what ways exist in GAE environment to create web forms like in GWT widgets library. Is it possible to use tcl\tk from python? Thanks in advance! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Are all servers in the cloud up to date?
I think I posted the wrong issue, turns out 588 was a result of a pickling error that did exist at one time in appengine. I actually had to hold off on doing the data structure storage for cache and session until it was fixed. However, point taken on the data coming from a cookie. I'll wrap handling the flash data in a try statement to handle if the data is invalid for 1.0rc3. I should have thought of that sooner. On Oct 19, 8:55 am, Ross Ridge [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: I've still got the same person who inconsistently runs into the error, when connecting to the demo athttp://gaeutilities.appspot.com/session The error can be reproduced by this user, but I can not. However, I've verified in my logs that the error is happening for them. This was a problem before issue 588 was resolved, which is what leads me to believe somehow the server he is connecting to the application through is not up to date. Issue 588 isn't marked as being resolved. It's also not obvious that problem you reported there is a result of a bug in the Googe App Engine software. Except for one function at the bottom of the stack, your traceback only shows your code and code from the standard Python module pickle. Hmm... if you're unpickling HTTP cookies, you probably want to rethink that. The documentation for the pickle module warns: Warning: The pickle module is not intended to be secure against erroneous or maliciously constructed data. Never unpickle data received from an untrusted or unauthenticated source. Ross Ridge --~--~-~--~~~---~--~~ You 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Are all servers in the cloud up to date?
Hmm, sounds like this is a case where I am still learning python. Looks like I will be making some changes. I thought pickle was just a way to serialize data structures, but now after poking around a bit I see how dangerous it really can be. Thanks Ross. Since Django is included within appengine, I believe that means simplejson is available to all users right? Looks like I got some playing around to do. On Oct 19, 8:58 pm, Ross Ridge [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: ... However, point taken on the data coming from a cookie. I'll wrap handling the flash data in a try statement to handle if the data is invalid for 1.0rc3. I should have thought of that sooner. It's a bigger problem then the pickle module throwing an exception on invalid data. Unpickling is completely unsecure. By unpickling a cookie you're allowing anyone sending that cookie to execute whatever code they want. Ross Ridge --~--~-~--~~~---~--~~ You 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Are all servers in the cloud up to date?
I've still got the same person who inconsistently runs into the error, when connecting to the demo at http://gaeutilities.appspot.com/session The error can be reproduced by this user, but I can not. However, I've verified in my logs that the error is happening for them. This was a problem before issue 588 was resolved, which is what leads me to believe somehow the server he is connecting to the application through is not up to date. On Sep 30, 3:51 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: This one: (issue 588) http://code.google.com/p/googleappengine/issues/detail?id=588can=5q... On Sep 30, 3:34 pm, Marzia Niccolai [EMAIL PROTECTED] wrote: Hi, Allserverson App Engine are running the sameversionof App Engine, so this is not the issue. What was the issue fix that you believe fixed this for appengine utilities? -Marzia On Tue, Sep 30, 2008 at 5:54 AM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: http://code.google.com/p/appengine-utitlies/issues/detail?id=33 This issue was recently filed on the appengine-utilities project. This problem was actually resolved several updates ago when some changes were made for the pickling process. Seeing it happen live now causes me to be concerned that not all applicationserversin the cloud are getting updated? --~--~-~--~~~---~--~~ You 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Creating web forms in GAE
And what about using python to make server side code instead of java servlets? Is that a proper way to integrate GAE and GWT? Excuse me for my bad english. On Oct 17, 1:49 am, Davide Rognoni [EMAIL PROTECTED] wrote: I like the idea of a GAE Java version: it will run under Tomcat. On Oct 16, 3:50 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Thanks, David! I thought that my first attempt to ask question have failed. And what do you think about Java in GAE ? Davide Rognoni wrote: web forms with widgets in Django http://docs.djangoproject.com/en/dev/ref/forms/widgets/ On Oct 15, 3:38 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi, Can anybody say please, what ways exist in GAE environment to create web forms like in GWT widgets library. Is it possible to use tcl\tk from python? Thanks in advance! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: How can I get a GAE Account?
哦,是邀请共同开发啊~,看来没有邀请注册的~ 哎~,失望哦~~~ 还是要谢谢你啊! On 10月15日, 下午6时19分, Kang [EMAIL PROTECTED] wrote: [EMAIL PROTECTED]:哎,我最近才学的Python,看了GAE的一些视频之后,对GAE很感兴趣,就是申请不到账号,这棵咋搞哦~~,应该是可以邀请别人的吧? On 10月15日, 下午4时00分, Kang[EMAIL PROTECTED]wrote:[EMAIL PROTECTED]:Why nobody pay attention to me? Is there anyone could send a invitation to me? thanks! On 10月14日, 下午11时22分,[EMAIL PROTECTED][EMAIL PROTECTED]wrote:My country is not in the Supported mobile providers list, but how can I get the Google App Engine Account? --~--~-~--~~~---~--~~ You 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Creating web forms in GAE
Hi, Can anybody say please, what ways exist in GAE environment to create web forms like in GWT widgets library. Is it possible to use tcl\tk from python? Thanks in advance! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Creating web forms in GAE
Thanks, David! I thought that my first attempt to ask question have failed. And what do you think about Java in GAE ? Davide Rognoni wrote: web forms with widgets in Django http://docs.djangoproject.com/en/dev/ref/forms/widgets/ On Oct 15, 3:38�pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi, Can anybody say please, what ways exist in GAE environment to create web forms like in GWT widgets library. Is it possible to use tcl\tk from python? Thanks in advance! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: How can I get a GAE Account?
申诉成功了,哈哈 剩下的时间就是好好学习python了 On 10月16日, 上午8时58分, kang [EMAIL PROTECTED] wrote: 我是在没有手机验证的时候就注册了的~ 现在做了一个 http:luck.appspot.com 2008/10/15 robbie [EMAIL PROTECTED] 不是邀请注册么? 那各位是怎么注册帐号的?我也是注册不了 On 10月15日, 下午9时00分, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: 哦,是邀请共同开发啊~,看来没有邀请注册的~ 哎~,失望哦~~~ 还是要谢谢你啊! On 10月15日, 下午6时19分, Kang [EMAIL PROTECTED] wrote: [EMAIL PROTECTED]:哎,我最近才学的Python,看了GAE的一些视频之后,对GAE很感兴趣,就是申请不到账号,这棵咋搞哦~~,应该是可以邀请别-人的吧? On 10月15日, 下午4时00分, Kang[EMAIL PROTECTED]wrote:我也不知道怎么给你。。因为我也在中国。。 [EMAIL PROTECTED]:Why nobody pay attention to me? Is there anyone could send a invitation to me? thanks! On 10月14日, 下午11时22分, [EMAIL PROTECTED][EMAIL PROTECTED]wrote:My country is not in the Supported mobile providers list, but how can I get the Google App Engine Account?- 隐藏被引用文字 - - 显示引用的文字 - -- Stay hungry,Stay foolish. --~--~-~--~~~---~--~~ You 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: ModelChoiceField
I just created my own ModelMultipleChoiceField class by copying and pasting and changing up some stuff in the ModelChoiceField. On Oct 13, 3:42 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: So below I have a snippet of my model form code. I was wondering does anyone know the correct format for the choices attribute of the ModelChoiceField class. channel = djangoforms.ModelChoiceField(Channel,query=Channel.all().filter('publish_status = ',True).filter('user = ',users.get_current_user()),choices=(Channel.title,Channel.title),widget=djangoforms.forms.SelectMultiple) Thanks, 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-appengine@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] How can I get a GAE Account?
My country is not in the Supported mobile providers list, but how can I get the Google App Engine Account? --~--~-~--~~~---~--~~ You 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: How can I get a GAE Account?
Why nobody pay attention to me? Is there anyone could send a invitation to me? thanks! On 10月14日, 下午11时22分, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: My country is not in the Supported mobile providers list, but how can I get the Google App Engine Account? --~--~-~--~~~---~--~~ You 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] ModelChoiceField
So below I have a snippet of my model form code. I was wondering does anyone know the correct format for the choices attribute of the ModelChoiceField class. channel = djangoforms.ModelChoiceField(Channel,query=Channel.all().filter('publish_status = ',True).filter('user = ',users.get_current_user()),choices=(Channel.title,Channel.title),widget=djangoforms.forms.SelectMultiple) Thanks, 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-appengine@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Newbie question - save geocode to the Datastore
Without getting too much into the details, you'll probably want to do an asynchronous (AJAX) request to your web app. Basically, once the geocode request has gone through and you have the coordinates, fire off another request to post the coordinates and associated data to your AppSpot for storage. -B On Oct 9, 3:56 pm, Yang [EMAIL PROTECTED] wrote: Hi, I am sorry for such newbie question... I would appreciate any help. I am trying to write a simple code which allows a user to place markers on a map and save them. Those saved markers would be displayed to everyone. There are more thing I want to do past it, but I am stuck at saving the markers geocode to the Datastore. I created db class, and initialized instance of it, but since marking activity happens in javascript, I don't know how to pass the geocode information from javascript portion to body part of HTML code so that it could be saved. Also, in reverse direction, I need to pass geocodes of all markers in the map canvas to display them. I am very new to the whole Google App Engine thing, so any help would be much much appreciated. Thank you, -Yang --~--~-~--~~~---~--~~ You 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] I can't receive the sms from google appengine
I had never ever received the sms from google appengine, but when I click send button again, it said that The phone number has been sent too many messages or has already been used to confirm an account.. Is there any problem with sms system of google appengine? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Memcache not working?
Sorry I forgot a return The example of use is: def get_items(self): return model.Item.all().order('-creation_date').fetch(10) I copied the wrong thing because I'm also trying to cache chunks of HTML def get_items(self): items = model.Item.all().fetch(10) return self.render_chunk('templates/index-items.html', {'items': items}) On Oct 8, 4:41 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I have this funcion to cache things: def cache(self, key, function, timeout=0): logging.debug('looking for %s in the cache' % key) data = memcache.get(key) if data is not None: logging.debug('%s is already in the cache' % key) return data else: data = function.__call__() logging.debug('inserting %s in the cache' % key) memcache.add(key, data, timeout) return data An example of use: items = self.cache('index_items', self.get_items) def get_items(self): items = model.Item.all().order('-creation_date').fetch(10) With the SDK it works. But when uploading the application I just see messages saying that nothing is in the cache. I never see xxx is already in the cache. I have cached all the queries in my main page because it is 6000 megacycles of average CPU. But if the caching is not working I don't know what I can do. I have also tried to cache chunks of HTML, but it still doesn't cache anything. In the SDK I go to the memcache viewer and I see the chunk of HTML cached if I put the key I use to store it in the cache. The debug messages says me that is not finding anything in the cache. And also the chunks of HTML write a tiemstamp and in the development environment (localhost) I see always the same timestamp until I call to memecache.delete but on the appspot page I always see a different timestamp so I'm sure it is caching nothing. --~--~-~--~~~---~--~~ You 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Datastore timeout error
Hello, I'm developing a quiz application now and I have a problem with datastore. Most of the time, application saves the data into the datastore, but sometimes, I get an exception. Exception in request: Traceback (most recent call last): File /base/data/home/apps/django/core/handlers/base.py, line 82, in get_response response = callback(request, *callback_args, **callback_kwargs) File /base/data/home/apps/views.py, line 701, in QuizResult db.put(result) File /base/python_lib/versions/1/google/appengine/ext/db/__init__.py, line 1006, in put keys = datastore.Put(entities) File /base/python_lib/versions/1/google/appengine/api/datastore.py, line 162, in Put raise _ToDatastoreError(err) File /base/python_lib/versions/1/google/appengine/api/datastore.py, line 1627, in _ToDatastoreError raise errors[err.application_error](err.error_detail) Timeout Does anyone know about this error? Keiya Kanno --~--~-~--~~~---~--~~ You 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Per Session Datastore
This might help others starting from the cookie-ignorant place I started from. Never got back any advice, so after a whole lot of Googling I ended up putting code like this on my index page: import sha, datetime, time, Cookie, os #Set session ID cookie if one doesn't already exist. cookie_string = os.environ.get('HTTP_COOKIE') if cookie_string: cookie = Cookie.SimpleCookie() cookie.load(cookie_string) if not cookie.has_key('sid'): sid = sha.new(repr(time.time())).hexdigest() expires = datetime.datetime.now() + datetime.timedelta(hours=2) expires = expires.strftime('%a, %d %b %Y %H:%M:%S') self.response.headers.add_header( 'Set-Cookie', 'sid=%s' % sid + '; expires=%s' % expires) else: sid = sha.new(repr(time.time())).hexdigest() expires = datetime.datetime.now() + datetime.timedelta(hours=2) expires = expires.strftime('%a, %d %b %Y %H:%M:%S') self.response.headers.add_header( 'Set-Cookie', 'sid=%s' % sid + '; expires=%s' % expires) A more elegant logic is undoubtedly possible, but is seems to set a session id cookie in all cases (whether there are no cookies or cookies -- i.e. for Google Analytics -- but not the SID cookie) I then check for the SID on other pages with cookie_string = os.environ.get('HTTP_COOKIE') cookie = Cookie.SimpleCookie() cookie.load(cookie_string) sid = cookie['sid'].value I then use this SID for all saves and queries to the datastore per a user's (i.e., a guest, as I don't require logins) session. Seems to work, though I've just uploaded the code. Let's see how it holds up. No more concurrency issues though. If people have found a better solution, I'd like to hear about it. 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-appengine@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Cleaning Out Old DB Entries
I'm backing guest sessions with the datastore. For the most, part, entries get cleaned up as the user goes (unsaved entities get deleted). However, there will be lingerers as the user exits the site, etc. What's the best means of cleaning lingerers these up? Entity has a datetime.datetime field (called creation). Will code this simple suffice: def cleanDB(): Clean out entities older than two hours. results = PalettesDB.all() for result in results: age = datetime.datetime.now() - result.creation if age.seconds 7200: db.delete(result) How can I call it in a cron job fashion? (It doesn't necessarily need to run with ever user's visit.) 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-appengine@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Cleaning Out Old DB Entries
Thanks a lot for the advice. Still quite a novice, so can you tell me more about how to implement the function? Not entirely sure where to stash the code (function in main.py w/ all the rest of my code) or how to call it with webcron (which sounds like exactly what I need). On Oct 6, 3:56 pm, David Symonds [EMAIL PROTECTED] wrote: On Mon, Oct 6, 2008 at 6:12 PM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: What's the best means of cleaning lingerers these up? Entity has a datetime.datetime field (called creation). Will code this simple suffice: def cleanDB(): Clean out entities older than two hours. results = PalettesDB.all() for result in results: age = datetime.datetime.now() - result.creation if age.seconds 7200: db.delete(result) How can I call it in a cron job fashion? (It doesn't necessarily need to run with ever user's visit.) You'd be better with code like: def cleanDb(): cutoff = datetime.datetime.now() - datetime.timedelta(hours=2) for result in PalettesDB.all().filter('creation ', cutoff).order('creation') result.delete() That's much simpler, shifts the filtering burden to the datastore's index (and thus much faster), and prevents any session from lingering indefinitely. You can just hook that up to a very simple handler, and ping it every hour or so via something like webcron. Dave. --~--~-~--~~~---~--~~ You 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Cleaning Out Old DB Entries
Ah, never mind. I see how it works. Simple: add handler to app.yaml. Will give it a go. Cheers, Jason On Oct 6, 4:16 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Thanks a lot for the advice. Still quite a novice, so can you tell me more about how to implement the function? Not entirely sure where to stash the code (function in main.py w/ all the rest of my code) or how to call it with webcron (which sounds like exactly what I need). On Oct 6, 3:56 pm, David Symonds [EMAIL PROTECTED] wrote: On Mon, Oct 6, 2008 at 6:12 PM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: What's the best means of cleaning lingerers these up? Entity has a datetime.datetime field (called creation). Will code this simple suffice: def cleanDB(): Clean out entities older than two hours. results = PalettesDB.all() for result in results: age = datetime.datetime.now() - result.creation if age.seconds 7200: db.delete(result) How can I call it in a cron job fashion? (It doesn't necessarily need to run with ever user's visit.) You'd be better with code like: def cleanDb(): cutoff = datetime.datetime.now() - datetime.timedelta(hours=2) for result in PalettesDB.all().filter('creation ', cutoff).order('creation') result.delete() That's much simpler, shifts the filtering burden to the datastore's index (and thus much faster), and prevents any session from lingering indefinitely. You can just hook that up to a very simple handler, and ping it every hour or so via something like webcron. Dave. --~--~-~--~~~---~--~~ You 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Why Google App Engine is broken and what Google must do to fix it.
Jorge, One thing you have to remember it is not what Guido or the engineers want. If Google App Engine is to succeed it is what the customers want. If it is designed as you have stated it will never recoup what Google has spent so far let alone down the road. Google App Engine has so many many limitations. Regardless if the limitations are by design or not it is virtually unusable by 99% of all developers. Can Google make a business off the remaining 1%? I think Google should pay much more attention to what the posters here are asking for and less on what they have designed App Engine for. Failure to listen to your customers is Always a Mistake! Defend it if you like. App Engine is going to be a huge money pit for Google. Engineers are terrible Businessmen and even worse Marketers Guido said as much in his talk. In the end Google is a publicly owned corporation and not a University and ultimately Google must answer to its customers and stockholders. The goal is to increase shareholder value through offering products and services the broad market demands and not basic research. App Engine in it's current form seems more like someone's thesis project more than a marketable computing platform. On Oct 6, 5:13 am, Jorge Vargas [EMAIL PROTECTED] wrote: On Sun, Oct 5, 2008 at 4:47 AM, Aral Balkan [EMAIL PROTECTED] wrote: Hi Jorge, You clearly don't get must of the stuff you are talking about. ALL the quotas are there for you to be efficient they the whole purpose, they are not hard coded to make your live bad they are in there to make the system better. I feel that you have missed the point of my post. Rest assured that I get the stuff I'm talking about. Please re-read the post and you will see that it is not an attempt to bash Google App Engine. Quite the contrary, it is a simple summary of the issues encountered by one developer while developing a real-world application. The reason for the post is to highlight these issues so that they can be fixed and thus, ultimately, to improve Google App Engine. As you can see from the replies here, and on the post, I am not the only one who has encountered these issues either. We provide constructive criticism for the things that we care about so that they can evolve. I invite you to add value to the conversation and help make Google App Engine better. did you watch the video I posted? they are aware of anything you propose, and half of them are non-fixable specially because they are impositions made so the system won't crumble with bad code, the other half are being worked on and as Guido suggested will probably be out before the end of the year. Aral --~--~-~--~~~---~--~~ You 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Getting The __searchable_text_index Property
Hi! With SearchableModels is it possible to find out what the value of the keywords associated with that object is? I believe these keywords are stored in the property __searchable_text_index, but I can't access that as when I do I get the following error: Traceback (most recent call last): File /base/python_lib/versions/1/google/appengine/ext/webapp/ __init__.py, line 499, in __call__ handler.get(*groups) File /base/data/home/apps/silicon/1.1066/readthread.py, line 81, in get vals['keywords'] = ', '.join(thread.__searchable_text_index) AttributeError: 'Thread' object has no attribute '_ReadThread__searchable_text_index' As can be seen, it appears thread doesn't have the property __searchable_text_index when, at the same time, the property appears in the data-store. Since SearchableModel provides such a nice keyword- builder already, I though it would be good to use it but I can't tell how to get the keywords! Any help would be greatly appreciated! Thanks, Larry --~--~-~--~~~---~--~~ You 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: High CPU warnings on simple PUT with implicit references.
The model is super simple; at this point, the only field that's being indexed is the region, which is a normalized/tokenized version of the latitude/longitude pair. Best, Ben On Oct 2, 2:39 pm, uprise78 [EMAIL PROTECTED] wrote: How about your model? What 'shape' is it? Do you have any string properties that don't need to be indexed? It does seem quite odd that a simple put like that is getting a warning though. It basically makes an app useless if that is a proper recording. On Oct 2, 2:27 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I'm trying to build a system where a shopkeeper can list promotional items and mark their store on a map, so that anyone searching for those items can find a place nearby that has a deal on them. The idea is that a shopkeeper has just one store/identity, but they may have multiple items, which I want searchable, so I'm using implicit references, as it seems like a good way to go. Here's my code for saving the sale. Ignore all the long/lat stuff; that's a different conversation: class SaveSale(webapp.RequestHandler): def get(self): address = cgi.escape(self.request.get('address')) lattitude,longitude = cgi.escape(self.request.get('point')).split(',') wholeLat,decLat = lattitude.split('.') mLat = wholeLat + decLat[0] wholeLong,decLong = longitude.split('.') mLon = wholeLong + decLong[0] token = str(mLon)+','+str(mLat) sale = SaleLocation(longitude = longitude, lattitude = lattitude, address = address, region = token).put() SaleItem(salelocation = sale, name = 'itemName').put() # hard-coded for now, just for testing purposes self.response.headers['Content-Type'] = 'text/xml' self.response.out.write('responsenoteSale Saved/note/ response') If I take out that SaleItem(...).put() command, I get a very reasonable average CPU reading of something like 300-400. With it in, this save action immediately gets a CPU warning with values ranging from 800 to well over 1000. Gets are a lot lighter, so I'm not worried about the overall volume, but I'm concerned that something that is ostensibly supported in the documentation can't be done without a CPU warning. That warning says the code should be optimized, but there's just not that much there to optimize. I realize that I could put this value in an array within the SaleLocation object, or even in a comma delimited string in the SaleLocation object, but that defeats the fairly elegant purpose of the implicit link between these objects. Is there a way to do things this way and reduce the CPU impact, or am I screwed? Alternately, is the CPU meter screwed, in which case, should I plunder forward, assuming it'll be fixed? Best, Ben --~--~-~--~~~---~--~~ You 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Python Support
Wouldn't Python 3 support be possible without breaking any code by simply requiring developers to change their app.yaml to include: runtime: python3 That, I assume, is the use of the runtime parameter? Python 2.6 will be good too, but I would especially love to see Python 3 when it's released. Can anyone from Google give any information about this please? --~--~-~--~~~---~--~~ You 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] High CPU warnings on simple PUT with implicit references.
I'm trying to build a system where a shopkeeper can list promotional items and mark their store on a map, so that anyone searching for those items can find a place nearby that has a deal on them. The idea is that a shopkeeper has just one store/identity, but they may have multiple items, which I want searchable, so I'm using implicit references, as it seems like a good way to go. Here's my code for saving the sale. Ignore all the long/lat stuff; that's a different conversation: class SaveSale(webapp.RequestHandler): def get(self): address = cgi.escape(self.request.get('address')) lattitude,longitude = cgi.escape(self.request.get('point')).split(',') wholeLat,decLat = lattitude.split('.') mLat = wholeLat + decLat[0] wholeLong,decLong = longitude.split('.') mLon = wholeLong + decLong[0] token = str(mLon)+','+str(mLat) sale = SaleLocation(longitude = longitude, lattitude = lattitude, address = address, region = token).put() SaleItem(salelocation = sale, name = 'itemName').put() # hard-coded for now, just for testing purposes self.response.headers['Content-Type'] = 'text/xml' self.response.out.write('responsenoteSale Saved/note/ response') If I take out that SaleItem(...).put() command, I get a very reasonable average CPU reading of something like 300-400. With it in, this save action immediately gets a CPU warning with values ranging from 800 to well over 1000. Gets are a lot lighter, so I'm not worried about the overall volume, but I'm concerned that something that is ostensibly supported in the documentation can't be done without a CPU warning. That warning says the code should be optimized, but there's just not that much there to optimize. I realize that I could put this value in an array within the SaleLocation object, or even in a comma delimited string in the SaleLocation object, but that defeats the fairly elegant purpose of the implicit link between these objects. Is there a way to do things this way and reduce the CPU impact, or am I screwed? Alternately, is the CPU meter screwed, in which case, should I plunder forward, assuming it'll be fixed? Best, Ben --~--~-~--~~~---~--~~ You 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Did something change on the live site for caching?
http://gaeutilities.appspot.com/flash The setting a flash message then display on the next page view used to work correctly on this demo page. However, while looking into another problem (which will be my next post) I noticed that I have to shift- refresh to see the flash messages now. It looks like somethings changed. I realize I can set cache headers on my own, and will do that with the next update I'll make sometime this week. But, I was curious what might have changed to cause this? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Are all servers in the cloud up to date?
http://code.google.com/p/appengine-utitlies/issues/detail?id=33 This issue was recently filed on the appengine-utilities project. This problem was actually resolved several updates ago when some changes were made for the pickling process. Seeing it happen live now causes me to be concerned that not all application servers in the cloud are getting updated? --~--~-~--~~~---~--~~ You 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Are all servers in the cloud up to date?
This one: (issue 588) http://code.google.com/p/googleappengine/issues/detail?id=588can=5q=eoferrorcolspec=ID%20Type%20Status%20Priority%20Stars%20Owner%20Summary%20Log On Sep 30, 3:34 pm, Marzia Niccolai [EMAIL PROTECTED] wrote: Hi, All servers on App Engine are running the same version of App Engine, so this is not the issue. What was the issue fix that you believe fixed this for appengine utilities? -Marzia On Tue, Sep 30, 2008 at 5:54 AM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: http://code.google.com/p/appengine-utitlies/issues/detail?id=33 This issue was recently filed on the appengine-utilities project. This problem was actually resolved several updates ago when some changes were made for the pickling process. Seeing it happen live now causes me to be concerned that not all application servers in the cloud are getting updated? --~--~-~--~~~---~--~~ You 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Using exec() in GAE
dammit, I got confused. I mean the exec statement, not the eval() function. But meanwhile I solved my issues: exec was choking on the wrong sequence of line separators. Thank you! W. --~--~-~--~~~---~--~~ You 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Using exec() in GAE
Hello, I could not find it in the documentation and it kind of seems to work. But please, put my worries at rest: is it ok to exec() a string in the Google App Engine? Thank you, W. --~--~-~--~~~---~--~~ You 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Per Session Datastore
First post related to my first ever app, so watch out. I've had a lot of fun making this: http://chroma-some.appspot.com/ And I've gotten a fair volume of usage which has encouraged me to keep polishing it. One issue I was having was attempting to store too many data structures (big dictionary of color terms, session-related dictionaries, etc) in memory in the Main(). I was getting errors as a result. I memcached the big dictionary of color terms -- I want that shared across users -- and that seems to work fine. Searches are reasonably fast. I also created a datastore with the intention of storing the user's per-session saves (permanent gallery sort-of-a-thing will come later). This flushes into another permanent datastore at the start of each session (so I can track what colors are popular across time and region). This perm datastore works fine as well. But now I'm experiencing concurrency issues with what I intended to be a per-session datastore -- I can see other users session saves. They can see mine. I delete theirs, creating errors when they try to re- access, etc. Your classic concurrency crises! I could use some help -- broad stroke steps to take -- to sort of quickly implement a solution. Obviously, I need a user ID by which to filter the session saves, but what's the best practice there? How to create it? Where to store it (as a cookie)? Later I plan to make use of the Google User functionality, but at this stage I'd just to get the per-session datastore working w/o concurrency problems. Thanks in advance for any help! 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-appengine@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Line drawing+Text graphics in delivered HTML
In the usual Python universe, your best bet would be PIL, the Pyton Image Library. Since you cannot use PIL inside Google App and the Image library appears not to have the functions you need (drawing on a bitmap), I am not sure your problem can be solved inside Google App. A word from above? --~--~-~--~~~---~--~~ You 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Having trouble uploading application.
I'm sorry, this is going to sound very beginner-ish (because I am one obviously). I've made my application and I'm trying to upload it but I keep running into problems. I'm using Ubuntu, and I go into the terminal and type /home/*username*/Documents/google_appengine/ appcfg.py update /home/russell/Documents/*nameofapp*/ and get the output bash: syntax error near unexpected token `newline'. Am I doing something totally obvious 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-appengine@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] how can I upload files bigger than 4MB use django and gae
I want to upload a 200MB file in google app engine. What can I do? Thanks in advance. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Fwd: New Admin Console Released
I like the ease at which bottlenecks can be identified but what does this mean: This URI uses a high amount of CPU and may soon exceed its quota. Does each URI have its own quota now? Or are the quotas for the whole application? Because I'm nowhere near using up my entire application quota, but I get that warning for one of my URIs (which I knew was inefficient). On Sep 18, 6:30 pm, Marzia Niccolai [EMAIL PROTECTED] wrote: Hi, This morning we released a new Admin Console which includes a more descriptive accounting of your application's CPU stats. We now display the amount of CPU consumed per request, as well as the avg amount of CPU used per handler. In addition to the CPU stats, you can see the short-term request rate per handler, as well as the total number of requests a day for each handler. Sign in to the admin console and check it out! -Marzia --~--~-~--~~~---~--~~ You 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Compilation of unanswered datastore questions
Benchmark wise, one thing I noticed recently was this. Working on an eeepc using the development SDK, I had an operation that did 122 puts. This took over a minute to complete. I modified it so I created a json formatted list which then only required 1 put, and the difference was incredible. About 2 seconds for the entire operation to complete. I do not know how this compares to the live version of appengine, but on the development sdk it was huge. --~--~-~--~~~---~--~~ You 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Having trouble using my own domain name with app engine
Jan and I have discussed this already, but for the record and anyone else who struggled with this (like me). It seems you cannot have two duplicate prefixes, even if the complete URLs are different. Look on the Dashboard of your Google Domain for an App in your that uses www as a prefix (like Google Web Pages) and rename it to something else. On Sep 3, 4:36 pm, Jan de Wild [EMAIL PROTECTED] wrote: thanks for your reaction. my problem is that i can t add the www subdomain too point to my app if i enter www in google apps it is not added to the list of subdomains , no warning noting. sorry for my bad english On 29 aug, 19:10, Tony Smith [EMAIL PROTECTED] wrote: you don't need to remove your domain from google apps. Instead add the appengine application to your domain via the dashboad in GAE. It will ask you to login with you admin for your domain. Then add the url that you want to use for the application (app.yourdomain.com). See this article for more info:http://www.google.com/support/a/bin/answer.py?hl=enanswer=91080 It worked perfectly for me. On Aug 27, 4:55 pm, Polyakov,Oleg V [EMAIL PROTECTED] wrote: I followed getting started instructions for creating an application with app engine, and it works. (http://spobby.appspot.com/) Now, I am trying to map this to the domain name that I bought from Yahoo. I tried following instructions on the Google Apps for Administratorshttp://www.google.com/support/a/bin/answer.py?answer=91077useful=0s... However, this doesn't work for me. 1) I already registered with Google Apps for spobby.com account. 2) When I go tohttp://appengine.google.com/deployment/newdomain?app_id=spobby, and enter spobby.com, then click on Add domain button, it will try to register me for http://spobby.spobby.cominsteadofhttp://spobby.com Two possible resolutions that I have in mind: 1) Remove myself from google apps for spobby.com account, not sure how to do it, and try repeating steps again. 2) Somehow add CNAME and Name Servers in my yahoo control panel for google account. I don't know values for cname and name servers. Please advice me what I am missing. --~--~-~--~~~---~--~~ You 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Query filter based on the Longitude attribute of a db.GeoPt property
Thanks for the follow-up. I guess one could still use the geotoken (my own term) idea, but only save one token (map-graph-square) per saved point. Then, when someone searches on a given point, tokenize the search point, search for anything that shares the same token, and then go back for for data in the surrounding tokens. In my example, that means 9 DB calls instead of one, but that's pretty manageable... I don't know how it scales if you want to have greater variability in your search range, but you could either define your tokens to cover more ground, or increase the number of tokens searched. Looking at the current quota limits, with 2.5 million datastore requests per day, I could handle 200,000 searches per day (250,000 * 9 = 2.45 million), which leaves room for 50,000 posts per day (one datastore operation per post), all under quota. Once this turns into a paid service, if I have to pay for more than that, I think I'll be happy to do so. -B On Sep 9, 2:52 pm, uprise78 [EMAIL PROTECTED] wrote: The exploding index issue can occur with list properties readily. Properties with multiple values, such as using a list value or a ListProperty model, store each value as a separate entry in an index. With a 9 element list you just created 9 indexes. If you expand the box to get some more resolution such as the 13 box example, you will then have 13 indexes on that property alone. You can see where this is going. It gets compounded if you even 1 single other list element in your model. If you had another list element with just 2 records you would have a total of 20 indexes (18 for the 2 lists and then 2 for the basic indexing). This causes a number of issues. The two you pointed out, updating and data storage. Updating has to hit each and every index so updates would be a huge bottleneck if the model is updated often. The other issue is (and correct me if I'm wrong on this anyone with more experience) is that because lists are stored as separate entities Big Table has to do multiple queries to return your result set. A bit of testing would probably be a good idea to see what the speed is. If you have a small dataset, you definitely won't have an issue. Check out this: http://code.google.com/appengine/docs/datastore/queriesandindexes.htm... --~--~-~--~~~---~--~~ You 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Query filter based on the Longitude attribute of a db.GeoPt property
I've got a better solution than geohashing. I break down the grid into sub-degree squares by truncating after the first decimal point, and then when I save something that I need to find on the map later, I save metadata with that point indicating the surrounding grid squares. So if I have a point with long -122.123123123 and lat 35.56565, that's in a grid square called -122.1x35.5, and it's surrounded as follows: [-122.2x35.6][-122.1x35.6][-122.0x35.6] [-122.2x35.5][-122.1x35.5][-122.0x35.5] [-122.2x35.4][-122.1x35.4][-122.0x35.4] Those are all represented in my object as a list (db.StringListProperty, so you have to do the right permutations to make them into strings), and because of the way lists work, if a point that you're searching on is in any of the grid squares associated with a saved point, that saved point will come up. To wit, if you have saved that above point, and someone comes in searching on an address that corresponds to LONG -122.0857 LAT 35.6, that corresponds to grid square '-122.0x35.6', which is in your upper right hand corner. Thus, if you search for something like: square = '-122.0x35.6' points = (SELECT * FROM Locations WHERE gridList=:1, square) ...you'll find that the original point we saved above will return. It's all about metadata. Don't think in terms of inequalities and boundary conditions, think in terms of inclusive ranges. Best, Ben On Jul 17, 2:26 pm, Nevin Freeman [EMAIL PROTECTED] wrote: I'm trying to figure out how to incorporate a filter based on the longitude attribute of an Entity's db.GeoPt property. I want to do something like this: GeoDataObj_query = GeoDataObj.gql(WHERE latlng.lat :1 AND latlng.lat :2 AND latlng.lon :3 AND latlng.lon :4 , maxLat, minLat, maxLng, minLng) latlng is my db.GeoPt property, and you can't just do latlng.lat or latlng.lon. How do I access that longitude attribute, and can I do it within the bounds of the rule that limits inequality filters to a single property? Thanks, Nevin --~--~-~--~~~---~--~~ You 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Problems with Geohash / Inaccuracy / ow to deal with this ?
I've got a better solution than geohashing. I break down the grid into sub-degree squares by truncating after the first decimal point, and then when I save something that I need to find on the map later, I save metadata with that point indicating the surrounding grid squares. So if I have a point with long -122.123123123 and lat 35.56565, that's in a grid square called -122.1x35.5, and it's surrounded as follows: [-122.2x35.6][-122.1x35.6][-122.0x35.6] [-122.2x35.5][-122.1x35.5][-122.0x35.5] [-122.2x35.4][-122.1x35.4][-122.0x35.4] Those are all represented in my object as a list (db.StringListProperty, so you have to do the right permutations to make them into strings), and because of the way lists work, if a point that you're searching on is in any of the grid squares associated with a saved point, that saved point will come up. To wit, if you have saved that above point, and someone comes in searching on an address that corresponds to LONG -122.0857 LAT 35.6, that corresponds to grid square '-122.0x35.6', which is in your upper right hand corner. Thus, if you search for something like: square = '-122.0x35.6' points = (SELECT * FROM Locations WHERE gridList=:1, square) ...you'll find that the original point we saved above will return. It's all about metadata. Don't think in terms of inequalities and boundary conditions, think in terms of inclusive ranges. Best, On Sep 3, 1:23 pm, Pierre [EMAIL PROTECTED] wrote: Hi, I need to find points (lat/lng) within a certain bounding box. To do so, I triedGeohashpython implementation (http://mappinghacks.com/ code/geohash.py.txt). Problem's data is : - I have 2 points (South west SW corner / North east NE corner) describing a geographic Bounding box - I have a model (let's call it 'Poi') having a field geohash of type Db.StringProperty + Lat and Lng field (Float) Question is : How on earth (lol :-) ) can I find all Poi within my bounding box ? I've already tried something like : CreateGeohashfor SW, createGeohashfor NE and do something like : SELECT * FROM Poi WHEREgeohash:1 andgeohash= :2,geohash(SW),geohash(NE) Also tried with geoindex, at different depth but all this fails and still give points not located within Bounding box. Also tried like describe in http://labs.metacarta.com/blog/27.entry/ geographic-queries-on-google-app-engine/ to create a small surrounding box for each Poi and then create ageohashfor this specific bounding box to be in between my SW-NE bounding box Nothing is working even with not worst case (I mean equatorial problem...) case/ Any help will be greatly appreciated. Thanks all, Pierre --~--~-~--~~~---~--~~ You 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Datastore query limitations
Dave, Thank you for this post. Your description of how to handle date ranges led me to a solution on the map lat/long issue that has gotten so much discussion in various threads. I've posted the following in a couple of other threads as well, since it seems to be a real issue. But the solution is redundant properties, as you indicate. Basically, the idea is finding a way to tokenize a region so that an infinite number of points becomes a block... What I do is that I break down the grid into sub-degree squares by truncating after the first decimal point, and then when I save something that I need to find on the map later, I save metadata with that point indicating the surrounding grid squares. So if I have a point with long -122.123123123 and lat 35.56565, that's in a grid square called -122.1x35.5, and it's surrounded as follows: [-122.2x35.6][-122.1x35.6][-122.0x35.6] [-122.2x35.5][-122.1x35.5][-122.0x35.5] [-122.2x35.4][-122.1x35.4][-122.0x35.4] Those are all represented in my object as a list (db.StringListProperty, so you have to do the right permutations to make them into strings), and because of the way lists work, if a point that you're searching on is in any of the grid squares associated with a saved point, that saved point will come up. To wit, if you have saved that above point, and someone comes in searching on an address that corresponds to: LONG -122.0857 LAT 35.6 that corresponds to grid square '-122.0x35.6', which is in your upper right hand corner. Thus, if your code is something like... square = '-122.0x35.6'# based on whatever normalizing function you use points = (SELECT * FROM Locations WHERE gridList=:1, square) ...you'll find that the original point we saved above will return. Of course, this is a simple example. Each grid square can be any size and shape, and you can cluster as many as you like in whatever shape you like. For me, a 3x3 grid of 0.1 degree squares is good enough. 0.1 degrees is approximately 7 miles in the north/south direction, and up to that big in the east-west dimension, at least at the equator. It's a blunt tool, but once I've got a reasonable set of map data back, then I can do further operations to throw out what I don't need. It's all about metadata. Don't think in terms of inequalities and boundary conditions, think in terms of inclusive ranges. With a little creativity, you don't need inequalities, at least for this problem. Best, Ben On Sep 7, 7:37 am, David Symonds [EMAIL PROTECTED] wrote: On Sun, Sep 7, 2008 at 9:42 PM, Nash [EMAIL PROTECTED] wrote: This is the part of the appengine that starts to get frustrating, the more criteria you will want to add, the more impossible you will find it to be. If all you are looking for is to find data for a particular date then I suggest adding three fields to your entity: year, month, day. If you want to get results for a particular day, just provide values for these attributes. By breaking the date unto three parts, you can also get results by month, by year etc. But if you have want to pull data between two points and between two dates, then good luck! In that case, you would use multiple properties: one for the whole date, and then split it out Y/M/D. Remember: BigTable is designed for lots of redundant data that makes it really easy and fast to index and find what you want. Don't be afraid to drop in redundant properties. Dave. --~--~-~--~~~---~--~~ You 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Datastore query limitations
True, but there's no reason that you couldn't make an approximation for each range within reason. For my app, which is about finding garage sales, I assume that nobody wants to go more than 50 miles from their starting point. I can certainly imagine applications where the range might be a lot more free-floating, but this might resolve the problem for a lot of cases. -B On Sep 9, 11:19 am, Peter [EMAIL PROTECTED] wrote: Hi Ben, Interesting approach, but only works if you know how you want to break things up ahead of time. I'd like to be able to pick a point and say 'give me everything within 1km' or 'give me everything within 100km'. Cheers, Pete On Sep 9, 4:30 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Dave, Thank you for this post. Your description of how to handle date ranges led me to a solution on the map lat/long issue that has gotten so much discussion in various threads. I've posted the following in a couple of other threads as well, since it seems to be a real issue. But the solution is redundant properties, as you indicate. Basically, the idea is finding a way to tokenize a region so that an infinite number of points becomes a block... What I do is that I break down the grid into sub-degree squares by truncating after the first decimal point, and then when I save something that I need to find on the map later, I save metadata with that point indicating the surrounding grid squares. So if I have a point with long -122.123123123 and lat 35.56565, that's in a grid square called -122.1x35.5, and it's surrounded as follows: [-122.2x35.6][-122.1x35.6][-122.0x35.6] [-122.2x35.5][-122.1x35.5][-122.0x35.5] [-122.2x35.4][-122.1x35.4][-122.0x35.4] Those are all represented in my object as a list (db.StringListProperty, so you have to do the right permutations to make them into strings), and because of the way lists work, if a point that you're searching on is in any of the grid squares associated with a saved point, that saved point will come up. To wit, if you have saved that above point, and someone comes in searching on an address that corresponds to: LONG -122.0857 LAT 35.6 that corresponds to grid square '-122.0x35.6', which is in your upper right hand corner. Thus, if your code is something like... square = '-122.0x35.6' # based on whatever normalizing function you use points = (SELECT * FROM Locations WHERE gridList=:1, square) ...you'll find that the original point we saved above will return. Of course, this is a simple example. Each grid square can be any size and shape, and you can cluster as many as you like in whatever shape you like. For me, a 3x3 grid of 0.1 degree squares is good enough. 0.1 degrees is approximately 7 miles in the north/south direction, and up to that big in the east-west dimension, at least at the equator. It's a blunt tool, but once I've got a reasonable set of map data back, then I can do further operations to throw out what I don't need. It's all about metadata. Don't think in terms of inequalities and boundary conditions, think in terms of inclusive ranges. With a little creativity, you don't need inequalities, at least for this problem. Best, Ben On Sep 7, 7:37 am, David Symonds [EMAIL PROTECTED] wrote: On Sun, Sep 7, 2008 at 9:42 PM, Nash [EMAIL PROTECTED] wrote: This is the part of the appengine that starts to get frustrating, the more criteria you will want to add, the more impossible you will find it to be. If all you are looking for is to find data for a particular date then I suggest adding three fields to your entity: year, month, day. If you want to get results for a particular day, just provide values for these attributes. By breaking the date unto three parts, you can also get results by month, by year etc. But if you have want to pull data between two points and between two dates, then good luck! In that case, you would use multiple properties: one for the whole date, and then split it out Y/M/D. Remember: BigTable is designed for lots of redundant data that makes it really easy and fast to index and find what you want. Don't be afraid to drop in redundant properties. Dave. --~--~-~--~~~---~--~~ You 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Query filter based on the Longitude attribute of a db.GeoPt property
I just came up with this last night, and have only done limited testing. I can guess what you mean by the exploding index problem, but are there any particulars you can give? Does the exploding index problem impact mostly total data storage, time to index, or performance on the GQL queries? Or some combination of the above? I definitely mean to do some testing, but my assumption--tell me if I'm on the wrong track--is that the indexing is primarily a challenge when adding new data, and maybe in data storage. But if I'm right here, then it's not too much of an issue for me, as I imagine that my app will mostly see incremental additions of data to be indexed; I won't be doing bulk loads which I can imagine could bog things down significantly. Any links to other threads on this issue would be appreciated. -Ben (readyassist) On Sep 9, 8:52 am, uprise78 [EMAIL PROTECTED] wrote: Won't having a list property like that get you the exploding index problem? Have you done any testing with a large subset of data? --~--~-~--~~~---~--~~ You 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Configuring CNAME *and* MX Records?
I see what you're getting at-- but it's not so much any sort of conflict, and more poor documentation on Google's part. Actually, after reading your message, I have yet another correction here: it was not so much a lack of documentation as my inability to find it. That FAQ entry directly answers my question. In fact, I thought the majority of websites handled domains without the www, but running some quick tests (yahoo, google, msn) shows me now that almost all sites actually do redirect to the url with the www. It must be because I am so used to typing it without the www! But anyway, that does fix it. I appreciate the help, Ross. --~--~-~--~~~---~--~~ You 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Making A 404 Error Page
Perfect! Thanks guys. :) --~--~-~--~~~---~--~~ You 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Making A 404 Error Page
Hi! As the title suggests, I am very new to Google App Engine. Really my question is as simple as the title: How can I make it so that instead of an error on a white page being shown, the browser is shown a custom 404 page? Searching yields some stuff related to Django but I'm just using standard App Engine and templates. Thanks, Larry --~--~-~--~~~---~--~~ You 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] libxml2
I am having difficulty importing libxml2 into my test project running on the development appserver. type 'exceptions.ImportError': No module named libxml2 args = ('No module named libxml2',) message = 'No module named libxml2' I get no problems when I put the same import statement in a regular .py file and run it through the terminal. Any ideas? --~--~-~--~~~---~--~~ You 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] I can't get Authentication Code
why?? --~--~-~--~~~---~--~~ You 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] .8 release of appengine-utilities, a better cache and more event triggers
http://gaeutilities.appspot.com/ New cache is the major feature of this release. It uses both the datastore and memcache much like session. It also has been refactored to act as a django cache backend. The latest release of django has the ability to plug in custom caching backends. Also, both cache and sessions have had multiple event triggers added. If anyone has any feature requests, this is the week to get them in. I'm going to be working on documentation before a 1.0beta. Once the beta goes up, the libraries will be feature frozen and only bugs will be worked on for a 1.0 release. changelog - cache: A lot of refactoring, preparing it for use as a drop in cache backend for django. - cache: uses memcache in addition to the datastore - demo: added memcache stats to the demo - demo: updated demo to include deleting a cache object - cache: passed the pep8 test - event: passed the pep8 test - sessions: sessionDelete event changed to sessionDeleted - sessions: sessionInititalized, sessionGetFromDatastore, sessionDataGetFromDatastore, sessionDataPut, sessionDataGetFromMemcache, sessionMemcacheUpdated events added. - cache: cacheInitialized, cacheAdd, cacheSet, cacheReadFromDatastore, cacheReadFromMemcache, cacheRead, cacheDeleted events added. --~--~-~--~~~---~--~~ You 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---