Service-Oriented Software Engineering

582642
5
Ohjelmistojärjestelmät
Syventävät opinnot
Service-oriented software engineering (SOSE) is a software engineering approach which utilises constructs and concepts conforming with the service-oriented computing paradigm for designing, modelling and developing service based systems. The course introduces principles behind service-oriented software engineering, and approaches and methods for efficient service production in service ecosystems. The emphasis of the course is on service design, composition and modelling principles instead of specific implementation technologies.

Koe

28.02.2013 09.00 B123
Vuosi Lukukausi Päivämäärä Periodi Kieli Vastuuhenkilö
2013 kevät 16.01-22.02. 3-3 Englanti Toni Ruokolainen

Luennot

Aika Huone Luennoija Päivämäärä
Ke 12-14 D122 Toni Ruokolainen 16.01.2013-22.02.2013
Pe 12-14 D122 Toni Ruokolainen 16.01.2013-22.02.2013

Harjoitusryhmät

Group: 1
Aika Huone Ohjaaja Päivämäärä Huomioitavaa
Ke 10-12 B221 Toni Ruokolainen 21.01.2013—22.02.2013

Yleistä

OSGi example projects now available!

The OSGi example projects are now finally available! You can find the .zip-file that you can import to your Eclipse -workspace here: osgi-example-projects.zip.

The example projects can be run under the Eclipse by creating a new OSGi run configuration from the menu Run/Run Configurations... You should create a run configuration that is illustrated in this screenshot: sose-runconfiguration-screenshot.jpg

The example implementation became way too complex because the way OSGi Declarative Services runtime is designed. The biggest complexity became due to the features of OSGi DS to not allow cyclic dependencies between services. For this reason, the service interfaces and their implementations are now implemented as distinct bundles. The service implementations were divided to front-end and back-end parts (e.g. org.sose.hotelprovider.backend and org.sose.hotelprovider.frontend) that are orchestrated with OSGi Event (publish-subscribe) mechanism. For this purpose, each implementation uses the OSGi EventAdmin services; reference to this OSGi infrastructure service given using the declarative service mechanism (i.e. by corresponding bind / unbind methods).

Each front- / backend-implementation utilizes now an activate() -method which is a callback method called by the OSGi platform after all service references for the service implementation have been resolved. 

In the runtime configuration illustrated in the screenshot above, the backend-parts of services are initiated before (they have runlevel 4) the frontends (with runlevel 5). This was needed to guarantee that events published by service frontends get consumed by the backends, i.e. the eventhandlers must be registered in the activate() -methods of the backend implementations before the frontend implementations publish the corresponding events.

Using this quit complex configuration of OSGi bundles we have now created a simple service choreography. Using OSGi Declarative Services created some technological complexities that were not foreseen by me! Especially, because cyclic dependecies are not tolerated, simply implementing the business logic for orchestrating a set of services does not work. In the OSGi framework there is however another way of declaring and using services, namely the OSGi Blueprinting mechanism which should be more easy way to create such service constellations (it hides the lifecycles and dependencies between services, and as far as I know, can also be used with service constellations having cyclic dependencies). 

Grading criteria changed: OSGi exercise provides now extra-points!

I realized this week that implementing the OSGi services involves many technical challenges that could not be addressed at the two hour tutorial. These challenges include for example resolution of cyclic dependencies, and possible issues with configuring the OSGi platform. Solving these technical challenges do not contribute to the core objectives of the course. That is why I decided to change the grading criteria as follows: you can now get the full 40 points from the course portfolio without the OSGi service implementation part. Instead, you can gain 0-5 extra-points (over the 40 points) from your implementation efforts. So, concentrate on the modelling projects and the home-exam instead.

I will provide a small example solution (involving traveller, travel provider and hotel provider participants of the service choreography) of the OSGi-projects due Monday that addresses all the technical challenges that you may encounter.  You can use that one still for your own implementation, if applicable.

 

SoaML screencast now available!

Due to numerous requests and feedback, I have now created a "screen cast" for SoaML modelling exercise. In the screen cast, the model created at the tutorial session (and available on this page below) is extended with a participant representing the hotel provider.

The screencast is available here: SoaML screencast. The screencast was done with a free tool - you can use the pause button at the bottom of the page to pause the presentation.

 

This course is aimed for MSc and PhD students interested in collaborative and interoperable computing within the Networking and Services subprogramme, and Service-oriented software engineering within the Software systems subprogramme.

The course provides an introduction to the context, characteristics and concepts of service-oriented software engineering. 

 

Schedule

The course consists of ten (10) lectures and three tutorials.

There are no weekly exercise sessions. The tutorials are held in class room B221!

See the course schedule below:

Kurssin suorittaminen

Completing the course requires completing the course portfolio and passing the course exam.

The course portfolio includes the assignments given during the course. The assignments include:

  1. Two extended abstracts on research papers;
  2. Two modelling exercises; and
  3. Service development exercise.

The material and instructions for the assignments will be provided during the course.

Grading

The course is graded on basis of the course portfolio and the home exam. At least half of maximum points must be achieved on both the course portfolio and the home exam to pass the course.

Course portfolio: 40p (min. 20p)
  • Contains the outputs of the reading assingments, modelling exercises, and the service development exercise.
    • Extended abstracts of the reading assignments
      • Delivered in pdf-format
    • Modelling artefacts: BPMN model and SoaML model projects produced by the Modelio tool
      • Delivered as zip-packages
    • Service development artefacts: project(s) produced with the Eclipse tool
      • Delivered as a zip-package
Home exam: 20p (min. 10p)
  • Concentrates on the generic principles and concepts taught in the course.
  • Home exam is now published: .pdf

Kirjallisuus ja materiaali

 

Lecture slides

  1. Lecture 1: Introduction to the course
  2. Lecture 2: Emergence of the Service Sector; Servitization
  3. Lecture 3: Service orientation
  4. Lecture 4: Service ecosystems - Concepts and Characteristics
  5. Lecture 5: Service-oriented analysis
  6. Lecture 6: Service-oriented design I - Systems and Architectures
  7. Lecture 7: Service-oriented design II - Services and Service Compositions
  8. Lecture 8: Service-oriented development
  9. Lecture 9: Service management
  10. Lecture 10: Advanced topics and course summary

 

Good tutorials available in the Internet

  1. Modeling business processes with BPMN
  2. SoaML tutorial
  3. Basic OSGi and OSGi Services (DS)

Assignments

In the reading assignments you should first read the given articles and then write an essay summarizing them. The expected length of an essay is about 1000 words and must be written as a scientific text (i.e. as taught in the scientific writing course). The essay should have a clear structure (i.e. at least an introduction, a middle part, and a conclusion) and the text should advance in a logical manner (a list of bullet points is not accepted as an essay). The essays will be returned by email to the lecturer (Toni.Ruokolainen(at)cs.Helsinki.FI) before the given deadline. Final version will be attached also as part of the course portfolio. The file format for the assignments is pdf.

You can access the articles with computers of the Department of Computer Science and the University of Helsinki. You may also access the articles from your home if you create a VPN connection to the university system: see the instructions.

Reading assignment 1: Value creation in service systems.

Read the following articles:

Write an article about value creation in service systems (you may use "Value creation in service systems" as the title of your essay or create your own). Your essay should discuss and answer at least the following questions:

  1. What are service systems? How are the related to services?
  2. What are the characteristics of value creation in service systems? How does it differentiate from contemporary value creation associated with tangible goods?

Deadline: February 1st.

 

Reading assignment 2: Service design and development methodology

Read the following article:

  • Papazoglou, Michael P., and Willem-Jan Van Den Heuvel. "Service-oriented design and development methodology." International Journal of Web Engineering and Technology 2.4 (2006): 412-442. PDF

Write an article about the service development methodology. Your essay should discuss and answer at least the following questions:

  • What kinds of activities are typical for service design and development? In what phases are those activities taken? (You don't have to elaborate on all the activities in the article but you can pick the most fundamental ones)
  • What are the main design and development principles discussed in the paper? What do they mean?

Deadline:  February 15th

 

Modelling assignment I: Service choreography modelling with BPMN

In this exercise you should look at the use cases described below and model a choreography that conforms to, or implements the behaviour by, the use cases. In the resulting choreography you should have (at least) four roles: one representing the traveller, another representing the travel provider (represented as the TravelReservationSystem in TravellerUseCaseDiagram and as actor TravelProvider in TravelManagementUseCaseDiagram), third representing the hotel reservation system and fourth representing the flight reservation system.

Some simplifications with respect to real-world cases have been made in the use case descriptions, for example regarding payments (which should involve some kind of financial service provider). Correspondingly, you are not expected to address every possible exceptional or alternative situation that could happen in the real-world scenarios. It suffices to meet the behaviour described in the use case descriptions, including the exceptional flows. You should be familiar with use case descriptions, if not, there are plenty of information available on the Internet :) In the use case descriptions below, the alternative flows are embedded in the main path, while exceptional flows are isolated as distinct elements; an exceptional flow description numbered 3.1 refers to step 3 in the main path, for example. 

You can use the model created at the tutorial session to get your work going. However, you should note that the tutorial version of the use case is a bit different (simpler) that the one used in here. The Modelio BPMN project created at the tutorial session can be found here: http://www.cs.helsinki.fi/u/thruokol/TravelReservation.zip 
You can import the above Modelio project to you workspace - Modelio has an "Import project.." selection under the "File" menu (make sure you have no projects open, since you can only have one project open at a time). For some reason the above project has one warning - you can neglect it.

Use case descriptions

ReserveTravel use case description
Actor Traveller
Objective To book a travel package complete with hotel and flight reservations.
Trigger Traveller enters the web-site of the travel reservation system.
Pre-condition -
Post-condition Either the Traveller is provided with a confirmation that her travel package is reserved (hotels and flights), or no reservations are done at all (no dangling reservations are left behind).
Main path
  1. Traveller uses a web-site to pick a travel package.
  2. Traveller sends a travel reservation request to the travel reservation system (includes the destination and timespan for the travel).
  3. Traveller receives a selection of hotels and rooms available at the destination with the given timespan.
  4. Traveller selects an appropriate hotel.
  5. Traveller sends her hotel selection to the travel reservation system.
  6. Traveller receives a selection of flights available to the destination with the given timespan.
  7. Traveller selects the most appropriate flight for her.
  8. Traveller sends the flight selection to the travel reservation system.
  9. Traveller receives a quote for her travel package.
  10. Traveller can now either accept or reject the quote, or make another travel reservation:
    10.1. Traveller accepts the quote:
      10.1.1. Traveller receives an invoice.
      10.1.2. Traveller send the payment information to the travel  
                 reservation system.
    10.2. Traveller rejects the quote:
      10.2.1. Hotel and fight reservations are cancelled by the travel
              reservation system.
      10.2.2. The process is terminated
    10.3. Traveller makes another travel reservation:
      10.3.1. Traveller returns to the step 1 of the basic use case flow
              (Traveller uses web-site...)
Exceptional flows
3.1. There are no hotels available
  3.1.1. Traveller receives a notification that no hotels are available at the travel destination with the
            given timespan.
6.1. There are no flights available
  6.1.1. Traveller receives a notification that no flights are available at the travel destination with the
             given timespan.

Travel management use case diagram

ReserveHotel use case description
Actor TravelProvider
Objective To book a hotel room for a client for a given timespan at the travel destination.
Trigger TravelProvider contacts the hotel reservation system's service.
Pre-condition TravelProvider has the criteria for hotel room booking (destination, timespan, other possible criteria)
Post-condition A hotel room conforming with the booking criteria has been reserved for the client.
Main path
1. TravelProvider sends a query about hotels available during a given timespan at a given location
2. TravelProviders receives a list of hotels and their rooms
3. TravelProvider selects the most appropriate hotel and a room from the list
4. TravelProviders sends a reservation request to the hotel reservation system
5. TravelProvider receives a reservation confirmation, if the reservation was successful

 

Exceptional flows

1.1. No accommodation is available

  1.1.1. TravelProvider receives a notification that no accommodation is available
           with the given criteria

4.1. Reservation failed

  4.1.1. TravelProviders receives a notification that the reservation failed

ReserveFlight use case description
Actor TravelProvider
Objective To book a flight for a client with the given criteria (timespan, travel destination)
Trigger TravelProvider contacts the flight reservation system's service.
Pre-condition TravelProvider has the criteria for flight booking (destination, timespan, other possible criteria)
Post-condition A flight conforming with the booking criteria has been reserved for the client.
Main path
1. TravelProvider sends a query about flights available to the travel destination
    with a given timespan.
2. TravelProvider receives a list of available flights
3. TravelProvider selects the most appropriate flight
4. TravelProvider sends a reservation request to the flight booking system
5. TravelProvider receives a reservation confirmation
Exceptional flows
1.1. No flights available
  1.1.1. TravelProvider receives a notification that no flights are available with the  
           given criteria.
4.1. Reservation failed
  4.1.1. TravelProvider receives a notification that for some reason the
           reservation failed.

 

Modelling assignment II: Service architecture modelling with SoaML

In this assignment you should use the Modelio tool to create a SoaML-based service architecture model that represents your BPMN process. The resulting model should contain a SoaML Services Architecture diagram with participants representing all the participants in your BPMN process. Correspondingly, each participant must be associated with a SoaML Service Contract. For this, you need to defined the service interfaces and service endpoint interfaces, as presented in the tutorial. More over, each service contract should include a sequence diagram that defines the interaction taken by the participants (typed with service endpoint interfaces) under the specific contract.

You should include the SoaML model in the same project as the BPMN project.

Remember that you must activate the SoaML module for each project separately, and use the SoaML specific menu for creation of SoaML-packages and elements and diagrams under the package!

Material for the modelling assignments

The exemplary Modelio project containing the BPMN and SoaML models: TravellerChoreography.zip. Use the import functionality of the Modelio tool for installing the project to your workspace (you should not extract the files, but use the import functionality instead).

The Eclipse projects created during tutorial III: sose_projects.zip. Use the import functionality of the Eclipse tool for installing the projects to your workspace (you should not extract the files, but use the import functionality instead).

Tools

Two different tool platforms are utilized during the course for service-oriented modelling and development. They are free open-source tools named Modelio and Eclipse:

Tutorial 1

In this tutorial we are going to model a simple service choreography with BPMN. The resulting choreography describes interactions between a traveller and a travel reservation system. The choreography design is based on a use case description given below.

Traveller use case diagram

Use case description:
 

Use case description
Actor Traveller
Objective To reserve a complete travel package
Trigger Traveller uses the web-site to select a travel package candidate and requests a travel reservation.
Precondition -
Postcondition Either the travel package is reserved and paid, or reservation is rejected.
Main path

1. The traveller uses the web-site and send a travel reservation request to the travel reservation system.

2. The traveller receives a quote for the travel reservation.

3. The traveller can now either reject the quote, accept the quote or make another travel reservation.

4. If traveller accepts the quote, she receives an invoice and pays it. 

Literature

Relevant literature references will be provided here. References are given in the lecture slides for now.