I have implemented a simple API in Go on Google App Engine Standard using just:
func init() {
http.HandleFunc("/api/v1/resource",submitResource)
}
Nothing special. However I want to port this code to using Cloud Endpoints instead in order to get the better monitoring and diagnostics.
Is it even possible with STANDARD instances or must I move to FLEXIBLE?
I can't find any documentation on this. Nor answers to this seemingly simple question. At the moment I half wish I had chosen Python because its support seems more mature. I chose Go because it seems more appropriate for API-like code because my minimal research suggested Go offered better performance.
If it is possible, are there any pointers to how please?
Only Python and Java are supported on GAE Standard via the Endpoints Frameworks. However, Go is supported on GAE Flexible.
Here is the Go GAE Flexible sample:
https://github.com/GoogleCloudPlatform/golang-samples/tree/master/endpoints/getting-started
After much research and trial and error, the simple answer is "No." - as of Dec 2016.
The longer answer is it's possible if you want to put far too much effort into making up to date libraries of your own. There is basically no support, even in alpha, for the current Google Cloud Endpoints using Go with Google App Engine Standard.
It's possible to run Go+endpoints on GAE Standard environment, however libraries might be outdated now.
Libraries and sample app can be found on github:
https://github.com/GoogleCloudPlatform/go-endpoints
I have successfully deployed "Greetings" as AppEngine SE app, and it works.
Related
I'm starting to build a web/mobile app that is going to be offered as SaaS.
I have seen many cloud options for hosting (Heroku, AWS) but finally decided to go with Google Cloud App Engine.
My back-end will be Java based, and I'm confused about going with the Standard or Flexible Env.
I have read several docs online but still undecided.
Considerations to tackle:
I am not very experienced with Docker and this is my first Saas App.
My app should run perfectly with the offering of the Standard Env.
Migrating from the Standard to the Flex environment seems to bring
some headache.
Would you please help me decide on the way to?
We try to cover the key differences in this doc:
https://cloud.google.com/appengine/docs/the-appengine-environments
To cover your considerations:
You don't need to understand Docker to use flex or standard
If your app can run in Standard - that's great!
Migrating from Standard to Flex is a fair bit of work. We try to cover it here
Read over those docs, and let me know if you have any other questions!
I am looking for a solution for a script language like lua to use with Go application running on GAE. I have found golua and luar projects and planned to use them as the solution.
However, once I ran them on GAE environment, I encountered
"o-app-builder: Failed parsing input: parser: bad import "unsafe" in
github.com/stevedonovan/luar/luar.go"
I was confused but finally found that apparently GAE trimmed unsafe package out for a reason. Since luar and golua need the package, I think I have to find a new solution for this.
Is there any way to use luar and golua on GAE? If it is not possible, are there any alternative script languages that will run on GAE environment?
The just announced Managed VMs will allow you to run App Engine applications on Compute Engine virtual machines. This allows access to the full range of libraries, filesystems and sockets. As of today (April 20th, 2014) Managed VMs are in Limited Preview, so you'll need to fill out the form here to get access.
So I was using CGo for a number crunching web app and it happens that CGo seems faster. Is there any that I can use CGo on Google App Engine Go runtime.
Nope. CGo is not supported yet, and perhaps never will. This is PaaS after all and they need to isolate the platform. But you never know. Perhaps a restricted version.
It is supported on App engine Go 1.11
https://gist.github.com/apstndb/456e47ce0dcca191d967aefed1320b92
I know it is an old question but it is still in top results, so just added for any one searching for it now
This question comes from working on my webapp, a feed reader written in Go. The code is available at http://github.com/matthewbauer/rivulet although that should not be necessary to answer the question.
I have a webapp written in Go that is running on Google's App Engine. It uses the usual common App Engine libraries like datastore, memcache, and user.
Is there any way to let my users run this app on their own without breaking App Engine compatibility?
Go now provides build constraints that exclude/include files based on target build platform:
// +build !appengine
So, I know that this is possible. But, my biggest problem is with my libraries that depend on App Engine: datastore, memcache, and user. I know other libraries provide datastore and memcache, and I can implement user on my own, but how would I go about wrapping it up?
I know that I can have them set up a development server with the SDK, but that might be too involved for some users. I want a single executable that normal Go projects provide. IS that possible?
If any examples exist, I haven't found them yet; any examples of App Engine independent webapps would be appreciated. I can learn by example.
You will probably have refactor your code.
The basic rule of thumb will be anywhere you depend on an AppEngine package define your own interface for the way you use it. This will allow you decouple the app from the appengine libraries.
Once you've defined those interfaces then you can start providing alternatives that satisfy the interfaces. You'll be able to plugin any Datastore or Memcache that satisfies the interfaces and your app will be able to both run on appengine or as a standalone with the alternatives.
Since ColdFusion is itself Java-based, I would imagine it's not too much of a stretch to suggest that CFML code could be deployed on Google App Engine.
BlueDragon is a commercial solution for deploying CFML code on Java servers.
It's described in this thread how someone got OpenBD (Blue Dragon) running on App Engine:
OpenBD on Google App Engine for Java
Are there any open source alternatives
that could be used for App Engine?
Railo is another obvious candidate here, and some people appear to be trying to tweak it for use on Google App Engine.
I am putting together some demos that run on Open BlueDragon, which in turn is running on Google App Engine. The list is small at the moment, but eventually it should give you a good idea of what is opssible with OpenBD and GAE.
http://www.brighthub.com/hubfolio/matthew-casperson/blog/archive/2010/05/12/cold-fusion-demos.aspx
Check out
http://www.stax.net/ - Stax networks made by a former Allaire(r)?
Works great, supports coldfusion out of the ..cloud. You download a precompiled source file, put your stuff in, upload it and it all works, no fighting with it.
I know google app engine is quite restrictive, it will involve opening up the source and removing everything that attempts to write to the file system, and changing your database interaction.
You can checkout this thread and group as a resource for Open BlueDragon as well as the wiki. Looks like they have a branch already which is working towards GAE compatibility.
On the Railo side of the CFML open source pond you can reference this article from help compiling Railo on your own from the source.
Joining both of their respective google groups and asking questions should yield fruitful as well.
Good Luck!