List of all posts from this series: http://vunvulearadu.blogspot.ro/2014/11/azure-blog-post-marathon-is-ready-to.html
Short Description
In only few words, Stream Analytics is a service that allow us to analyze and process a stream of data in real-time. The most important thing here is real-time. This service allow us to process stream an allow us to react based on the events that are happening on the stream.
Main Features
Capacity
This service is able to analyze millions of events per second. Not per hour or minutes, but per second. For example we can analyze stream generated by Event Hub.
Processing
Stream Analytics comes not only with capacity, but also with computing power. It is able to analyze the stream content, detect different pattern and trigger different actions.
Resiliency
This is one of the Azure services where resiliency is quaranteed.
No data loss
Once the content reach the stream, the service guarantee to us that no data will be lost. Each bit from the stream will reach the final destination.
Scalability
He have the ability to stream with multiple stream and processing units. In this way we can scale-up as much as we want.
Correlation
There is the ability and support to correlate multiple streams of data. In this way working with multiple stream of data will not increase the complexity of our system.
SQL Syntax
The language used to process data streams is very similar with SQL (subset of SQL). In this way we don’t need to learn a new language, we only need to learn and know functions that are specific to Stream Analytics.
Data timestamp
In a system that analyze data in real-time the concept of timestamp and arrival time can be different based on the ingest source or other rules. Because of this we can specify using a command what column should be used as ‘arrival time’ – the command name is TIMESTAMP BY.
Data types
There are 4 types of data that can be used in Stream Analytics:
Using this 4 primitive types we can map any kind of data from numbers to strings and dates.
DDL
Data Definition Language is a vocabulary used to define the data structure of Stream Analytics. For example CREATE TABLE is part of DDL vocabulary.
DML
Data Manipulation Language is the vocabulary used to retrieve, process and work with Stream Analytics. Part of DML are “SELECT”, “WHERE”, “GROUP BY”, “JOIN”, “CASE”, “WITH” and so on.
Window
A window in Stream Analytics terminology represent all events in a specific time frame. Using this time windows we can aggregate events, analyze them many more. There 3 types of time windows in Stream Analytics, from the simple ones that are fixed in time, from the one that start only when a specific event or action happen in the system:
Functions
There are a lot of functions that are built in. This functions allow us to do different things from extracting different part of a date time column get substrings or cast to different types.
Don’t forget that when cast is not possible the current version of the service will not throw an expectation. It will only return NULL value.
Low Latency
The latency from the moment when data reach the service until will be processed is extremely short.
REST API
Like for the rest of services from Microsoft Azure, all the service management is made using a simple REST API. Because of this we can create our own management application or portal.
Limitations
Region Availability
In the preview phase, this service is only available in Central US and West Europe region. In future this service will be available worldwide.
Partition Id
In this preview phase, the data partitioning using ‘partition by’ must be on Partition Id. In the future we will be able to make partitioning on other fields.
Number of aggregation
The maximum number of aggregation definitions that can be done in a query can be 7.
Job Management
When we need to redeploy or start again a job, we are not able to specify the start point. This mean that we cannot continue with data processing from the point where the last job stopped.
Input from blobs
When we are using blobs as input we should limit the maxim size of each blob to 10MB in this moment. This happens because jobs can have problem consuming large blobs and crash.
Columns Heather and Whitespaces
The system don’t make any kind of trim in the name or columns. This mean that if we specify a space at the beginning or end of a column will generate null entries in the job output.
Applicable Use Cases
Below you can find some use cases when I would use Stream Analytics.
Analyze sensor events of a smart home system
I would use this service to analyze all the events that are produces by a smart home platform and react to this events. From simple events that notify me that the battery is low to the one that transmit the room temperature or that an open is open or close.
Logs
There are a type of logs that I would send to a stream analytic system and based on their content to trigger different alerts or alarms. Based on this data we could even make predictions.
Smart devices
When I say a smart device I have in mind a smart watch, a smart shoe, a phone or something similar. Why not aggregate all the data into a system that can analyze them and notify parents that the child has temperature or is sick.
Code Sample
-
Pros and Cons
Pros
Cons
None, for the use cases where I would like to use this service.
Pricing
When you need to estimates the costs of Stream Analytics you should take into account the fallowing components:
Conclusion
We should keep an eye on this service and be open to use it when you will need stream analytics in real time. Analyzing a stream in real time is a hard thing if you need SLAs. It is not only CPU power.
Short Description
In only few words, Stream Analytics is a service that allow us to analyze and process a stream of data in real-time. The most important thing here is real-time. This service allow us to process stream an allow us to react based on the events that are happening on the stream.
Main Features
Capacity
This service is able to analyze millions of events per second. Not per hour or minutes, but per second. For example we can analyze stream generated by Event Hub.
Processing
Stream Analytics comes not only with capacity, but also with computing power. It is able to analyze the stream content, detect different pattern and trigger different actions.
Resiliency
This is one of the Azure services where resiliency is quaranteed.
No data loss
Once the content reach the stream, the service guarantee to us that no data will be lost. Each bit from the stream will reach the final destination.
Scalability
He have the ability to stream with multiple stream and processing units. In this way we can scale-up as much as we want.
Correlation
There is the ability and support to correlate multiple streams of data. In this way working with multiple stream of data will not increase the complexity of our system.
SQL Syntax
The language used to process data streams is very similar with SQL (subset of SQL). In this way we don’t need to learn a new language, we only need to learn and know functions that are specific to Stream Analytics.
Data timestamp
In a system that analyze data in real-time the concept of timestamp and arrival time can be different based on the ingest source or other rules. Because of this we can specify using a command what column should be used as ‘arrival time’ – the command name is TIMESTAMP BY.
Data types
There are 4 types of data that can be used in Stream Analytics:
- Bigint
- Float
- Datetime
- Nvarchar(max)
Using this 4 primitive types we can map any kind of data from numbers to strings and dates.
DDL
Data Definition Language is a vocabulary used to define the data structure of Stream Analytics. For example CREATE TABLE is part of DDL vocabulary.
DML
Data Manipulation Language is the vocabulary used to retrieve, process and work with Stream Analytics. Part of DML are “SELECT”, “WHERE”, “GROUP BY”, “JOIN”, “CASE”, “WITH” and so on.
Window
A window in Stream Analytics terminology represent all events in a specific time frame. Using this time windows we can aggregate events, analyze them many more. There 3 types of time windows in Stream Analytics, from the simple ones that are fixed in time, from the one that start only when a specific event or action happen in the system:
- Tumbling
- Hoping
- Sliding
Functions
There are a lot of functions that are built in. This functions allow us to do different things from extracting different part of a date time column get substrings or cast to different types.
Don’t forget that when cast is not possible the current version of the service will not throw an expectation. It will only return NULL value.
Low Latency
The latency from the moment when data reach the service until will be processed is extremely short.
REST API
Like for the rest of services from Microsoft Azure, all the service management is made using a simple REST API. Because of this we can create our own management application or portal.
Limitations
Region Availability
In the preview phase, this service is only available in Central US and West Europe region. In future this service will be available worldwide.
Partition Id
In this preview phase, the data partitioning using ‘partition by’ must be on Partition Id. In the future we will be able to make partitioning on other fields.
Number of aggregation
The maximum number of aggregation definitions that can be done in a query can be 7.
Job Management
When we need to redeploy or start again a job, we are not able to specify the start point. This mean that we cannot continue with data processing from the point where the last job stopped.
Input from blobs
When we are using blobs as input we should limit the maxim size of each blob to 10MB in this moment. This happens because jobs can have problem consuming large blobs and crash.
Columns Heather and Whitespaces
The system don’t make any kind of trim in the name or columns. This mean that if we specify a space at the beginning or end of a column will generate null entries in the job output.
Applicable Use Cases
Below you can find some use cases when I would use Stream Analytics.
Analyze sensor events of a smart home system
I would use this service to analyze all the events that are produces by a smart home platform and react to this events. From simple events that notify me that the battery is low to the one that transmit the room temperature or that an open is open or close.
Logs
There are a type of logs that I would send to a stream analytic system and based on their content to trigger different alerts or alarms. Based on this data we could even make predictions.
Smart devices
When I say a smart device I have in mind a smart watch, a smart shoe, a phone or something similar. Why not aggregate all the data into a system that can analyze them and notify parents that the child has temperature or is sick.
Code Sample
-
Pros and Cons
Pros
- Real time (real) capabilities
- SQL subset language
- Scalable
- Multiple input/output sources
- Different methods to aggregate data
Cons
None, for the use cases where I would like to use this service.
Pricing
When you need to estimates the costs of Stream Analytics you should take into account the fallowing components:
- Volume of data
- Streaming Unit
- Outbound traffic
- Ingest mechanism and costs
Conclusion
We should keep an eye on this service and be open to use it when you will need stream analytics in real time. Analyzing a stream in real time is a hard thing if you need SLAs. It is not only CPU power.
Comments
Post a Comment