0

I'd like to develop a bunch of SaaS-Applications in Java and I'm not sure wat is the best way to go.

Each Application will have a WAR containing the Webservice and will have at least one Worker-WAR, which is a Thread waiting for new Tasks in the DB to come up and then working off this task. This worker contains the intelligence of the application and uses a lot of cpu. The Webservice gives Users the possibility to add new tasks and other stuff ...

Resource Limitations

The infrastructure must ensure the following: The Webservice must always get a certain amount of cpu time to be able to respond to the user. So the hungry Worker must not get all cpu time for its working.

Each Tenant has its own worker and they must not interfere with each other as it must be not possible to block the whole system (and all tenants) with a single task.

Resource Sharing

It would be nice to be able to share the resources but always ensure that in extreme situations every worker and webservice gets the required minimum.

Versioning

As new Versions of a application are released each tenant must have the possibility to initiate a update on its own when he adapted to the API-Changes. Furthermore a tenant must be able to keep more than one application-endpoint (lets call them channels) to have a production channel and a beta-channel. In the Beta-Channel the tenant can test againts new versions and when he feels comfortable with the new version he can update his production channel.

User-Management

All applications of a tenant must share a user-Database and have the same way to authenticate.

Environment

I want to use Java EE 7. I would enjoy using Wildfly.

Question

What is the best infrastructure to approach these aims? I want to host this on my own servers.

What I already found

I understand that you cannot limit CPU-usage in a jvm. So the Workers must have their own jvms.

I looked at PaaS-Providers like OpenShift Origin, but it seems that they encourage you to run a application-server per tenant, per application which sounds to me as a resource-eater.

Is there no way to have one Wildfly running and limit the amount cpu-usage per tenant and app?

Thank You Lukas

Lukas Lentner
  • 370
  • 3
  • 11
  • Could you run the application in a docker container and use its resource limiting options? https://docs.docker.com/reference/run/#runtime-constraints-on-cpu-and-memory – Foo42 Mar 16 '15 at 14:01
  • But then I will have the same as with openshift, isn't it? OpenShift uses Docker and every WAR will be in a own gear/container/cGroup and needs its own app-server ... – Lukas Lentner Mar 16 '15 at 15:04

0 Answers0