In this blog post we will talk about the state of serverless as well as business logic for serverless applications..
Datadog has released their report on the state of Serverless. You can find it at https://www.datadoghq.com/state-of-serverless/
Interestingly, this report only focuses on serverless functions. It does not account for usages of other serverless offerings like serverless data stores, front end API, workflow, etc. (For examples of serverless services, you can take a look at https://aws.amazon.com/serverless/ )
Within the space of serverless functions, this report shows very clearly how popular this technology has become. In it, we see quantified data confirming what we have been seeing at various customers for the past few years:
With all these new serverless services, one can start to consider building full applications with only serverless technologies.
Independently of how much serverless you want to mix in your application architecture the need to write business logic remains high. It is often a large part of the development cost, not to mention maintenance.
One clear option is to use a rule engine. Corticon.js is a no-code/low-code and cloud-native rule engine that allows business users to author business logic as decision services that can be deployed as serverless functions. Learn more about Corticon.js here.
In the following section, we explore a concrete example of how this works:
The use case is a modern vehicle insurance company provides pay for what you use/drive car insurance. A team of business specialists has written a set of rules. The rules are divided into logical units and linked together. The first rule set computes how much to charge based on distance driven, driver’s age and various other conditions. The second one adjusts the charge based on the risk level of the location driven during the day. The third one adjusts the charge based on vehicle cost. Each of these are maintained by different business analysts. Finally, the last rule set logs the information about the charge and the driver for auditing purposes. All this is created with a visual, drag-and-drop Ruleflow editor.
This is illustrated with the following Corticon.js rule flow.
Now let’s look briefly at what an individual rulesheet looks like:
The business specialist simply works in a spreadsheet like interface to:
Working with a spreadsheet interface allows most business user to express simple to very complex rules without having to write a single line of code.
Additionally, the specialist can express business logic documentation. For example, in the last rulesheet below the third panel (bottom one) contains one rule statement.
These rule statements will be generated at runtime and are typically used for auditing or tracing purposes. In our example, we use them to log audit information. This is critical information to have for when we need justify why users may be denied services or why they are charged a specific amount.
These rules can get quite complicated and would be hard to program correctly and quickly if they had to be coded in a regular programming language. It’s simpler, more reliable, and faster to let the specialist author, maintain and test the rules. This provides a good division of labor; the integrator can concentrate on securing the solution and scaling it without having to worry about a good chunk of the business logic implementation and testing.
Corticon.js also provides a lot of productivity when maintaining the business logic. Let’s look at an example: Let's say the team is tasked offering a promotion for young drivers 20 to 22 who do not drive much per day and if they have at least two years of driving experience.
The business analyst simply adds a column with the proper condition for the driver and add the promotion price in the corresponding cell in the action panel as illustrated below in Column 12.
As you can see, the business analyst can do the changes very quickly as well as test them.
From the integrator point of view, the decision service is truly a black box that given a set of inputs will provide the charge to assign to the driver.
Serverless functions are becoming very popular and are becoming an essential component of cloud applications. In this context, Corticon.js provides a great solution to build complex business logic to run in these serverless functions.
Corticon.js is cloud native and allows building business logic at an unprecedented pace. Customers are reporting up to 90% productivity improvement. And as importantly, it provides a cloud agnostic solution so that you can rest assured you can deploy your business logic in any of the major cloud platforms without efforts.
Learn more about Corticon.js
Subscribe to get all the news, info and tutorials you need to build better business apps and sites
You have the right to request deletion of your Personal Information at any time.
You can also ask us not to pass your Personal Information to third parties here: Do Not Sell My Info
Let our experts teach you how to use Sitefinity's best-in-class features to deliver compelling digital experiences.
Copyright © 2021 Progress Software Corporation and/or its subsidiaries or affiliates.All Rights Reserved.
Progress, Telerik, Ipswitch, Chef and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.