google-cloud-datastore

getting blobstore to callback to endpoint method

自古美人都是妖i 提交于 2019-12-03 08:48:46
I am developing an app-engine connected android project using the eclipse plugin. When I upload an image to the blobstore, how do I make it callback an endpoint method? I find great posts here that can be used as reference to understand my question better (if you need to). using blobstore with google cloud endpoint and android Saving blobs with Google Endpoint So really, I want to know how to make the callback url an endpoint method such as saveAnimalData below (I stole from referenced link) @ApiMethod(name = "saveAnimalData", httpMethod = HttpMethod.POST) public String saveAnimalData

Import large data (json) into Firebase periodically

旧城冷巷雨未停 提交于 2019-12-03 08:47:55
We are in the situation that we will have to update large amounts of data (ca. 5 Mio Records) in firebase periodically. At the moment we have a few json files that are around ~1 GB in size. As existing third party solutions ( here and here ) have some reliability issues (import object per object; or need for open connection) and are quite disconnected to the google cloud platform ecosystem. I wonder if there is now an "official" way using i.e. the new google cloud functions ? Or a combination with app engine / google cloud storage / google cloud datastore . I really like not to deal with

How to estimate hosting services cost on GAE?

情到浓时终转凉″ 提交于 2019-12-03 07:30:08
问题 I'm building a system which I plan to deploy on Google App Engine . Current pricing is described here: Google App Engine - Pricing and Features I need an estimate of cost per client managed by the webapp. The cost won't be very accurate until I have completed the development. GAE uses such fine grained price calculation such as READs and WRITEs that it becomes a very daunting task to estimate operation cost per user. I have an agile dev. process which leaves me even more clueless in

Following backreferences of unknown kinds in NDB

…衆ロ難τιáo~ 提交于 2019-12-03 07:18:22
I'm in the process of writing my first RESTful web service atop GAE and the Python 2.7 runtime; I've started out using Guido's shiny new ndb API. However, I'm unsure how to solve a particular case without the implicit back-reference feature of the original db API. If the user-agent requests a particular resource and those resources 1 degree removed: host/api/kind/id?depth=2 What's the best way to discover a related collection of entities from the "one" in a one-to-many relationship, given that the kind of the related entity is unknown at development time? I'm unable to use a replacement query

Google App Engine appcfg.py shows the help message for every command

北慕城南 提交于 2019-12-03 07:18:21
I have GWT app, which is deployed on GAE (Java). I'm trying to download data from App Engine datastore using appcfg.py . I did all the setup according to http://ikaisays.com/2010/06/10/using-the-bulkloader-with-java-app-engine/ . GAE Python SDK version is 1.4.3 Python version is 2.5.4 appcfg.py is on my PATH. When I run appcfg.py on the command-line, I get the "help" message. But the problem is that no matter which command I use, it always returns the help message. I have not been able to run any command using appcfg.py. It doesn't give any specific error message no matter what arguments I

Cost of storing a file in Datastore vs Blobstore

可紊 提交于 2019-12-03 07:08:17
Question: Since every file in the blobstore has an associated BlobInfo entity in the datastore, do I get charged the cost of write/read of that entity just like any other datastore entity? Background: We store millions of images on App Engine, and we're currently storing them in datastore entities (the images are smaller than 1MB). I'm wondering if using the blobstore would reduce our cost. I'm not concerned about the cost of storage. The real cost is the act of writing and reading, so that's what I'm trying to reduce. Right now we pay for the write and read of the datastore entities, one

how to update a field value of a data store in google app engine using java

烈酒焚心 提交于 2019-12-03 06:44:34
I had created a Login (Kind) in the data store. Inside the login, I created two fields username and passsword. When the user changes the password I want to update the field value inside the datastore. but when I used this code, DatastoreService datastore = DatastoreServiceFactory.getDatastoreService(); Entity passwordchange = new Entity("Login"); passwordchange.setProperty("password", "admin@123"); datastore.put(passwordchange); It creates a new row and inserts the password "admin@123" instead of updating the new password in same row. Can anyone suggest me how to update the data of a field. If

Store ordered list in database (Gap approach)

一曲冷凌霜 提交于 2019-12-03 06:26:49
I want to keep a large ordered list (millions of elements) in Google App Engine datastore. Fast insertion is required. The simplest way would be adding an indexed property (or column) "order_num" representing the order. For example, a list [A, B, C] would be stored like this: content order_num -------------------- A 1 B 2 C 3 However, this doesn't give you fast insertion. For example, If I want to insert X after A, I have to renumber B and C to "make room" for X, i.e., let B become 3, C becomes 4, and X be 2. This would be a disaster if I have millions of elements. I found a feasible solution

got 'invalid_grant' in oauth2 SignedJwtAssertionCredentials

霸气de小男生 提交于 2019-12-03 06:19:45
I am trying to make an oauth2 access_token in a server-to-server JSON API scenario. But it failed with invalid_grant error, please help. from oauth2client.client import SignedJwtAssertionCredentials KEY_FILE = 'xxxxxxxxxxxx-privatekey.p12' with open(KEY_FILE, 'r') as fd: key = fd.read() SERVICE_ACCOUNT_EMAIL = 'xxxxxx.apps.googleusercontent.com' credentials = SignedJwtAssertionCredentials(SERVICE_ACCOUNT_EMAIL, key, scope="https://www.googleapis.com/auth/datastore https://www.googleapis.com/auth/userinfo.email", token_uri='https://accounts.google.com/o/oauth2/token') assertion = credentials.

For Google App Engine (java), how do I set and use chunk size in FetchOptions?

泄露秘密 提交于 2019-12-03 06:11:21
Im running a query and it is currently returning 1400 results and because of this I am getting the following warning in the log file: com.google.appengine.api.datastore.QueryResultsSourceImpl logChunkSizeWarning: This query does not have a chunk size set in FetchOptions and has returned over 1000 results. If result sets of this size are common for this query, consider setting a chunk size to improve performance. I can't find any examples anywhere as to how to actually implement this, there is a question on here about python, but as Im using java and dont understand python, I am struggling to