Equation Calculation Service in Blue Jay Web Services

Purpose Features Service Rates Getting Started Service Reference

Links:

Purpose

This service is an online equation management, and execution web service (Web API), providing secure regional unified calculations in a set of web services.

Calculations in applications take many forms. The most common methodology I have seen for performing calculations is to use code to produce the desired results, this code contains many functions and classes to produce the results. These functions are executed with some logical branching in order to produce the results from calculations. This code is then compiled and tested and then deployed. However, changes require the same efforts for development, testing, and deployment before being realized by the consuming application.

Another method I have seen used is to put the calculation into database tables and functions that when executed provide the calculation results to the application. This helps with automation and deployment issues and is easier to test, but shifts the calculation development to database professionals. Additionally, changes need to be either made exclusively by the database developers or sufficient graphical user interfaces have to be built for business professionals affect the policy changes needed.

Both of these methods have a degree of complexity that is integrated into the code that executes, the more complex the calculation, the more complex the code that makes the calculation becomes. Managing complexity in code over time is a problem that must be contended with in every deployment iteration. If the change process is not managed well, technical debt increases and slows further modifications because of increased complexity, it just takes longer to modify the complex code.

Making code that executes on a model of calculation instead coding the calculation itself reduces code complexity and allows for easy changes to the calculation model. The model can then be changed and distributed as needed with a redeployment of the application.

The model for calculations can be defined as formulas with variables and organized as conditional branches to calculate the results using those formulas progressing through the conditions. The encapsulation of conditions and formulas and variables is termed equations. These equations can be serialized as text and saved or transmitted as needed.

Features

Service Rates:

All services are free until July 31, 2019. Usage reports are sent out each month (beginning of the month)

After this date, costs are calculated monthly for the account usage (sum of the size of data used), and invoices are then sent out monthly.

Getting Started

Using the Equation Calculation Service is a two-step process. 1. Define and upload your Equation Project to the EquationProject Web API service (only once), 2. Call the Calculate service with the appropriate variable values to get the calculated results.

Prequisites:

  1. Register with Blue Jay Web Services
  2. Save Account key

Using Web Api Client (Postman) to Save an Equation Project to the Service

  1. Define Equation Project (click here for more information)
  2. Add Header key:X-Auth-Token value:[key recieved from Blue Jay Web Services]
  3. Add Equation Project (json text) to body of message
  4. POST to https://bluejaywebsvc.com/api/equationproject

Service References (Web Api):

Every method of this resource requires the Header: X-Auth-Token with the value obtained from Blue Jay Web Services when the account was registered.

https://bluejaywebsvc.com/api/EquationProject

  • GET - Returns a list EquationProjects for the Account
  • GET/[ProjectName] - Returns the EquationProject for the name
  • POST - Add a new EquationProject to the Account
  • PUT - Update/Add the EquationProject for the Account
  • DELETE - Removes the EquationProject from the Account

https://bluejaywebsvc.com/api/Calculate

  • POST - returns the results of the calculation