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.
Let our experts teach you how to use Sitefinity's best-in-class features to deliver compelling digital experiences.Learn More
Subscribe to get all the news, info and tutorials you need to build better business apps and sites
You can also ask us not to share your Personal Information to third parties here: Do Not Sell or Share My Info
We see that you have already chosen to receive marketing materials from us. If you wish to change this at any time you may do so by clicking here.
Thank you for your continued interest in Progress. Based on either your previous activity on our websites or our ongoing relationship, we will keep you updated on our products, solutions, services, company news and events. If you decide that you want to be removed from our mailing lists at any time, you can change your contact preferences by clicking here.