Make database in appengine by eclipse - google-app-engine

I'm making a game for windows phone. And my game has a highscore board which gets value from appengine.
And I'm finding a document to do that.
I want to know how to make a database and how to send, get value.
Can you give me a link or example ?

You could look at Mobile Starter Backend that will give you a ready to use mBaaS hosted on App Engine with a generic data structure to store things like high scores, leaderboard, etc. Though the documentation mentions iOS and Android clients, you can also invoke the REST endpoints stuff from your Windows Phone code.
If you wish to roll out your own services, take a look at Google Cloud Endpoints that will give you a REST API hosted on App Engine and you can build in Datastore support. Start over here : https://developers.google.com/appengine/docs/java/endpoints/

Related

Is Google Cloud Storage fast enough for serving images to mobile apps?

I have been using Google Cloud Storage to save photos that users upload from a mobile app (built with flutter and firebase), recently I had the need to resize/transform images and I wanted to explore if it's possible to do it directly from google cloud storage!
I found this project https://github.com/albertcht/python-gcs-image that you have to deploy on google app engine and if you call it with a bucket and an image it returns a URL to a Google CDN I think (something like this http://lh3.googleusercontent.com/*).
I looked at the code in the repository and the only thing it does is to return the result of google.appengine.api.images.get_serving_url and I don't understand why I cannot get this serving_url directly from my dart code?
What is the difference between Google Cloud Storage and lh3.googleusercontent.com?? Can I make the same image processing directly from cloud storage?
It seems odd that I have to run an app engine app that just returns a URL?
What am I missing?
The lib use this api. It's in Python 2.7 which have a end of life the 01/01/2020.
Moreover, the image api is available only with AppEngine 1st generation (python 2.7) and not available for the 2nd generation (python 3).
All of this for not recommended you to use this.
The best design today is to perform the resize/crop when the file is uploaded and to store the result in Cloud Storage. Example here and here
Then, you only have to serve, from Cloud Storage, the resized/cropped images.
Look # Firebase Extensions, there is already such an Extension provided there
What I found is:
The Java, Python, and go Standard environments for Google App Engine
include the GAE Images API (Java, Python, which can resize, rotate,
flip, and crop an image, as well as return an image serving URL which
allows for client side transformations, similar to Cloudinary and
Imgix.
This matches my previous understanding and experience as well. serving_url is really convenient for image manipulations.
Having said that, as you correctly pointed out, it's first and foremost an AppEngine feature and will require you to use AppEngine in one way on another.
If it's not what you want, you can create a service that will crop your images and deploy it serverless. It's a lot less burdensome that having AppEngine service running 24/7. What's more, AWS had several pre-baked templates to do just that - crop images that can be deployed in a couple of clicks.
If you are, like myself, interested in Google Cloud solution I can offer a similar function that I wrote. It can be deployed in Cloud Run as-is. See details in my other answer.
With it you can not only resize the images for mobile, but also map your own domain to the Cloud Run function and put it behind any CDN you like, which potentially can be faster that service from Google Storage. You can find plenty info on the Internet about why full-fledged CND is better than just bare Google Storage.

What Google hosting should I choose for a Node.js and React website?

I want to be able to host my website on google servers, i would like to design the website using react along with node js in the backend, from my current research it seems that google app engine is the way to go.
Am i on the right path or should i be looking at another avenue.I don't expect the site to intake a lot of traffic so a low cost plan would be ideal, a free plan would be amazing if possible if possible.
I also read that google dns could be used for a website which seems pretty convenient, how exactly do i go about this?
Your on the right path. Goole app engine flexible environment is the ideal choice for you. Since you want your backend to run in Nodejs it's very simple to run Nodejs in Google app engine. Google also give you free $300 for the free trial and you can use it for 12 months.
Read more about the pricing in here
Read more about Nodejs in Google app engine flexible here

Do I have to use App Engine to write glassware with Mirror API?

I am trying Python quickstart project (https://developers.google.com/glass/develop/mirror/quickstart/python) and it is implemented on GAE, however, looking at the code it does not seem that there is much dependency on App Engine itself (code is kind of complicated and I still do not understand it all though).
Is this required to host Mirror-based glassware on App Engine?
Is this required to host Mirror-based glassware on App Engine?
No, it is not required. What you really need is ability to use Google API's and Mirror API is just one of them.
Java quick start, for example does not run on top of GAE.

What is the relationship/differences between Google App Engine, and "normal" web apps?

I was trying to start to learn about programming on Firefox OS, and I heard that it is programmed with JavaScript and HTML5, and it uses the same structures of web apps.
Said that, I'm doing a course on Udacity ( I'm a beginner) that is about web development, and it talked about how to use the Google App Engine(we just made our own websites online, using python and some structures of the GAE), and I tryied to make some relationship with what I was seeing in the Firefox website, and I just coundn't figure out nothing.
Google App Engine is a "platform as a service model" of webapps. What you don't need is the key. You don't need :
a Database Administrator
Network technician
a Backup Admin (you still need to make backups of your app and data but not your network config files ect...)
the hardware at your company
the ISP service level agreements
there is more that Google specifically puts in over other platform as a service businesses.
Google takes care of this for you. You just write the webapp (and back it up for a rainy day)
As for Firefox OS, you build application, as you wrote, with HTML5, CSS3, and JavaScript: only web technology. Those are web applications that you build to run on Firefox OS devices, and even in the browser, depending on the API you used. The application you build https://developer.mozilla.org/en-US/Apps, can be either hosted on your own server, or if you packaged it, on the Firefox OS marketplace https://marketplace.firefox.com/.
I would also like to add that Google App Engine is a PaaS at the end of the day. So while technically, one can say that any web application should run, that is not always the case.
If you are using a PaaS, whether it is a Google App Engine or any others like Heroku, CloudFoundry, etc - you must understand the various Services and APIs that it provides in the different platforms that it supports. For e.g. using Google App Engine, you can choose either Java, Python or PHP to write and host your web applications. However, you have to use some of its services like Datastore, etc.
Moving any web application that you have written to a PaaS is not always straightforward. Except for the most simplistic apps that print a "Hello World", there are chances that you atleast have to do the following things:
Migrate parts of your application to utilize the Platform Services/APIs
Rearchitect parts of your application to take maximum advantage of the Cloud i.e. multi-tenancy, Scaling, etc.
You could treat Google App Engine(GAE) as web server hosting with specific web framework (python or java), which can host any normal webapps.
Firefox OS webapps are written with normal web skills. So you can use GAE to 'host' Firefox webapps.
(GAE is also mentioned as one of hosting place in Mozilla Developer Network
https://developer.mozilla.org/en-US/docs/Trash/Publishing_the_app )
The evil detail is Firefox webapp need an extra 'manifest.webapp' file that need extra MIME host settings
self.response.headers['Content-Type'] = 'application/x-web-app-manifest+json'
https://developer.mozilla.org/en-US/Apps/Developing/Manifest#Serving_manifests
Then you are ready to host Firefox Webapp on GAE :)

Google App engine for mobile clients

Can I use GAE(Google App Engine) for developing a server for mobile clients? Mobile clients will send data to server every 10 seconds.
I am planning to develop the prototype using GAE and then depending on the results, will decide where to locate the prod server.
And are there any best practices to follow in developing code so that it will have very minimal dependancy with GAE (Can easily port to another environment with minimal code change when required)
thanks.
Ofcourse you can, GAE provides a good way to create a great backend for a mobile app.
about dependencies, you can use a project like django-nonrel, it creates an interface between your code and the API of GAE.

Resources