google-cloud-datastore

Tree structures in a nosql database

十年热恋 提交于 2019-11-29 21:56:44
I'm developing an application for Google App Engine which uses BigTable for its datastore. It's an application about writing a story collaboratively. It's a very simple hobby project that I'm working on just for fun. It's open source and you can see it here: http://story.multifarce.com/ The idea is that anyone can write a paragraph, which then needs to be validated by two other people. A story can also be branched at any paragraph, so that another version of the story can continue in another direction. Imagine the following tree structure: Every number would be a paragraph. I want to be able

Google Cloud Bigtable vs Google Cloud Datastore

痞子三分冷 提交于 2019-11-29 19:29:24
What is the difference between Google Cloud Bigtable and Google Cloud Datastore / App Engine datastore, and what are the main practical advantages/disadvantages? AFAIK Cloud Datastore is build on top of Bigtable. tx802 Based on experience with Datastore and reading the Bigtable docs , the main differences are: Bigtable seems to be designed for HBase compatibility, whereas Datastore is more geared towards Python/Java/Go web app developers (originally App Engine) Bigtable is 'a bit more IaaS' than Datastore in that it's not 'just there' but requires a cluster to be configured . Bigtable supports

What database does Google use?

南楼画角 提交于 2019-11-29 18:31:00
Is it Oracle or MySQL or something they have built themselves? splattne Bigtable A Distributed Storage System for Structured Data Bigtable is a distributed storage system (built by Google) for managing structured data that is designed to scale to a very large size: petabytes of data across thousands of commodity servers. Many projects at Google store data in Bigtable, including web indexing, Google Earth, and Google Finance. These applications place very different demands on Bigtable, both in terms of data size (from URLs to web pages to satellite imagery) and latency requirements (from

what's the difference between google.appengine.ext.ndb and gcloud.datastore?

感情迁移 提交于 2019-11-29 17:44:27
问题 ndb: (from google.appengine.ext import ndb) datastore: (from gcloud import datastore) What's the difference? I've seen both of them used, and hints they both save data to google datastore. Why are there two different implementations? 回答1: The Python NDB Client is specific to Python Applications running on Google App Engine. The datastore client removes that restriction and you can run your Python application anywhere, including Google App Engine, Google Compute Engine or anywhere else.

Importing Entities Into Local GCP Datastore Emulator

北战南征 提交于 2019-11-29 17:16:59
I was able to export entities into a storage bucket without much difficulty with this command: gcloud datastore export --kinds="KIND1,KIND2" --namespaces="NAMESPACE1,NAMESPACE2" gs://${BUCKET} And according to the docs importing can be done like this: gcloud datastore import gs://${BUCKET}/[PATH]/[FILE].overall_export_metadata or like this: curl \ -H "Authorization: Bearer $(gcloud auth print-access-token)" \ -H "Content-Type: application/json" \ https://datastore.googleapis.com/v1/projects/${PROJECT_ID}:import \ -d '{ "inputUrl": "gs://'${BUCKET}'/[PATH]/[FILE].overall_export_metadata", }' My

pros and cons of db and ndb in google app engine

雨燕双飞 提交于 2019-11-29 16:55:19
问题 I have seen a little of this in stack overflow but I am wondering if there is any reason to use the DB entity model and what the specific pros and cons of using on or the other are. I have read the ndb is a little faster and that it helps with caching. They have a good bit of info in the docs but don't really straight out say that ndb is better. At least I haven't found that yet. 回答1: As far as I can tell ndb is an evolution of db, kept seperate to maintain compatability. Have a look at the

Google App Engine NDB: How to store document structure?

徘徊边缘 提交于 2019-11-29 16:10:11
问题 From App Engine NDB documentation: The NDB API provides persistent storage in a schemaless object datastore. It supports automatic caching, sophisticated queries, and atomic transactions. NDB is well-suited to storing structured data records. I want to create a structure like the following using NDB, where each instance looks like : { city: 'SFO' date: '2013-01-27' data: { 'keyword1': count1, 'keyword2': count2, 'keyword3': count3, 'keyword4': count4, 'keyword5': count5, .... } } How can I

Checking if Entity exists in google app engine datastore.

只谈情不闲聊 提交于 2019-11-29 16:08:48
问题 What is the best/fastest way to check if an Entity exists in a google-app-engine datastore? For now I'm trying to get the entity by key and checking if the get() returns an error. I don't know the process of getting an Entity on the datastore. Is there a faster way for doing only this check? 回答1: com.google.appengine.api has been deprecated in favor of the App Engine GCS client. Have you considered using a query? Guess-and-check is not a scalable way to find out of an entity exists in a data

Downloading Google App Engine Database

一笑奈何 提交于 2019-11-29 15:49:56
问题 I had created web application and deploy it in Google App Engine after I created table(entity) in Google App Engine datastore. My doubt is it possible to download the entity/database? 回答1: to enable remote_api , add this to your web.xml : <servlet> <servlet-name>remote-api</servlet-name> <servlet-class>com.google.apphosting.utils.remoteapi.RemoteApiServlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>remote-api</servlet-name> <url-pattern>/remote_api</url-pattern> </servlet

App Engine: Can I upload my local dev_appserver.datastore to the live datastore?

给你一囗甜甜゛ 提交于 2019-11-29 15:46:15
问题 I've been reading about the remote_api and the bulkloader.yaml configuration file for doing bulk uploads of Google App Engine, but all I really want to do is replace my live datastore on the cloud with the contents of my local datastore. From what I've read, it would seem that I have to first somehow convert my dev_appserver.datastore file into csv or xml, and then apply all the fancy transforms of bulkloader.yaml, which seems like a lot of unnecessary work. Anyone know if there's an easier