Home > Articles > Web Services > SOA

This chapter is from the book

Service Access

On the surface, accessing a service sounds so simple—just call the interface! In reality, access can get very complicated as you try to control access to services and maintain flexibility concerning where service users and providers are deployed. The following sections explore a number of the design issues you will encounter and the design patterns that you can use to address them.

Direct Service Access

The most obvious way to use a service is to directly access the service provider's interface (Figure 4-10). While this is straightforward, it requires that the service user be aware of both the functionality provided by the service interface (which you would expect) and the location of the interface. If you are using HTTP to access your service, for example, then the service user needs to know either the IP address or hostname of the machine on which the service is running as well as the specific socket corresponding to the service's interface.

Figure 4-10

Figure 4-10 Direct Service Access

This requirement to know about the interface's location makes the design of the service user dependent on the deployment specifics of the service provider. If the service provider is moved from one machine to another, then the service user's configuration must be updated to reflect the change. If the service becomes very successful and has many users, such dependencies make it difficult to move the service provider. Such movement might be required to add capacity by moving the service to a larger machine or recover from a machine outage by moving the service to an alternate machine. While network-level solutions such as virtual IP addresses and virtual hostnames provide some relief, they have their own limitations and accompanying administrative costs as well.

Variations in Direct Service Access

Service Lookup

One means of avoiding this dependency between the service user and the location of the service interface is to employ a lookup service (Figure 4-11). The lookup service knows the actual location of the provider's service interface. In order for the service user to access the service, it first uses the lookup service to get the actual location of the service interface and then uses this information to access the service. The JNDI (Java Naming and Directory Interface)1 is a service interface that is commonly used for this purpose. The advantage of this approach is that when a service provider changes location, only the lookup service needs to be updated. The service users will pick up the change from the lookup service.

Figure 4-11

Figure 4-11 Lookup Service

When a lookup service is used, the lookup typically occurs just the first time a particular user wants to access the service. Once the service interface is located, the user continues to use that interface as long as it is operational.

Of course, the lookup service itself now presents exactly the same problem that it solves for other services: the service user must know the location of the lookup interface to be able to use it. But at least the problem is reduced in scope to just accessing the lookup service, which presumably will not change its interface location very often.

Proxy Access

Another approach that can isolate the service user from the details of the service provider's deployment is to employ a level of indirection—a proxy—for accessing the service (Figure 4-12). To the service user, the proxy presents what appears to be the service's interface without knowing that it is, in reality, a proxy interface. The proxy forwards all incoming requests to the real service interface and forwards replies from the service interface back to the service user through the proxy interface.

Figure 4-12

Figure 4-12 Proxy Access Interfaces

Direct Access Limitations

There are a couple of drawbacks to the direct access approach and its service lookup and proxy variants. One is that any change in the location of the service provider's interface requires changes to the configuration of some other component. In direct access, the component requiring update is the service user. With service lookup, it is the lookup service, and with a proxy it is the proxy. This dependency of other components on the physical location of the service provider's interface complicates changing the service provider's location. It adds administrative overhead and adds to the time it takes to implement such changes.

This administrative overhead affects more than just the normal deployment of services. It comes into play when you want to provide a fault tolerant or highly available service as well. In such cases, when something happens to the existing service provider you need to bring up a replacement copy of the service provider. This replacement copy will be in a different location, generally on a different machine. For local failover, this different machine may be in the same data center, but in the case of a site disaster it will be in a different data center. In such cases it becomes very difficult to maintain the appearance of the "same location" for the service interface with network-based virtual IP addresses and hostnames. Administrative changes to service users, lookup services, or proxy agents are generally required.

These administrative changes significantly complicate the design, implementation, and test of service failover. A failure to make any of the required administrative changes during a failover will cause the service to become unavailable just as surely as a breakdown in bringing up the backup service provider. The more administrative changes that need to be made, the greater the chance an implementation mistake will cause the failover itself to fail. Since testing failover is an arduous and risky activity, there are advantages to keeping the administrative changes as simple as possible—or eliminating them altogether.

This situation gets even more complicated when asynchronous request-reply, subscription, and unsolicited notification patterns come into play. These patterns often require delivery interfaces on the service user—interfaces that the service provider, lookup service, or proxy need to know about. This makes the administrative problem even more complex, since location information now needs to be updated when service clients move.

Message-Based Service Access

Messaging services provide an alternate means for service users and service providers to interact. We are all familiar with messaging services such as e-mail and instant messaging. At the systems level, messaging services such as the standards-based JMS (Java Messaging Service), IBM Websphere MQ, and TIBCO Rendezvous are in common use.

When using a messaging service, all communications between the parties is exchanged using an intermediary—the Messaging Service Provider (Figure 4-13). In contrast with the proxy approach, both sender and recipient are very much aware that they are employing a third party to send and receive messages.

Figure 4-13

Figure 4-13 Messaging Service

Electronic messaging services differ from postal (physical mail) services in a subtle but significant way. Postal service mailboxes are physical entities that serve as the interfaces between the messaging service and its users. An address in physical mail systems designates the physical mailbox to which the letter or package is to be delivered. In other words, the address is location-specific.

In contrast, electronic messaging separates the concepts of destination and interface. The address now denotes a logical destination whose physical location is unknown to either the sender or recipient. The messaging service interface is no longer tied to a specific destination. Instead, the messaging service provides a generic interface for sending and receiving messages regardless of the destination. This separation greatly simplifies the use of messaging services.

Abstract destinations provide location independence. The fact that the logical destination is no longer tied to the physical location of the recipient means that the recipient's location can change without impacting the sender—or the mail service. Thus, you can send an e-mail message to jane.doe@messageservice.com without having any idea where Jane Doe actually is. Furthermore, Jane Doe can retrieve her message from any machine that can access the messaging service, whether at home, at work, or at an Internet café in Istanbul!

The messaging service provides all the interfaces needed for communications (Figure 4-14). This simple shifting of interfaces to the messaging service greatly simplifies making deployment changes. None of the participants—sender, recipient, or messaging service—has any dependency at all on the location of the sender and recipient. In fact, the only location dependency that remains is that the sender and recipient must know the location of the messaging service interfaces. Consequently, the sender and recipient can move freely without altering any configuration information—anywhere. As long as both can access the messaging service interfaces, they can communicate with each other.

Figure 4-14

Figure 4-14 Messaging Service Interfaces

There is another significant benefit that arises from the fact that the messaging service provides both the sending and receiving interfaces. Because the message recipient does not have to provide an interface to receive a message (it uses the messaging service's interface instead), it is easy for any component to receive a message. All that is required is an agreed-upon destination name. Thus it is easy for any component to be both a sender and a recipient. This communications flexibility enables the convenient implementation of the asynchronous request-reply, subscription, and unsolicited notification service interaction patterns. Therefore, the use of a messaging service provides flexibility in choosing whatever service interaction pattern seems most appropriate for the service being designed.

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