Skip to content

What is API Logic Server

💡 TL;DR - modern 3-tiered architecture, API-accessed, scalable containers

Deployment Architecture

  • A modern 3-tiered architecture, accessed by APIs
  • Logic is automatically reused, factored out of web apps and custom services
  • Containerized for scalable cloud deployment - the project includes a dockerfile to containerize it to DockerHub.

Development Architecture

  • Installed as Docker, pip, or use Codespaces
  • Standards-based customization - debug in a standard IDE (VSCode, PyCharm), using standard packages (Flask, SQLAlchemy)

Runtimes and CLI

API Logic Server is a Python Application, consisting of:

  1. Runtimes for ApiLogicProject execution (see below)
  2. CLI (Command Language Interface - provides ApiLogicServer create…`)

It executes either as a locally install (venv), or a Docker image (which includes Python). In either case, the contents are the same:

API Logic Server Intro

 

Key Runtime Components

API Logic Server Runtime Stack

The following

Component Provides
Flask enables you to write custom web apps, and custom api end points
SQLAlchemy Python-friendly ORM (analogous to Hiberate, JPA)
Logic Bank Listens for SQLAlchemy updates, provides Multi-Table Derivations and Constraint Rules
Python Events (e.g., send mail, message)
Customizable with Python
SAFRS JSON:API and swagger, based on SQLAlchemy
SAFRS-RA Admin App, using SAFRS

Execution: 3-tiered architecture

The API Logic Server executes as an application server, accessed by an API, in a standard 3-tiered architecture.

Observe that logic plugs into SQLAlchemy. Logic is thus automatically shared (factored out) of custom services, and web or browser-based apps.

In most cases, the API Logic Server executes in a container, so scales horizontally like any other Flask-based server.

API Logic Server Intro