Serverless Data Processing Using Azure Tools

One of the previous blogs covered some of the concepts behind how Azure Event Hubs supports multiple protocols for data exchange. In this blog, we will see it in action using an example. With the help of a sample app, you will see how to combine real-time data ingestion component with a Serverless processing layer.

The sample application has the following components:

To follow along and deploy this solution to Azure, you are going to need a Microsoft Azure account. You can grab one for free if you don’t have it already!

Application Components

Let’s go through the individual components of the applications

As always, the code is available on GitHub.

Producer Component

This is pretty straightforward - it is a Go app which uses the Sarama Kafka client to send (simulated) "orders" to Azure Event Hubs (Kafka topic). It is available in the form of a Docker image for ease of use (details in next section)

Here is the relevant code snippet:

JSON

1

order := Order{OrderID: "order-1234", CustomerID: "customer-1234", Product: "product-1234"}

2

3

b, err := json.Marshal(order)

4

5

msg := &sarama.ProducerMessage{Topic: eventHubsTopic, Key: sarama.StringEncoder(oid), Value: sarama.ByteEncoder(b)}

6

producer.SendMessage(msg)

A lot of the details have been omitted (from the above snippet) - you can grok through the full code here. To summarize, an Order is created, converted (marshaled) into JSON (bytes) and sent to Event Hubs Kafka endpoint.

Serverless Component

The Serverless part is a Java Azure Function. It leverages the following capabilities:

The Trigger allows the Azure Functions logic to get invoked whenever an order event is sent to Azure Event Hubs. The Output Binding takes care of all the heavy lifting such as establishing database connection, scaling, concurrency, etc. and all that’s left for us to build is the business logic, which in this case has been kept pretty simple - on receiving the order data from Azure Event Hubs, the function enriches it with additional info (customer and product name in this case), and persists it in an Azure Cosmos DB container.

You can check the [OrderProcessor](https://github.com/abhirockzz/eventhubs-functions-cosmosdb-example/blob/master/consumer-azure-function/src/main/java/com/abhirockzz/OrderProcessor.java) code on Github, but here is the gist:

Java


1
@FunctionName("storeOrders")
2
public void storeOrders(
3
4
  @EventHubTrigger(name = "orders", eventHubName = "", connection = 
5
  "EventHubConnectionString", cardinality = Cardinality.ONE) 
6
  OrderEvent orderEvent,
7
8
  @CosmosDBOutput(name = "databaseOutput", databaseName = "AppStore", 
9
  collectionName = "orders", connectionStringSetting = 
10
  "CosmosDBConnectionString") 
11
  OutputBinding<Order> output,
12
13
  final ExecutionContext context) {
14
....
15
16
Order order = new Order(orderEvent.getOrderId(),Data.CUSTOMER_DATA.get(orderEvent.getCustomerId()), orderEvent.getCustomerId(),Data.PRODUCT_DATA.get(orderEvent.getProduct());
17
output.setValue(order);
18
19
....
20
}

The storeOrders method is annotated with [@FunctionName](https://docs.microsoft.com/java/api/com.microsoft.azure.functions.annotation.functionname?view=azure-java-stable&WT.mc_id=dzone-blog-abhishgu) and it receives data from Event Hubs in the form of an OrderEvent object. Thanks to the [@EventHubTrigger](https://docs.microsoft.com/java/api/com.microsoft.azure.functions.annotation.eventhubtrigger?view=azure-java-stable&WT.mc_id=dzone-blog-abhishgu) annotation, the platform that takes care of converting the Event Hub payload to a Java POJO (of the type OrderEvent) and routing it correctly. The connection = "EventHubConnectionString" part specifies that the Event Hubs connection string is available in the function configuration/settings named EventHubConnectionString

The [@CosmosDBOutput](https://docs.microsoft.com/java/api/com.microsoft.azure.functions.annotation.cosmosdboutput?view=azure-java-stable&WT.mc_id=dzone-blog-abhishgu) annotation is used to persist data in Azure Cosmos DB. It contains the Cosmos DB database and container name, along with the connection string which will be picked up from the CosmosDBConnectionString configuration parameter in the function. The POJO (Order in this case) is persisted to Cosmos DB with a single setValue method call on the [OutputBinding](https://docs.microsoft.com/java/api/com.microsoft.azure.functions.outputbinding?view=azure-java-stable&WT.mc_id=dzone-blog-abhishgu) object - the platform makes it really easy, but there is a lot going on behind the scenes!

Let’s switch gears and learn how to deploy the solution to Azure

#cloud #tutorial #azure #serverless #databases #messaging #azure functions #azure cosmos db

What is GEEK

Buddha Community

Serverless Data Processing Using Azure Tools
 iOS App Dev

iOS App Dev

1620466520

Your Data Architecture: Simple Best Practices for Your Data Strategy

If you accumulate data on which you base your decision-making as an organization, you should probably think about your data architecture and possible best practices.

If you accumulate data on which you base your decision-making as an organization, you most probably need to think about your data architecture and consider possible best practices. Gaining a competitive edge, remaining customer-centric to the greatest extent possible, and streamlining processes to get on-the-button outcomes can all be traced back to an organization’s capacity to build a future-ready data architecture.

In what follows, we offer a short overview of the overarching capabilities of data architecture. These include user-centricity, elasticity, robustness, and the capacity to ensure the seamless flow of data at all times. Added to these are automation enablement, plus security and data governance considerations. These points from our checklist for what we perceive to be an anticipatory analytics ecosystem.

#big data #data science #big data analytics #data analysis #data architecture #data transformation #data platform #data strategy #cloud data platform #data acquisition

Ian  Robinson

Ian Robinson

1624399200

Top 10 Big Data Tools for Data Management and Analytics

Introduction to Big Data

What exactly is Big Data? Big Data is nothing but large and complex data sets, which can be both structured and unstructured. Its concept encompasses the infrastructures, technologies, and Big Data Tools created to manage this large amount of information.

To fulfill the need to achieve high-performance, Big Data Analytics tools play a vital role. Further, various Big Data tools and frameworks are responsible for retrieving meaningful information from a huge set of data.

List of Big Data Tools & Frameworks

The most important as well as popular Big Data Analytics Open Source Tools which are used in 2020 are as follows:

  1. Big Data Framework
  2. Data Storage Tools
  3. Data Visualization Tools
  4. Big Data Processing Tools
  5. Data Preprocessing Tools
  6. Data Wrangling Tools
  7. Big Data Testing Tools
  8. Data Governance Tools
  9. Security Management Tools
  10. Real-Time Data Streaming Tools

#big data engineering #top 10 big data tools for data management and analytics #big data tools for data management and analytics #tools for data management #analytics #top big data tools for data management and analytics

Gerhard  Brink

Gerhard Brink

1624692167

Top 10 Big Data Tools for 2021!

In today’s tech world, data is everything. As the focus on data grows, it keeps multiplying by leaps and bounds each day. If earlier mounds of data were talked about in kilobytes and megabytes, today terabytes have become the base unit for organizational data. This coming in of big data has transformed paradigms of data storage, processing, and analytics.

Instead of only gathering and storing information that can offer crucial insights to meet short-term goals, an increasing number of enterprises are storing much larger amounts of data gathered from multiple resources across business processes. However, all this data is meaningless on its own. It can add value only when it is processed and analyzed the right way to draw point insights that can improve decision-making.

Processing and analyzing big data is not an easy task. If not handled correctly, big data can turn into an obstacle rather than an effective solution for businesses. Effective handling of big data management  requires to use of tools that can steer you toward tangible, substantial results. For that, you need a set of great big data tools that will not only solve this problem but also help you in producing substantial results.

Data storage tools, warehouses, and data lakes all play a crucial role in helping companies store and sort vast amounts of information. However, the true power of big data lies in its analytics. There are a host of big data tools in the market today to aid a business’ journey from gathering data to storing, processing, analyzing, and reporting it. Let’s take a closer look at some of the top big data tools that can help you inch closer to your goal of establishing data-driven decision-making and workflow processes.

Apache Hadoop

Apache Spark

Flink

Apache Storm

Apache Cassandra

#big data #big data tools #big data management #big data tool #top 10 big data tools for 2021! #top-big-data-tool

Gerhard  Brink

Gerhard Brink

1620629020

Getting Started With Data Lakes

Frameworks for Efficient Enterprise Analytics

The opportunities big data offers also come with very real challenges that many organizations are facing today. Often, it’s finding the most cost-effective, scalable way to store and process boundless volumes of data in multiple formats that come from a growing number of sources. Then organizations need the analytical capabilities and flexibility to turn this data into insights that can meet their specific business objectives.

This Refcard dives into how a data lake helps tackle these challenges at both ends — from its enhanced architecture that’s designed for efficient data ingestion, storage, and management to its advanced analytics functionality and performance flexibility. You’ll also explore key benefits and common use cases.

Introduction

As technology continues to evolve with new data sources, such as IoT sensors and social media churning out large volumes of data, there has never been a better time to discuss the possibilities and challenges of managing such data for varying analytical insights. In this Refcard, we dig deep into how data lakes solve the problem of storing and processing enormous amounts of data. While doing so, we also explore the benefits of data lakes, their use cases, and how they differ from data warehouses (DWHs).


This is a preview of the Getting Started With Data Lakes Refcard. To read the entire Refcard, please download the PDF from the link above.

#big data #data analytics #data analysis #business analytics #data warehouse #data storage #data lake #data lake architecture #data lake governance #data lake management

Serverless Data Processing Using Azure Tools

One of the previous blogs covered some of the concepts behind how Azure Event Hubs supports multiple protocols for data exchange. In this blog, we will see it in action using an example. With the help of a sample app, you will see how to combine real-time data ingestion component with a Serverless processing layer.

The sample application has the following components:

To follow along and deploy this solution to Azure, you are going to need a Microsoft Azure account. You can grab one for free if you don’t have it already!

Application Components

Let’s go through the individual components of the applications

As always, the code is available on GitHub.

Producer Component

This is pretty straightforward - it is a Go app which uses the Sarama Kafka client to send (simulated) "orders" to Azure Event Hubs (Kafka topic). It is available in the form of a Docker image for ease of use (details in next section)

Here is the relevant code snippet:

JSON

1

order := Order{OrderID: "order-1234", CustomerID: "customer-1234", Product: "product-1234"}

2

3

b, err := json.Marshal(order)

4

5

msg := &sarama.ProducerMessage{Topic: eventHubsTopic, Key: sarama.StringEncoder(oid), Value: sarama.ByteEncoder(b)}

6

producer.SendMessage(msg)

A lot of the details have been omitted (from the above snippet) - you can grok through the full code here. To summarize, an Order is created, converted (marshaled) into JSON (bytes) and sent to Event Hubs Kafka endpoint.

Serverless Component

The Serverless part is a Java Azure Function. It leverages the following capabilities:

The Trigger allows the Azure Functions logic to get invoked whenever an order event is sent to Azure Event Hubs. The Output Binding takes care of all the heavy lifting such as establishing database connection, scaling, concurrency, etc. and all that’s left for us to build is the business logic, which in this case has been kept pretty simple - on receiving the order data from Azure Event Hubs, the function enriches it with additional info (customer and product name in this case), and persists it in an Azure Cosmos DB container.

You can check the [OrderProcessor](https://github.com/abhirockzz/eventhubs-functions-cosmosdb-example/blob/master/consumer-azure-function/src/main/java/com/abhirockzz/OrderProcessor.java) code on Github, but here is the gist:

Java


1
@FunctionName("storeOrders")
2
public void storeOrders(
3
4
  @EventHubTrigger(name = "orders", eventHubName = "", connection = 
5
  "EventHubConnectionString", cardinality = Cardinality.ONE) 
6
  OrderEvent orderEvent,
7
8
  @CosmosDBOutput(name = "databaseOutput", databaseName = "AppStore", 
9
  collectionName = "orders", connectionStringSetting = 
10
  "CosmosDBConnectionString") 
11
  OutputBinding<Order> output,
12
13
  final ExecutionContext context) {
14
....
15
16
Order order = new Order(orderEvent.getOrderId(),Data.CUSTOMER_DATA.get(orderEvent.getCustomerId()), orderEvent.getCustomerId(),Data.PRODUCT_DATA.get(orderEvent.getProduct());
17
output.setValue(order);
18
19
....
20
}

The storeOrders method is annotated with [@FunctionName](https://docs.microsoft.com/java/api/com.microsoft.azure.functions.annotation.functionname?view=azure-java-stable&WT.mc_id=dzone-blog-abhishgu) and it receives data from Event Hubs in the form of an OrderEvent object. Thanks to the [@EventHubTrigger](https://docs.microsoft.com/java/api/com.microsoft.azure.functions.annotation.eventhubtrigger?view=azure-java-stable&WT.mc_id=dzone-blog-abhishgu) annotation, the platform that takes care of converting the Event Hub payload to a Java POJO (of the type OrderEvent) and routing it correctly. The connection = "EventHubConnectionString" part specifies that the Event Hubs connection string is available in the function configuration/settings named EventHubConnectionString

The [@CosmosDBOutput](https://docs.microsoft.com/java/api/com.microsoft.azure.functions.annotation.cosmosdboutput?view=azure-java-stable&WT.mc_id=dzone-blog-abhishgu) annotation is used to persist data in Azure Cosmos DB. It contains the Cosmos DB database and container name, along with the connection string which will be picked up from the CosmosDBConnectionString configuration parameter in the function. The POJO (Order in this case) is persisted to Cosmos DB with a single setValue method call on the [OutputBinding](https://docs.microsoft.com/java/api/com.microsoft.azure.functions.outputbinding?view=azure-java-stable&WT.mc_id=dzone-blog-abhishgu) object - the platform makes it really easy, but there is a lot going on behind the scenes!

Let’s switch gears and learn how to deploy the solution to Azure

#cloud #tutorial #azure #serverless #databases #messaging #azure functions #azure cosmos db