Composite services are a step beyond the elementary services that were discussed in the previous part. Composite services are services that combine two or more other services to create a service that provides more added value. Composite services invoke elementary services and other composite services, they may access multiple domains, coordinate a global transaction with multiple local transactions. An even simpler definition of composite service: do [substantially] more than straightforward request/reply VETRO.
In this chapter, we discuss the implementation of composite services with Service Bus. A number of facilities at our disposal for creating more advanced flow logic than we have seen in previous chapters is introduced. Conditional steps, iterations, message transformation, value translation and call outs are important elements in a composite service. The ability to execute parts of the message processing in parallel – with the Split/Join components – is discussed as well.
This chapter looks at the submission of a flight schedule by an airline carrier. Earlier, in chapter 4, we developed the SlotService. Through this service, a specific time slot is assigned to an airline for a departure or arrival. This assignment results in a placeholder in the airport’s seasonal flight schedule, that actual scheduled flights can be linked to. The composite FlightScheduleService that is the subject of the current chapter takes a request for actually planning a flight. Such a planned flight has to be an implementation of a slot.
The implementation of the FlightScheduleService involves the use of multiple pipelines – that handle various stages of validation and enrichment. The set of Service Bus activities used includes validation, service call out and Java- call out, error handling, for..each iteration, some complex XQuery processing, if..then..else logic, and the use of DVM (Domain Value Mapping). The Split/Join component is used to speed up the execution by making some of the processing execute in parallel.
- Implementing the bare bones FlightScheduleService
- Validation, Constraint Checking, Domain Value Mapping
- Using Call Outs for validation and enrichment
- Add a Template based Logging Pipeline
- Parallel Processing using Split Join
Sources for this chapter can be found on Github: Chapter 7 Sources.