Home > Articles > Web Services > SOA

Analysis and Service Modeling with REST

📄 Contents

  1. 9.1. Uniform Contract Modeling and REST Service Inventory Modeling
  2. 9.2. REST Service Modeling
A primary way in which SOA project delivery methodologies differ is in how they position and prioritize analysis-related phase, which the authors discuss in this chapter.
This chapter is from the book
chapter_09.jpg

9.1 Uniform Contract Modeling and REST Service Inventory Modeling

9.2 REST Service Modeling

A fundamental characteristic of SOA projects is that they emphasize the need for working toward a strategic target state that the delivery of each service is intended to support. In order to realize this, some level of increased up-front analysis effort is generally necessary. Therefore, a primary way in which SOA project delivery methodologies differ is in how they position and prioritize analysis-related phases. This consideration is equally relevant to any service implementation medium. In fact, the actual medium and associated technology that will be used to physically design and develop services may not actually be known during initial analysis stages. It may be better to determine whether REST or another medium is the most suitable choice after having had the opportunity to model a number of planned service candidates and study their anticipated composition and interaction requirements.

There are two primary analysis phases in a typical SOA project:

  • the analysis of individual services in relation to business process automation
  • the collective analysis of a service inventory

The service-oriented analysis phase is dedicated to producing conceptual service definitions (service candidates) as part of the functional decomposition of business process logic. The service inventory analysis establishes a cycle whereby the service-oriented analysis process is carried out iteratively to whatever extent the project methodology will allow.

9.1. Uniform Contract Modeling and REST Service Inventory Modeling

As explained in Chapter 4, a service inventory is a collection of services that are independently owned, governed, and standardized. When we apply the Uniform Contract {400} constraint during an SOA project, we typically do so for a specific service inventory. This is because a uniform contract will end up standardizing a number of aspects pertaining to service capability representation, data representation, message exchange, and message processing. The definition of a uniform contract is ideally performed in advance of individual REST service contract design because each REST service contract will be required to form dependencies on and operate within the scope of the features offered by its associated uniform contract.

Organizations that apply Enterprise Inventory [461] to build a single inventory of REST services will typically rely on a single over-arching uniform contract to establish baseline communication standards. Those that proceed with the Domain Inventory [458] approach instead will most likely need to define a separate uniform contract for each domain service inventory. Because domain service inventories tend to vary in terms of standardization and governance, separate uniform contracts can be created to accommodate these individual requirements. This is why uniform contract modeling can be part of the service inventory analysis project stage.

In the Service Inventory Analysis section from Chapter 8, we explained that the purpose of this stage is to enable a project team to first define the scope of a service inventory via the authoring of a service inventory blueprint. This specification is populated by the repeated execution of the service inventory analysis cycle. Once all (or as many iterations as are allowed) are completed, we have a set of service candidates that have been (hopefully) well-defined, individually and in relation to each other. The next step after that is to proceed with the design of the respective service contracts.

When we know in advance that we will be delivering these services using REST, it is beneficial to incorporate the modeling of the inventory’s uniform contract during the modeling of the service inventory itself. This is because as we perform each service-oriented analysis process and as we model and refine each service candidate and each service capability candidate, we gather more and more intelligence about the business automation requirements that are distinct to that service inventory. Some of this information will be relevant to how we define the methods and media types of the uniform contract.

For example:

  • understanding the types of information and documents that will need to be exchanged and processed can help define necessary media types
  • understanding the service models (entity, utility, task, etc.) in use by service candidates can help determine which available methods should be supported
  • understanding policies and rules that are required to regulate certain types of interaction can help determine when certain methods should not be used, or help define special features that may be required by some methods
  • understanding how service capability candidates may need to be composed can help determine suitable methods
  • understanding certain quality-of-service requirements (especially in relation to reliability, security, transactions, etc.) can help determine the need to support special features of methods, and may further help identify the need to issue a set of pre-defined messages that can be standardized as complex methods (as explained in Chapter 10)

A practical means of incorporating the task of uniform contract modeling as part of the service inventory analysis is to group it with the Define Technology Architecture step (Figure 9.1). It is during this step that general service inventory architecture characteristics and requirements are identified from the same types of intelligence we collect for the definition of uniform contract features. In this context, the uniform contract is essentially being defined as an extension to the standardized technology architecture for the service inventory.

Figure 9.1

Figure 9.1. The service inventory analysis cycle diagram from Chapter 8 augmented to include uniform contract modeling as an iterative task.

If combining the Model Uniform Contract task with the Define Technology Architecture step turns out to be an unsuitable grouping, then the Model Uniform Contract task can be positioned as its own step within the cycle.

When we begin working on the uniform contract definition, one of the key decisions will be to determine the sources to be used to populate its methods and media types. As a general starting point, we can look to the HTTP specification for an initial set of methods, and the IANA Media Type Registry for the initial media types. Further media types and possibly further methods may come from a variety of internal and external sources.

Before continuing, have a quick look at Figure 9.4 in the upcoming REST Service Modeling Process section. Note how the symbols for Steps 6 and 11 contain an asterisk in the top right corner. As explained in this section, this indicates that during this step we are modeling REST service candidates that either:

  • incorporate methods and/or media types already modeled for the uniform contract, or...
  • introduce the need to add or augment methods and/or media types for the uniform contract.

This type of two-way relationship between the Perform Service-Oriented Analysis step (which encompasses the REST service modeling process) and the Model Uniform Contract task is a natural dynamic of the service inventory analysis cycle.

REST Constraints and Uniform Contract Modeling

Although REST constraints are primarily applied during the physical design of service architectures, it can be helpful to take them into consideration as the uniform contract takes shape during the service-oriented analysis stage.

For example:

  • Stateless {395} – From the data exchange requirements we are able to model between service candidates, can we determine whether services will be able to remain stateless between requests?
  • Cache {398} – Are we able to identify any request messages with responses that can be cached and returned for subsequent requests instead of needing to be processed redundantly?
  • Uniform Contract {400} – Can all methods and media types we are associating with the uniform contract during this stage be genuinely reused by service candidates?
  • Layered System {404} – Do we know enough about the underlying technology architecture to determine whether services and their consumers can tell the difference between communicating directly or communicating via intermediary middleware?

The extent to which concrete aspects of REST constraint application can be factored into how we model the uniform contract will depend directly on:

  • the extent to which the service inventory technology architecture is defined during iterations of the service inventory analysis cycle, and...
  • the extent to which we learn about a given business process’s underlying automation requirements during Step 2 of the service-oriented analysis process (as explained in Chapter 8).

Much of this will be dependent on the amount of information we have and are able to gather about the underlying infrastructure and overall ecosystem in which the inventory of services will reside. For example, if we know in advance that we are delivering a set of services within an environment riddled with existing legacy systems and middleware, we will be able to gain access to many information sources that will help determine boundaries, limitations, and options when it comes to service and uniform contract definition. On the other hand, if we are planning to build a brand new environment for our service inventory, there will usually be many more options for creating and tuning the technology architecture in support of how the services (and the uniform contract) can best fulfill business automation requirements.

REST Service Centralization and Normalization

Logic Centralization [475] attempts to avoid many of the pitfalls associated with redundant logic implemented across services by centralizing the logic in the form of a single normalized service. Redundant logic can lead to increased maintenance overhead both on an on-going basis and when business requirements change. It can further lead to governance and configuration management issues, especially in cases where the redundant logic is owned by different groups within an organization.

Because, within REST service implementations, the service contract is not “packaged” with the service architecture and logic, it is relatively easy for others in an IT department to add new REST services to a service inventory, particularly in the absence of a contract-first design approach. This tends to result in service capabilities that perform functions redundant with those provided by existing REST services. For example, a new REST service may inadvertently add an entity-centric service capability that belongs to the functional context of an existing REST entity service.

This issue can be addressed by applying Service Normalization [506], a pattern related to Logic Centralization [475], but one that views the design of services from a service inventory perspective. A normalized service inventory is designed with a clear blueprint and careful attention to service boundaries. These boundaries are defined on a functional basis. New logic that needs to be incorporated into a service inventory is first analyzed for its coherency in relation to the functional boundaries of existing services (Figure 9.2).

Figure 9.2

Figure 9.2. A service inventory comprised of REST services, each with a distinct functional boundary. When no one boundary overlaps the other, Service Normalization [506] has been applied to its full extent.

Normalizing a REST-centric service inventory requires up-front analysis, established governance practices, and a “whole-of-inventory” perspective to be applied. Normalization makes it easier for service consumers to find and correctly use the functionality they need in a consistent, logically partitioned space of REST service capabilities grouped into distinct functional contexts.

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020