Using NDB without AppEngine - google-app-engine

Is it possible to create AppEngine-independent applications with Python NDB API? I need to host some basic scripts with database on AE, but I don't want to vendor lockin into the service.

NDB was designed and built on App Engine. Turning it in to something portable would be a research project.

You could use no DB at all if you don't need to store data, or you can use Cloud SQL which is really a mysql like instance for your application. In any case, if you use AppScale you can move your App Engine application whereever you want, thus there is no vendor lock-in.

Related

Connecting different microservices to same cloud datastore

Is it possible to have 2 different applications (one written in Python and one in Java) in the same App Engine environment (Standard) and have them view the same Datastore?
From my understanding, Google Cloud Datastore is the storage option that comes along with any AppEngine application, but also exists as an external service any application can use.
Is there a way for one application to view the other application's "embedded" Datastore (without one application exposing an API to it)? If not, how can 2 different applications use the same storage? I haven't been able to find any documentation regarding Cloud Datastore urls or using them as a third party database.
You probably can use the REST API version https://cloud.google.com/datastore/docs/apis. The real question is, why do you need to 2 different apps here? Micro service is usually implemented in appengine using module on a single app, https://cloud.google.com/appengine/docs/standard/python/microservices-on-app-engine.

Google app engine only as database store

I am currently developing a php application hosted in my server. I want to store the database data in a more secure place rather than my own server. Can I use google app engine only to store and retrieve data without creating a java or python app? If thats possible how can I access data? Using a special service or I can directly connect to db like connecting to a mysql server and execute sql commands lik select, insert etc?
Storing your data on App Engine will not magically grant you extra security. If an attacker compromises your server, they will be able to compromise the interface you have to your datastore and do whatever they wish.
A much better approach would be to learn best-practices for secure web development, and endeavour to ensure your app will not be compromised.
They have a module called remote_api, but it has some restrictions. Check it out:
http://code.google.com/intl/fi-FI/appengine/articles/remote_api.html
There is no direct way to access datastore in App engine. I assume you use mysql or other relational database for your php application. But app engine provide a schemaless object datastore. In that case you need some java or python app for preparing data to store in datastore. Check below links as well.
http://code.google.com/appengine/docs/java/datastore/
https://stackoverflow.com/questions/1466420/google-app-engine-external-database

can we use cassandra / couchdb / mongodb with google app engine infrastructure?

Is there anyway we can use Google App Engine but do not use google's bigtable?
Like for storing my data, I would prefer to use cassandra and have the ability to plug and unplug additional database servers.
And say if I would like to use CouchDb/MongoDb instead is it supported in the GAE's infrastructure?
Short answer: No.
Longer answer: It depends how you want/need to use the database systems. There is no way you could run those system directly on AppEngine. But if low-latency was not a prerequisite (as would be the case with infrequent/periodical fetches of data) then you could set them up on another host with some kind of HTTP API, and query your services from appengine using urlfetch.
Just my two cents:
I dont think you can do what you want on Google App Engine directly. If you really need other databases, then Amazon's EC2 may e what you are looking for.
Also, Take a look at this: Using Quercus® to Run the WordPress PHP blog on Google App Engine
Yes, you can use Cassandra database on Google App Engine but in its flexible environment. But, as of now, flexible environment is in Beta version and is not recommended for production use.

How to port a PostgreSQl database to Google App engine

i am currently doing a project as one of my university projects and it uses Google maps and right now i am using a postgresql database which is on my localhost but i want to host it some where else i couldn't find any free hosting for postgres and i don't know whether i can use Google App engine or Fusion tables to do it. i am using postgres and php to manipulate data and generate KML files. Google Maps V3 javascript API as the front end
any suggestions ?
Thanks !!
PHP is one of the most requested features, but it is not yet supported in GAE, so your PHP code is useless. In the future, hosted SQL databases seem to be part of Google plans to provide "Enterprise features" in GAE, stay tuned because that could simplify what you need to do.
Currently, in case that:
your site is implemented as a Java EE or Python web appliaction
you are already using JPA/JDO (only in the Java EE case)
you are not doing JOIN statements (not supported in GAE)
Or even if your service/dao layers are already well isolated, it would be possible to host your "denormalized" database (it would not be a postgres service) and your frontend in GAE without too much effort.

Any one tried MongoDB on Google App Engine?

I'm trying to deploy one of my java apps in GAE and I have used MongoDB. Unfortunately GAE doesn't allow me to create databases, however it suggests using Google Datastore. Are there any plugins or add-ons to use MongoDB.
You can't run MongoDB on GAE. You need to use the Google datastore.
Matt is right. If you want to deploy to Google's servers you can't use Mongo. If you are interesting in running your own server(s), check out AppScale.
If you really want to use MongoDB anyway, you'll have to find a third-party host that provides a REST interface through which you can make your transactions. I've personally tried and recommend MongoLab on App Engine. Then, in your code, use an HttpUrlConnection object to send/receive requests if you're doing it with Java.
I think you could deploy your app on app engine and create a separate vm instance in google compute engine that would have mongo installed, then you plug your GAE app on that vm for the db connection. This would allow you to keep all your app in the google cloud. See https://cloud.google.com/solutions/mongodb/ and http://docs.mongodb.org/ecosystem/platforms/google-compute-engine/
A lot of things have changed since this question has been asked, as of June 2021, you can use MongoDB Atlas with Google App Engine Standard running on Java 8 environment. I built my App with the Ktor framework that runs on App Engine and interacts with databases on MongoDB Atlas.
if you're still looking for an answer to this you might want to check this project that did exactly the same but in reverse, it will surely help you out with what you want to do.
http://code.google.com/appengine/articles/django-nonrel.html
you can use mongo, only if have something like on mongolab then use pymongo to connect and most important thing you need to enable socket api from gae dashboard.
it worked for me thanks

Resources