migae: clojure on Google App Engine

515 views
Skip to first unread message

Gregg Reynolds

unread,
Aug 29, 2015, 2:49:43 PM8/29/15
to clo...@googlegroups.com
Hi list,

If you have any interest in Clojure on Google App Engine you might want to take a look at migae.  Currently it just contains several basic demos showing how to structure Clojure apps on GAE, running from raw java interop, to ring, to compojure, to compojure-api.  Dynamic code reloading makes rapid development possible.  Not quite a true repl, but almost as good for servlet development at least.

The technique is straightforward and surprisingly simple, but has not (to my knowledge) been explained or demoed before.  (A web search for "clojure on app engine" turns up surprisingly few recent results.)  It turns out to be very easy to have multiple servlets, filters and a quasi-repl using basic techniques (and some minor hackery) rather than a specialized library.  It's not at all like appengine-magic.  AE-magic is fine, but it's a little long in the tooth, and more important, Google's switch to a gradle-based build system renders much of AE-magic's logic unnecessary.  Also, I wanted the service libs to be independently usable.

I'd appreciate any feedback, especially on my explanation of how it works - why dynamic loading works even though everything is aot-compiled.  I'm not entirely sure I understand how Clojure's loading mechanism dovetails with the servlet/jvm loading mechanism, so I made an educated guess.  Also, I've tried to make the README relatively basic so those not familiar with servlet programming can grok it.

As for GAE service libraries, that'll take a while, and it's probably too much for me alone, so any who wants to help out is welcome.  I've got what I think is a promising approach to the Datastore API but will describe that in another message.

Thanks,

Gregg

Nicholas Faiz

unread,
Sep 1, 2015, 8:55:18 AM9/1/15
to Clojure
Thanks. This is very helpful. I successfully built an example Clojure service on GAE last week working from http://flowa.fi/blog/2014/04/25/clojure-gae-howto.html?lang=en . Looking forward to reading through your examples.

Cheers,
Nicholas

con...@infodogs.co

unread,
Dec 16, 2016, 8:16:40 AM12/16/16
to Clojure
Hi Gregg,

Recently switched from python to clojure. 
Is migae still ok for starting out for building applications on app engine (the last commit is from 2015) ? 

Thank You,
Claudiu

Gregg Reynolds

unread,
Dec 16, 2016, 11:00:35 AM12/16/16
to clo...@googlegroups.com
On Fri, Dec 16, 2016 at 6:13 AM, <con...@infodogs.co> wrote:
Hi Gregg,

Recently switched from python to clojure. 
Is migae still ok for starting out for building applications on app engine (the last commit is from 2015) ? 

Thank You,
Claudiu

Hi Claudiu,

Thanks for asking.  The answer is yes and no.  Yes: I did a bunch of work on it last summer, switching to boot,  etc.  No: the documentation, while plentiful, is probably pretty outdated, and I haven't looked at it for six months so I'm not sure what works and what doesn't. It does work, I'm just going to have to spend some time cleaning things up.  Fortunately I'm due to start using it in anger for a Real Project next week, so I expect to have an update available soon.  In the meantime poke around in https://github.com/migae, especially boot-migae, and let me know how things go.

Thanks,

Gregg
 
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@googlegroups.com
Note that posts from new members are moderated - please be patient with your first post.
To unsubscribe from this group, send email to
clojure+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jeaye

unread,
Dec 17, 2016, 2:14:03 PM12/17/16
to clo...@googlegroups.com
I was recently informed about https://github.com/nickbauman/cljgae-template which aims to provide a GAE template for leiningen projects. As it didn't exist when I started with GAE, I wrote up a summary of my experience bootstrapping things here: https://blog.jeaye.com/2016/08/23/clojure-app-engine/

Hopefully these prove useful.

On Fri, Dec 16, 2016 at 10:00:20AM -0600, Gregg Reynolds wrote:
> On Fri, Dec 16, 2016 at 6:13 AM, <con...@infodogs.co> wrote:
>
> > Hi Gregg,
> >
> > Recently switched from python to clojure.
> > Is migae still ok for starting out for building applications on app engine
> > (the last commit is from 2015) ?
> >
> > Thank You,
> > Claudiu
> >
>
> Hi Claudiu,
>
> Thanks for asking. The answer is yes and no. Yes: I did a bunch of work
> on it last summer, switching to boot, etc. No: the documentation, while
> plentiful, is probably pretty outdated, and I haven't looked at it for six
> months so I'm not sure what works and what doesn't. It does work, I'm just
> going to have to spend some time cleaning things up. Fortunately I'm due
> to start using it in anger for a Real Project next week, so I expect to
> have an update available soon. In the meantime poke around in
> https://github.com/migae, especially boot-migae
> <https://github.com/migae/boot-gae>, and let me know how things go.
>
> Thanks,
>
> Gregg
>
>
> >
> >
> > On Saturday, August 29, 2015 at 9:49:43 PM UTC+3, Gregg Reynolds wrote:
> >>
> >> Hi list,
> >>
> >> If you have any interest in Clojure on Google App Engine you might want
> >> to take a look at migae <https://github.com/migae/migae>. Currently it
> > clojure+u...@googlegroups.com
> > For more options, visit this group at
> > http://groups.google.com/group/clojure?hl=en
> > ---
> > You received this message because you are subscribed to the Google Groups
> > "Clojure" group.
> > To unsubscribe from this group and stop receiving emails from it, send an
> > email to clojure+u...@googlegroups.com.
> > For more options, visit https://groups.google.com/d/optout.
> >
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clo...@googlegroups.com
> Note that posts from new members are moderated - please be patient with your first post.
> To unsubscribe from this group, send email to
> clojure+u...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to clojure+u...@googlegroups.com.
signature.asc

Gregg Reynolds

unread,
Dec 18, 2016, 4:21:58 PM12/18/16
to clo...@googlegroups.com


On Dec 17, 2016 1:13 PM, "Jeaye" <con...@jeaye.com> wrote:
I was recently informed about https://github.com/nickbauman/cljgae-template which aims to provide a GAE template for leiningen projects. As it didn't exist when I started with GAE, I wrote up a summary of my experience bootstrapping things here: https://blog.jeaye.com/2016/08/23/clojure-app-engine/

Hopefully these prove useful.

thanks much, I'll take a look.

Gregg 

> > For more options, visit this group at
> > http://groups.google.com/group/clojure?hl=en
> > ---
> > You received this message because you are subscribed to the Google Groups
> > "Clojure" group.
> > To unsubscribe from this group and stop receiving emails from it, send an

> > For more options, visit https://groups.google.com/d/optout.
> >
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clo...@googlegroups.com
> Note that posts from new members are moderated - please be patient with your first post.
> To unsubscribe from this group, send email to

> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscribe@googlegroups.com.

> For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@googlegroups.com
Note that posts from new members are moderated - please be patient with your first post.
To unsubscribe from this group, send email to

For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscribe@googlegroups.com.

con...@infodogs.co

unread,
Dec 19, 2016, 2:22:24 AM12/19/16
to Clojure
Thank you. 
Will take a look at migae. cljgae-template also sounds promising.
Got chestnut template working with datastore. Thank you for posting http://lambda-startup.com/developing-clojure-on-app-engine/ and https://blog.jeaye.com/2016/08/23/clojure-app-engine/
Don't know if it's the best approach but seems to be working nicely(also have the repl working in vim). 


For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojure+u...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages