SAFplus Runtime Director API  3.0.5
examples.http Namespace Reference

This example shows a simple http server protocol for program-to-program communication. More...

Detailed Description

This example shows a simple http server protocol for program-to-program communication.

For example, your EMS could use this protocol (extended, of course) to control the cluster.

For understandability, many of the server's responses have been enhanced with human-readable annotation in this simple example. Of course, a real implementation would return data more easily parsed by the client software (such as XML formatted data).

By default, the server listens to port 8000. The following URLs are available:

Show nodes, Service Units and Components: URL: /

Show the list of nodes URL: /nodes

Show a list of Service Units URL: /serviceUnits

Show a list of Service Groups URL: /serviceGroups

Show a list of applications URL: /apps

Add a new application into the system: URL: /newapp/<filename> For example: /newapp/home/stone/myApp.tgz

Deploy a new application URL: /deploy/<app>/<ver>/<nodes> For example: /deploy/virtualIp/1.4.0.0/ctrlI0

Upgrade an service group URL: /upgrade/<servicegroup>/<new version>=""> For example: /upgrade/virtualIpi0/1.4.0.1