Home > Articles > Programming > Windows Programming

This chapter is from the book

11.3 Architecture

11.3.1 Overview

As discussed in the previous section, a TAU.NET node is implemented as an extension for the Cell Systems under .NET Framework. It supports the communication between the Cell Systems of the participant agencies.

A TAU.NET member system is composed of a TAU.NET Node and a Cell System. The TAU.NET Node consists of two sets of components, TAU.NET Node Interface and TAU.NET Node Adaptor.

As shown in Figure 11-3, the Cell System contains three major modules, corresponding to the business functions that were discussed in Section 11.1.

Figure 11-3Figure 11-3 Architecture of TAU.NET Node.

These are

  • Inquiry module
  • Reservation module
  • Bill/Payment module

The modules in the Cell System are linked to the corresponding components in the TAU.NET Node so that their functions can be extended to the distributed environment of TAU.NET. The TAU.NET Node Adaptor components include the Process component and Remote Request component; they talk directly to the Cell System modules. On the other hand, the TAU Node Interface components include the Server objects and Client Proxy object for the Web Services; they talk to the remote TAU.NET Nodes via the Internet.

When an agency initiates a distributed inquiry transaction, the Inquiry module of its Cell System puts a request to the Inquiry Remote Request component in its TAU.NET Node Adaptor. This component translates the user request into the appropriate request of remote Web Services. Then the Proxy object in the TAU Node Interface is instantiated so that the remote Web Services are invoked.

In order to invoke a remote Web Service, a SOAP request message is sent to the server site, where it is received by the Inquiry Server component. Calling the services or methods of the Inquiry Process component in the TAU.NET Node Adapter on the server site, the Inquiry Server component generates the query result and sends it back to the client's TAU.NET Node. In the TAU.NET Node Adapter on the server site, the Inquiry Process component interacts with the Inquiry module of the Cell System in order to fulfill the requested query.

On the client site, the Inquiry Proxy object receives the query result and passes it to the Inquiry module of the Cell System via the Inquiry Remote Request component.

Distributed Reservation and Bill/Payment transactions can be processed in a similar way. However, databases in the Cell Systems of both client site and server site need to be updated.

Components in TAU.NET Node Adaptor are implemented using ADO.NET, which supports consistent and scalable access to various data sources. Therefore, they need to be customized for different kinds of data sources so that all the discrepancies of the data sources are concealed from the TAU.NET Node Interface. That is, the requests and results are all represented as ADO.NET DataSet objects through which the TAU.NET Node Interface objects interact with the local data.

Furthermore, ADO.NET provides abundant functionality whereby the DataSet objects can be processed in a disconnected fashion. That is, DataSet objects are filled from the database; they are then manipulated in the TAU.NET Node Adaptor, and the database is finally updated if necessary. The Fill and Update operations are carried out in batch mode, but data manipulation can be performed without a database connection. That minimizes the required resource for the interaction between the TAU.NET Node Adaptor and Cell System.

In addition, business rules are also implemented in the components of TAU.NET Node Adapter. The data in DataSet objects is manipulated based on these rules.

The communication between TAU.NET Nodes is based on SOAP, and messages in XML format deliver the requests and results over the HTTP channels. Data of any type can be transferred. More specifically, the query results can be directly delivered as a DataSet object. Consequently, the components in TAU.NET Node Interface are very simple to implement; it simply provides a transparent channel for the TAU.NET Node Adaptors to their exchange DataSets.

11.3.2 Schema for Data Exchange

As we have decided, the DataSet class is used for data exchange. The DataSet can be represented in XSD Schema, which is an XML standard.

11.3.2.1 Schema for Inquiries About TAU Products and Services

Generally speaking, there are several fields in the schema that are crucial to a travel product or service:

  • Unique Product/Service ID
  • Category
  • Destination or Location
  • Rate and Unit
  • Effective and Expiration date

In addition, there may be multiple line items as details and references to original sources.

The schema can be represented as DataSet, XML, and its outline in VS.NET.

See Figure 11-4 for DataSet ERD, and Figure 11-5 for XML outline and XML Schema file TauServiceDataSet.xsd.

Figure 11-4Figure 11-4 TauServiceDataSet entity relational diagram in VS.NET.

Figure 11-5Figure 11-5 Schema outline for TauServiceDataSet in VS.NET.

The schema file is in XML format as follows.

<?xml version="1.0" encoding="utf-8" ?>
<xsd:schema id="TauServiceDataSet" 
  targetNamespace=
   "http://tempuri.org/TauServiceDataSet.xsd"
  elementFormDefault="qualified" 
  xmlns="http://tempuri.org/TauServiceDataSet.xsd" 
  xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
  xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
 <xsd:element name="TauServiceDataSet" 
   msdata:IsDataSet="true">
  <xsd:complexType>
   <xsd:choice maxOccurs="unbounded">
    <xsd:element name="TAU_SERVICE">
     <xsd:complexType>
      <xsd:sequence>
       <xsd:element name="SERVICEID"
              type="xsd:string" />
       <xsd:element name="BOOKINFOID"
              type="xsd:string"
              minOccurs="0" />
       <xsd:element name="CATEGORYCODE"
              type="xsd:string"
              minOccurs="0" />
       <xsd:element name="RATE"
              type="xsd:decimal"
              minOccurs="0" />
       <xsd:element name="UNIT"
              type="xsd:string"
              minOccurs="0" />
       <xsd:element name="EFFECTIVEDATE"
              type="xsd:dateTime"
              minOccurs="0" />
       <xsd:element name="THROUGHDATE"
              type="xsd:dateTime"
              minOccurs="0" />
       <xsd:element name="LOCATIONCODE"
              type="xsd:string"
              minOccurs="0" />
       <xsd:element name="TAU_SERVICE_DETAIL">
        <xsd:complexType>
         <xsd:sequence>
          <xsd:element name="SERVICEID"
              type="xsd:string" />
          <xsd:element name="LineItemOrder"
              type="xsd:int" />
          <xsd:element name="ItemDesc"
              type="xsd:string"
              minOccurs="0" />
          <xsd:element name="ItemUrl"
              type="xsd:string"
              minOccurs="0" />
         </xsd:sequence>
        </xsd:complexType>
       </xsd:element>
      </xsd:sequence>
     </xsd:complexType>
    </xsd:element>
   </xsd:choice>
  </xsd:complexType>
  <xsd:unique name="TauServiceDataSetKey1"
        msdata:PrimaryKey="true">
   <xsd:selector xpath=".//TAU_SERVICE" />
   <xsd:field xpath="SERVICEID" />
  </xsd:unique>
 </xsd:element>
</xsd:schema>

11.3.2.2 Data Schema for Inquiries About Member Services

There is no central server in TAU.NET, nor is there any central controller in the entire Internet. As far as name resolving is concerned, TAU.NET may use Internet standards. That is, member systems store each other's reference information, and messages are passed between them to synchronize this reference information. To achieve this, the members should share the basic information about their service scope, such as category and destination or location.

The schema should have basic information fields, such as member ID, member name, and service URL. One member may have one or more categories of service to provide and one or more locations or destinations to serve. Figures 11-6 and 11-7 show the schema in two views.

Figure 11-6Figure 11-6 Diagram of a member service information schema.

Figure 11-7Figure 11-7 Document outline of a member service information

In XML format, the schema file of TauMemberServiceDataSet has text as follows.

<?xml version="1.0" encoding="utf-8" ?>
<xsd:schema id="TauMemberServiceDataSet" 
  targetNamespace=  "http://tempuri.org/TauMemberServiceDataSet.xsd" 
  elementFormDefault="qualified" 
  xmlns=
 "http://tempuri.org/TauMemberServiceDataSet.xsd"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
  xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
 <xsd:element name="TauMemberServiceDataSet" 
    msdata:IsDataSet="true">
  <xsd:complexType>
   <xsd:choice maxOccurs="unbounded">
    <xsd:element name="TauMember">
     <xsd:complexType>
      <xsd:sequence>
       <xsd:element name="MemberID" 
         type="xsd:string" 
         minOccurs="0" />
       <xsd:element name="MemberName"
         type="xsd:string"
         minOccurs="0" />
       <xsd:element name="WebServiceUrl"
         type="xsd:string"
         minOccurs="0" />
       <xsd:element 
         name="TauMemberServiceCategory">
        <xsd:complexType>
         <xsd:sequence>
          <xsd:element name="CategoryCode" 
            type="xsd:string" 
            minOccurs="0" />
         </xsd:sequence>
        </xsd:complexType>
       </xsd:element>
       <xsd:element 
         name="TauMemberServiceLocation">
        <xsd:complexType>
         <xsd:sequence>
          <xsd:element name="LocationCode" 
            type="xsd:string" 
            minOccurs="0" />
         </xsd:sequence>
        </xsd:complexType>
       </xsd:element>
      </xsd:sequence>
     </xsd:complexType>
    </xsd:element>
    </xsd:choice>
  </xsd:complexType>
 </xsd:element>
</xsd:schema>

11.3.2.3 Other Schema for Data Exchange

The reservation transaction information schema is shown in Figure 11-8. The service may have booking information in diverse forms based on the category or vendor. BOOKDATA stores the booking data based on the schema referred by BOOKINFOID.

Figure 11-8Figure 11-8 Schema for booking a service.

The schemas for data exchange to serve Billing and Payment transactions are beyond the scope of this case study.

11.3.2.4 Classes for the Schemas

When VS.NET is used to construct the schema, the corresponding classes are generated by the tool, creating programs TauServiceDataSet.cs, TauMemberService.cs, and TauBookDataSet.cs. Alternatively, the classes of a schema may be created using command xsd.exe. The following commands generate the classes in TAU namespace:

xsd TauServiceDataSet.xsd /dataset /n:TAU
xsd TauMemberService.xsd /dataset /n:TAU
xsd TauBookDataSet.xsd /dataset /n:TAU

11.3.3 TAU.NET Node Interface

11.3.3.1 Server Objects for Web Services

Having defined the schema for data exchange, we can work on setting the protocol of the Web methods for data exchange. Each member should implement all those Web methods in order to communicate with each other.

First, let's consider the Web Service for inquiries about products and services. Two criteria, category and destination or location, may be commonly used to inquire about travel services; consequently, two Web methods should be provided, as follows:

[WebMethod]  
public TauServiceDataSet
 GetServiceDataSetByCategory(
           String categoryCode);
[WebMethod]  
public TauServiceDataSet
 GetServiceDataSetByLocation(
              String locationCode);

The categoryCode string may be a code for information about lodging, airline tickets, or car rentals. The locationCode string is about the destination or location the travel agency serves.

Second, let's consider the Web Service for inquiries about member services. This method is used to get an overview of available services provided by this member. Using this information, other members can build up or refresh their own repositories for member services in TAU.NET.

[WebMethod]  
public TAU.TauMemberServiceDataSet
 GetMemberServiceInfo ();

Finally, let's consider the Web Service for making reservations. Two methods are required here. One is used to get the reservation information for a specific travel service:

[WebMethod]  
public TauBookDataSet
 GetReservationInfo(string serviceID);

The other one is for making a reservation on a particular service specified by a given DataSet:

[WebMethod]  
public string 
 MakeReservation (TauBookDataSet bookData);

All these methods can be gathered in one Web Service file, TauService.asmx. Figures 11-9 and 11-10 show the Web Service Description screens on Internet Explorer.

Figure 11-9Figure 11-9 -Using a Web browser to display the TauService Web

Figure 11-10Figure 11-10 WSDL of the TAU.NET Web Service TauService.

11.3.3.2 Proxy Objects for Web Services

The .NET utility program, wsdl.exe, can generate the Client Proxy for the TAU.NET Web Service.

The following command creates the code TauService.cs, which defines a Client Proxy class, TauService in the TAU.Proxy namespace. The Client Proxy class serves as an access point at the client site to the remote Web Services.

wsdl http://localhost/TAU/TauService.asmx /n:TAU.Proxy

Because all the members implement a Web Service with a standard interface, the same service on various member systems may be invoked by using a general-purpose Client Proxy object. In this case, the URL of the target service needs to be specified as a property of the Client Proxy object. For example, if we want to request the Web method GetServiceDataSetByLocation in http://www.TauMember1.com, we first need to create a new object:

TAU.Proxy.TauService objService;
 objService = new TAU.Proxy.TauService();

Second, we set its Url property value:

 objService.Url =
 "http://www.TauMember1.com/TAU/TauService.asmx";

Third, we instantiate the DataSet to receive the return:

 TAU.Proxy.TauServiceDataSet objDataSetTemp;
 objDataSetTemp = new TAU.Proxy.TauServiceDataSet();

Finally, we specify the Web method to fill the DataSet:

objDataSetTemp =
objService.GetServiceDataSetByLocation(
                    "BOSTON");

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