Trillo Logo

Application Development Process using Trillo Workbench - An Overview

3. Developing an Application Using Trillo Workbench

When building a typical application, engineers will use the Trillo Workbench UI, an editor, or an IDE to create the application data model, business logic, workflow, and domain metadata.

Application data model: An application uses multiple databases each with hundreds of tables. Writing programs to create and access database tables is a tedious and time-consuming task. Trillo Workbench simplifies this by using metadata to specify the data model.

Using Trillo Workbench, you will create your database metadata in JSON using either the Workbench UI or your own text editor.

Workbench will use this JSON metadata to transparently create the cloud databases, schemas, tables, column specifications, indexings, etc. It will also create APIs that your application will access to perform database operations.

At runtime, Workbench will manage the database connections, transaction integrity, role-based access control (RBAC), encryption, audit logs, and more.

Business Logic: In Trillo Workbench, you write business logic as modular serverless functions. These serverless functions are similar to Cloud Functions (GCP) or Lambda (AWS) but do not require cloud expertise. Instead, you use Workbench’s API abstraction. Trillo Workbench automatically deploys and publishes each function as an endpoint through its gateway.

It should be noted that serverless functions can also be executed asynchronously as a way of improving performance in some scenarios.

Examples of API functions that can be created with Workbench include:

Workflow: Trillo Workbench makes it a breeze to write simple or complex backend workflows. Workflows are written similarly to the serverless functions mentioned above.

Workflows run asynchronously and the lifecycle of the jobs is fully managed by Trillo Workbench.

Domain Metadata: The domain metadata is useful for writing configurable applications. Engineers specify domain metadata as JSON files using the Workbench UI or an editor. Functions can access this metadata at runtime using APIs. Likewise, Trillo Workbench lets you customize its existing services using metadata (for example Open ID Connect can be configured for Okta authentication using a JSON file).

3.1 Data Service

The following diagram shows how to create custom APIs for database operations.

Data-Service
  1. Engineers enter specification of tables as metadata using a UI.
  2. Metadata is saved in a repository.
  3. Trillo Workbench reads metadata from the repository and creates databases and their tables.
  4. Trillo Workbench publishes DB operations for each table as APIs.

Using Existing Database
Trillo Workbench can connect to an existing database using the JDBC interface. It saves database schemas as metadata. You can augment it to include other meta-info such as role-based access control, encryption, validation, etc.

APIs Using Complex JDBC Queries
In an application it is often required to design an API to retrieve data using complex queries (with joins, grouping, sorting, subqueries, etc.). To publish them as APIs, you would normally write a function. In Trillo Workbench you write queries using curly braces for parameters. Workbench publishes each query as an API.

3.2 Serverless Functions for Business Logic

Using Trillo Workbench, business logic is written using modular functions.

Serverless-Functions-for-Business-Logic
  1. Application logic is written as serverless functions:
    1. Functions can be written in your favorite IDE and executed in debug mode. The IDE will then connect to your Trillo workbench instance in your VPC for API support.
    2. Or, you can edit code using the built-in editor in Trillo Workbench.
  2. Your code is saved in the Workbench repository.
  3. Your code is compiled and deployed dynamically (without CI/CD). (In the production environment, code can be deployed with the Trillo Workbench.)
  4. Trillo Workbench publishes each function as an API endpoint.

3.3 Domain Metadata

An application uses several metadata files for configuration specification such as external APIs, identity providers, data mapping, etc. Trillo Workbench lets you manage them as domain metadata in JSON or XML files. You can use them in code that depends on metadata.

3.4 Serverless Function for Workflows

Trillo Workbench uses functions for the workflow definition. In addition, it provides operator classes for increasing concurrency. Typically, you use operators or other functions for activities (steps of a workflow). A higher-level function can sequence activities as workflows. A function keeps workflow abstraction as simple as any other program. Trillo Workbench manages the workflow lifecycle, maximizes concurrency, and deals with the audit logs. The workflow design is generic, it can be used in API calls to increase concurrency, for example fetching data from more than one external system.

Serverless-Function-for-Workflows

3.5 File Management Services

The File Management Service provides higher-level APIs to manage application files in buckets. The API is a common denominator of several applications built using Trillo Workbench. Trillo Workbench also imposes access control on access and update of files.
These APIs are used by Trillo File Manager (an application product that is provided with Workbench).

File-Management-Services

3.6 Doc Management Service

Trillo Doc Management Service provides intelligent document management using Document AI and Generative AI. Its features include the following components and APIs:

  1. Pre-built workflows to ingest data from multiple source buckets, external content management systems, local files on user computers, etc.
  2. Organizing documents in logical folders and copying them to the cloud bucket if required.
  3. Documents are pre-processed using the following steps:
    1. Extract content using OCR and libraries.
    2. Create preview images of pages.
    3. Extract embedded images.
    4. Extract thumbnails.
  4. Classify documents. (Permits plugging in custom classifiers.)
  5. Extract structured data from documents. (Permits plugging in custom processors.)
  6. Generate embeddings of documents and store them in vector databases. (Permits selection of one of several vector databases).
  7. Semantic and text search.
  8. Summary and QA using LLMs.
Doc-Management-Service

3.8 Task History

The executions of background tasks are recorded in the database.

3.9 Audit Logs

Trillo Workbench logs important events in the database and cloud logs (GCP Stackdriver/ Operation Suite). It includes information such as the operation name (e.g. create, file upload, delete, etc.), user, date-time, short-description, severity, etc.
Using Audit Logs and Task History, you can troubleshoot 95% of issues. Cloud logs are used for the remaining 5%.

3.10 External Systems and API Credentials

A function can invoke restful APIs using Trillo Workbench. The restful APIs use OAuth2 protocol for authorization. Trillo Workbench lets you enter credentials using the UI. (All credentials are encrypted and stored securely).

3.11 External Identity Integration

In addition to integrating with external systems, a new application can also use enterprise identity systems such as LDAP, Active Directory, or 3rd party services such as Google Cloud Identity, Okta, One Login, etc. Trillo Workbench provides integration with external authentication services using OIDC protocol. All you need to do is enter external system integration specifications – endpoints and credentials. (Trillo Workbench can also support integration with legacy authentication systems using SAML).

3.12 Settings

Settings are meta information used within an application. These are divided into the following categories.

  1. Properties (or key-value pairs): Keys used in a program are replaced by values at runtime.
  2. API Credentials – discussed in 3.10 above.
  3. Service Authorization – discussed in section 3.11. Service Authorization is generic since it is also used for API integration in addition to identity. (for example, Salesforce API uses OAuth2 authorization).
  4. Public Key – This is used for services that use SSH protocol for authorization such as SFTP or “rsh”.

3.13 User Management Application

User Management Application is a full application including user interface. It is required to store user records (actual or proxy in case of an external identity integration). Other optional uses are:

  1. Use it in a new application. You can customize it (UI source code is provided).
  2. Use it during development.

3.14 Approximately 90% Feature Coverage

In our experience, Trillo Workbench covers approximately 90% of the core platform. You can focus on domain-specific parts.

Trillo Workbench implementation itself is a meta-architecture (meta meta-model), therefore adding 10% core is easy as well. You can do it yourself or ask Trillo.

What’s Next?