Why isn't Cloud Endpoints for Golang in GAE Standard Environment? - google-app-engine

Hey does anyone know why Google Cloud Endpoints for Go-lang isn't in the standard environment on Google App Engine? It's only seemed to be officially supported/documented for Python / Java.
Is it because
A) Cloud Endpoints is coming to Golang soon / someday.
B) Cloud Endpoints isn't so great, so it's not going to be implemented in Golang.
C) Something else.
There's this "non-standard" lib https://github.com/GoogleCloudPlatform/go-endpoints but it hasn't been updated in 9 months.
I'm trying to choose between Python and Golang for a GAE project, and this lack of support for Cloud Endpoints is giving me pause.
Thanks in advance.

Product manager Dan Ciruli answered this on the google-appengine-go mailing list :
There are two primary reasons, and the second is a byproduct of the
first. We've had much less uptake on the Endpoints Go framework --
perhaps because, in the words of a developer I spoke to, "Go just
isn't a 'framework' language." Unlike, Java, Python (and, say, Node),
most developers using Go don't use a framework for writing an API
backend.
And, at least partially because of that, we aren't staffed on the
Endpoints team to build and support a framework in Go.
He added:
All hope is not lost. You can put a Go API behind Endpoints today on
GAE Flex or Container Engine (without framework) using the Extensible
Server Proxy. And later this year, we should be able to get the ESP
deployed in GAE standard environment, you'll get the full power there,
too.

Related

Connecting to AppEngine datastore in development via Cloud Datastore API

We are currently running a combined AppEngine / GCE app and thus far have kept all of our datastore access on the AppEngine side of things. Now we are exploring also allowing our GCE instance to make some queries into the (shared) datastore. To start, I'm trying to figure out how to run things locally. What we have so far:
A Go devappserver running
A Go standalone binary that wants to issues queries to the devappserver datastore.
We installed ('go get') google-api-go-client/datastore/v1beta2 so that we can use an API instead of issuing direct HTTP calls. However we are definitely willing to issue direct HTTP calls if this API library won't work in development.
We have service accounts set up (we already access GCS from GCE) but I doubt that's relevant for running locally...
I've seen some docs but they (a) only talk about Python & Java, and (b) discuss connecting to the (standalone) development datastore server, as opposed to the datastore embedded in AppEngine's devappserver (if those are even different?). There is also the following answer here on StackOverflow, but again it discusses connecting to the standalone development datastore server:
How to connect to the local google cloud Datastore db?
Any pointers would be much appreciated!
Ian
Currently this is not possible in the development environment for several reasons. The Google Cloud Datastore tool (gcd.sh) uses the java development server. However when developing go for App Engine you use the python development server, which has different underlying storage. There is a bug to track this issue on the github page.
You can still develop a Google Cloud Datastore application in go however there are many bugs in the current go client library. Unfortunately, the development server does not currently support the JSON API, which the go library uses (see the note at the top of the page).
Update: I wanted to make sure proppy's comment was seen as part of the answer. His suggestion does provide a way to use the protocol version of the API, which is probably more stable than the go client library above. It could also let you use the gcd.sh tool to test this in the development server. You will have to craft the HTTP requests yourself though, and you won't be able to share the data in the datastore between your application and the Cloud Datastore in development. However it is definitely a good workaround and lets you use the Cloud Datastore API, which as it develops will be easier to work with than other workarounds.
From proppy:
Note that you can still use Cloud Datastore Protobuf HTTP API with Go. The protobuf definition is available on GitHub, you can compile it to Go code using the Go protobuf compiler plugin and then send POST HTTP requests to /datastore/{version}/datasets/{datasetId}/{method}.
If the use case from your "GO" app server is straight forward enough, you may want to implement access by using an API call to your GAE service (perhaps extending the service to receive the API calls).
This has the added benefit of only having to make changes in one place if your datastore definitions or functions change.

App Engine Endpoints

Im starting a new application with AppEngine and I need a REST Service.
I was looking at Endpoints and I think they are exactly what I need.
I also read Google don't recommend to use Endpoints in production but my app first version is not going out until April approximately.
How mature do you think App engine Endpoints are?
Do you recommend to use them or should I find another REST framework.
If so, Are there any other REST framework similar to App Engine Endpoints?
or
Which one do you recommend, Restlet? or use it with Spring MVC?
Thanks
I'm a bit biased (being a Googler and member of the App Engine team), but I think Endpoints is worth a try. With regards to the general disclaimer on using Endpoints in production, we have allowed some developers to launch in production as long as they have spoken to us first.
I provided another answer to a related question on RESTful development here. The developer tried Endpoints and decided to use it over other options.

why is javascript node.js not on google app engine

Google created the V8 JavaScript engine: V8 compiles JavaScript source code directly into machine code when it is first executed.
Node.js is built on V8 - why is Google not offering any Node.js servers like Microsoft Azure?
Google App Engine would be a natural place to put Node.js.
Do you know why Google is not doing just that?
Node.js is maintained by Joyent, who is in a way a competitor of Google.
Node.js has no link what so ever with Google but is in fact built on top of an open source project started by Google.
Google might jumped into this business just like Azure did, but there are already so many PaaS doing it, it might not be worth it. I have never used GAE, but my understanding is that it is quite different that other PaaS and you have to use GAE libraries to make your code run.
Which, this is my personal feeling, is not really what the Node.js community is looking for.
Node.js is used to quickly make a fast lightweight app, a big share for APIs for Phone apps for example.
Nevertheless if you are looking for a PaaS for Node.js, the are quite a few out there:
Joyent (nodejitsu)
dotCloud which has WebSockets support.
Windows Azure
Nodester (bought by App Fog recently)
Any Cloud Foundry host should support Node.js too.
and many more...
Those are just some names off the top of my head. There quite a few but those are the major ones.
Oh there is Heroku too, but they don't have support for WebSocket which is a bummer for any Socket.IO based app.
As of June 2014, Google had a limited preview for custom languages on Google App Engine (which is different from Google Compute Engine).
Watch Building Node.js applications with App Engine and Custom Runtimes and check out https://cloud.google.com/appengine/docs/managed-vms/:
App Engine now offers a second hosting option: Managed VMs. The Managed VM hosting environment lets you run App Engine applications on configurable Compute Engine Virtual Machines (VMs).
You can also use Managed VMs to deploy user-configurable custom runtimes, such as for Node.js and other runtimes.
The procedure to get into the beta is:
Sign up and create a Managed VM project
Managed VMs are in Limited Preview, you must sign up for access to this feature, create a billing-enabled project, and tell us about your project so we can whitelist it to run in a Managed VM. Follow these steps:
Sign up for access to Managed VMs.
Join the app-engine-managed-vms Google Group to participate in discussions about Managed VMs.
Projects (or apps - they are the same thing) must be in a U.S. data center. If you're planning to use an existing project, skip to the next step. Otherwise, create a new app in a U.S. data center. Navigate to https://preview.appengine.google.com and create a new app.
Enable billing for the project. Visit the page https://cloud.google.com/console/project/apps~, where is the ID of your project. Click on Settings in the left menu and then enable billing. If your app is billed under a Premier account, email us at app-engine-managed-vm-tt-id#google.com to have your new Cloud project billed under the same account.
Send an email to app-engine-managed-vm-tt-id#google.com with the application ID in the subject line.
When we receive your email, we’ll configure some resources behind the scenes and notify you via email when your project is ready to go. The email includes final instructions for setup. If you encounter an error while following these instructions, contact us at app-engine-managed-vm-tt-id#google.com.
You can easily install node on Google Compute Engine (which basically is a virtual computer). Here is a link:
https://developers.google.com/datastore/docs/getstarted/start_nodejs/
Regards
Lars
after years of experiences in google appengine, i switch to other cloud services now.
i think google appengine is actually an old fashion service in cloud computing industry. which is slow to new technology, difficult to deploy, time wasting to learn the apis and lacking of a lot of features you need in languages you use.
regardless of google's large community, i would not suggest anyone to use google appengine.
[newer paas]
i strongly recommend you to use openshift, appfog, heroku .etc's new paas cloud computing technologies, which are far more extensible, less change needing, more migrable from one platform to another, more freely coding in the beauty of the natural lanuage and its standard libraries without ugly platform specific apis.
[iaas]
if you want more control over the running os environment, you may give linode, digital ocean, amazon, google cloud engine, microsoft azure etc. iaas providers a try.
Because App Engine is a platform-as-a-service, and in order to add a new language/stack to GAE, Google need to create mid-level libraries that interface with the plethora of App Engine's services.
Moreover, all App Engine apps is sandboxed and has several functionalities restricted from inside their sandbox environment. This means that beside the need to create service libraries, Google also need to create a secured sandbox environment for any language/stack that they try to introduce into GAE.
I personally think the second reason is why Google does not introduce support for new language/stack as aggressive as Azure did. App Engine is, in a way, more 'managed' than Azure, and has a larger initial development cost for new language/stack.
It has been released as of March 2016.
https://cloudplatform.googleblog.com/2016/03/Node.js-on-Google-App-Engine-goes-beta.html
Node.js has recently enabled support for Google Cloud users. The main document pages are:
Node.js on Google Cloud Platform
Google Cloud Datastore — Google Developers
It seems to require at the moment a Compute Engine instance.
Background: App Engine Standard vs App Engine Flexible
There seems to be some confusion on this topic because there are two versions of App Engine: Standard and Flexible. NodeJS is supported on App Engine Flexible but NOT on App Engine Standard. (See here for a more complete explanation of the differences).
App Engine Standard scales in seconds (as opposed to minutes for the Flexible environment), and has a free tier, so you can develop and demo without spending a dime. These benefits come at the cost of flexibility. App Engine Standard only supports certain languages and libraries, doesn't allow writing to disk nor SSH. In other words, the environment is standardized.
Answer: NodeJS Support on App Engine Standard
If you are interested in NodeJS support on App Engine Standard, please star this issue: https://issuetracker.google.com/issues/67711509.
Google addresses features that get attention from the community (see here). The best way to give your attention to this feature, is to star it on the Google Issue tracker linked to above.
Google announced on March, 21st 2016 that Node.js on Google App Engine was going beta: https://cloudplatform.googleblog.com/2016/03/Node.js-on-Google-App-Engine-goes-beta.html?m=1
This was expected as Google also joined the Node.js Foundation and Google develops the V8 JavaScript engine which powers Chrome and Node.js: https://nodejs.org/en/blog/announcements/welcome-google/
Google announced a partnership with NodeSource at the same time.
Google has just announced support for Node.js on App Engine.
See: https://cloud.google.com/nodejs/
Here's an example of how to deploy Node.js app on App Engine.
Google is a software-conservative company. Programming a backend in JavaScript would be absolutely unimaginable for Google's managers. Creating infrastructure Google itself won't be using is not a good investment. Reference: Notes from the Mystery Machine Bus
(Jun 2021) This question is almost a decade old, and many things have changed since the OP. TL;DR: JavaScript and/or Node.js are supported in 6 different serverless compute platforms from Google: 4 on GCP and one each from Google Workspace and Firebase plus release dates:
Google App Engine - Standard (Jun 2018) - announcement, docs (Node.js 10, 12, 14; 8 is deprecated)
Google App Engine - Flexible (Mar 2016) - announcement (general release), docs (Most Node.js versions)
Google Cloud Functions (Mar 2017) - announcement (general release), docs (Node.js 10, 12, 14; 8 is deprecated)
Cloud Functions for Firebase (Mar 2017) - announcement, docs (same versions as Google Cloud Functions)
Google Cloud Run (Apr 2019) - announcement (general release), docs (Any Node.js version you can put in a container)
Google Apps Script (Aug 2009) - announcement, docs (JS-only, not Node; Rhino ES3/ES5 + extensions originally; now v8 & ES6+ [Mar 2020])
Also see Google Cloud's overall support of/for Node.js.

Alternative to Google App Engine API?

I'm looking for an alternative of the Google App Engine API. I mean I'm searching an API for coding in JAVA that provides :
Simple DB API, with no conf
Simple User API, with no need to implements the login/register/user management process
Simple Task API, with no need to configure any third lib
Google App Engine is really attractive because it provides all theses functionalities with no effort ... But I need to port my app to my own server... Using appScale is not for me because I don't need something really scalable ... I just want to code the business model, not all things that should already exists.
Hope my question is clear :)
Thanks in advance for help, sincerely,
You can run AppScale on a single node deployment, you'll just lack fault tolerance. I am currently unaware of any other project that runs Java GAE apps.

Hosting/transferring a web site on Google App Engine

I have my website currently hosted on paid server, but i want to transfer it on GAE.
How can i do it? Can anyone please help me in this case.I'd appreciate your help.
Thanks:)
1) First you will have to adapt your website to the GAE framework (python with django or the new Java environment). You can test your work by downloading the SDK of GAE which offer a local server.
2) Then create an account on appengine.google.com and upload your application on something.appspot.com, test it.
3) If you have a domain name, create a google apps account on this domain, and finally bind this domain with your GAE website. Here is the Google doc.
If it is just a static website which does not need server side scripts or a database, then you might want to look into Google Sites instead of Appengine. You can find out more about Sites here: http://www.google.com/sites/help/intl/en/overview.html
If you do have some server side logic going on, you will need to convert it to either python or java and convert your relational database to Google's Data API which does not support the SQL your current database uses. You can read more about the APIs and what is supported with the Data API and tutorials at: http://code.google.com/appengine/
In response to sanorita's comment "Actually, it's generated html and not plain html. and google appengine is for static data... right?":
AppEngine can host static data, but that is far from its intent.
The purpose of AppEngine is to allow developers to easily deploy their dynamic applications on Google's infrastructure. In the end, assuming you have programmed your app in effective ways to handle scaling (basically just noting that writes to the database are expensive, and contention is the root of all evil) you can handle nearly any amount of traffic.

Resources