I would say that the third point is pretty independent of grails / play / what in general. If you need a shared cache, there are many providers for it, and most of them have plugins in Grails.
The apartment building in the grail is quite mature and much less intrusive than the solution from the blog in Sebastiens's answer. Regardless of whether you use a single lease (several databases) or several tenants, they are more or less transparent to your code, and most headaches are abstracted. Keep in mind that you need to do some smart indexing (for example, include the tenant ID in the index of several columns, etc.), so as not to get very sad speeds when your data starts to grow.
As for external views, you can either tickle them in the database, or symbolically link them to your webapp and simply save them in separate numbered folders. Then, from the tenant's plugin, you can use TenantUtils.getCurrentTenant() and simply visualize from the corresponding folder "/" + (tenantID ?: "default") + "/whatever/view/path" . Thus, layouts, etc. Can be transferred between tenants, if you so wish, and simply add the specific material of the tenant to the folders for the tenants.
Perhaps you can do it in the game, too, or, but I donβt see anything that would prevent you from doing this just fine in Grails.
My $ 0.02 for that matter.
source share