
The Primary Server (PS) is a tomcat running the clusterj-cluster-manager-api.war (CCMA).
- 1: the client
- 2: machine physical or virtual
- 3: tomcat
- 4: CCMA
- 5: The setup database (SDB)
Execution flow from the client
Basically, the PS receives the client request and routes it to a node in a machine:
- The client makes a request with these parameters:
- cluster token: the token identifying the cluster
- uri: .war and endpoint
- query string in GET requests
- body in POST requests
- http header with the clusterj session token
- The PS:
- Receives the request
- Picks a machine with more resources available from the in-memory singletons that holds data for clusters and machines
- Calls the endpoint at the chosen machine
- The TS
- Receives the request from the PS
- Process the request
- Sends the response to the PS
- The PS
- Receives the response from the TS
- Sends the response to the client

At a lower level, the CJCMA handles the request
- Clients calling from the Internet
- PS
- TS
- Tomcat in PS
- Tomcat hosting CJNMA
- CJNMA
- Node Tomcat, that is, the tomcat hosting the user’s .wars
- The SDB
- Client request
- PS request to the CJNMA: node installation, startup/shutdown, machine statistics
- SDB update from CJCMA: cluster creation, user authorization, cluster details, node details