Multi-tenancy and handlers calls

77 views
Skip to first unread message

Julius Kovac

unread,
Jul 10, 2014, 9:43:46 AM7/10/14
to google-ap...@googlegroups.com
Hi,

I try to solve following problem and maybe there is some simple solution I keep overlooking. Currently I register simple handlers:

/addpost (show form to add post)
/latest (show latest posts)
/top (show top posts)

I would like to extend this functionality the way that all handlers will be prefixed with some namespace, for example projectId (paths will be something like /25887/addpost /25887/latest etc.).
How would you solve this and then invoke appropriate handler?

Thank you for any advice,
-- Julius



Matthew Zimmerman

unread,
Jul 10, 2014, 9:52:56 AM7/10/14
to Julius Kovac, google-appengine-go
You are looking for gorilla mux - http://www.gorillatoolkit.org/pkg/mux
> --
> You received this message because you are subscribed to the Google Groups
> "google-appengine-go" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to google-appengin...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Jeff Huter

unread,
Jul 10, 2014, 11:35:33 AM7/10/14
to google-ap...@googlegroups.com, jul...@gmail.com
Or, martini. https://github.com/go-martini/martini#routing.

I recently changed a site from gorilla to martini and very happy with the results.  At least for my site, martini middleware greatly simplified the routing/controller logic.

Jeff

Julius Kovac

unread,
Jul 10, 2014, 1:52:06 PM7/10/14
to google-ap...@googlegroups.com, jul...@gmail.com
Thank you Matthew and Jeff for suggestions, I will take a closer look at both.

-- Julius

Glenn Lewis

unread,
Jul 10, 2014, 2:00:13 PM7/10/14
to Jeff Huter, google-appengine-go, Julius Kovac
I'm curious if you also investigated Revel: http://revel.github.io/ ?
I haven't looked into it yet, but it sounds interesting and similar to martini.
-- Glenn


To unsubscribe from this group and stop receiving emails from it, send an email to google-appengin...@googlegroups.com.

Jeff Huter

unread,
Jul 10, 2014, 2:18:11 PM7/10/14
to google-ap...@googlegroups.com, jbh...@gmail.com, jul...@gmail.com
I did and it looked interesting.  Unfortunately, at the time I looked, there was no AppEngine support.  It's possible that has since changed.
> For more options, visit https://groups.google.com/d/optout.
Message has been deleted

Prateek Malhotra

unread,
Jul 11, 2014, 11:51:46 AM7/11/14
to google-ap...@googlegroups.com, jbh...@gmail.com, jul...@gmail.com
I help maintain an AppEngine compatible version of Beego.me: https://github.com/astaxie/beegae
Reply all
Reply to author
Forward
0 new messages