[google-appengine] Re: Local datastore import is too slow
On Thu, Nov 20, 2008 at 11:35 AM, Jyoti Shete-Javadekar [EMAIL PROTECTED] wrote: I am trying to load my development datastore using the bulk loader script. However the import is very slow. I had to kill the import process since it was not completed even after 12 hours. I have about 13K rows in the CSV file. One data model entity is about 300 bytes. 10 entities are imported at a time. The model has two unicode attributes, two unicode list attributes , one url and one long attribute. I use unicode.split to populate list attributes. I am running the bulk loader in a virtual machine having 512MB memory. During the import about 91% memory is utilized. I have not specified any custom index in index.yaml. Don't use the dev_appserver for that amount of data. At least in its current state it is not designed for that amount. Do you *absolutely* need to load that amount of data to do local development? 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: quotas in appengine
I agree jay, the most important feature for me right now is getting the payment system in place. One thing that is not clear to me is if we will be able to buy more Puts-per-hour so that we aren't taken offline for a legitimate spike in traffic. I'm not sure how I would tell me clients to *slowly* ramp up their usage :) (now if there was a queue in GAE that I could dump to and slowly add from the background, i would gladly use it). I've looked at SimpleDB too and the lack of Put limits makes it far easier to test a real-world application. some notes on this from yesterday's chat that were somewhat encouraging: [09:29am] ryan_google: billing will include user-definable budgets, notifications, and other tools to let you ensure that you're not cut off [09:52am] danielobrien: Vamsi: Billing is sometime between now and the end of march, not necessarily march itself. --maybe March, yuck [09:57am] marzia_google: bFlood: we are trying to release some form of billing by the end of the year, but the exact timeline and form of such a release is yet to be determined On Nov 19, 10:12 pm, Jay Freeman \(saurik\) [EMAIL PROTECTED] wrote: It seems to me like, if this were a problem, then Google isn't doing their job when it comes to scaling our applications. When I'm using Amazon's S3 or their SimpleDB (or, for the most part, EC2) I just have to think about how much I pay for per GB used and per GB transferred. Amazon provides me almost no limitations on how much data I can store or how quickly I can access it, so why does Google? Is Amazon's ability to install more servers to handle increased load fundamentally greater than that of Google's? I wish less time was spent on quotas, even on features... even on /fixing bugs/ (and yes, even those which I consider to be blocking issues), and more time was spent on billing infrastructure so I could start paying them to scale in the way my application actually needs rather than in the ways they are willing to provide out of the kindness of their giant Google hearts for free. :( -J -- From: Barry Hunter [EMAIL PROTECTED] Sent: Sunday, November 09, 2008 10:57 AM To: google-appengine@googlegroups.com Subject: [google-appengine] Re: quotas in appengine Remember AppEngine is a 'shared' environment - lots of apps are all using a slice of the same resources. Would you rather that someone (maliciously or simply though ignorance) monopolizes all the resources (even if they are paying) and that brings your app (though no fault of your own) to a standstill. ... --~--~-~--~~~---~--~~ You 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] Storing references to other objects..?
Hi, Each GalleryObject can be a 'root' without any parent or it has a parent, which is another GalleryObject it is based on. This means each GalleryObject may have a history of parents, grandparents, etc. How should I store this history? Store only the immediate parent or a list of those parents? Which is more efficient when I want to get a list of parents from the datastore. I think only storing the immediate parent will result in problems, no? Also how do I store this list of parents? By reference or using their index? (Each GalleryObject has an index (0,1,2,3, ...) So storing a list of GalleryObjects means either storing (0, 12, 55, 3234, ...) or (ref1key, ref2key, ref3key, ...) Which way would you suggest? I guess storing by using their index makes the most sense, no? Otherwise if I delete a GalleryObject it might be referenced by key somewhere else (what happens if I do this? won't it be deleted since a reference still points to it?) thanks...jago --~--~-~--~~~---~--~~ You 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: INPUT-OUTPUT applications using DATASTORE
Hello everybody from Greece I want to do this simple task: To create an application that will create a datastore and get user input. It is like the 1st part of the Guestbook application. Then I want to create another application like the 2nd part of the Guestbook application to print the user input the 1st part has collected. For the 1st part I have created my datastore with greetings as input. It worked (1st+2nd part together) For the 2nd part I use the code: #Retrieve using Gql from table the query class Greeting(db.Model): author = db.UserProperty() content = db.StringProperty(multiline=True) date = db.DateTimeProperty(auto_now_add=True) class MainPage(webapp.RequestHandler): def get(self): greetings = db.GqlQuery(SELECT * FROM greeting ORDER BY date DESC LIMIT 10) results=greetings.fetch(10) #testing output self.response.headers['Content-Type'] = 'text/plain' self.response.out.write('Testing..') self.response.out.write('htmlbody') for result in results self.response.out.write('content'+result.content) 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('/') application = webapp.WSGIApplication([ ('/', MainPage), ('/sign', Guestbook) ], debug=True) def main(): run_wsgi_app(application) if __name__ == __main__: main() The above code is not working. Have any ideas, I would appreciate. Best Regards, COSTAS Anastasiades --~--~-~--~~~---~--~~ You 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
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: AttributeError: '_URLFetchResult' object has no attribute 'strip' Is driving me Crazy...
Thanks Alexander, It did the trick. Maarten On Nov 17, 12:47 am, Alexander Kojevnikov [EMAIL PROTECTED] wrote: urlfetch.fetch() returns a Response object, not a response value as a string:http://code.google.com/appengine/docs/urlfetch/responseobjects.html This code should do the trick: root = ET.fromstring(response.content.strip()) On Nov 17, 3:53 am, Maarten_D [EMAIL PROTECTED] wrote: I am trying to port a perl app to python and i dont have much experience with python. I need to strip the leading and trailing whitespaces from a http post result: def sms_sender(a): query_args = { 'username':username, 'password':password, 'to':'001234567890', 'from':'001234567890', 'text':a } encoded_args = urllib.urlencode(query_args) url = 'https://myaccount.smsdiscount.com/clx/sendsms.php' #print urllib.urlopen(url, encoded_args).read() response = urlfetch.fetch(url=url, payload=encoded_args, method=urlfetch.POST, headers={'Content-Type': 'application/x-www- form-urlencoded'}) response = response.strip() root = ET.fromstring(response) #Create an iterator iter = root.getiterator() #Iterate for element in iter: if element.text: text = element.text if element.tag == result: ResultCode = repr(text) elif element.tag == resultstring: ResultString = repr(text) elif element.tag == resultdescription: ResultDescription = repr(text) elif element.tag == endcause: ResultEndCause = repr(text) I know the code is horrible! I get the error: AttributeError: '_URLFetchResult' object has no attribute 'strip' I really dont know how to proceed!! Please help.. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Logging static file requests
Hey everyone, I've been using the built-in logging module to log all sorts of scripting events for debugging/tracking purposes. It would be great if I could use this logging functionality to make a note of whenever a user requests a particular static file (e.g. tracking file downloads). My first idea was to create a small script that logs the request, and then redirects the user to the file, but can anyone else think of a better/easier way to do it? Thanks in advance! Chris --~--~-~--~~~---~--~~ You 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] Global Variables / Caching Question
Forgive me if this is a FAQ, but I did a little searching and did not find an answer. According to http://code.google.com/appengine/docs/python/appcaching.html, GAE caches global variables in imported modules between requests. I've got a global dictionary in a module that I'm sharing between requests. Is such a dictionary thread safe? In other words, if multiple users are hitting my application simultaneously, and both may be using the same global dictionary, am I going to encounter problems, or will GAE handle the situation gracefully? Thanks for any help. (By the way, I know that the dictionary may eventually disappear or get recreated unless I write its information to the data store. That's okay in the case I have in mind.) -- http://giscoder.blogspot.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: Hardly anything stored in appengine - already 10 MB gone?
Your not hallucinating. I've seen the same kind of problem. Apparently there is a known issue where space is sometimes not reclaimed after you delete a data store entity. If you've been creating and deleting a lot of entities, this one may be hitting you. On Wed, Nov 19, 2008 at 5:07 PM, jago [EMAIL PROTECTED] wrote: Thanks. At least I am not hallucinating. I didn't do anything and the next morning diskspace is gone ;) It would be neat if we at least had the faintest view of our files (like a html interface) - not the datastore, but the stuff we upload...html files, images, etc. On Nov 19, 1:06 pm, saranpol [EMAIL PROTECTED] wrote: I found this problem too. On Nov 19, 9:37 am, jago [EMAIL PROTECTED] wrote: Hello, I have hardly anything stored in appengine. Still the dashboard claims I have already 10 MB used. Can I get somehow more information about what is using the 10 MB? It cannot be the few things I have in the datastore or the website hosted on the appengine. Can I somehow free all the memory on the appengine? Cheers, jago -- http://giscoder.blogspot.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: Global Variables / Caching Question
There are no threads on gae. When multiple users visit your app simultaneously, gae will start several process to deal with the request. Every proccess has a copy of the variables. == http://go2.apsppot.com 2008/11/20 Joel Odom [EMAIL PROTECTED] Forgive me if this is a FAQ, but I did a little searching and did not find an answer. According to http://code.google.com/appengine/docs/python/appcaching.html, GAE caches global variables in imported modules between requests. I've got a global dictionary in a module that I'm sharing between requests. Is such a dictionary thread safe? In other words, if multiple users are hitting my application simultaneously, and both may be using the same global dictionary, am I going to encounter problems, or will GAE handle the situation gracefully? Thanks for any help. (By the way, I know that the dictionary may eventually disappear or get recreated unless I write its information to the data store. That's okay in the case I have in mind.) -- http://giscoder.blogspot.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: How do I create the a image object that is located on my local file system?
Thanks a lot for this info On 11月20日, 上午5时44分, Alexander Kojevnikov [EMAIL PROTECTED] wrote: You cannot access the static files in app engine.http://code.google.com/appengine/docs/configuringanapp.html#Static_Fi... If you need to read your image, keep it with the application files or in the datastore. Alex --www.muspy.com On Nov 20, 6:12 am, charles [EMAIL PROTECTED] wrote: I tried to create a image object: avatar = images.Image(os.path.join(os.path.dirname(__file__),'images/ head.jpg') but this will lead to error, can anyone help me with this? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-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] sharing application
I want to post my application in the Gallery. The submit button says Share this Application. I just want to make sure that that doesn't make the source code public. Also, 2 of the fields are: Application URL:* Source URL: What is the difference? 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] Data Modelling Advice - Blog Tagging System
Am wondering if anyone might provide some conceptual advice on an efficient way to build a data model to accomplish the simple system described below. Am somewhat new to thinking in a non-relational manner and want to try avoiding any obvious pitfalls. It's my understanding that a basic principal is that storage is cheap, don't worry about data duplication as you might in a normalized RDBMS. What I'd like to model is: A blog article which can be given 0-n tags. Many blog articles can share the same tag. When retrieving data would like to allow retrieval of all articles matching a tag. My normal mindset would be to create a many-to-may relationship between tags and blog articles. However, I'm thinking in the context of GAE that this would be expensive, although I have seen examples of it being done. Any suggestions on the most efficient way to approach this on GAE? --~--~-~--~~~---~--~~ You 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] Alternate way to receive verification code than SMS?
Hello all, I know you're going to think I live in a cave, but I don't currently own a mobile phone (that may change once I see a Google Android phone I like, but not yet). Is there another way to get the Google AppEngine verification code than via the current cell phone based SMS route? Thanks, Robert --~--~-~--~~~---~--~~ You 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] Executing query on DevelopmentServer
Hi ! I have model class RawData(db.Model): raw = db.StringProperty(multiline=True) date = db.DateTimeProperty(auto_now_add=True) somvere in my code i try ... query = RawData.gql(ORDER BY date LIMIT 100) query_length = query.count() but it returns that query_length is 0 ! but without ORDER BY date LIMIT 100 query works. The next problem is the same datetime in all records in my RawData.date (when i try it run on Development Server) --~--~-~--~~~---~--~~ You 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] ViewDoesNotExist
Hello, I am new to google app engine and django. I extracted the Google App Engine Helper for Django and created an app. I am trying to do a simple test of accessing a simple webpage. Below is the error that i am getting. But the views.py is under /mytest/ directory. I have attached the error and 2 urls.py. Any suggestion what i should try. Thanks. ViewDoesNotExist at /mytest/ Could not import views. Error was: No module named views Request Method: GET Request URL:http://localhost:8082/mytest/ Exception Type: ViewDoesNotExist Exception Value:Could not import views. Error was: No module named views Exception Location: /Applications/GoogleAppEngineLauncher.app/ Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/ google_appengine/lib/django/django/core/urlresolvers.py in _get_callback, line 127 # urls.py - # this urls.py is located under appengine_django folder from django.conf.urls.defaults import * urlpatterns = patterns('', # Example: # (r'^foo/', include('foo.urls')), # Uncomment this for admin: (r'^admin/', include('django.contrib.admin.urls')), (r'^mytest/', include('mytest.urls')), ) # urls.py - # this urls.py is located under mytest folder from django.conf.urls.defaults import * urlpatterns = patterns('', (r'^$', 'views.index'), (r'^sign$', 'views.sign'), ) --~--~-~--~~~---~--~~ You 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] bulkload issues
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: 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: Best practices implementing paging
best way i found is to use any entity and +1 rule. and back link using HTTP REFERER (not accurate but reliable in most conditions..) On Nov 19, 9:38 pm, Abel Rodriguez [EMAIL PROTECTED] wrote: I am currently doing a detailed study on how to optimize my application to be scalable. I have thoroughly studied the lectures delivered by the engineers at google, and my opinion: fantastic In this case, my question comes from the presentation Buildding Scalable Web Applications with Google App Engine whose rapporteur was Brett Slatkin In it, in the section Building a Blog: Paging , using the attribute index, get to paginate infinite elements, using the index as a guide for the next entry Now, suppose you delete an entity, the attribute index would not be consecutive. taking into account that, any idea howto implement paging that supports not only next and previous, but also, goto n page number.? thanks in advance, Abel --~--~-~--~~~---~--~~ You 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 to update my new version of db on server
Hi, There is no automatic way that you can update models in the datastore. You would need to write a custom script to handle data migration in chunks. Information on how you can do this can be fuond in this article: http://code.google.com/appengine/articles/update_schema.html -Marzia On Wed, Nov 19, 2008 at 4:46 PM, lp [EMAIL PROTECTED] wrote: Hello I need advice. I have application version 1, in her database they is one model: id1 date_1 date_2 int_1 nameemail pass In version 1 I have 6000 input In version 2 I separated model in two parts id1 date_1 name email pass id2 id1 int_1 date_2 I want put my version 2 in production on server to replace version 1 Was is the best (and safe) method? --~--~-~--~~~---~--~~ You 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: Compressed string extractable in appengine?
The following should work, if you haven't tried something along these lines already. Java: String inputString = Hello, world!; byte[] input = inputString.getBytes(UTF-8); byte[] output = new byte[100]; Deflater compresser = new Deflater(); compresser.setInput(input); compresser.finish(); compresser.deflate(output); FileOutputStream out = null; try { out = new FileOutputStream(some_temp_file); out.write(output); } finally { out.close(); } Python: import zlib zlib.decompress(data) print data Let me know if you run into any trouble, Daniel On Nov 19, 4:30 pm, jago [EMAIL PROTECTED] wrote: Hi, I want to create a compressed String in Java and send it to the appengine where it is decompressed. Can somebody help me to do this? So far I used GZIP for compression in Java. Extraction in appengine didn't work though. Using the ZIP format in Java resulted also in not more luck. Does somebody have example codes on both sides that is known to work? Thanks a lot! --~--~-~--~~~---~--~~ You 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: Expiring DataStore Entities ?
Hi boson, It sounds like this idea belongs in the issue tracker as a feature request: http://code.google.com/p/googleappengine/issues/list Happy coding, Jeff On Nov 18, 9:27 am, boson [EMAIL PROTECTED] wrote: Anybody like this? I propose that Google allows Datastore entries to expire and be automatically purged. The default would be to never expire (current behavior), but we might get an optional param, like time from memcache.add(): time Optional expiration time, either relative number of seconds from current time (up to 1 month), or an absolute Unix epoch time. By default, items never expire. I'm having a hard time getting my head around managing retention policies on old BigTable data, particularly with the lack of support for long-running requests and the slowness/inability to make large queries. It seems that this simple addition to the db.Model API would address a lot of these problems! E.g. If you're storing gifts given for a simple social app, you might set a 6 month retention on your Gift entities. This keeps your data store clean without requiring extra maintenance. Users might flag to keep a special gift (which would set the entity to never expire), but otherwise you could keep running without indexes getting huger and slower. E.g. If you want to store votes for a week-long poll to make sure nobody votes twice. You tally votes as you go (sharded counters of course), but store Vote Entities keyed by user IDs to allow quick checks if people voted yet. After the poll is closed, you don't want thousands of Vote records sitting around in your store. If they had an expiration of 1 month, they'd automatically get cleaned up. Is there a better way of handling 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] Re: gql matching DateTimeProperty
Hi, In order to query on DateTime objects, the following methods are supported (from http://code.google.com/appengine/docs/datastore/gqlreference.html): A datetime, date, or time literal, with either numeric values or a string representation, in the following forms: * DATETIME(year, month, day, hour, minute, second) * DATETIME('-MM-DD HH:MM:SS') [no milliseconds] * DATE(year, month, day) * DATE('-MM-DD') * TIME(hour, minute, second) * TIME('HH:MM:SS') -Marzia On Wed, Nov 19, 2008 at 7:03 PM, niklasr [EMAIL PROTECTED] wrote: SELECT * FROM thing WHERE added = '2008-06-08 22:17:45.200477 ' won't match Neither SELECT * FROM thing WHERE added '2008-07-08 22:17:45.200477 ' and added '2008-06-08 22:17:45.200477 ' And SELECT * FROM Ad WHERE added '2006-11-18 22:17:45.200477 ' surprisingly matches many entities. How match a day or a month interval, or an exact timepoint? --~--~-~--~~~---~--~~ You 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: bulk upload
Hi, This first error looks to be caused by this issue: http://code.google.com/p/googleappengine/issues/detail?id=157 For the second, to upload text fields, you can specify the value type as db.Text. -Marzia On Wed, Nov 19, 2008 at 11:02 PM, Gampesh [EMAIL PROTECTED] wrote: Hi, my bulkupolad script is working fine for the fields in loader.py is str that is: def __init__(self): fields = [ (newsid, str), (celebrity_id, str), (url_id, str), (title, str), (link, str), (description, str), (pub_date, str), (created_at, str), (updated_at, str) ] bulkload.Loader.__init__(self, News, fields) but in my data i have some some text data which have more the 500 bytes data which is range for the text so what would be the by loader.py for the text field instead of str (description, str), is field which is a text type so what should be type in place of str 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: Best practices implementing paging
The only downside is that it's not possible to page back HTTP REFERER (not accurate but reliable in most conditions..) Couldn't you build a paging index incrementally, and put it in a cookie? --~--~-~--~~~---~--~~ You 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: sharing application
Hi, Source URL is not required, and may be omitted. The Application URL is the URL where the app is being served, and is required to submit your app. -Marzia On Thu, Nov 20, 2008 at 8:51 AM, GAEfan [EMAIL PROTECTED] wrote: I want to post my application in the Gallery. The submit button says Share this Application. I just want to make sure that that doesn't make the source code public. Also, 2 of the fields are: Application URL:* Source URL: What is the difference? 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: Alternate way to receive verification code than SMS?
Hi Robert, Please fill out this form: http://appengine.google.com/waitlist/sms_issues -Marzia On Thu, Nov 20, 2008 at 3:16 AM, roschler [EMAIL PROTECTED] wrote: Hello all, I know you're going to think I live in a cave, but I don't currently own a mobile phone (that may change once I see a Google Android phone I like, but not yet). Is there another way to get the Google AppEngine verification code than via the current cell phone based SMS route? Thanks, Robert --~--~-~--~~~---~--~~ You 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: INPUT-OUTPUT applications using DATASTORE
Hi Costas, What kind of errors are you seeing? It's difficult to read the code highlighted, so if you could include a stack trace or other information, that would be helpful. Thanks, Marzia 2008/11/20 ΚΩΣΤΑΣ ΑΝΑΣΤΑΣΙΑΔΗΣ [EMAIL PROTECTED] Hello everybody from Greece I want to do this simple task: To create an application that will create a datastore and get user input. It is like the 1st part of the Guestbook application. Then I want to create another application like the 2nd part of the Guestbook application to print the user input the 1st part has collected. For the 1st part I have created my datastore with greetings as input. It worked (1st+2nd part together) For the 2nd part I use the code: *#Retrieve using Gql from table the query* *class Greeting(db.Model): author = db.UserProperty() content = db.StringProperty(multiline=True) date = db.DateTimeProperty(auto_now_add=True)* *class MainPage(webapp.RequestHandler): def get(self): greetings = db.GqlQuery(SELECT * FROM greeting ORDER BY date DESC LIMIT 10) results=greetings.fetch(10)* * #testing output self.response.headers['Content-Type'] = 'text/plain' self.response.out.write('Testing..') self.response.out.write('htmlbody') for result in results self.response.out.write('content'+result.content) 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('/')* ** ** *application = webapp.WSGIApplication([ ('/', MainPage), ('/sign', Guestbook) ], debug=True)* ** *def main(): run_wsgi_app(application)* *if __name__ == __main__: main() * The above code is not working. Have any ideas, I would appreciate. Best Regards, COSTAS Anastasiades --~--~-~--~~~---~--~~ You 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] SDK 1.1.6: urlfetch: no content-length in response?
Hi, I hope I checked correctly. I completely removed and reinstalled the SDK 1.1.6 two times. Urlfetch seems to remove the content-length header from the HTTP response. At least, that attribute is part of _UNTRUSTED_RESPONSE_HEADERS in urlfetch_stub.py and I printed the headers with logging.debug() to make sure that the original response contains that header and that the sanitized headers don't. Could some Google engineer please verify? 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 email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: SDK 1.1.6: urlfetch: no content-length in response?
Hi Waldemar, The SDK was updated so that a user can only specify headers in the SDK that they are able to specify in production. Since App Engine does not allow this header to be set, the SDK no longer does. -Marzia On Thu, Nov 20, 2008 at 12:57 PM, Waldemar Kornewald [EMAIL PROTECTED]wrote: Hi, I hope I checked correctly. I completely removed and reinstalled the SDK 1.1.6 two times. Urlfetch seems to remove the content-length header from the HTTP response. At least, that attribute is part of _UNTRUSTED_RESPONSE_HEADERS in urlfetch_stub.py and I printed the headers with logging.debug() to make sure that the original response contains that header and that the sanitized headers don't. Could some Google engineer please verify? 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 email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: gql matching DateTimeProperty
Thank you for replying, though it's still not matching from here. I've this is the datastore added -MM-DD HH:MM:SS value: 2008-06-08 22:17:45.200477 type: gd:when Still the following won't match SELECT * FROM thing WHERE added = '2008-06-08 22:17:45' It should be trivial, but how? regards Niklas On Nov 20, 7:56 pm, Marzia Niccolai [EMAIL PROTECTED] wrote: Hi, In order to query on DateTime objects, the following methods are supported (fromhttp://code.google.com/appengine/docs/datastore/gqlreference.html): A datetime, date, or time literal, with either numeric values or a string representation, in the following forms: * DATETIME(year, month, day, hour, minute, second) * DATETIME('-MM-DD HH:MM:SS') [no milliseconds] * DATE(year, month, day) * DATE('-MM-DD') * TIME(hour, minute, second) * TIME('HH:MM:SS') -Marzia On Wed, Nov 19, 2008 at 7:03 PM, niklasr [EMAIL PROTECTED] wrote: SELECT * FROM thing WHERE added = '2008-06-08 22:17:45.200477 ' won't match Neither SELECT * FROM thing WHERE added '2008-07-08 22:17:45.200477 ' and added '2008-06-08 22:17:45.200477 ' And SELECT * FROM Ad WHERE added '2006-11-18 22:17:45.200477 ' surprisingly matches many entities. How match a day or a month interval, or an exact timepoint? --~--~-~--~~~---~--~~ You 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: gql matching DateTimeProperty
Hi Niklas, As stated above, you can not use the string literal to query, you must include a DATETIME() wrapper around that argument. Additionally, since milliseconds are not included, you would need to query something like this to find a specific entity that accorded at 2008-06-08 22:17.45.: SELECT * FROM thing WHERE date DATETIME(\'2008-06-08 22:17.45\') AND date DATETIME(\'2008-06-08 22:17.46\') -Marzia On Thu, Nov 20, 2008 at 1:09 PM, niklasr [EMAIL PROTECTED] wrote: Thank you for replying, though it's still not matching from here. I've this is the datastore added -MM-DD HH:MM:SS value: 2008-06-08 22:17:45.200477 type: gd:when Still the following won't match SELECT * FROM thing WHERE added = '2008-06-08 22:17:45' It should be trivial, but how? regards Niklas On Nov 20, 7:56 pm, Marzia Niccolai [EMAIL PROTECTED] wrote: Hi, In order to query on DateTime objects, the following methods are supported (fromhttp://code.google.com/appengine/docs/datastore/gqlreference.html): A datetime, date, or time literal, with either numeric values or a string representation, in the following forms: * DATETIME(year, month, day, hour, minute, second) * DATETIME('-MM-DD HH:MM:SS') [no milliseconds] * DATE(year, month, day) * DATE('-MM-DD') * TIME(hour, minute, second) * TIME('HH:MM:SS') -Marzia On Wed, Nov 19, 2008 at 7:03 PM, niklasr [EMAIL PROTECTED] wrote: SELECT * FROM thing WHERE added = '2008-06-08 22:17:45.200477 ' won't match Neither SELECT * FROM thing WHERE added '2008-07-08 22:17:45.200477 ' and added '2008-06-08 22:17:45.200477 ' And SELECT * FROM Ad WHERE added '2006-11-18 22:17:45.200477 ' surprisingly matches many entities. How match a day or a month interval, or an exact timepoint? --~--~-~--~~~---~--~~ You 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: SDK 1.1.6: urlfetch: no content-length in response?
Hi Marzia, On Nov 20, 10:07 pm, Marzia Niccolai [EMAIL PROTECTED] wrote: The SDK was updated so that a user can only specify headers in the SDK that they are able to specify in production. Since App Engine does not allow this header to be set, the SDK no longer does. What I meant is that content-length is missing in the response, not the request. On the production server it works correctly. This header is required at least by boto. How are we supposed to find out he length of the http response? 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: SDK 1.1.6: urlfetch: no content-length in response?
Hi Waldemar, Sorry, I think I'm not understanding what issue you are seeing. Is it that the request received by your app has the content-length header removed? The SDK should disallow self.response.headers['Content-Length'] to be set by the user, as this is how our production environment behaves. Can you provide the code that is specifically causing the issue? -Marzia On Thu, Nov 20, 2008 at 1:45 PM, Waldemar Kornewald [EMAIL PROTECTED]wrote: Hi Marzia, On Nov 20, 10:07 pm, Marzia Niccolai [EMAIL PROTECTED] wrote: The SDK was updated so that a user can only specify headers in the SDK that they are able to specify in production. Since App Engine does not allow this header to be set, the SDK no longer does. What I meant is that content-length is missing in the response, not the request. On the production server it works correctly. This header is required at least by boto. How are we supposed to find out he length of the http response? 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: ViewDoesNotExist
Hi! On Nov 20, 5:18 pm, yinDojo [EMAIL PROTECTED] wrote: # urls.py - # this urls.py is located under mytest folder from django.conf.urls.defaults import * urlpatterns = patterns('', (r'^$', 'views.index'), (r'^sign$', 'views.sign'), ) Please try this: urlpatterns = patterns('mytest.views', (r'^$', 'index'), (r'^sign$', 'sign'), ) BTW, the admin interface doesn't work out of the box on App Engine. There's some code floating around that makes it work, but I don't know if it works with Django 1.0.2: http://groups.google.com/group/google-appengine/browse_thread/thread/d28216f1d350abba?hl=en Bye, Waldemar Kornewald -- Shameless plug :) app-engine-patch: Use Django on App Engine - with lots of goodies http://code.google.com/p/app-engine-patch/ --~--~-~--~~~---~--~~ You 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: SDK 1.1.6: urlfetch: no content-length in response?
Hi Marzia, On Nov 20, 11:03 pm, Marzia Niccolai [EMAIL PROTECTED] wrote: Sorry, I think I'm not understanding what issue you are seeing. Is it that the request received by your app has the content-length header removed? No, I'm using urlfetch: response = urlfetch.fetch(...) logging.debug(response.headers) = no content-length header in response 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: SDK 1.1.6: urlfetch: no content-length in response?
Hi Marzia, On Nov 20, 11:27 pm, Marzia Niccolai [EMAIL PROTECTED] wrote: Hi Waldemar, Ah, yes, sorry for the confusion. This is a bug. I've filed it:http://code.google.com/p/googleappengine/issues/detail?id=877 -Marzia Thanks a lot! 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: gql matching DateTimeProperty
Hi Niklas, I believe this is an issue that only affects the Admin Console. I've filed this issue: http://code.google.com/p/googleappengine/issues/detail?id=878 It executes perfectly within an application. -Marzia On Thu, Nov 20, 2008 at 5:21 PM, niklasr [EMAIL PROTECTED] wrote: Many thanks! Problem solved with numeric form matching the expected result: SELECT * FROM thing WHERE date DATETIME(2008,06,08,22,17,45) AND date DATETIME(2008,06,08,22,17,46) SELECT * FROM thing WHERE date DATETIME(2008,11,20,22,17,45) It's just that datetime string representations return error: SELECT * FROM thing WHERE date DATETIME('2008-06-08 22:17.45') « An error has occurred while executing this query. SELECT * FROM thing WHERE date DATETIME('2008-06-08 22:17.45') AND date DATETIME('2008-06-08 22:17.46') « An error has occurred while executing this query. Niklas On Nov 20, 10:42 pm, Marzia Niccolai [EMAIL PROTECTED] wrote: Hi Niklas, As stated above, you can not use the string literal to query, you must include a DATETIME() wrapper around that argument. Additionally, since milliseconds are not included, you would need to query something like this to find a specific entity that accorded at 2008-06-08 22:17.45.: SELECT * FROM thing WHERE date DATETIME(\'2008-06-08 22:17.45\') AND date DATETIME(\'2008-06-08 22:17.46\') -Marzia On Thu, Nov 20, 2008 at 1:09 PM, niklasr [EMAIL PROTECTED] wrote: Thank you for replying, though it's still not matching from here. I've this is the datastore added -MM-DD HH:MM:SS value: 2008-06-08 22:17:45.200477 type: gd:when Still the following won't match SELECT * FROM thing WHERE added = '2008-06-08 22:17:45' It should be trivial, but how? regards Niklas On Nov 20, 7:56 pm, Marzia Niccolai [EMAIL PROTECTED] wrote: Hi, In order to query on DateTime objects, the following methods are supported (fromhttp:// code.google.com/appengine/docs/datastore/gqlreference.html): A datetime, date, or time literal, with either numeric values or a string representation, in the following forms: * DATETIME(year, month, day, hour, minute, second) * DATETIME('-MM-DD HH:MM:SS') [no milliseconds] * DATE(year, month, day) * DATE('-MM-DD') * TIME(hour, minute, second) * TIME('HH:MM:SS') -Marzia On Wed, Nov 19, 2008 at 7:03 PM, niklasr [EMAIL PROTECTED] wrote: SELECT * FROM thing WHERE added = '2008-06-08 22:17:45.200477 ' won't match Neither SELECT * FROM thing WHERE added '2008-07-08 22:17:45.200477 ' and added '2008-06-08 22:17:45.200477 ' And SELECT * FROM Ad WHERE added '2006-11-18 22:17:45.200477 ' surprisingly matches many entities. How match a day or a month interval, or an exact timepoint? --~--~-~--~~~---~--~~ You 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: Compressed string extractable in appengine?
Thanks...worked great. On Nov 20, 7:37 pm, Daniel O'Brien (Google) [EMAIL PROTECTED] wrote: The following should work, if you haven't tried something along these lines already. Java: String inputString = Hello, world!; byte[] input = inputString.getBytes(UTF-8); byte[] output = new byte[100]; Deflater compresser = new Deflater(); compresser.setInput(input); compresser.finish(); compresser.deflate(output); FileOutputStream out = null; try { out = new FileOutputStream(some_temp_file); out.write(output); } finally { out.close(); } Python: import zlib zlib.decompress(data) print data Let me know if you run into any trouble, Daniel On Nov 19, 4:30 pm, jago [EMAIL PROTECTED] wrote: Hi, I want to create a compressed String in Java and send it to the appengine where it is decompressed. Can somebody help me to do this? So far I used GZIP for compression in Java. Extraction in appengine didn't work though. Using the ZIP format in Java resulted also in not more luck. Does somebody have example codes on both sides that is known to work? Thanks a lot! --~--~-~--~~~---~--~~ You 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] IP geocoding/geolocation in Google App Engine
A geo location service for looking up the country code for a given IP address: http://geoip.wtanaka.com/ It can be queried from google app engine apps. There's some sample code here: http://code.google.com/p/geo-ip-location/ --~--~-~--~~~---~--~~ You 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] Return file with app.yaml, fetch() or redirect?
I have a jar-file at another host XYZ. From this host the file is returned with a special content- and mime-type in its header. I want the appengine to make the file available at /remote/test.jar If a user then calls http://myapp.appspot.com/remote.test.jar I want the jar to be returned identically as if it were coming from my host XYZ. Identical in every way, including the headers! Can I do this somehow? How? What would you suggest to use: app.yaml, fetch(), redirect, or something else? --~--~-~--~~~---~--~~ You 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: SDK 1.1.6 Released
Exciting, Marzia. So sorting on a key would be much faster way of doing a bulk update of existing data of the kind described at: http://code.google.com/appengine/articles/update_schema.html in the Updating Existing Entities section, is that correct? Any idea how much faster sorting by the key is? Seems like these bulk updates must be a major bottleneck for quite a few people -- they certainly are for me! Thanks. -Adam On Nov 20, 6:07 pm, Marzia Niccolai [EMAIL PROTECTED] wrote: Hi, Today we released the 1.1.6 SDK. You can download it on our Google hosting project (http://code.google.com/p/googleappengine/downloads/list), and peruse the release notes (http://code.google.com/p/googleappengine/wiki/SdkReleaseNotes) for more details on the release. This release contains some notable new features, including several additions to the datastore: * You can now sort and filter on an entity's key:http://code.google.com/appengine/docs/datastore/queriesandindexes.htm... * You can now delete an entity directly using its key, without instantiating/fetching the Model object * If you specify a key_name when creating a Model, its key will now be available before you call put() * URLFetch calls made in the SDK now have a 5 second timeout, matching production Also, it contains a number of issue fixes, including the following: * The SDK now only supports the same headers as production:http://code.google.com/p/googleappengine/issues/detail?id=53 * In production, fixed an erroneous NeedIndexError when two ancestor queries were specified:http://code.google.com/p/googleappengine/issues/detail?id=423 * Calling to_xml on a model instance containing a BlobProperty returns that BlobProperty base64 encoded:http://code.google.com/p/googleappengine/issues/detail?id=430 * URLFetch now uses the original HTTP method (e.g. POST) when following a redirect:http://code.google.com/p/googleappengine/issues/detail?id=363 -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: Best practices implementing paging
I plan to do this by building an index entity as entries are added. So, for example, the index entity would contain the order string for every 10th entry (the first on each page), allowing you to jump straight to a particular page. On Nov 20, 11:07 am, Jon Watte [EMAIL PROTECTED] wrote: The only downside is that it's not possible to page back HTTP REFERER (not accurate but reliable in most conditions..) Couldn't you build a paging index incrementally, and put it in a cookie? --~--~-~--~~~---~--~~ You 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 want to use urlfetch to get the search result of facebook
I want to use urlfetch to get the search result of facebook I want to search people by email in facebook (http://www.facebook.com/ [EMAIL PROTECTED]) and facebook allow only registered user to get the result I try to send cookie like this result = urlfetch.fetch( url='http://www.facebook.com/s.php?q='+q, method=urlfetch.GET, headers={ 'User-Agent' : 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv: 1.8.1) Gecko/20061010 Firefox/2.0' ,'Cookie': 'sid=2;, h_user=b3fb2236fb02;, c_user=522572836;, xs=676c54532a463bb2edd60134cf3;, login_x=a %2A2%3A%2Bs%2A5%3A%22email%22%3Bs%3A19%3A%22saraol%40gmail.com%22%2Bs %3C19%3A%22remember_me_default%32%3Bb%3A2%3B%7D;, datr=d1a9f1a263d1b403c323e55f1cfd99359121146bb45537da558be22551b323;' } ) but it doesn't work Please help... Thank you very much.. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google App Engine group. To post to this group, send email to google-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 -~--~~~~--~~--~--~---