Insert excerpt | ||||||
---|---|---|---|---|---|---|
|
Excerpt |
---|
This page handles FAQ answers that are a work in progress. |
Table of Contents |
---|
Current FAQ
Updates
How do I define the list of topics for use in AMQP 1.0?
Info |
---|
AMQP 1.0 technically has no subscription function (unlike 0.9). Subscription is handled by a broker. |
The need for harmonisation/guidance on topic trees is not unique to AMQP 1.0.
The role of topics is discussed in the TIYP supporting material. See, e.g., the "Subject-based Filtering" section in https://reference.swim.aero/technical-infrastructure/guidance-for-pub-sub-push-implementation.html that discusses topic enumerations and topic trees. The getTopics operation allows a service consumer to request the list of topics that are available to use in the subscription.
The topics themselves are URIs and should be based on the data that is exchanged. The need for semantic interoperability applies to the topic names. Therefore, it a best practice to use terms coming from a common semantic reference such as the a stardardised information exchange model, the AIRM and/or the list of service categories.
An example, using terms from the AIRM and the format used in the TIYP supporting material:
- /meteorology/precipitation
- /meteorology/precipitation/LFPG
It is also best to avoid business and service logic in the topic tree such as the way in which the data is served. There is also no need to prefix the items in the topic tree with e.g. "topic/"
Info |
---|
Domains may agree their own topic trees. For example, work on topic trees is occurring within the MET community. See https://wmo-teams.atlassian.net/wiki/spaces/WIS2/pages/167313674/WIS+2.0+Demonstration+Projects+Workshop. |
How do I decide on the granularity of a service?
It is difficult to provide an exact answer to this question because there are many factors that affect the granularity of the service.
Service granularity is related to the design principle of service composability which defines services in such a way that they can be used in a service composition. A service composition is an aggregation of services where many smaller (i.e. fine grained) services (the composition members) are combined together in a larger (coarse grained) service. Typically a composition member provides functionality to the other services in the service composition. An example to think of as service composition is a service that mashes up data from various domains to create integrated picture (e.g. combining aeronautical information with flight data).
The functional scope also affects the granularity of the service. It is based on the operational needs of the service consumer. The service should be meaningful in the sense that it solves a whole problem for users and it is important to understand what that problem is e.g. is it to see all of the meteorological weather products or simply METARs.
Info |
---|
See the Service Orientation Process knowledge article - in particular, the Identify and Design steps are useful in understanding users and their needs. |
The information exposed also affects the granularity. For example, the service may have operations to allow a consumer to get all messages, get an individual message, get a property of a message or a combination of these. The decision here is also driven by operational needs and the information exchange requirements. Likewise, the format of the information can be a driver - is it preferable to have one service that provides information in many formats (e.g. IWXXM and GRIB2) or to have each format as a separate service. However, in general, a new format and/or technical protocol is introduced in a new interface within the existing service.
Info |
---|
The Interoperability Architecture, in particular, the organisational view is most relevant here. |
The decision also depends on where the service sit in the overall service oriented architecture. For example, a coarse-grained service may be exposed to a set of external consumers closer to an application/business need while microservices are exposed more transversely but also more at the heart of common functionality for all, hence also the practices around microservices.
In Europe, some services that implement information exchanges are regulated, in the sense that they are listed in the EU Regulation - Common Project 1 and in the SESAR Deployment Programme. These may act as a guide in deciding the granularity of a new service. On the other hand, the list may act as input to a wider service orientation activity.
Each of my service consumers has a dedicated endpoint. Is this described as one service with multiple endpoints or as different services?
This situation allows each service consumer to have the information customised to their needs. However, as the operational need and functionality of the service remains consistent, it is a best practice to deal with this as a single service.
The Service Metadata Schema for service descriptions makes the definition of at least an endpoint mandatory. Therefore, it is not possible to simply ignore the endpoint field. However, the schema does allow users to define multiple endpoints and you can also use parameterized URLs (to illustrate: https://www.domain.com/url?variable=value&variable=value). The use of parameterized URLs is very common and can be a sensible solution to the problem described while fitting inside the current schema restrictions. The description of the endpoint can then be used to say that the parameters will be assigned to the consumer when a formal arrangement (such as a service level agreement) is agreed.
How do I describe a service that uses GraphQL?
GraphQL is an example of message-oriented service design (as opposed to operation-oriented or resource-oriented service design). For message-oriented services, the essential part is describing the data schema. GraphQL services do this in its own schema language “GraphQL Schema Language”.
TBD