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:
- Runtimes for ApiLogicProject execution (see below)
- 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:
Key Runtime Components
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.