• No results found

Automated Deployment of a Heterogeneous Service-Oriented Sys

N/A
N/A
Protected

Academic year: 2021

Share "Automated Deployment of a Heterogeneous Service-Oriented Sys"

Copied!
37
0
0

Loading.... (view fulltext now)

Full text

(1)

Automated Deployment of a Heterogeneous

Service-Oriented System

Sander van der Burg Eelco Dolstra

Delft University of Technology, EEMCS, Department of Software Technology

September 3, 2010

(2)

Service Oriented Computing

The Service Oriented Computing (SOC) paradigm is very popular to build distributed applications.

(3)

Service Development Support System (SDS2)

Philips has developed a service oriented architecture for Asset Tracking & Utilisation services in a hospital environment. Service Development Support System (SDS2)

Motivating example throughout the paper

(4)
(5)

Service Development Support System (SDS2)

Sander van der Burg, Eelco Dolstra Automated Deployment

Purpose

A hospital contains a wide range of medical devices Each produce status and event logs in their own format Difficult to perform analysis on data

How can we transform these implicit datasets into somethinguseful?

(6)
(7)

SDS2: Utilisation Service

(8)

SDS2: Technologies

MySQL: data storage

Ejabberd: messaging system for transmitting status and location events

Java: implementation language

Apache Axis: for implementing web services

Google Web Toolkit: for implementing web application front-ends

(9)

SDS2: Deployment

SDS2 must be eventuallydeployed, i.e. made available for use

(10)

SDS2: Deployment

Create a global configuration file with service locations, and: Databases:

Transfer schema to target machine Install database on MySQL server Web services:

Compile Java web service code Package web application archive Activate web service on target machine Web applications:

Compile Java code to JavaScript code Compile Java web application code Package web application archive

(11)

SDS2: Distribution

(12)

SDS2: Deployment

(13)

Challenges

Deploying islabourious:

Time consuming. Deploying SDS2 takes several hours for a

single machine

Subject to errors. Because it is performed manually

Complexityis proportional to number of machines in the

network

(14)

Challenges

Deployment steps must be performed in the right order: For a web service providing data from a database, the database must be activated first

(15)

Challenges

We do not exactly know what the dependencies of a service are: Difficult to upgrade reliably

Difficult to upgrade efficiently

(16)

Challenges

Upgrading is notatomic:

A user can observe that the system is changing

(17)

Challenges

Deploying inheterogeneousnetworks is even more complex.

(18)

Challenges

Existing deployment tools have various limitations:

Designed for specific component technologies (requires to exclusively use one type of language/implementation):

Enterprise Java Beans OSGi

Embedded systems

Designed for specific environments:

GoDIET: Designed for the DIET grid computing platform CODEWAN: Ad-hoc networks

Generic approaches (lack desirable non-functional properties):

Software Dock: no dependency-completeness, atomic upgrading

(19)

Disnix

Distributed deployment extension for the Nixpackage

manager

Captures deployment specification in models

Performs complete deployment process from models Guarantees complete dependencies

Component agnostic

Supports atomic upgrades and rollbacks

(20)

Disnix

(21)

Service model

{distribution, system}:

let pkgs = import ../top-level/all-packages.nix {

inherit distribution system; }; in

{ mobileeventlogs = { name = "mobileeventlogs"; pkg = pkgs.mobileeventlogs; type = "mysql-database"; };

MELogService = { name = "MELogService"; pkg = pkgs.MELogService;

dependsOn = { inherit mobileeventlogs; }; type = "tomcat-webapplication";

};

SDS2AssetTracker = { name = "SDS2AssetTracker"; pkg = pkgs.SDS2AssetTracker;

dependsOn = { inherit MELogService ...; }; type = "tomcat-webapplication";

}; ... }

(22)

Infrastructure model

{

test1 = {

hostname = "test1.net"; tomcatPort = 8080; mysqlUser = "user"; mysqlPassword = "secret"; mysqlPort = 3306;

targetEPR = http://test1.net/.../DisnixService; system = "i686-linux";

}; test2 = {

hostname = "test2.net"; tomcatPort = 8080; ...

targetEPR = http://test2.net/.../DisnixService; system = "x86_64-linux";

}; }

Captures machines in the network and their relevant properties and capabilities.

(23)

Distribution model

{infrastructure}:

{

mobileeventlogs = [ infrastructure.test1 ]; MELogService = [ infrastructure.test2 ];

SDS2AssetTracker = [ infrastructure.test1 infrastructure.test2 ]; ...

}

Maps services to machines

(24)

Deployment process

Specifications are used to derive deployment process:

Building services from source code

Transferring services to target machines

(25)

Building services

Every component built from source code is stored in the Nix store:

/nix/store/y2ssvzcd86...-SDS2EventGenerator

Former part: y2ssvzcd86..., SHA256 hash code derived

fromall build-time dependencies of the component:

compilers, libraries, build scripts

Latter part: SDS2EventGenerator: name of the component

(26)

Building services

/nix/store nqapqr5cyk...-glibc-2.9 lib libc.so.6 ccayqylscm...-jre-1.6.0 16 bin java n7s283c5yg...-SDS2Util share java SDS2Util.jar y2ssvzcd86...-SDS2EventGenerator bin SDS2EventGenerator share java SDS2EventGenerator.jar

(27)

Building services

/nix/store nqapqr5cyk...-glibc-2.9 lib libc.so.6 ccayqylscm...-jre-1.6.0 16 bin java n7s283c5yg...-SDS2Util share java SDS2Util.jar y2ssvzcd86...-SDS2EventGenerator bin SDS2EventGenerator share java SDS2EventGenerator.jar

(28)

Transferring closures

Copy services and intra-dependencies to target machines in the network

Only components missing on target machines are transferred Always safe. Files are never overwritten/removed

(29)

Transition phase

Inter-dependency graph is derived from specifications Deactivate obsolete services (none, if activating new configuration)

Activate new services

Derive order and dependencies from dependency-graph

(30)

Service activation

Every service has a type: mysql-database,

tomcat-webapplication,process, ...

Types are attached to external processes, which take 2 arguments

activateordeactivate Nix store component

Infrastructure model properties are passed as environment variables

(31)

Atomic upgrading

Two-phase commit protocol mapped onto Nix primitives Commit-request-phase (distribution phase):

Build sources

Transfer service closures

Commit-phase (transition phase):

Deactivating/activating services

Optionally block/queue connections from end-users

(32)

Atomic upgrading

In case offailure during commit-request: system is not

affected

No files overwritten

Will be removed by garbage collector

In case offailure during commit:

(33)

Results

We have created deployment models for SDS2

Used to atomatically deploy SDS2 in a network of 4 32-bit Linux and 4 64-bit Linux machines

Deployment takes minutes for a single machine. For each additional machine a couple of minutes.

Upgrading only took seconds in most cases (only changed parts were replaced)

(34)

Results

Because all components and dependencies are known:

Deployment steps were always performed in the right order No failures due to breaking inter-dependencies

Upgrading is efficient; we only have to upgrade what is necessary

Upgrading is reliable; we always know and include the

(35)

Results

Upgrades are (almost) atomic

Minor issue: web application in browser must be refreshed, which is not under Disnix’ control

Components can be built for a particular platform

On the coordinator machine (if capable) On the target machines

(36)

Conclusion and future work

Conclusion:

With Disnix we can automatically, efficiently and reliably deploy service oriented systems similar to SDS2 in heterogeneous environments

Future work:

Support dynamic migration of database (and other mutable state)

Experimenting in larger networks

(37)

Questions

Disnix and other related Nix software can be found at:

http://nixos.org

Any questions?

References

Related documents

In a surprise move, the Central Bank of Peru (BCRP) reduced its benchmark interest rate by 25 basis points (bps) to 3.25% in mid-January following disappointing economic growth data

The rhetoric of the supremacy of the ‘golden coin’ of free markets and democracy championed by Johnson in his vision for Global Britain and future engagement with Africa

Open C:\SAS_Home\wrapper.conf and ensure that a Java 6 JRE is specified, for example:   wrapper.java.command=C:\Program Files (x86)\Java\jre6\bin\java.exe Restart

Make measurements on timeslot 0 [FREQUENCY] {Timeslot Off} [Enter] Activate the ORFS measurement (figure 25) [MEASURE] {GMSK Output RF The default setting measures spectrum

Please select an occupational family, group, and sub-group for your first job after graduation from Auburn University.. Architecture and Engineering Occupations

Other factors that favor good performance in adult cochlear implant candi- dates include lip-reading ability and residual hearing before implantation (patients with some hearing in

The improved and more refined morphology of the compatibilized blend strongly influences the mechanical behavior of the isotropic sheets of the binary blend; in particular,

[r]