Skip to content
Tom Janson edited this page Feb 15, 2018 · 2 revisions

Deploying a service

Distribution

There are two possibilities to distribute a service:

  • local: By putting the service into the service of the local deployment, the service is available to the local node (for development purposes).
  • network: The service can be uploaded to the network and be made avialable to each node in the network.

Uploading a service

The service can be uploaded to the network using the node launcher:

java -jar las2peer.jar --bootstrap deployment.network.url:port uploadServicePackage('i5.las2peer.services.fileService-2.0.jar', 'agent-developer.xml', 'developer-password')

TODO how to create developer agent

The specified developer agent owns the service. Only this agent can upload a new version of a service.

Deployment

There are two possibilities to start a service on a node, independent of where the service comes from (local or network):

  • manual deployment: The service can be started on a specific node by calling startService('i5.las2peer.services.fileService.FileService@1.0') using the launcher tool
  • automatic deployment: There's nothing to do here! If your service qualifies for automatic deployment, las2peer starts the service on an appropriate node in the network once it is requested. The service is also upgraded to new versions once they are available.

Requirements for automatic deployment

Any service that has been annotated with @ManualDeployment cannot be started automatically by las2peer, since this annotation enables some features that need manual configuration on each node (such as mainly configuration files). Other reasons for disabling automatic deployment may be

  • Storing user data using the ServiceAgent
  • Use of a database
  • Accessing other data sources requiring secret credentials
  • Heavy computations requiring exceptional hardware
  • Full control over the service, deployed versions, monitoring, ...
  • ...
Clone this wiki locally