SQL Server 2005 Proxy Service Application software composition

Source: Internet
Author: User
Tags sql

The agent service is a complex technology with many configurable mobile components. Detailed information is as follows:

Information

Information refers to the basic unit of information that is invoked in the service proxy application. For service agents, the receipt of information is always in the order in which it is sent, and it is guaranteed to be sent and received only once. At the same time ensure that information is not lost. Sometimes the information sent is not immediately received. If this happens, the service agent saves the information and tries to send it again later. Confirmations will be sent before the information to ensure that the data they transmit is needed. The maximum value of information transmission is very large, up to 2GB.

Session

When a message is sent in a Service Broker application, it needs to use a session (or dialog). The session is created as a special task that is deleted when the task is complete, in fact, the primary information exchange is built in the Service Broker, not the information. The session occurs in two endpoint services: Start session service (initiator), and accept session request service (target).

Queue

In a Service Broker application, information is stored in a queue until it is processed. Internally, a Service Broker queue is a special type of table that can be viewed in a SELECT statement by the name of the queue. However, you cannot publish insert, UPDATE, or DELETE statements in a queue. You place the information in a queue to support server restart, which guarantees that the information is not lost.

Service

A service program reads information from a queue and processes them. A service can be an ad hoc, a stored program, or a different program that connects to a database. Each service must be associated with a queue. As mentioned earlier, a session occurs between services.

Session Group

Session groups are used to make information processing continuous and relate them to each other. Each session is a member of a session group. The main idea is that some information is related to others, and the conversation group keeps them together in a neat way. In fact, transactional processing gives all the information in a session group unique to continuous access until the process is complete.

There are many other moving parts associated with the service agent application. These components are the main players in the service agent game. The more familiar you are with them, the more you can write good service agents. Now let's look at how you can use the Service Broker to perform business transactions.

Business Processing

Tasks in a business program are rarely performed in a synchronized fashion. The processing of these transactions often contains separate tasks that may occur synchronously, may overlap, or may not depend on other steps during processing. This is usually suitable for product manufacturing, especially for customers who subscribe to purchase products such as automobiles.

When someone subscribes to a custom car, the steps to create a car part do not have to depend on each other. For example, many of these components can be built at the same time. However, at the end of the process, they are assembled into cars. You will encounter:

Steps in the procedure depend on the preceding steps

If a step fails, it is more important for the success of the overall project

Steps require additional input from the purchaser

In addition to these cases, if the potential buyer revokes the order, it is necessary to repay it according to the process logic. You may be familiar with a type of business process with these characteristics.

When a similar process executes in a database, it typically performs a series of database processing transactions, and each process performs a separate atomic level task. When a database processing process advances or returns, these series of related business transactions are usually not done in such a way. They must have a planned design so that if they fail, the logic is used to return the business processing transaction. The entire business process is difficult to implement, as these independent processes are actually linked to each other and encompass a holistic goal. This is the real value of a queue architecture, such as a Service Broker.

In a Service Broker application, parallel processing is possible and often required. You can make your application conform to this pattern according to your business process. In our customer car example, you can design your program in such a way as to conform to the chassis construction model and to follow the engine construction mode. It is best to use session groups to make these separate parts of the processing process interconnected.



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.