Roads are the backbone of an efficient, well-developed city and – as most city-planners will attest – it’s a lot more painful and costly to build streets and transportation infrastructure after the fact. The construction chaos, the unhappy citizens, the knowledge that it’s not as good as it could have been… all of this is similar to what smart city leaders may be setting themselves up for by not laying the ideal foundation for smart city data management.

Big city CTOs and CIOs around the world are looking to leverage the Internet of Things (IoT) to streamline traffic and public transportation, better manage and deliver city assets, and provide personalized services to their citizens. What they may not realize is that there is a smart way to harness the power of IoT while putting in place infrastructure that will meet the needs of a wide variety of unpredictable future projects.

Below, I’ll explain why event-driven architecture should be at the core of a data movement and management strategy for any smart city – or rather, any smarter city.

Untangle the clutter with an event-driven mindset

Building smart city infrastructure as a tangle of siloed applications that interact on a request-response basis makes for a complicated mess if you are looking to develop an interconnected city-wide view of services and data.

A typical request-response framework, the most common pattern for communication and data transfer, will not suffice. Why? Because IoT is dynamic, not static; it relies on real-time data movement. So, smart cities – a forward-thinking concept in itself – need to be innovative; they need to be built on event-driven architecture to reach their full potential.

smart city it infrastructure

What is event-driven architecture?

In computing, an event is a change of state or occurrence that can be recognized, transmitted, processed, and reacted to. While the concept of an event is easy to comprehend, most of our technology systems and architecture were not designed for an event-driven world. It’s a lot harder than it sounds to put data in motion so that it gets from where it’s created to where it needs to be, automatically and in real-time.

Legacy systems tend to leverage request-reply based communication patterns, where a system needs to be asked or polled to determine if an event has happened. While this style of communication was adequate for most business processes in the past, for a growing number of use cases today – where the time value of data is high, and agility and scalability are essential – request-reply based architectures are limiting. By contrast, event-driven architecture is based on the publish-subscribe messaging pattern, where events are transmitted in real-time between applications that publish and subscribe to them via an intermediary event broker.

I’ll now explain how a smart city struggling with data management can leverage event-driven architecture and the Internet of Things to reach its full potential.

Why is event-driven architecture important to leveraging IoT in a smart city context?

Event-driven architecture can act like a central nervous system for your smart city, enabling connected infrastructure, transportation and other services to communicate, update and improve, in concert.

There are many metaphors for IoT, but at its core, it is most like a body’s nervous system. Many sensors (nerves) located within different devices (limbs, organs) are connected and pass signals to one another (like a nervous system). A well functioning nervous system enables these signals to be transmitted in real-time throughout the body, to be processed by the brain, and reacted upon.

IoT is growing exponentially. Currently there are billions of connected devices globally that are collecting and sharing data. The purpose is to generate real-time data that can be analyzed and reacted to. By this definition, anything can be part of the IoT; anything can produce data, and anything can be connected – even an entire city.

Smart City Data ManagementThe general purpose of smart city initiatives is to use real-time data collected by a number of sources to track, analyze, and improve the performance of services such as public transportation, parking, waste management, utilities… the list goes on. The objective is to make a city more desirable and more efficient. For a city to reach its full potential, you need to get all the ‘things’ to integrate and interact in an event-driven fashion (vs. polling or request-reply) so that something useful can be done with the data – like automating and improving city services or processes.

Consider a modern use case with a focus on data: smart city parking management.

How Smart City Parking with Event-Driven Architecture Could Save Your City Billions of Dollars

Research by INRIX found that Americans spend an average of 17 hours per year searching for parking. This costs the U.S. economy more than $72B annually in the form of wasted time, fuel, and emissions. For cities concerned about greenhouse gas emissions, less time spent searching for parking could save millions of gallons of fuel. In the case of the United States, searching for parking wastes a whopping 1.7B gallons of fuel per year.

the cost of searching for parking in the US

A solution: Smart parking sensors

In the not-so-distant future, your smart city could include parking sensors.

Now, without event-driven architecture as the foundation for these applications, city administrators and citizens would have to ping smart parking sensors to find out the availability of the spots, and analytics would likely be run overnight based on a batch of data.

A better solution: Event-driven Smart parking sensors

By leveraging event-driven architecture, parking sensors could notify citizens in real-time where spots are available and link to a city-wide payment system (see this example). Analytics could be automated by streaming data to cloud services, and parking fees could be adjusted based on demand.

How else could parking data be used elsewhere? Could it be useful to a different city service? The possibilities are endless with the proper foundation. Thinking of each of these interactions as the production and consumption of events is the type of thinking needed to architect the best solution where data can flow across city services with ease.

Now, consider another modern use case: road flooding and disaster response.

Smart City Disaster Management – How Event-Driven Architecture Enables a Real-Time Response

Thinking about how different city services could use data to predict trends, send alerts, or generally improve their capabilities is an important aspect of planning smart city initiatives and data management. It may not be immediately obvious which other services could benefit from knowing about an event. Detection of localized flooding based on rising water levels is a great example of how event-driven architecture can enable an entire city to deal with and predict troubles sparking from something like blocked drains.

In this specific case, the first service you think of to notify is likely road maintenance.

In a request-response system, a service could continuously ping drain sensors. If something comes back showing an increase in water level, another message could be sent to the road maintenance group to put up barriers to block off the road to citizens. The next drain sensor that registers a change could spark the same sort of reaction.

With event-driven architecture, it doesn’t have to stop there. An event translates into action much better than a published report. It would go beyond just notifying road crews for closures and maintenance, the event notification could also be used for:

  • Rerouting smart public transit
  • Notifications to drivers
  • Developing trends that could be important to housing and community development
  • Smart storm water management (for drainage)
  • Smart disaster response, evacuation
  • Tracking and health hazard alerting for diseases linked to standing water (like malaria outbreaks in certain regions)

By event-enabling a city’s services you are not handcuffed by request-response and slow consumers; each service that has an interest in an event – like water level logging – can find out and react in real-time, potentially saving lives in the case of a serious flood or replacing manual tasks with automated systems. With an event mesh, you could achieve uniform connectivity and response times across a variety of applications, ‘things’, clouds, and on-premises environments. Systems would be governed, robust, and scalable as your city grows.

So now that you’re warming up to the idea of what event-driven architecture can do for your smart city, you may be asking the question, “What else do I need to be able to implement this architecture?”

Event Mesh: The Foundation for Enabling Event-Driven Architecture Across Smart City Projects

In a nutshell, cities can enable event-driven architecture across all their smart city projects by deploying and connecting event brokers to create an event mesh.

In a smart city, one would never want the flow of real-time data to rely on, or wait for, the applications producing or receiving the data. You want interconnectivity without one service (e.g. parking) interfering with another service (e.g. public transportation).

Just like a house, a smart city needs to be built on a solid foundation. As I mentioned before, since the dawn of modern civilization, roads have been that foundation – they connect communities, are essential for emergency services, and allow people to get where they want to go. And above all, a city with an intelligent road system and plan in place will experience fewer growing pains as the population increases.

An event mesh, or a network of interconnected event brokers, is to smart cities what well-designed roads are to urban planning. An event broker (middleware software, appliance, or SaaS) is used to transmit events between event producers and consumers.

An event mesh can give smart cities a robust and secure foundation to build and deploy applications in any environment (on-premises, hybrid cloud, etc.). With this foundation in place, new applications are not created in silos, but are free to send and receive data from other applications across the event mesh.

See below:

Event Mesh: The Foundation for Enabling Event-Driven Architecture Across Smart City Projects

A Real-Time World Demands A Real-Time Solution

It’s natural for ideas to outpace technology. IoT makes a staggering amount of real-time data available for action and decision making, but our methods for getting it where it needs to be have been lagging. Shouldn’t we try our best to keep up so our aspirations for a better, smarter future aren’t handcuffed by yesterday’s technology?

I hope you now recognize why building the foundation for a smart city with event-driven thinking is critical to its success. Further, implementing an event mesh will make it easier to implement as a whole, ensuring scalability as you connect more and more services together.

Even ten years ago the world was a very different place. Soon, the amount of data consumed in real-time will exceed the entire amount of data consumed today. As IoT and the planning of smart cities continues to unfold, our ideas for interconnectivity need to evolve beyond patching together solutions that will cause pain down the line; our standards for baseline event-driven infrastructure shouldn’t be short-sighted. Innovative solutions (smart cities) deserve innovative technologies (like an event mesh).

And it doesn’t end with smart cities, an idea gaining traction. Read more about the “smarter state” here.

In my next blog, I will discuss public transport in smart cities, including the challenge of bringing buses online and why an event mesh is the best solution.

Sarah Diguer
Content Marketing Manager

Sarah has honed her skill at breaking down complex topics into things that non-engineers and non-technical people can understand over the course of a career spent in the research and technology space for years, including a stint managing marketing for a company that built test facilities for gas turbine engines for the likes of Rolls-Royce and Pratt & Whitney.

With Solace Sarah has helped craft numerous articles and white papers about how event-driven architecture and microservices can help enterprises and government agencies improve operational efficiency, better serve their constituents and customers, and more through the Internet of Things, smart city and smart transport initiatives, supply chain modernization and more.

Sarah holds a bachelor of engineering (aerospace) degree from Carleton University. She is an avid painter, an average golfer, and a movie buff who enjoys watching and reviewing films of all eras and genres.