PageBox for Java: Web application deployment using Java PageBox

 PageBox for Java 
Deployment Token API Active naming Trusted

Active Naming


The Active Naming of PageBox for Java follows the same principles as the Active Naming for .NET. Active Naming is used in PageBox constellations involving:

  • PageBoxes that installed the Web application from the same Repository. Web application instances can access to their PageBox facilities including Active Naming with the PageBox API.

  • Web application instances acting as clients. A client calls services or forwards requests to Web applications acting as servers

  • Web application instances acting as servers. Servers implement these services or process these requests.

The purpose of Active Naming is to select the most convenient location.

The Active Naming uses the token implementation of PageBox for Java.

Load balancers

Active Naming serves the same need as load balancers.

Users connect to a load balancer that can act like a set of virtual servers. The load balancer distributes requests to actual servers defined in a pool of application servers.

Load balancers can be software solutions like BIG-IP of F5 Networks that you can also find on some Dell computers or hardware solutions like the Cisco Content Services Switch (CSS). Load balancers have different functions:

  • Load balancers are routers. The user never knows about the pool servers that serve its requests. She only knows the virtual entry point. Load balancers may also protect the application servers against some IP attacks (DoS, SYN, ACK.)

  • Load balancers analyze messages at IP level but also at application level. For instance they understand SSL, parse HTTP headers and can identify cookies.

  • Load balancers implement many balancing algorithms. They can balance the number of messages processed by the application servers of the pool or the number of connections to the application servers of the pool or send new requests to the servers with the best response time. Usually you can configure cookie stickiness: HTTP message with a given cookie will always been sent to the same application server or client stickiness: requests of a client will always been sent to the same application server.

  • Load balancers monitor the performance and availability of the application servers with heartbeat messages.

  • Load balancers are customizable and flexible. They support a scripting language to setup sophisticated routing rules and heartbeats.

Load balancers can distribute load between thousands of applications servers. Without PageBox it may even be difficult to distribute applications on so large numbers of servers. Therefore it may be useful to use load balancers in combination with PageBox constellations.

However because load balancers are commercial (and rather expensive) products they cannot be a prerequisite for PageBox use. We also had the opportunity to play with the CSS and we got the feeling that today they have another - cultural rather than technical - drawback. First sophisticated setting require writing a significant amount of scripts. Second people are specialized. Very few have an hollistic view of an information system. A load balancer is considered as a network device and managed by people that usually configure firewalls and routers. A sophisticated setting of a load balancer requires a good understanding of application protocols that developers, operations and network engineers cooperate and notify changes to each others in due time.

Therefore we designed the Active Naming as a pure, highly customizable application solution with automated updates: for instance when a new application clone is added it is automatically added to the pool. A future direction for Active Naming could be an automated update of load balancers.


A PageBox-enabled Web application declares entry points that can be pages or services. Clients can balance their requests between entry points.

An entry point is defined by:

  • A name

  • A URL

  • Imperative matching object. Clients can only balance between Web application instances whose object match their own imperative object. The comparison is made with the equals method. The object type is known by the client and server Web Application instances and obscure to the PageBoxes.

  • Nice if match object. Clients will balance preferentially between Web applications whose object match better with their own nice if match object. The Active Naming uses a compareTo method to compute the distance between the client object and the server objects. This compareTo method allows comparing two nice if object and also considering the resources (CPU, memory and network) of the PageBox hosting the nice if passed in parameter. Shorter the distance is more chances a server entry has to be selected. This data is meaningful for the client and server Web Application instances and obscure to the PageBoxes.

A PageBox-enabled Web application uses a method of the PageBox API to declare, update and remove its entry points.

When an application has declared its entry points the hosting PageBox registers on the ring and updates a special message, which is a HashMap whose key is the archive name of the application and value another HashMap whose key is the entry name and value an object of ActiveEntry class defined like this:

class ActiveEntry {

String url;

String must;

String niceif;



  • url is the url of the entry on the Web application instance

  • must is the imperative matching data

  • niceif is the nice if match data


When it acts as a client a PageBox-enabled Web application implements servlets, JSPs and services that parse user input, create imperative and nice if match objects and uses a getCandidate method of the PageBox API to get the most convenient URL for entry points.


Especially when the services pointed by the entry points return XML messages the proxy can syndicate responses. A syndication servlet:

  • Processes the user input

  • Calls getCandidate to get the most suitable URLs for the entry points

  • Calls the services at these URLs

  • Merge and transform the services' responses

Page handling

The user enters data needed for routing, for instance her GPS coordinates or the location of the data she wants to use on a first form. A servlet processes these data, selects the most suitable page instance and returns a page like this:


<body onload="javascript:document.parmSend.submit();">

<form name="parmSend" method="post" action="https://appliserver:8443/appli/entrypage">

<input type="hidden" name="parm1" value="value1" />

<input type="hidden" name="parm2" value="value2" />

<input type="hidden" name="parm3" value="value3" />



On load the page automatically posts on the entry page with needed parameters.

Service handling

The Web service client first calls a proxy Web service to get the URL of the chosen service instance and then call this service instance.
2002-2004 Alexis Grandemange. Last modified .