buffalo icon indicating copy to clipboard operation
buffalo copied to clipboard

Make Buffalo GAE compatible

Open markbates opened this issue 7 years ago • 16 comments

Currently Buffalo is not GAE compatible. I don't use GAE, so I'm definitely looking for support on this. @matryer has offered his assistance as well.

Mat and I spent some time at GoLab in Italy a couple of weeks ago and found that, at least, two things are preventing Buffalo apps from working on GAE.

  1. GAE is currently on Go 1.6 and Buffalo requires 1.7 because of the use of context.Context - This should be remedied on it's own in a few weeks when Go 1.8 is released and GAE is updated to support it.

  2. https://github.com/GeertJohan/go.rice uses syscall which is a no-no on GAE. This would mean the resolvers package would need some reworking, as well as the build command. This could cause breaking changes.

markbates avatar Feb 02 '17 21:02 markbates

What's the advantage of supporting GAE Go runtime instead of GAE Docker runtime, besides not needing to build separately? We could probably add "basic" support for GAE through the docs using Docker in its current state, perhaps with Travis for building.

https://cloud.google.com/appengine/docs/flexible/

philipithomas avatar Feb 02 '17 23:02 philipithomas

The Flexible environment might be the choice, but I'd love go see if the standard environment could be supported easily before abandoning it. There are some key differences that might sway a user towards either option.

The key one for me is that standard environment apps spin up instantly (milliseconds), whereas the flexible environment can take minutes. This means standard environment apps are likely to be cheaper, because they don't need to be constantly running.

For a real example, nobody uses Downlist (an app I made) so it's completely free for me. BUT it's always available... try it: https://downlist.io/

matryer avatar Feb 02 '17 23:02 matryer

update GAE now supports go1.8. https://cloud.google.com/appengine/docs/standard/go/release-notes

niranjan92 avatar Jul 01 '17 10:07 niranjan92

GAE already has things like memcached, task queues for background jobs etc.

@markbates what components are in plan for GAE compatibility?

niranjan92 avatar Jul 02 '17 04:07 niranjan92

Right now the goal is to just get a standard buffalo app to deploy and run on GAE.

markbates avatar Jul 02 '17 10:07 markbates

Is this still a possibility? Any idea of a rough date please? I would be using Google App Engine's Standard Environment not the Flexible.

davidhtims avatar Dec 06 '17 16:12 davidhtims

This is still scheduled for 1.0, but there is no date associated with it. To make this happen someone who knows GAE well needs to step up and help make it happen.


Mark Bates

On Dec 6, 2017, 10:11 AM -0600, David Smith [email protected], wrote:

Is this still a possibility? Any idea of a rough date please? I would be using Google App Engine's Standard Environment not the Flexible. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

markbates avatar Dec 06 '17 17:12 markbates

I've got a bit of Go App Engine (Standard) experience. Would love to help out on this. I'll take a look and see what it'll take.

benkraus avatar Feb 12 '18 16:02 benkraus

@benkraus that would be great! I tried a while back, but gave up as I never use GAE and it needs someone who has some knowledge there to try and get it right. :)

This is the repo I was testing with https://github.com/markbates/gapp (it's really, really, really out of date at this point, but it might provide some insight.

markbates avatar Feb 12 '18 16:02 markbates

Just as a data point, go.rice no longer uses syscall. It was removed here: https://github.com/GeertJohan/go.rice/commit/c7060fb13da33d0f0df3ca434beb86e3d2bff711

raylee avatar Apr 03 '18 17:04 raylee

Would Buffalo be compatible with the new Google App Engine standard environment V2 aka Go111 runtime?

davidhtims avatar Nov 27 '18 23:11 davidhtims

I saw that too, and had that same thought. Just need to find time to try it. :)

benkraus avatar Nov 27 '18 23:11 benkraus

GAE for Go 1.11 just requires a main.go to listen on the port provided in the PORT environment variable. So maybe Buffalo could just support PORT and then there shouldn't be any more work to do :) Of course, access to other services and capabilities is a different story, but for basic sites I think it's a winner.

On Tue, 27 Nov 2018 at 23:54, Ben Kraus [email protected] wrote:

I saw that too, and had that same thought. Just need to find time to try it. :)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/gobuffalo/buffalo/issues/213#issuecomment-442264036, or mute the thread https://github.com/notifications/unsubscribe-auth/AAGNG-OVUAF8qZ8ySYDLVJ0piIrQ_4s7ks5uzdDCgaJpZM4L1pM8 .

matryer avatar Nov 28 '18 13:11 matryer

I was able to get a non-db backed up running fairly easy.

I couldn’t quite figure out how to hook up pop to googles postgres though.

I’m not too familiar with GAE though.

First person to write an article on how to deploy a database backed Buffalo app to GAE wins a prize (seriously). :) On Nov 28, 2018, 8:30 AM -0500, Mat Ryer [email protected], wrote:

GAE for Go 1.11 just requires a main.go to listen on the port provided in the PORT environment variable. So maybe Buffalo could just support PORT and then there shouldn't be any more work to do :) Of course, access to other services and capabilities is a different story, but for basic sites I think it's a winner.

On Tue, 27 Nov 2018 at 23:54, Ben Kraus [email protected] wrote:

I saw that too, and had that same thought. Just need to find time to try it. :)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/gobuffalo/buffalo/issues/213#issuecomment-442264036, or mute the thread https://github.com/notifications/unsubscribe-auth/AAGNG-OVUAF8qZ8ySYDLVJ0piIrQ_4s7ks5uzdDCgaJpZM4L1pM8 .

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

markbates avatar Nov 28 '18 13:11 markbates

For the database backed Buffalo app on GAE,

It is not directly mentioned about that but I opened issues (proposals) on pop: https://github.com/gobuffalo/pop/issues/281 and https://github.com/gobuffalo/pop/issues/295 for this possibility. (since we live in Cloud World) And @B-Scan mention about his workaround on https://github.com/gobuffalo/pop/issues/281#issuecomment-435358094 .

I wrote my basic ideas on the issues and as a first few steps, some PRs are merged into pop. If there are some ideas about it, those will help us a lot!

Currently, I am thinking about some approaches including (1) wrapper dialects for existing dialects which has modified connection method but share main functions, (2) abstraction layer for connection and/or caching, (3) or just simply add some connection parameters to determined connection method and backend variations.

Any Idea? how about talking them on the proposals on pop? (I don't know and don't consider other parts of the GAE. I just think about pop side for now. :-)

sio4 avatar Nov 28 '18 14:11 sio4

I have a draft of this post sitting for some time. Some bits need an update, but I hope it can help anyone who is trying to use the App Engine.

How to Deploy GoBuffalo on Google's App Engine

That's more or less used to deploy the blog itself, which is running on the App Engine and Buffalo.

tombiscan avatar May 02 '19 08:05 tombiscan