There is a server on WildFly 8.2 containing a bunch of interacting components (EJB modules, servlets, web services, etc.). The server is running 24x7. To update, you have to stop it, perform an update, then start it. This is certainly not long, on average 10 minutes per month does not work, but I would like 100% uptime.

Are there any standard J2EE tools or WildFly directly to update components on the fly? Or maybe separate libraries / frameworks?

Standard redeploy is not very suitable, because As far as I understand, a separate component will not be available until the old one is already uninstalled, and the new one is still deployed.

You can write yourself something like a proxy class, which will be aware of the two versions and will smoothly redirect from one to the other. Here I am just afraid that I will reinvent the wheel.

ZY The option with a proxy / balancer in front of two servers is not considered yet, since will need another server, this is an extreme option.

  • one
    Proxy / balancer can be installed on one of the wildfly servers. In addition, the wildfly itself can be a proxy / balancer, and this boasts. In general, cluster failover is assumed. The wildfly is organized through domains. - Sergey
  • one
    You can try to use nginx as a proxy. In case of an error on the first server, he will remember the request and redirect to another and give the user a normal page. On the other proxy, I did not find such an opportunity. They will first show the village with an error, then just go to the working server. - Sergey

1 answer 1

Options:

1. Microservices

the final application will be decomposed into microservices

pros:

  • freedom of technology
  • much easier to maintain
  • freedom of approach: orchestrator, choreographer, etc.

minuses:

  • the more microservices the more control is required. those. you will need at least your own monitoring

2. Migrate to OSGi

For example, on the basis of Karaf you can build an application consisting of bundles. OSGi uses the orchestrator approach

pros:

  • OSGi platform provides many buns right out of the box
  • easier to maintain

minuses:

  • higher entry threshold for programmers

both approaches may require significant effort of programmers (depending on the current architecture of the project)