In the CosTrading, service offers are strongly typed. Any export operation is based on the use of an offer type, similarly lookup operations are performed upon a given type. Typed offers bring two main advantages. First, applications cannot export or search weird offers, but only offers defined at design time. Second, a CosTrading implementation may take advantage of types to improve performance, only searching in offers of a given type instead of in all the offers. This becomes vital when several thousand of offers have been exported. Part of the CosTrading service, the Service Type Repository stores the various service offer types. It also provides type checking when exporting or searching offers. In this repository, a service offer type is characterized using four elements:
Each service property is characterized using:
Figure 2 presents the OMG IDL interface of a printer service. This service is used in this paper to illustrate various aspects of the trading service and our TORBA proposal.
The related service offer type is Printer, which is characterized by the four properties presented in Table 1. The color property specifies if a printer could print in color or only in B&W. The cost_per_page property contains the cost to print a sheet of paper for this printer. The number of pages per minute a printer can produce is contained in the ppm property. Finally, the queue property is the name of the printer queue.
|
As stated earlier, it is important to have typed offers. However, dealing with software quality, the CosTrading service lacks a standard language to describe offer types. The only available means is to use the add_type() operation of the ServiceTypeRepository interface provided by the CosTrading service. Section 3.2 discusses how the TORBA Definition Language (TDL) addresses this problem.