Specifications
StreamInsight Architecture CHAPTER 8 149
Output Adapters
The output adapters reverse the operations of the input adapters by translating events into a
format that is usable by the target device and then sending the translated data to the device.
The development process for an output adapter is very similar to the process you use to
develop an input adapter.
Query Instances
Standing queries receive the stream of data from an input adapter, apply business logic to the
data (such as an aggregation), and send the results as an event stream to an output adapter.
You encapsulate the business logic used by a standing query instance in a query template
that you develop using a combination of LINQ and a .NET language. To create the standing
query instance in the CEP server, you bind a query template with specic input and output.
You can use the same query template with multiple standing queries. After you instantiate a
query, you are can start, stop, or manage it.
Deployment Models
You have two options for deploying StreamInsight. You can integrate the CEP server into an
application as a hosted assembly, or you can deploy it as a standalone server.
Hosted Assembly
Embedding the CEP server into a host application is a simple deployment approach. You
have greater exibility than you would have with a standalone server because there are no
dependencies between applications that you must consider before making changes. Each
application and the CEP server run as a single process, which may be easier to manage on
your server.
You can use any of the development approaches described later, in the “Application Devel-
opment” section of this chapter, when hosting the CEP server in your application. However, if
you decide later that you want your application to run on a standalone server, you will need
to rewrite your application using the explicit server development model.
Standalone Server
You should deploy the CEP server as a standalone server when applications need to share
event streams or metadata objects. For example, you can reuse event types, adapter types,
and query templates and thereby minimize the impact of changes to any of these metadata
objects across applications by maintaining a single copy. You can run the CEP server as an
executable, or you can congure it as a Windows service. If you want to run it as a service
application, you can use StreamInsightHost.exe as a host process or develop your own host
process.