Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Intelligence at the Edge: Event-Driven Architecture

DZone's Guide to

Intelligence at the Edge: Event-Driven Architecture

Event-driven architecture provides an efficient way to carry out cognitive tasks. It applies basic business logic while data is in motion and can decide whether to involve back-end processes.

· AI Zone ·
Free Resource

Did you know that 50- 80% of your enterprise business processes can be automated with AssistEdge?  Identify processes, deploy bots and scale effortlessly with AssistEdge.

Cognitive services are quickly changing applications and the businesses that deploy them. Using APIs from companies like IBM, AWS, and Microsoft, developers can leverage some of the world’s most sophisticated technology for computer vision, translation, sentiment analysis, and much more with just a few lines of code.

To get the most out of cognitive services, many developers are adopting a design pattern called event-driven architecture.

As the name suggests, event-driven architecture makes software change its behavior in response to events in real-time. Event-driven architecture is different from traditional request-response architectures such as REST in that an event-driven system broadcasts a notification when a predefined event occurs rather than following along a set path of subsequent subroutines. This notification may be picked up by any number of other systems, whose use of the information is decoupled from the original event. It’s a way to create faster, more dynamic, more distributed, and independent applications, allowing you to trigger and execute business logic at the edge, with each system informed by, but not necessarily reliant upon, the next.

What Is the Connection With Cognitive Services? 

The event-driven design pattern provides a fast and efficient way to carry out cognitive tasks. Instead of sending all your data to an external server, having that server parse the data, and figuring out what action to take, it applies basic business logic while the data is in motion, directly in your network, and can decide whether to involve back-end processes. This way, you aren’t wasting valuable bandwidth or computational power sending data that never needed to travel back to home base for processing.

As a result, it becomes possible to build powerful cognitive applications right where the intelligence is applied: at the edge of the network.

Because cognitive services are delivered as discrete components, you can add them via serverless microservices and process data in real-time without the need for ingestion by a centralized data center unless it is truly necessary.

A Case Study: Yummy Cola

Let’s take one example. Say a beverage company called Yummy Cola is launching a new line of flavored colas leading up to, and during, this year’s Super Bowl. It wants to monitor brand reaction through social media channels but knows the #superbowl hashtag will be incredibly busy with game analysis and the activity of other brands. It needs a way to filter their brand mentions and gauge the sentiment of how users feel about their product launch.

To do this at scale would cost a fortune, and without an event-driven architecture, sending every user’s message to a central server or data center to process and analyze would be incredibly slow. An event-driven system will be much more efficient, using cognitive services to carry out basic business logic at the edge.

In this way, the brand can monitor each message, determine whether it refers to the new colas, parse the sentiment of the relevant ones, and only pass the relevant information to the back end.

To do this, it could deploy edge computing resources to filter the messages with a natural language processing service, identifying which messages mentioned the brand and which were unrelated. From there, it could use a different cognitive service to analyze people’s feelings about the different colas. It could even publish the popularity of the different products. And it could do all this without bringing the back-end servers into play.

Architecture for the Edge — and Beyond

RESTful architectures were well-suited to an earlier, simpler generation of web applications. Modern applications demand a different approach, with their dense mesh of microservices, edge-computing nodes, and streams of data from sensors and devices. What applications need most now is an architecture that is light, flexible, and decentralized. Event-driven architecture satisfies on all counts — an elegant example of form following function.

Consuming AI in byte sized applications is the best way to transform digitally. #BuiltOnAI, EdgeVerve’s business application, provides you with everything you need to plug & play AI into your enterprise.  Learn more.

Topics:
event-driven architecture ,ai ,cognitive computing ,cognitive services ,data analytics

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}