This month’s newsletter compares complex event processing (CEP) and business rules engine (BRE) with respect to their similarities, differences and use in the financial services (FS) industry.
An event, in general, can be defined as an activity or action of importance. Every event is backed up by underlying data points – for e.g. one chooses to purchase stock X over stock Y, or the probability of selling a product to customer A is more than that to customer B. An event can also invoke actions and further create more events – such as identifying frauds or showcasing a personalised offer in real-time situations by responding to a customer visit quickly. Due to the high volume of events taking place around us at all times, it has become important to enable seamless event processing across industries. Event processing is conceptually centred around the ingestion, manipulation and dissemination of events. Events are immutable, have strong temporal constraints and managed life cycles, and can use sliding windows. There are various ways to manage event processing – such as stream processing, CEP and BRE. This newsletter aims to delineate CEP and BRE and help our readers to understand when to choose one over the other.
This edition also contains industry news around the adoption of digital technologies by regulatory bodies and the Banking, Financial Services and Insurance “(BFSI)” industry to improve end-to-end customer experiences and enhance data protection from various avenues simultaneously.
BRE can be defined as a software program that executes decision processes based on predefined business logic. On the other hand, CEP refers to the processing of real-time event data to generate insights in or near real-time (before storing the data), which can help to identify opportunities or threats and accordingly respond to these events as quickly as possible. CEP is responsible for aggregation, pattern matching, and analysing and taking action on the basis of insights generated, whereas BRE is more logic-driven and takes action on the basis of a predefined set of rules. Although both CEP and BRE are rule-driven, they are both significantly distinct.
Business rules are the rules that govern the practices and behaviour of businesses and are executed on a day-today basis in any organisation. These rules are implemented across multiple sources, systems and applications and can be combined with other applications in a complex manner to produce the desired outputs. As the system grows in complexity, a simple rule change that can be defined in a matter of minutes by subject-matter experts (SMEs) or business analysts can take months of programming by developers to get deployed in production, hampering the performance of the business. Due to this, enterprises are turning away from hard-coding business rules and have realised the need for a business rule management system (BRMS).
A BRMS is a technology system used to capture decision logic as a business rule, which is then automated across applications. Instead of embedding rules as code within multiple applications, in a BRMS, the rules are externalised and managed away from application code. This enables the logic to be leveraged by multiple applications and changed independently from the governing applications, which empowers business personnel or developers to manage decision logic as business rules, and not programming code. Moreover, externalised rules are placed in a business rule repository that gives business specialists the ability to create, modify or activate business rules without IT involvement.
The BRE executes all these pre-defined rules or business rule repositories written within a BRMS.
A BRE comprises of following components:
An example of a BRE being applied to a shopping experience would include configuring a rule of giving a 10% cashback of the total transaction amount to the customer whose one-time shopping expenditure exceeds INR 10,000. Such rules can be configured or revoked easily by business analysts as per their requirements from the graphic user interface itself. However, it is important to clarify that a BRE is not the same as a workflow engine. A workflow engine automates end-to-end multi-layered processes, while a BRE evaluates expressions and decision criteria. Though it is possible to automate multi-step decision workflows along with a BRE, the two are considerably different. Moreover, business rules are a core component of workflow functionality since workflows involve decision-making processes.
CEP is one of the techniques that is used to identify and analyse data from streams of events – typically arriving in an asynchronous manner – through different sources. This data must be processed ‘on the fly. The CEP technique can apply queries to multiple data streams simultaneously to detect specific patterns of events, thus triggering appropriate actions in real-time. It is used to predict high-level events which are likely to result from specific sets of low-level events. Operational intelligence collects real-time data, analyses cause-and-effect relationships, and correlates it against historical data to provide insights and trigger appropriate actions.
CEP architecture
In the above diagram, a stream of events enters the system through edge devices. The knowledge base holds the domain knowledge that is necessary for interpreting and solving these problems. In a rule-based system, the knowledge gets represented as a set of rules. These events then enter the decision engine and appropriate actions are taken. Events in the decision engine can be processed in cloud and stream modes, with the former being the default mode.
In the cloud mode, events are treated as an unordered cloud. Decision engines in this mode do not consider timestamps, temporal features or any stages of life cycle management. This mode uses the rule constraints to find the matching tuples to activate and execute rules. As long as the rules are written in Java or the rule file , they remain active and get automatically triggered when the rule constraints match. However, events need to be retracted explicitly when they are not needed.
In the stream mode, the decision engine processes events in a chronological manner. The decision engine here takes into account the event timestamp and draws relevance using temporal constraints. Events in the stream mode have specified sliding window times and lengths. The decision engine identifies and creates a proper internal structure at compile time to use data from that sliding window to evaluate the rule and automatically trigger the action events. Moreover, it automatically removes the events when the expiration constraint is specified explicitly.
Difference between CEP and BRE
CEP | BRE | ||
---|---|---|---|
1 | Process type | Stateful transaction | Stateless transaction |
2 | Data management strategy | Pattern-based strategy | Rule-based strategy |
3 | Warning precedence | Warning precedes threats | No warnings |
4 | Response time | Quicker response than BRE | Slower than CEP |
5 | Centricity | Information-centric | Process-centric |
6 | Data stream | Works on real-time, incoming event data | Works on stored or payload data |
7 | Application areas |
|
|
8 | How the rule engine works |
|
|
9 | When to use | Real-time action | Scheduled action |
10 | Tools |
|
|
Automated business rules, often used for common real-life scenarios, can help to remove human inconsistency, speed up business processes and eliminate any confusion within such processes. Business rule designers build custom logic, evaluate conditions and choose the expected outcomes. Rules can be low-density (simple rules like basic statements, and sequential rules) or high-density (slightly complex rules like matrix conditions or truth tables), which may need to be combined and intuitively optimised in order to produce the desired outcomes. Moreover, rules can be integrated with most existing systems and used to initiate workflows, assign tasks to actors in the system, dynamically calculate data on reports, automatically produce documents, etc.
When latency requirements are low and the volume of events is large, CEP is preferred over BRE. CEP can be leveraged for real-time complex pattern searches, business rules, analytics and cases where best-action recommendations need to be made and the complexity of the size of the data being handled is constantly increasing.
The stock market is one of the ideal use cases for CEP, which can be used to improve trading algorithms. CEP applications in the stock market consist of pattern-recognition algorithms, historical data analysis and processing, price matching, buying and selling triggers leading to decision making, and many more such events.
CEP enables the use of high-frequency trading, which involves placing trades in sub-milliseconds in considerably high volumes. The trading programs based on mathematical formulas or algorithms are used to evaluate stock market rates and trigger the automatic buying or selling of stocks. These programs must be fast, flexible and independent as they execute many different and competing complex events simultaneously to execute complex strategies. The execution is performed within seconds or milliseconds because the profit margin on these trades is so small that the opportunity must not be missed. The higher is the volume and speed of execution, the higher are the profits.
Algorithmic trading components using CEP to execute high frequency trades
While CEP and BRE are similar in many aspects, the main difference between them is the statefulness of events that allows CEP to retain and process asynchronous events. In addition, CEP encompasses the rule-building functionality of the BRE. Also, BRE is currently more widely adopted in the industry primarily due to tool maturity, in-built frameworks for auditing, logging, monitoring and error handling, and workflow decision-making capability. These features require custom coding or extensive plug-ins on a CEP platform, specifically because many event processing tool stacks are open source and still gaining momentum. CEPs also are known to have other limitations – like lack of a structured language and being resource-intensive – which mandates their enablement on the cloud for effective scale implementation.
Considering the growth of CEP and AI as a solution offering in the data industry, it is interesting to see how these two technologies can come together. CEP techniques are often used for pre-processing the incoming stream of events before data is fed to downstream applications that employ AI techniques. Conversely, AI/machine learning (ML) interventions are baked in the CEP pipeline – for example, to allocate weightages on low-level events – to determine the probability of a complex event. Thus, the combination of CEP and AI will enable the creation of intelligent real-time analytical applications.
Wells Fargo’s new virtual assistant, Fargo, which is on the verge of being released to customers, will get the much-needed support of Google Cloud, to provide a personalised, efficient and robust banking experience. It would be pivotal in aligning Fargo’s digital strategy to provide a better and intuitive banking journey which would help to cater to every individual’s anticipated needs.
Birla Sun Life Insurance has taken a step towards improving customer experiences by providing end-to-end services – from onboarding to issuance – on WhatsApp. For now, only existing customers of Sun Life can use this service, which includes services like know your customer (KYC), quote generation, premium payments and underwriting. It also provides security features like mobile number validation, face identification and name matching to prevent fraud.
The introduction of innovative WealthTech has aided in levelling the playing field for the independent financial advisors (IFAs). At present, there are nearly 160,000 IFAs in India, and less than 1,000 of them have mutual fund holdings worth more than INR 100 crore. Innovative WealthTech powered by advanced analytics, AI and ML solutions is making a shift from active to low-cost passive funds. Also, the phygital model is enabling IFAs across the nation to combine human efforts with technology to experience growth in their businesses and participate in India’s growth story by contributing to Atmanirbhar Bharat.
A solution for yield-based insurance policy has been launched by HDFC ERGO. In this solution, satellites will be used to help calculate the threshold index value using satellite imaging data and remote sensing mechanism. This value will be compared with the actual index value in order to determine whether the yield is at loss. The policy is backed by technology.
Based on their usage of vehicles, customers of many general Indian insurance companies can now turn on/off their insurance coverages. If the coverage is switchedoff for a day, it will be considered as a reward day. All of these reward days will be accumulated, and customers will get a reward in terms of cashback or discounts during insurance renewal. It will also help companies to analyse and understand customers’ driving behaviours and enhance overall as well it will lead to a better customer experience and customer satisfaction.
Finance Minister Nirmala Sitharaman expressed her strong support for Web 3.0 and other emerging technologies while addressing the 21st World Congress of Accountants 2022. She emphasised on the importance of ML in accounting, thereby improving the decision-making process. She also highlighted key aspects of Web 3.0 that would help financial analysts and accountants to reduce the current problems in the industry.
The first digital rupee has been launched by the RBI to facilitate the issuance of digital currency which could be used for transactions pertaining to Government securities. The digital rupee would be used for the settlement of securities issued by the Government, eventually increasing the efficiencies in the inter-bank market. It would be regulated by the RBI. Presently, two versions of the digital rupee have been proposed by the RBI – retail and wholesale.
The Ministry of Electronics and Information Technology has released the revised draft of the Digital Personal Data Protection Bill, 2022. Although the bill is sector agnostic, sector-specific regulatory bodies are expected to build regulations based on the legislation passed via the bill.
According to a study conducted by IEEE, the five major technological aspects – 5G, cloud computing, the metaverse, industrial internet of things and electrical vehicles will have a significant impact on the BFSI (33%) in 2023. These technologies would automate and streamline processes through data analysis, thereby fostering efficiency, optimisation and robustness in the industry.
The IRDAI has revised its previous draft on expenses of management (EoM). According to the revised draft, the caps have been changed to 30% for non-life insurers and 35% for general insurers and standalone health insurers. Also, the caps on payments of commission to agents have been removed – previously, a lower cap of 20% was proposed.
Insurers can now collect data from the Healthcare Professionals Registry (HPR) formed by the National Health Authority for Ayushman Bharat Digital Mission. The registry contains a unique ID for every medical practitioner, which can be used to build a network of doctors and provide a cashless OPD service as well as help in the issuance and renewal of professional indemnity covers.
Acknowledgements: This newsletter has been researched and authored by Aniket Borse, Anuj Jain, Arpita Shrivastava, Bhawesh Pant, Bhavika Tahiliani, Dhananjay GoeI, Harshit Singh, Krunal Sampat, Pooja Sharma, Vaibhav Jain and Raghav Sharma.