Lianja Cloud Server

From Lianjapedia
Jump to: navigation, search

The Lianja Cloud Server is a modern, fast, and flexible cross-platform cloud database Application Server that enables you to share Apps and Data in the Cloud or on premises running on either Linux, Windows or MacOS. Lianja Cloud Server provides an enterprise-class solution for both SMEs and large enterprises.

This article provides a functional overview of the Lianja Cloud Server.

Introduction

The Lianja Cloud Server provides a wide range of features.

Key features:

  • Provides secure Web and Mobile App deployment of Apps developed using the Lianja App Builder.
  • Once published, Lianja Cloud Apps can be run in any modern web browser; desktop or mobile.
  • Available as a docker image.
  • Can be load balanced across multiple server instances.
  • Can be installed and managed in an existing IT infrastructure; Includes ISAPI extension for IIS on Windows and Apache plugin for Linux supporting connection pooling.
  • Includes embedded Lianja SQL Server.
  • Access the native (embedded) Lianja database or any third party database using Virtual Tables.
  • Built-in authentication with (optional) 2FA support.
  • Integral support for the Lianja App Center.
  • User roles and permissions handled automatically depending on the authenticated user; Control who can run specific Apps and what functionality and data is available to them.
  • Can be configured with real-time data replication and automatic failover on server failure (Linux servers only).
  • Automatic browser client detection with UI personalities (Desktop and Mobile browsers).
  • High performance and scaleable architecture using best of breed technologies.
  • Fully open architecture with connectors for; OData (http), Node.js, Python, .NET and ODBC client applications.
  • Lianja Hosted Cloud Server Edition (Amazon AWS).

See Lianja Cloud Server FAQ for further details.

Authentication Services

The Cloud Server has built-in support for authenticating users.

When logging into the Lianja App Center, once authenticated only those Apps has permission to run on displayed in the App Center.

Once authenticated and running an App by clicking on a tile in the App Center, the operations that can be performed by the authenticated user are restricted by roles and permissions. Additionally Row Level Security controls what ecords the user can see.

You can also use the Node.js module, the Python module or the .NET assembly to authenticate and perform CRUD operations on your data.

App Deployment Services

The Lianja Web Client is a pure HTML5 JavaScript client that runs Apps developed in the Lianja App Builder using best practices in any HTML5 compatible desktop or mobile browser. It uses best of breed technologies to provide a rich and responsive user experience.

You visually build Apps using the Lianja App Builder and deploy them to your Lianja Cloud Server as packages.

Progressive Web Apps (PWA) are web apps that use emerging web browser APIs and features along with the traditional progressive enhancement strategy to bring a native app-like user experience to cross-platform web applications.

See Progressive Web Apps for details.

Cloud Data Services

Lianja ODBC data access

Open Database Connectivity (ODBC) is an industry standard interface for accessing data in a heterogeneous environment of relational and non- relational database management systems. Based on the Call Level Interface specification of the SQL Access Group, ODBC provides an open, vendor- neutral way of accessing data. Using the Lianja ODBC Driver in conjunction with the Lianja Cloud Server, third party ODBC-aware products have full CRUD (Create, Read, Update, and Delete) access to Lianja data (Local and Remote) no matter where it resides.

Lianja OData Server

OData is a standardized protocol for creating and consuming data APIs. OData builds on core protocols like HTTP and commonly accepted methodologies like REST. The result is a uniform way to expose full-featured data APIs. The Lianja Cloud Server has built-in support for OData. There is no need to write any custom code to use this functionality, you just point at an OData URI and the Cloud Server will perform the requested OData operation returning data in industry standard JSON format. See this article for details.

Working with JSON and JQL

JQL leverages the complete flexibility of JSON with the full power of SQL. Created specifically for use with Web and Mobile applications, JQL provides a common query language and JSON-based data model that operates independently from the underlying SQL database.

JQL is based on standard SQL. It has familiar data definition language (DDL), data manipulation language (DML), and query language statements.

The JQL DDL extends SQL with support for a native JSON data type.

The JQL DML provides transparent access to the (possibly nested) members of JSON data columns. You do not need to use any special functions or operators to reference JSON encoded object members as this is handled natively by the JQL engine.

See Working with JSON and JQL for details.

Node.js Module

Lianja Cloud Server includes a Node.js module lianjaclouddataservices enabling Node.js applications to connect to a local or remote Lianja Cloud Server and perform a variety of operations.

See Using the lianjaclouddataservices Node.js Module for details.

Python Module

Lianja Cloud Server includes a Python module lianjaclouddataservices enabling Python applications to connect to a local or remote Lianja Cloud Server and perform a variety of operations.

See Using the lianjaclouddataservices Python Module for details.

.NET Assembly

Lianja Cloud Server includes a .NET Assembly lianjaclouddataservices enabling .NET applications to connect to a local or remote Lianja Cloud Server and perform a variety of operations.

See Using the lianjaclouddataservices .NET Assembly for details.

Dynamic Page Services

Dynamic pages contain HTML and page processing directives in the same way as a PHP page does. You use page processing directives to generate HTML code dynamically. Page processing directives are typically enclosed in <% and %> in both Visual FoxPro Server Pages (.rsp files), LianjaScript Server Pages (.jssp files) and Python Server Pages (.pysp files).

Visual FoxPro Server Pages (.rsp files)

JavaScript Server Pages (.jssp files)

Python Server Pages (.pysp files)

Server side procedures

You can integrate with business logic on the server by calling server side procedures from the Web/Mobile client.

Remember that when invoking server side procedures in the web/mobile client, the server knows nothing about the UI or the data state: it is "stateless". What this means is that any required UI information should be passed as arguments to the server side procedure and that the procedure should open the database and tables that it needs. When testing on the desktop, the situation is different as the desktop App is stateful: it has access to the UI, the database is open and the tables may be in an active state.

So, as a best practice you should write any server side procedures that work with data to include not isserver() conditional code with push and pop datasession.

e.g. (LianjaScript example)

proc getBalance(database, table, args)
   local result  = 0
   if not isServer()
       push datasession
   endif
   open database &database
   use &table   
   // Insert your code here to do what you need to do
   use
   close database
   if not isServer()
         pop datasession
   endif
   return result
endproc

The following methods can be used to call server side procedures that are written in LianjaScript, Python or JavaScript.

exports.conf

A function can be called directly if it is declared in exports.conf in your App.

var result = myfunc();

See also: Server Side Procedures - Parameter Passing Examples

Lianja.evaluate()

The Lianja.evaluate() method can be used to call a LianjaScript function/procedure.

var result = Lianja.evaluate("myproc()");

To call a procedure in a library, prefix the procedure name with the library name and '::'. The library will be loaded only once on the server.

var result = Lianja.evaluate("mylib::mylibproc()");

See also: Server Side Procedures - Parameter Passing Examples

Lianja.evaluateJavascript()

The Lianja.evaluateJavascript() method can be used to call a JavaScript function.

var result = Lianja.evaluateJavascript("myfunc()");

The file 'myfunc.js' should be in the app or library directory and contain a function with the same name as the file. If the 'myfunc.js' file does not exist in the app or library directory and the file 'server_functions.js' exists then the function 'myfunc' is assumed to be defined in the 'server_functions.js' file.

To call a function in a library, prefix the function name with the library name and '::'. The library will be loaded only once on the server.

var result = Lianja.evaluateJavascript("myjslib::mylibfunc()");

An alternative syntax using the Lianja.evaluate() method is also available:

var result = Lianja.evaluate("javascript:myfunc()");
var result = Lianja.evaluate("javascript:myjslib::mylibfunc()");

Lianja.evaluatePython()

The Lianja.evaluatePython() method can be used to call a Python function.

var result = Lianja.evaluatePython("myfunc()");

The file 'myfunc.py' should be in the app or library directory and contain a function with the same name as the file. If the 'myfunc.py' file does not exist in the app or library directory and the file 'server_functions.py' exists then the function 'myfunc' is assumed to be defined in the 'server_functions.py' file.

To call a function in a library, prefix the function name with the library name and '::'. The library will be loaded only once on the server.

var result = Lianja.evaluatePython("mypylib::mylibfunc()");

An alternative syntax using the Lianja.evaluate() method is also available:

var result = Lianja.evaluate("python:myfunc()");
var result = Lianja.evaluate("python:mypylib::mylibfunc()");

Subcategories

This category has only the following subcategory.