Last month I was honored to participate in the bi-annual SAP BTP Hackathon, a fierce and friendly 3-day competition during which teams from different organizations build a working prototype of an application using SAP BTP services. The Solace team was thrilled to partner with Hydro-Québec and collaborate with BlueBoot and SAP. Together, we tackled an exciting use case, dived into the architecture, and created a working prototype. In this article I will explain the use case and how we achieved the desired outcome using various BTP services and SAP Integration Suite, advanced event mesh.
Hydro-Québec is responsible for supplying power to all residents of Quebec (a province in Canada). Hydro-Québec’s mission is to provide clean and renewable energy which is low in greenhouse gas emission. All the energy is generated within the province and less than 1% of the electricity consumed in Québec comes from other out-of-province sources.
Due to its location, Quebec gets very cold during winter — the temperature can get as low as -25 or -30° celsius, which is around -22°F. This is the time when the energy consumption is the most since everyone uses more power to keep their homes warm.
At Hydro-Québec’s head office, the main concern is how to keep with the increased capacity demand.
Hydro-Québec’s SAP development team came up with an idea to keep energy consumption low during the winter months using SAP BTP technologies. The idea is to challenge the citizen to change the thermostat temperature to a lower value which would lead to lower energy consumption by:
- Monitoring the outside temperature and energy consumption every hour.
- If the consumption reading reaches a certain value, challenging the citizen (through the mobile app) to lower their thermostat a couple degrees, which they would hardly notice.
- If the client accepts the challenge, offering them a discount so they save some money.
Meanwhile, back at the head office, an admin portal lets Hydro-Québec managers see how much energy is saved through the program, how many people have accepted or rejected the challenge, etc.
After the initial discussion, whiteboarding, and a lot of back and forth we came up with the architecture. This architecture involved some microservices best practices such as decoupled/loosely coupled services, agility, event-driven, extensibility, and individual scalability. The final architecture used the following services from the BTP cockpit:
- SAP HANA Cloud
- Advanced Event Mesh
- Integration Suite
- Cloud Integration
- API management
- SAP BUILD
- Process Automation including Business Rules
- Cloud Foundry Runtime
- Business Application Studio
Here are brief descriptions of each of the components used:
- SAP Workzone And UI Integration Cards: SAP Workzone enables organizations to easily build business sites that provide centralized access to business application information on any device. It also provides pre-built templates, user interface cards, and content widgets to help in easily building and managing sites visually. In this use case, SAP Build Workzone is used to create the Temperature simulator and the admin portal for the admin to login and have a single view of how much KWH is being saved by this challenge. The cards in the workzone interact with AEM (SAP Integration Suite, Advanced Event Mesh) to publish the temperature data and subscribe to challenge accepted/rejected and total savings which are published by downstream applications.
- SAP Integration Suite, Advanced Event Mesh: AEM is an event streaming, event management, and monitoring platform that makes software event brokers available as a service. With AEM you can create event broker services in minutes, build a model of your event mesh to design and help implement it, and monitor your services and event mesh to ensure everything runs smoothly. In the current architecture, AEM provides the messaging and integration layer which glues different services together in a decoupled manner. This layer helps in providing decoupling between the components and enabling EDA. AEM provides various benefits in the overall architecture:
- Decoupled/loosely coupled applications and services
- Support for multiple messaging patterns, e.g. one to one, one to many, many to one
- Support for popular APIs and open protocols, such as REST, AMQP, MQTT, WebSocket, etc.
- Dynamic message routing
As shown in the high-level design, various BTP components interact with AEM by publishing and subscribing to the data that is needed.
- SAP Integration Suite, Cloud Integration: SAP Cloud Integration Connect lets you automate business processes with pre-built integrations, APIs, connectors, and best practices. It provides a graphical modeling environment that lets you design the details of message processing; both senders and receivers as well as the individual processing steps. Here, SAP Integration Flow (iFlow) interacts with AEM and the SAP HANA Cloud DB through SAP CAP application. The iFlow does the business logic and is in charge of updating the consumptions, savings, and challenge created/accepted/rejected status in the SAP HANA DB.
- SAP Build Process Automation: SAP Process Automation is invoked by iFlow and decides whether a challenge needs to be created for a client. If there is new challenge to be issued to the client, it is published to AEM which is then in turn subscribed by Admin console and the iFlow for updating the DB.
- SAP AppGyver (or SAP Build Apps): SAP Build Apps is a professional application development solution designed for anyone to quickly create apps without code regardless of role or skill level. SAP Build Apps is used to create the mobile App that the client can download. AppGyver polls the SAP Hana cloud for any new challenge. If there is a new challenge for the client, a notification on the app allows the client to accept or reject the challenge. This app also tells the client how much money the client has saved by accepting the challenge
- SAP HANA Cloud: SAP HANA Cloud is a modern database as a service (DBaaS) powering intelligent data applications and analytics across all enterprise data. SAP HANA Cloud DB service is used to persist the data about the client, temperature, challenges, etc., so it can be used later for analytics and next-gen intelligent data applications.
Demo In Action
Here is what the mobile app looks like, specifically showing energy consumption details, the presentation of challenge to the client, and a display of how much they saved.
Mobile App View
The SAP BTP Hackathon 2023 was a huge success. We all came out learning something new as well as fostering friendships that we will cherish forever. The working prototype was demoed to the entire SAP BTP, and HyrdoQuebec team. Please contact Solace if you have any comments or questions about this use case and the Advanced Event Mesh service of SAP BTP, or if you would like to see the hackathon demo in action.
- Vincent Desrochers
- Mairana Chacin
- Alexandre Doré
- Wilson Hernando Reyes Torres
- Youlian Dimitrov
- Francisco Cosco
- John Clavijo
- Scott Dillon
- Brad Caldwell
- Neha Sinha