Skip to main content

Overview

Welcome to the Data documentation! This page will give you an initial introduction to the main concepts.

You will learn:

  • What is a FUN
  • What is a Micro Executor
  • The concepts of Tenants, libraries and workspaces

Data protocol - The FUN

Communication between the different Data components takes place via fun. These are text strings following a precise syntax that have all the information that the server needs in order to provide the data. The server components parse and interpret the fun syntax, execute a specific service and in the end return a JSON response. This communication pattern is better known as RPC: Remote Procedure Call.

The syntax of a fun is as follows:

F(data structure;service;service method)  // input parameters

Data Structure

Data structures are fixed and are as follows:

  • SmeupDataTable: representation of a data table
  • SmeupFeedback: representation of a list of output messages
  • SmeupDataTree: representation of a tree structure
  • SmeupSch: representation of a frontend view
  • SmeupLayout: representation of a frontend component layout

Service

The service is the business logic procedure that handles the fun. The procedure is defined in a micro-executor and based on the implementation language, can be a Java Class, a Node.js object, an RPGLE program, a Golang struct or a .NET class.

Service method

To group multiple functionalities in the same service, each service supports multiple methods. Based on the implementation language they are Java class public methods, Node.js functions, RPGLE subroutines, Golang struct methods or .NET class methods.

Parameters

A program written on the server may need to receive input parameters. The parameters that can be passed to the function are six objects and two free parameters.

Objects

n(type; parameter; code)

By n we mean a number from 1 to 6 (so a maximum of 6 objects). For example, if a function needs 2 objects, the first would be: 1(type; parameter; code) and the second would be: 2(type; parameter; code).

Free parameters

P(value)
Input(value)

The Input parameter is the same as the P parameter. Typically, the information written in P and Input is in KEY-VALUE format, in particular KEY(VALUE), to allow for greater comprehension of the data. For example, if you need to send user information, you can use the following syntax:

INPUT(FIRST_NAME(John) LAST_NAME(Doe))

See more details about FUN

Data engine - The Micro Executors

All the business logic of an application using Data is handled by small standalone components called micro-executors.

The micro-executor is a standalone microservice whose task is to interpret and execute programs written in specific languages. Inside a micro executor, the program state and the user session are managed in a stateless way according to cloud native guidelines.

Each micro-executor handles one specific runtime. Supported runtimes are:

  • Java
  • Java/RPGLE
  • Node.js
  • GO
  • .NET

Tenant, Library and Workspace concept

Data is a multi-tenant platform. Tenants are also called environments. A tenant may identify a customer environment or a test environment for an existing customer environment.

A library is a specific folder which contains DSL (Domain Specific Language) files, services and programs written in different languages. Sources are organized in subfolders.

For example, a simple library structure is:

  • JASRC: folder that contains RPGLE services and programs (.rpgle)
  • QILEGEN: folder that contains RPGLE /COPY (.rpgle)
  • SCP_LAY: folder that contains Layout DSL (.lay)
  • SCP_SCH: folder that contains views DSL (.sch)
  • SCP_SET: folder that contains prototypes DSL (.set)
  • SCP_CLO: folder that contains Environment parameters (.clo)

Each library is strongly recommended to be saved on GitHub.

To have a greater developer experience, some environments are configured to support the User Workspace. This is a specific library visible only during the user session, in which the developer can work in complete isolation. Development is done in the dedicated environment directly in remote.