What is GenAI-Powered Microservice Automation?
Microservice Automation means you can create microservices from a database with 1 command. You get an Admin App and a JSON:API with Swagger. Then, use your IDE to declare logic using spreadsheet-like rules (40X more concise than code), and Python as necessary. It's fast - you are up in seconds - and flexible using your IDE and familiar tools.
Power it with GenAI to make it even simpler. Just describe the system in business terms, and the system is created. Then, declare rules in natural language.
Let's have a look.
1. Simplicity of AI
To create system, provide a prompt in business terms:
Create an AI Prompt file named genai_demo.prompt
Create a system with customers, orders, items and products.
Include a notes field for orders.
Enforce the Check Credit requirement (do not generate check constraints):
1. Customer.balance <= credit_limit
2. Customer.balance = Sum(Order.amount_total where date_shipped is null)
3. Order.amount_total = Sum(Item.amount)
4. Item.amount = quantity * unit_price
5. Store the Item.unit_price as a copy from Product.unit_price
That's all it takes to create a system. Note:
-
This prompt is a high-level, business-oriented description of the system - not just the database, but the multi-table business logic too.
-
It is not "techno-babble" of low-level framework details (routes...). You don't need to provide. or even learn such details. That would be a failure to communicate.
2. Speed of Low Code
Then, 1 command creates the project (you can also create from an existing database), providing remarkable business agility:
App and API are ready to run
The system creates the database, and an executable project providing API and App Automation. The microservice is ready to run, instantly:
3. Flexibility of a Framework
Agility includes maintenance automation, using GenAI and Logic Automation, with standard tooling such as Python and your IDE:
Customize and Iterate the Logic and API
Declare executable spreadsheet-like rules - 40X more concise than code - using GenAI or code completion. These address multi-table derivations and constraints, and role-based row filtering.
Declarative rules promote iterative development with support for maintenance automation, with automation for invocation, ordering, dependency management and optimization.
Use Python to extend the rules (e.g, to send a Kafka message), and use the Flask framework to extend the API:
Use your IDE debugger and the logic log to debug logic.
Fully Delivering on Simplicity, Speed, Flexibility
Technology Promises | Limited By... | Deliver the Promise With API Logic Server |
---|---|---|
Framework Promises Flexibility | - No API, Logic or App Automation - Months of complex development |
- Full Microservice Automation - Preserves Full framework access |
Low Code Promises Speed | - No Logic Automation (nearly half the effort) - Manual Screen Painting - Proprietary IDE, Framework |
- Logic Automation - App Automation - Open IDE, Tools, Libraries |
GenAI Promises Simplicity | - No API, Logic or App Automation - Only Database Automation |
- API Logic Server uses GenAI, adding... - Full Microservice Automation - No FrankenPrompt |
API Logic Server offers a fresh approach, relative to traditional technology:
-
Unlike Frameworks, API Logic Server:
- Eliminates weeks-to-months of complex development with Microservice Automation (APIs and App in a customizable project). You're ready to run, not code.
- Provides Logic Automation.
-
Unlike Low Code, API Logic Server:
- Eliminates tedious screen painting and complex database definition, providing Microservice Automation.
- Provides Logic Automation. For systems providing update, this is critical - nearly half the effort. The promise of Low Code requires logic automation.
-
Not just faster/easier for business users, but IT friendly:
- Leverages standard dev languages and tools (IDE, source control). All the power and flexibility of a framework.
- Provides deployment flexibility, creating containers you can deploy anywhere.
-
Unlike basic GenAI, API Logic Server creates:
- Complete microservices -- including logic automation. You have working software. With GenAI, you have a database.
- Avoids the FrankenPrompt.
For more information, see the FAQs.
How Does GenAI - With Microservice Automation - Avoid the FrankenPrompt?
GenAI brings well-known value to app development. It's great for generating code snippets, particularly for driving automation engines, such as sql (e.g., "create a database..."). API Logic Server leverages both of these strengths, including GenAI Logic Automation.
For large, complex systems (e.g., microservices and their logic), GenAI breaks down -- results can be inconsistent, sometimes wrong, occasionally head-scratching hallunications.
Microservice Automation provides the missing pieces: logic, api and app automation engines (analogous to SQL), enabling GenAI to scale up to complex microservice creation, avoiding:
-
Avoids "Franken-response": the last thing you want is for AI to turn your 5 simple rules into 200 lines of code: hard to read, verify correctness, and change. By contrast, creating declarative rules results in logic that is concise, understandable, and provides Maintenance Automation.
-
Avoids the "Franken-prompt": in the absence of automation engines, developers are forced into complex prompt engineering, requiring detailed knowledge of the target code. This defeats the objective of simplicity.
So, Microserve Automation not only leverages the value of GenAI, but enables it to address complex system creation, preserving simplicity.
Doesn't Low Code Make It Fast?
Yes, for retrieval-oriented systems. But, if your system requires update logic, the multi-table derivations and constraints are nearly half the effort -- the iceberg under the surface of the API.
See the screenshot above: Customize the Logic and API. Logic automation means logic is expressed in spreadsheet-like rules, not code. These rules are 40X more concise than code, and are extensible with Python. They are automatically invoked, and are multi-table, multi-field.
So:
-
Logic automation is required to fulfill the promise of fast. Without it, your project will simply not get moving.
-
GenAI simplifies database creation. In the past, Low Code tools have found it challenging to make it easy for users to define foreign keys, indices, etc.
-
Developers will appreciate that API Logic Server is standards-based - use your own IDE, familiar tools such as source control, etc.
Don't frameworks make it easy to create endpoints?
They do. But a microservice is far more than a single endpoint. It's a horse of an entirely different feather, requiring:
-
Filtering, pagination, optimistic locking... for all the tables
-
API design
-
SQLAlchemy models
-
Admin App
-
Update APIs... and their logic
GenAI Microservice Automation does all of this, automatically. It's a complete system, ready to run.
Watch it
Create from GenAI
Create from Existing Database
Web/GenAI - Zero Install
Please see Web/GenAI for more information, including how to access.
In Depth
Simplicity of AI, Speed of Low Code, Flexibility of a Framework, Modern Software Architecture
Instant Microservices, for Integration and App Backends
For Developers and their organizations seeking to increase business agility, API Logic Server provides
-
AI Simplicity: create projects from a Natural Language business oriented prompts, or existing database, in seconds
-
Microservice Automation: create executable projects with 1 command:
- API Automation: crud for each table, with pagination, optimistic locking, filtering and sorting, and
- App Automation: a multi-page, multi-table Admin App.
-
Standards-Based Customization: use standard tools (your IDE, Python, Flask, SQLAlchemy, GitHub and Docker), with API Logic Server support for:
-
Logic Automation: unique rules - 40X more concise multi-table derivations and constraints.
-
Deployment Automation: scripts created to containerize your system, and deploy to Azure.
-
API Logic Server differentiates from traditional approaches:
-
Unlike basic GenAI, API Logic Server creates systems from prompts at the business level, without tedious framework-level AI prompt engineering.
-
Unlike frameworks, API Logic Servers preserves full flexibility and standard Dev Tools, with microservice automation to eliminate weeks-to-months of complex development.
-
Unlike Low Code, API Logic Server provides logic automation, and preserves the framework flexibility.
Enterprise-class Architecture, Standards and Flexibility
API Logic Server creates projects with a modern, service-based architecture. Systems are:
-
API-enabled by default; self-serve means most new requests will not require custom api development
-
Shared logic enforced in the middle tier: unlike manually coded frameworks which may result in non-sharable logic on UI controllers, shared logic enables not only traditional forms, but also services, AI-driven bots, etc.
-
Servers are stateless for scalability
-
Scripts are provided to automate containterization
Developers appreciate a standards-based development approach.
-
Projects are customized using standard IDEs, leveraging code completion for declaring logic.
-
Projects can utilize modern tooling, such as Git for source control, testing tools, etc.
Developers require the flexibility of a framework. In fact,
-
API Logic Server is based on Flask, so you can add new endpoints as required.
-
You have the full power of Python and its many libaries, enabling you to address requirements such as integration (e,g, with message-based integration with systems like Kafka)
Speed of Low Code - including logic
Unlike Low Code systems, API Logic Server:
-
Provides unique Logic Automation: for anything beyond trivial logic, missing backend logic automation means your project will simply not get moving.
-
Automates modern, standard architectures
-
Is IDE based, unlocking a wealth of tooling for customization
-
Automates Instant Admin Apps, eliminating the need to use (and learn) a screen painter, and are executeable instantly
And, for systems requiring highly customized interfaces for Business Intelligence, API Logic Server works with Low Code.
Simplicity of AI
Technology only becomes useful when it's simple enough for teams to be effective. API Logic Server employs AI:
- Use Natural Language to create databases
- Use Natural Language to declare rules
Videos, Tour
API Logic Server is an open source Python project. It is a CLI for project creation, and set of runtimes (SAFRS API, Flask, SQLAlchemy ORM, business logic engine) for project execution.
It runs as a standard pip install, or under Docker. For more on API Logic Server Architecture, see here.
Explore it below.
Video Tutorial (4 min)
Click the image below for a video tutorial, showing complete project creation, execution, customization and debugging. Or, see this article: click here.
Quick Screenshot Tour of using API Logic Server: Create, Run, Customize, Deploy
1. Create: Microservice Automation
Plug into your database, or database model: Microservice Automation means create projects instantly, with a single CLI command:
2. Run: API Automation and App Automation
Microservice Automation creates a project that is executable, with:
The API unblocks UI Developers from waiting on lengthy API development cycles.
The Admin App can be used for instant business user collaboration.
See JSON:API and Admin App
You can run directly (python api_logic_server_run.py
), or open it in your IDE and use the pre-created run configurations:
Unlike frameworks which require significant time and expertise, the create command builds a complete API for your database, with endpoints for each table, including swagger. The Admin App provides a link to the Swagger:
3. Customize: Logic Automation, Python Flexibility
Customize created projects in your IDE, with Python and standard libaries. Significantly, Microservice Automation also includes:
- Logic Automation means you customize logic using Rules and Python in your IDE
Rules are unique and confer significant business agility - 40X more concise than code,
for security and multi-table derivations and constraints.
See Logic With Rules and Python
Rules are 40X more concise than code, and are extensible with Python:
For more on customization, click here.
Customization also provides no-code ad hoc integrations,
and enables Instant Business Relationships.
See Integration: APIs and Messages
The automatically created JSON:API provides no-code ad hoc integrations, enabling organizations to move beyond ETL. For example, other applications might require a customer record, and their addresses. The automatically created self-serve JSON:API requires no code, and reduces future custom API development:
- Create the JSON:API
- Declare security, to control access and row level authorization
Integrate with B2B Partners by creating custom endpoints using Python and Flask, with under 10 lines of code. Instant business relationships. Observe that:
- Update logic is partitioned out of each service - or UI - into shared Logic
- Mapping between SQLAlchemy rows and requests is automated with the RowDictMapper
Integrate internal systems with Kafka, using business logic events:
For more on integration, explore running code in the Application Integration Sample Tutorial.
4. Deploy: Deployment Automation
The system creates scripts to containerize your project, and deploy it to Azure.
See Deployment Automation
The ApiLogicServer create
command builds scripts for containerizing your project, testing it locally, and deploying to Azure:
Key Features
API Features
Feature | Notes |
---|---|
API Automation | Unlike Frameworks, API created automatically |
Logic | Update requests automatically enforce relevant logic |
Security | Role-based result filtering |
Self-Serve JSON:API | UI Developers and Partners don't require API Dev |
Standards-based | JSON:API |
Optimistic Locking | Ensure User-1 does not overwrite changes from User-2 |
Multi-table | Retrieve related data (e.g. customers, with orders) |
Pagination | Performance - deliver large result sets a page at a time |
Filtering | Injection-safe filtering |
Logic Features
Feature | Notes |
---|---|
Conciseness | Rules reduce the backend half your system by 40X |
Automatic Ordering | Simplifies Maintenance |
Automatic Optimization | Reduce SQLs by pruning and adjustment-based aggregates |
Automatic Invocation | Rules called automatically to help ensure quality |
Multi-Field | Formulas and contraints can access parent data, with optional cascade |
Multi-table | Sum / Count Rules can aggregate child data, with optional qualification |
Extensible | Formulas, Constraints and Events can invoke Python |
Debugging | Use IDE Debugger, and logic log to see which rules fire |
Security Features
Feature | Notes |
---|---|
Authentication | Control login access |
Authorization | Row level access based on roles, or user properties |
Authorization | Global filters (e.g, multi-tenant) |
Extensible | Use sql for authentication, or your own provider |
Admin App Features
Feature | Notes |
---|---|
App Automation | Unlike frameworks, Multi-Page App is created automatically |
Multi-Table - Parents | Automatic Joins (e.g., Items show Product Name, not Product Id) |
Multi-Table - Children | Parent pages provide tab sheets for related child data (e,g, Customer / Order List) |
Lookups | E.g., Item Page provides pick-lists for Product |
Cascade Add | E.g., Add Order defaults the Customer Id |
Declarative Hiding | Hide fields based on expression, or insert/update/delete state |
Intelligent Layout | Names and join fields at the start, Ids at the end |
Simple Customization | Simple yaml file (not complex html, framework, JavaScript) |
Images | Show image for fields containing URLs |
Data Types | Define customfields for your data types |
Other Features
Feature | Notes |
---|---|
Microservice Automation | One-command API / App Projects |
Application Integration | Microservice support API Automation, and Kafka Messages |
AI-Driven Automation | Use Copilot to automate database creation |
Multiple Databases | Application Integration |
Deployment Automation | Automated Container Creation, Azure Deployment |
Business Scenarios
Application Integration, B2B
As illustrated below, API Logic Server supports transactions from User Interfaces, and 3 alternatives for Application Integration:
-
Ad Hoc Integration: the automatically created JSON:API provides no-code ad hoc integrations, enabling organizations to move beyond ETL. For example, other applications might require a customer record, and their addresses from an existing database.
-
JSON:API are a standard for self-serve APIs -- where clients can select the columns and the related data they require.
-
Analogous to GraphQL, self-serve APIs reduce the need for ongoing custom API development.
-
-
B2B Partners: you can use Python, Flask and SQLAlchemy to create Custom APIs, e.g. for B2B Partners. These are simplified by automatic reuse of Logic, and Integration Mapping.
-
Messages: Application Integration support also provides automation for producing and consuming Kafka messages. Here's an article: click here. To see these services in a tutorial, click here.
Unblock Client App Dev
Framework-based API development is time-consuming and complex. Since client App Dev depends on APIs, front-end dev is often blocked. This serialized dev process reduces business agility, and increases pressure on the team.
API Logic server can change that.
-
API Automation means client App Dev can start as soon as you have a database
-
Logic Automation means that
- Such logic - a substantial element of the system - is automatically partitioned out of each client into server-based logic. This reduces client coding, and enables the logic to be shared between user interfaces and services.
- Logic development can proceed in parallel with client App Dev
Here's an article, here. Or, the the Tutorial, here.
Instant Microservices with AI-Driven Schema Automation
API and Logic Automation begins with a database. But what if it's a new project, and there is no database.
You can certainly use your SQL tools. But we all know that SQL can be... tiresome.
AI provides a solution: Schema Automation. You can use Copilot to create the SQL DDL like this:
Create database definitions from Copilot
Create a system with customers, orders, items and products.
Include a notes field for orders.
Enforce the Check Credit requirement (do not generate check constraints):
- Customer.balance <= credit_limit
- Customer.balance = Sum(Order.amount_total where date_shipped is null)
- Order.amount_total = Sum(Item.amount)
- Item.amount = quantity * unit_price
- Store the Item.unit_price as a copy from Product.unit_price
Then, employ API Logic Server API and Logic Automation, and use Python and standard frameworks to finish the job.
Here's a tutorial you can to explore this: click here,or see this article.
Back Office - Admin Data Maintenance, Data Correction
Api Logic Server creates an executable multi-table Admin App. Optionally add Logic and Security.
Use this app for:
-
Admin Data Management: for lookup tables, table-driven meta data (e.g., General Ledger allocation definitions), etc. These often fall off the schedule, requiring the use of SQL tools that are hard to use, and don't provide logic or security.
-
Data Correction: the realities of database use can result in invalid data (data loading, poor quality feeds). These often require manual effort with SQL tools to find and correct such data. This requires manual data validation which may be inconsistent. You can provide professional interface, back by logic and security.
For additional Use Cases, click here.
Docs, Install, Eval Guide
To see the docs, click here.