Application Structure: Concept View -3 Message Processing (Enterprise Structure)

xiaoxiao2021-03-06  72

content

This page

Message Routing Message Switching Form Message Process Requirements Message Processing Infrastructure Message Treatment Summary

As described in the article, the service is interacting by switching messages. In our proposed service model, the service is defined completely by its own acceptance and generated message, including the sorting requirements of those messages. The successful route between the message is a complex process, and the message processing base architecture shared between the services disclosed in the organization can best handle this process.

This topic will explore these concepts in detail, providing readers to the concept view of the role played in the service-based architecture for readers.

news

The message is an information unit that is transmitted from one service to another. The message must be a highly systemized structure so that it can be analyzed and understood. This architecture uses abstraction to communicate between architectural documents of the message element in service and solution developers.

The key information included in the message architecture is: element name, data type (eg, "Integer"), value constraint (for example, an integer used to represent the approximate probability may require a requirement between 0 and 100) and whether the element is necessary. Using a powerful architecture definition language, you can build a complex architecture with a simple type.

As mentioned in the service, the service needs to be independent of the platform system to achieve interoperability. Such a system must clearly define a bitmier such as "Integer" and "float" (floating point), avoiding construction not easy to implement on the target platform, usually facilitating the wire format data element Convert to a system-specific data element.

Choosing the appropriate type system is only one of the methods used by software designers to design interoperability service messages. The message is the center of the service design process; it is necessary to make the parties. If the message is designed, it will eventually make changes, which will lead to expensive redesign costs because all service users migrate to the new interface.

The message design includes the definition of functional elements and operational elements, the functional requirements and operational requirements for support services. Because the operation element may be affected by the functional element of the functional element, the designer should determine the operational elements of the "body" of the functional element by the transport protocol.

Another principle of interoperable message design is to take advantage of the existing element definitions in the "head" and "body" architecture. To maximize the use of service stored phone numbers, you should use a widely accepted element definition to model. This approach reduces the design work, and these people generally understand the elements that can be placed to use other services to use them.

In terms of concept, the message must be self-sufficient, including or reference all the information necessary to understand the message. In fact, a part of this message state may be self-evident: For example, when using Hypertext Transfer Protocol (HTTP), the response from the service is interpreted as a response to the request sent on the same connection.

Back to top

Message route

Our most familiar messaging form is a request / response: the sender opens a connection to the receiving port, send a message, and then receive a confirmation (the response body generated by the processing of the request message).

Although it looks only to only a few steps, the truly process is often more complicated. The transmission of the message is usually to pass through the intermediate layer (eg, a cache, filter firewall, and credential management system). These intermediate layers can be said to listen to messages to perform partial processing or complete processing. The intermediate layer may produce an abnormality (eg, an authorized intermediate layer that rejects access requests, resulting in returning a sender an error.

Listening is the concept foundation of the message processing infrastructure structure. By listening, the message can be routed along a complex path to the shared dedicated service can participate in the message processing.

A more common application is to perform request conversion between services in different messages formats, as shown in Figure 1. This mode can be used to provide a standard-compliant interface in front of the system using a proprietary protocol, and can be used to convert a message that complies with the over-time version of the service agreement. Figure 1. Serving other service converters

The request can also be redirected to other service ports based on any element or attribute of the message. This example of this content-based route includes state division (e.g., pressing newslets by date) and network topology optimization (route request to the local service port, rather than the service port of many hop).

The design value of asynchronous messaging has been simply discussed in the service article. Unless we must make the request to receive a response very quickly (for example, an impatient user access to the web request), the service should use a pair of port for asynchronous interaction. A request for a request should provide a response to the port identifier that can be sent in the message header. In fact, the requester is placed at the end of the message processing chain, using the response created by the intermediate layer and service of the basic business logic that implements the request.

Back to top

Message exchange form

There are several different messaging forms in the previous discussion. Different exchange forms apply to different services. Here are some examples of exchange forms and their use:

• Fire and forget. When using this form, only one message is sent and is not desired to get (or unwilling to accept) response. This form is usually used to send state updates, such as temperature readings. • Monolog. When using this form, the message stream is pushed to the service port and does not answer. Solden usually used for audio / visual content, often use multicast or broadcast to introduce content to more than one recipient. • Request / Response (Request / Response). This is a form that we are familiar with. At this time, the client expects to immediately get the response to the information request. This is the main message exchange form for HTTP used on the web. • "Dialog" (conversation). This is a point-to-point connection established with a plurality of associated exchanges that are bound by an approved protocol. Simple Mail Transfer Protocol (SMTP) uses this form. • Conversations. Although all previous forms can be considered as "session" form, the term is used herein to describe a flexible exchange that may involve many services. Using session forms, complex exchanges necessary to support actual business functions can be made.

The purpose of providing this information exchange form is not to establish a vocabulary, but to illustrate the service designer needs to choose the exchange form suitable for application requirements.

These forms can be used in the service providing. Starting "monochuan" request / response exchange is an example (for example, requesting news "Auto Totor" applications). The auto hutter sends a request to contain port identifiers that will accept the message stream. The news provider will verify the request. If the request has the current subscriber's credentials, a positive response will be made. The news providing service adds the automated port port to the multi-channel broadcast list, which will then start receiving the message.

Long-term running asynchronous sessions bring several complicated factors to messages. First, some of the services involved, especially the initiation of the process, requires maintenance of some states on the session. For example, the supply management service may represent technical staff to trigger the procurement request. In order to be able to notify the skilled person (even if it is in progress), it is necessary to include a tag in all messages exchanged to uniquely identify the session. Second, in the session, you must establish a security context based on each message; no session context can be used for credential cache.

Back to top

Message processing requirements

Different from requests for web pages, services that implement high-value business processes are usually more concerned about the reliability of the transfer mechanism rather than the speed of the response. In order to make a service-based application to become a trusted platform for business applications, some usage requirements must be met, which will briefly introduce some of these requirements. Reliable message processing

Synchronous messaging cannot be completely reliable. Due to network issues or system failures, the target port may not be available. Network delays may result in unpredictable lagging time. Due to routing features, the message stream may arrive in the order of errors.

The general solution for transmission is that if the initial transfer attempt fails, the request is queued and rely on retransmission. But this process brings another possible problem: multiple receipts of the same message may have a very bad effect (for example, repeated order). One principle of messaging is to ensure the power of messages, that is, make sure that multiple receipts of a message have the same effect as a receipt.

The target of reliable messaging infrastructure is to ensure that the message is only transmitted in the correct order, and the abnormality is reduced when this goal cannot be implemented in the time interval of the policy driver.

Not all applications require reliable messaging; for example, if a message is lost, including the "late" message (that is, after the subsequent message is reached), the stream audio can also be played normally. But even in this case, the application needs to have a sense of messaging, so that "play" to reach the message content in error order.

Most support for reliable message processing already included in the infrastructure service, there is no need to rewrite each application. However, when the side effects are particularly serious, it may be necessary to make special improvements to the service to ensure the power of the message.

routing

Complex messages routing is essential for implementing practical solutions. Messages may require routing by providing reliable messaging, check secure credentials, and services to secure audition trails in many other solutions.

In order for different services to understand the routing needs of each message, there must be a certain standard. When A successfully completed the message processing, the message header needs to tell the service A: The message should be sent to the service B. All services in the message processing chain need to know how to route an exception when there is an unexpected.

If many incompatible routing protocol specifications are used, the result will generate a bunch of non-interoperable services. Service architects should choose to meet the minimum application requirements and achieve the most widely used specifications.

Security management

Security is a major problem that needs to be considered when transplanting business processes to networks accessible by other parties other than organizations. The news needs to be protected to prevent data stealing and tampering; personnel and systems need reliable authentication; services must be strengthened for the invasion of service attacks and how to reject attacks.

Network security is a number of problems that require a large number of specific solutions. Some safety mechanisms can be optimally implemented as shared services or by routing and filtering infrastructure, while other security issues must be resolved within the service itself.

Software designers consider factors include:

• Selection of compilers and runtime environments. If the memory access beyond the boundary can be used to affect the execution of foreign code, the service is very susceptible to harm. The current development tools and execution environments help prevent this attack. • Logging and log analysis. The service should be modeled to understand normal access modes and exception access modes. The system developed should be able to warn suspicious activities to the operator. The service access model will continue to develop over time, because actual operation experience will help deepen the understanding of the organization. • data encryption. The mechanism should be used to protect sensitive data to prevent unauthorized other parties from accessing it (including intermediate services that are authorized to act on the message). This can be achieved by encrypting the specific part of the message with only the expected participant knows how to decrypt. • Message integrity. Safety checksums can be used to explain that messages have not been modified during transmission. It can be applied to some messages or applications. Since the intermediate layer may need to add a header to the message, the checksum of the entire message may need to be recalculated at each hop; this process has supported a standard integrity check method. • Authentication and authorization. Identifying remote users and services bring considerable challenges. Users are simply a maximum headache problem: When role changes in partner organizations, access to your service will affect your service; and users accessing services from different providers do not want to manage the only one of each user. Credentials. The solution is to secure authentication and permissions management to partners, and the service agreement clearly specifies that the partner is responsible for improper access from its organization. In the near future, this will be a considerable innovation and development field. Record and review

For organization intelligence and consideration of the safety precautions mentioned earlier, organizations must understand the principles of service. The shared logging feature should provide information to the shared analysis engine, and the analysis engine can allow organization to perform service modeling, planning capacity, and troubleshoot the generated issues.

Some services may require audit-reviewed records provided by a separate agent other than the service user and service provider. With such services, it is necessary to comply with the government's regulations or resolved between the partner organizations on what messages that have been processed and when proactive disputes may occur.

Cache management

There are several types of services generate cache results. It may include static information, for example, the securities at a closed price of a specific date, or can effectively process it within a period of time, but data should be verified before taking action (for example, the sales situation of the seat on the aircraft flight ).

The web cache uses the Unified Resource Locator (URL) as a key and raises a few results for complex queries. The service does not provide such a simple method, so it is necessary to send a key to the service request by the development standard and allow the service to inform the intermediate layer and the user in response to the case of cacheability.

Chapter 6, "State" will discuss how to use how to use cache data and non-cached data.

Back to top

Message processing infrastructure

Many of the operational requirements for strong message processing have just been proposed, there should be implemented in the message processing infrastructure. This infrastructure is conceptual, including:

• Public components. Organization needs to set up standards for listening and message processing software for all implementation services. • Organize infrastructure. Routers, firewalls and sharing services play an important role in meeting security requirements, logging requirements, and content-based routing management requirements. • Partner infrastructure. Similarly, the network and service infrastructure of the organization that uses your services are equally important for service delivery security and reliability. • Public infrastructure. The message may have a long path between the routers that use the organization and the edge of the network of the organization. In addition to providing simple bitstreams, the public infrastructure also includes organizational selection as an intermediate layer for review, authentication, acceleration, and other functions.

Figure 2 describes the message processing infrastructure in a graphic manner.

Figure 2. Message processing infrastructure

Since all messages processes the infrastructure through the message, it is an ideal environment for managing operational functions. This means that you can separate the core business feature (ie, your service providing business process) is separated from the operational function, which is your service to communicate with other services. Through the separation of these functions, the responsibility can also be assigned to the appropriate expert group within the organization. Although you are independent of the service to be used to design services, you still have to consider whether these services still involve network transmission. Business logic will need to take care of the complexity of distributed processing and asynchronous processing.

Back to top

Message processing summary

The message is the design center of the network service. The service-based structure is beneficial to integration and interoperability. A standard solution for horizontal messaging issues will greatly help achieve interoperable services.

The news along the complex route, starting from the user, through the middle layer, arriving at the service provider. The final response may also be returned along another equivalent complicated path. Applications for services and use services must be designed and developed under the premise of these complexity. Conversion of service calls as synchronization function calls generate fragile applications.

Most complicated factors involved in writing services and use of services should be upgraded to a messaging infrastructure that is more widely shared as possible to the application requirements and organizational policies. This infrastructure will become key aspects of innovation and development throughout the computer industry in the next few years.

Back to top

note

• HTTP's Keep-Alive allows each connection to have multiple interactions, but this form is still a request / response.

Go to the original English page

转载请注明原文地址:https://www.9cbs.com/read-92671.html

New Post(0)