Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Change status
IDIEP-17
AuthorDenis Mekhanikov
Sponsor 
Created 
Status
Status
colourGreyYellow
titleDRAFTACTIVE


Table of Contents

Motivation

...

It should be possible to update service implementation without downtime. Employment of Deployment SPI should solve this problem.

Service processor should subscribe to class deployments and restart corresponding services, when their classes change.

The basic usage scenario involves enabling UriDeploymentSpi and updating the JAR files, containing implementation classes. It will lead to existing services cancellation and reployment. It implies, that services should be ready to sudden cancellations. Documentation should contain explanation of this fact with examples.

To make redeployment with an updated class possible, service's properties and its class should be separated. ServiceConfiguration should contain the following properties:

...

  • String serviceClassName – name of a service implementation class.
  • Map<String, Object> properties – properties, that a service can use during initialization and work. Properties should be included into the ServiceContext object.
  • It will also help the service processor distinguish between different services configurations, when only properties change. 

    ServiceConfiguration#service property should be removed.

    Service classe should have an empty constructor, that will be used by deploying nodes.

    A possible point of improvement here is to start redeployment with a random delay to avoid denial of service on the whole cluster.

    ...