Is Serverless in Your Present or Future?

Is Serverless in Your Present or Future?

Posted on June 21, 2021 0 Comments
Business Logic for Serverless GCP AWS Azure

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:

  • Serverless is gaining in popularity among organizations of all sizes.
  • Lambda functions are invoked three and a half times more often than two years ago.
  • Azure Functions and Google Cloud Functions are gaining momentum.

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.

What Are Good Solutions To Improve Your Productivity When Writing and Maintaining Business Logic?

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.

  1. By using a rule based no-code serverless decision service like Corticon.js, you gain productivity because the business logic can be authored directly by the business specialist.
  2. And as importantly, you will gain agility as the same business user will be able to adjust the rules very quickly as the business evolves without the costly and time-consuming round trips that are typical between business users and programmers. You are freeing your precious programming resources to focus on the security and scalability of the solution.
  3. But it does not stop there, you gain even more agility because the business user does not need to be trained in any of the cloud technologies. So, you can tackle new project faster and at reduced costs.
  4. You also future proof your business logic with the confidence that you can port it to any of the major cloud vendors in just one click.
  5. You gain even more productivity because Corticon.js even offer options for deploying some of the business logic closer to the user for better user experience.

In the following section, we explore a concrete example of how this works:

Car Insurance Example

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.

Rule flow

Now let’s look briefly at what an individual rulesheet looks like:

A rulesheet

The business specialist simply works in a spreadsheet like interface to:

  1. 1. Assess various conditions (top panel): for example, assessing how much to increase the daily price based on three conditions: the distance driven, the driver age and the risk level of the zone driven during the day.
  2. 2. Act based on these conditions (bottom panel): here we simply set a specific amount to charge.

 

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.

Rules statements

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.

Maintaining Business Logic

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.

New Condtions

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.

Conclusion

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

Thierry Ciot

Thierry Ciot

Thierry Ciot is a Software Architect on the Corticon Business Rule Management System. Ciot has gained broad experience in the development of products ranging from development tools to production monitoring systems. He is now focusing on bringing Business Rule Management to Javascript and in particular to the serverless world where Corticon will shine. He holds two patents in the memory management space.

Comments

Comments are disabled in preview mode.
Topics

Sitefinity Training and Certification Now Available.

Let our experts teach you how to use Sitefinity's best-in-class features to deliver compelling digital experiences.

Learn More
Latest Stories
in Your Inbox

Subscribe to get all the news, info and tutorials you need to build better business apps and sites

Loading animation