StreamInsight (1)

Source: Internet
Author: User
Recently, I made a small research on StreamInsight. I found that many of these ideas are very different from the database operations for data rows that I have been dealing with. In view of the fact that there are not many related materials, there are fewer Chinese characters (it is hard to read on MSDN). After half a day of exploration, it can only be regarded as a new entry. I wrote this series of articles to discuss with you. Introduction to StreamInsi

Recently, I made a small research on StreamInsight. I found that many of these ideas are very different from the database operations for data rows that I have been dealing with. In view of the fact that there are not many related materials, there are fewer Chinese characters (it is hard to read on MSDN). After half a day of exploration, it can only be regarded as a new entry. I wrote this series of articles to discuss with you. Introduction to StreamInsi

Recently, I made a small research on StreamInsight. I found that many of these ideas are very different from the database operations for data rows that I have been dealing with. In view of the fact that there are not many related materials, there are fewer Chinese characters (it is hard to read on MSDN). After half a day of exploration, it can only be regarded as a new entry. I wrote this series of articles to discuss with you.

Introduction

StreamInsight is a new module in SQL Server 2008 R2. It provides the Complex Event Processing (CEP, Complex Event Processing) function.

Traditional databases target data row operations. All information is first stored in the hard disk and then retrieved for a series of calculations. CEP is used for event stream operations. The event stream enters through the adapter from the portal, and then passes through a series of query logic processing in the CEP server, and finally delivers the results to each target through the output adapter.

View the source image (large image)

You can think that during processing, all events and the data carried by the events are temporarily stored in the memory, but they are generally invisible during processing, all you can touch is input and output. That is to say, after you throw a bunch of event streams to StreamInsight, in addition to waiting for the stream of processed events at the output end, you cannot take an event in the middle of a process to see what it looks like.

In addition, because the input adapter, output adapter, and CEP server are both running asynchronously, you cannot determine which module an event is in at a certain time point, therefore, the traditional debugging method for program lines is also unacceptable in StreamInsight-based programs. Fortunately, StreamInsight provides a good Debugger tool to review the entire process from the event perspective.

Application scenarios

You may not know what StreamInsight is doing here. The following is an example:

Website traffic monitoring. If we want to count the total traffic of the website for one day, we can use traditional databases. However, if we need to count the number of current online users in real time and keep updating the number, traditional databases will become clumsy and slow. Because if we first store the access information in the database, and then use the time condition to filter out the number of visitors in the current time period, it will be inefficient.

StreamInsight provides a time window mechanism to collect statistics on all inbound events Based on Time Window slices. As the event flows in, the window always counts the data in the latest window. In this way, you can obtain the information about the number of online users as quickly as possible.

In summary, StreamInsight should be applied to scenarios with the following characteristics:

Focus on real-time results.

High-throughput scenarios, and do not focus on the storage of intermediate results. StreamInsight is said to be designed for high-throughput scenarios, and intermediate results, as described above, cannot be obtained.

It can be sliced for statistics. Because StreamInsight is generally used to calculate data at a given moment, just like when a flood occurs, you cut a knife to calculate its cross section. If you want to count the total amount, such as the total traffic, it is better to use a traditional database.

Installation and documentation

Although StreamInsight is a new module on 2008 R2, it can be installed without SQL Server 2008 R2. If you have a Key, you can install StreamInsight Server and Client without installing SQL Server.

For detailed installation instructions, refer to http://msdn.microsoft.com/zh-cn/library/ee378749.aspxon MSDN, which is much easier than SQL Server installation. The only thing to note is that in Step 7, it is best to select "add current user to StreamInsight User Group". Otherwise, you cannot Connect to the StreamInsight server endpoint using the Connect method. If you want to add a new account later, log out and log on again.

All the official documents about StreamInsight are stored in.

A good way to get started is to download the http://go.microsoft.com/fwlink? The example on LinkId = 180356 first has a perceptual knowledge, and may be able to quickly understand the principles. We recommend the TrafficJoinQuery project, which is simple and has a clear architecture.

The above is the beginning of this series, there are not many dry goods, but I have been full of sweat, I hope the next will not be so painful. It is a great comfort for me to see what I understand.

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.