JBoss:Developer's Guide
上QQ阅读APP看书,第一时间看更新

Practical JBoss

In the following section, we will start the BeOSBank digitalization. Let me introduce you to the client who is responsible for maintaining BeOSBank's development environments: Doctor JBoss. You have a business meeting with the client; listen and improve the way he and his team are managing their environments today:

Doctor JBoss: Hi Mr, nice to meet you.

Client: How are you today? Nice to meet you too.

Doctor JBoss: Let me introduce my assistant (you). We are working in the same team and are glad to have this meeting with you.

You: Nice to meet you.

Client: We have a lot of problems with our development environments; we are running many release cycles, and since we are migrating to the new web portal in the next few months, we are still maintaining the old portal bug fix branch concurrently. We have the same issue when a configuration parameter is changing; we have to apply the modification manually on each server. We have a lot of silo servers; when we have to deploy one application, we have to manually do it on each server; the process is very time consuming, and we would like to improve this.

Doctor JBoss: Hmmm, I am seeing, so you are still running in standalone mode? I have good news for you; from EAP 6, you have a domain mode that helps you manage server configuration from a single location.

Client: How is it possible? We are running EAP 7, and we worked with a guy from NullConsultantAgency to set up this architecture, but he said the domain is not good for us since we have different applications to manage and different Dev environments to support in parallel.

Doctor JBoss: How many applications and environments are you running in parallel?

Client: For the pilot, we want to focus on the money transfer portal app only. We have two silo servers running two different versions of our web portal. When one server goes down, the version hosted on this server is not available anymore; we want to add two new machines to support two concurrent branches for the new portal app in the same configuration. This situation will probably change, and we will have more and more environments to support various development requests.

You: So here's your current deployment topology?

JBoss standalone architecture money-transfer-app version 1.x

Doctor JBoss: Do not worry, with my assistant, we will design a new architecture to support a single administration dashboard, running old and new versions of the money transfer concurrently, and the most important one: high availability of the server instances.

Client: What is high availability?

Doctor JBoss: This means you will not have a single point of failure in your configuration anymore; if one machine is down, you will still have another active node for each version of the application.

Client: Good, so I need to purchase six new machines right?

Doctor JBoss: Not really! The current material configuration is enough to add more server instances. We will play with port offset to have more than one server instance per machine. You will save a lot of money, and you do not have to buy two more machines to deploy the new versions. The new version will be handled by new server instances on both the machines.

Client: That's cool, so I need zero new machines.

Doctor JBoss: We will add a small machine for a domain controller; this is the host on which you will perform all your administrative tasks. The domain controller will interact with host controllers to manage all the configuration.

You: Drawing :

JBoss domain architecture money-transfer-app version 1.x and 2

Client: What is a host controller?

Doctor JBoss: The host controller is a process running on each machine of your domain; it will be responsible for starting and stopping the server instances. It cooperates with the domain controller to maintain the domain configuration policy on the host its managed.

Client: What about the server group?

Doctor JBoss: The server group is a deployment unit; literally, it is a collection of server instances running the same configuration and deployments. Any update on the group configuration affects all the members of the group.

Client: Nice stuff, but how do we implement this? Can you make a small PoC for my money-transfer-webapp?

Doctor JBoss: My colleague will take the floor and show you.