I have had some trivial toy Haskell projects running on AppEngine just
testing it out.
Using the AppEngine custom runtime it's trivial to deploy an application.
I use OSX as my development machine which complicates it a little but all
you need to do is create a statically linked binary and a Dockerfile to
start it. The only interesting bit in the Docker file is my app looks for a
port environment variable which i hardcore and I use a optimised base image
meaning the docker container is around 20Mb in total.
CMD PORT=8080 myapp-exe
I'm using stack to build my projects. As I'm on OSX I need it to tell stack
to build the app in a linux docker container to run in the
'fpco/haskell-scratch' container above.
in the stack.yml I add the below
Then to build I run the below which generates the executable used in the
If on Linux you probably won't need to build in a docker container and just
use: stack build --ghc-options='-optl-static -optl-pthread' --force-dirty.
Interacting with the services in AppEngine where they have a public API
shouldn't be an issue, hit the documented HTTP endpoint as they specify.
It's the API's which don't have a public Google Cloud equivalent that are
Search being one.
AppEngine give the tools for custom runtimes but don't give docs for
interacting with things such as the search API so you can write your own
API using your own runtime. I've not had anytime yet to reverse engineer
the protocol buffer sidecar they have on the instances....If i wasn't
playing with a toy project and on a deadline I'd write a separate service
using Scala + the Java sdk's to deploy as a thin REST service for search /
mail then call that from Haskell.
With the custom runtimes AppEngine should publish the sidecar API so people
can create open source SDK's which would only help grow AppEngine.
On Saturday, 15 October 2016 00:23:41 UTC+11, Thomas Koch wrote:
> Hi Adam,
> have you had success trying Haskell on AppEngine? I'd love to try it out
> myself once I've time for this and would love to learn from your experience
> or help you if you got stuck.
> Am Mittwoch, 5. Oktober 2016 11:26:40 UTC+2 schrieb Adam Evans:
>> That looks to be the simplest / obvious solution, take the off the shelf
>> Java / Python AppEngine SDK and create a RESTish wrapper around the search
>> features. Deploying in AppEngine I'd then need to look at service to
>> service auth to restrict access so my index is not publicly available.
>> The primary reason for investigating AppEngine is cheap computing on the
>> the micro instances + search vs AWS EC2 with ElasticSearch. I would prefer
>> not have an instance specifically as a search sidecar to keep the cost down.
>> I'll try and investigate the ProtoBuf api reverse engineered by the PHP
>> project. It would be useful if Google opened up the spec if providing
>> custom runtimes so 3rd parties can implement the libraries, it'd also make
>> AppEngine a no brainer as a PaaS with custom runtime support.
>> On Wednesday, 5 October 2016 07:52:30 UTC+11, Tom Walder wrote:
>>> I guess you could deploy a PHP/Python/Standard runtime app to just
>>> expose a RESTish API to the Search service.
>>> I've done this before.
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email
To post to this group, send email to email@example.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit
For more options, visit https://groups.google.com/d/optout.