An Introduction to Lianja Cloud Server |
![]() |
![]() |
![]() |
The Lianja Cloud Server is a modern, fast, and flexible cross-platform cloud database Apps Server that enables you to share Apps and Data in the Cloud or on premises running on either Linux or Windows. 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. This article and further information on the Lianja Cloud Server can now be found on the Lianja wiki here. IntroductionThe "Lianja Apps Platform" abbreviated to "Lianja APaaS" consists of the following products which can be bought individually or altogether as a "Lianja APaaS subscription". The Lianja APaaS consists of: Lianja Cloud Server at a glanceThe Lianja Cloud Server provides a variety of features that are grouped by functionality. App Deployment ServicesData ServicesDynamic Page ServicesSo let's take a look at these services one by one and see what they offer. If you want to skip all this read the FAQ. App Deployment ServicesLianja HTML5 JavaScript Web ClientThe 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 browser. It uses best of breed technologies to provide a rich and responsive user experience. Lianja HTML5 JavaScript Mobile ClientThe Lianja Mobile Client is a pure HTML5 JavaScript client that runs Apps developed in the Lianja App Builder using best practices on mobile devices. The Lianja Mobile Client is implemented as a responsive UI and will automatically adjust its appearance on iPhone, iPad, Android Phones and Android Tablets. It incorporates the PhoneGap JavaScript APIs and can be packaged up as a self contained App using the Adobe PhoneGap Build Service that can be submitted to the Apple App Store or Google Play. Data ServicesLianja ODBC data accessOpen 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 SQL Server, third party ODBC-aware products have full CRUD (Create, Read, Update, and Delete) access to Lianja data no matter where it resides. Lianja OData serviceOData 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. Lianja WebSockets ServiceWebSockets is an advanced technology that makes it possible to open an interactive communication session between the user's browser and a server. With this API, you can send messages to a server and receive event-driven responses without having to poll the server for a reply. The Lianja Cloud Server has built-in support for writing WebSocket servers in both Visual FoxPro compatible scripting or JavaScript on all supported platforms. Dynamic Page ServicesDynamic 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 Visual FoxPro Server PagesLianja Cloud Server has built-in support for Visual FoxPro Server Pages. Visual FoxPro Server pages (.rsp pages) have the Lianja database and scripting engine embedded in them. You can write and test Visual FoxPro Server Pages in the Lianja App Builder and "Publish to the Cloud website" to deploy them. In addition to the built-in commands and functions supported the Lianja/SDK C/C++ API provides the ability to write custom functions and classes in C/C++ to extend the functionality already offered. This is similar to but much simpler than using the PHP Extensions API to extend PHP. Page processing directives:
When a Visual FoxPro Server Page is executed the following are available to the script (in addition to the complete VFP compatible cross-platform scripting language implemented in Lianja). Global associative arrays:
Global objects:
Built-in commands/functions:
You can view an example Visual FoxPro Server Page on the documentation wiki. JavaScript Server PagesLianja Cloud Server has built-in support for JavaScript Server Pages. JavaScript Server Pages (.jssp pages) are modeled on PHP Server Pages. They embed the V8 JavaScript engine which is used by Google Chrome and Node.js. The JavaScript engine implements ECMAScript as specified in ECMA-262, 5th edition. Lianja JavaScript Server Pages provide the ability to write both the client and the server code in JavaScript. You can use them in place of PHP server pages. If you know JavaScript and HTML these are for you. You are not required to learn any new programming language in order to build custom Web and Mobile Apps. JavaScript Server Pages have embedded Lianja database and OData support and they are fast as the whole engine is written in C/C++, no Java or other dependencies required. Additionally they support "one-time" loading of JavaScript libraries to enable team sharing of code libraries and open source JavaScript libraries using the built-in include_once("library_name.js") and the require("module_name") function. They also provide a lot of functionality that will be familiar to PHP developers (details below). You can write and test JavaScript Server Pages in the Lianja App Builder and "Publish to the Cloud website" to deploy them. Page processing directives:
When a JavaScript Server Page is executed the following are available to the script (in addition to the built-in ECMAScript JavaScript functions). These should be familiar to PHP Web developers as they use the same naming convention. Global associative arrays(objects):
Global objects:
Built-in functions:
You can view an example JavaScript Server Page on the documentation wiki. FAQCan I use Lianja Cloud Server with my existing Web Servers?Yes. Lianja Cloud Server can operate standalone and works as a traditional Web Server "out-of-the-box" but it also includes an Apache plugin mod_lianja for Linux and an ISAPI filter for IIS on Windows. What about security, can I restrict what services are available from the internet?Yes. Lianja Cloud Server can be configured to enable or disable OData Read/Update requests as well as WebSocket Services. You can also configure a whitelist and blacklist for IP addresses. Does Lianja Cloud Server support https and SSL certificates?Yes. To use https you need to install the apache plugin mod_lianja on Linux or the ISAPI filter isapi_lianja on Microsoft Windows. Do Visual FoxPro Server Pages only work on Windows?No they run on Windows and Linux (both x86 and x86_64) and use the Lianja database and scripting engine that is embedded in the Lianja App Builder. What JavaScript engine is Lianja Cloud Server using and is this cross-platform?JavaScript Server Pages (.jssp pages) is a page processing service modeled on PHP server pages. The Lianja Cloud Server has the V8 JavaScript engine embedded into it with many built-in objects and functions as well as the Lianja database engine embedded within it. The V8 JavaScript engine is the same engine used in Node.js but we have ported it to Windows, Linux and Mac and integrated it in so it operates seamlessly as part of Lianja Cloud Server. What would you recommend me to write my server pages in, Visual FoxPro or JavaScript?You can write them in whatever you feel comfortable with and have knowledge of. This reduces the learning curve for building polished custom Web Applications. Both types of server pages are data-centric. You can call Visual FoxPro code directly from JavaScript Server Pages using Lianja.execute() and Lianja.evaluate() which are described above in this article. Why do I need to write server pages, I thought the Lianja App Builder would generate Web Apps and Mobile Apps?The Lianja HTML5-JavaScript Web Client and the Lianja HTML5-JavaScript Mobile Client will run Apps developed in the Lianja App Builder if you have followed best practices and developed your App the way we have recommended using standard pre-built sections and gadgets. Many Apps can be built like this and will run without changes in the Web Client and Mobile Client. How scalable is the Lianja Cloud Server?Highly! You can load balance web connections across multiple App Servers. There is no practical limit to the number of connections that can be made and it is extremely fast. Can I have a mixture of clients accessing and updating data concurrently e.g. desktop apps, web apps, mobile apps?Yes, the underlying database and scripting engine is embedded in all of the Lianja products; Lianja App Center, Lianja SQL Server and Lianja Cloud Server. If I wanted to develop a custom mobile app in a non-Lianja product that performs CRUD operations on my Lianja data how would I do that?Mobile apps typically use OData calls to perform CRUD operations on a remote server data source. You would use the OData Service built into the Lianja Cloud Server to achieve this. The OData Service generates JSON and handles CRUD operations using JSON formatted data. We recommend jQuery, jQuery Mobile and Twitter Boostrap which we in fact use ourselves. Does the Lianja OData Service handle JSONP so I can get around SOP (Same-Origin Policy) issues?Yes. See the article on using OData with Lianja, the $callback=myfunction argument will wrap the JSON data that it returns by a function call. Typically HTTP requests are stateless how can I maintain state between requests?You can use the _SESSION[] or $_SESSION[] associative array which persists between HTTP requests. Can I retrieve photos and other images in the Lianja database and display them in a web page?Yes, both Visual FoxPro Server Pages (.rsp pages) and JavaScript Server pages (.jssp pages) have a built-in function that will generate an HTML img tag which contains the image. This function is called base64_encode_image() and is described above in this article. How do I store the photos or other images?You use the objectRead() built-in function in conjunction with the _FILES[] or $_FILES[] associative array as described above in this article. Both Visual FoxPro Server Pages and JavaScript Server Pages handle multiple file uploads using HTTP POST and setup the _FILES[] or $_FILES[] array which is described above in this article. You can store the photo directly in a Lianja database table using objectRead($_FILES[0].tmp_nam, object_field_name ) in JavaScript or objectRead(_FILES[0].tmp_nam, object_field_name) in Visual FoxPro scripting. I need to store a large amount of photos can Lianja Cloud Server handle that?Yes, the Lianja database engine is 64-bit on all supported platforms (including 32 bit ones). It supports huge table sizes up to 2^64. Thats big! I need to handle 10s of thousands of users, can Lianja Cloud Server be clustered?Yes, on Linux you can setup Lianja Cloud Server in an Enterprise-class HA (High Availability) cluster consisting of 2 x load balancers, multiple App Servers and 2 x Data Servers with automatic failover and fallback. It can also handle real-time geographic off-site data replication. If you need help with this contact us as we have significant expertise in this area. In a nutshell, what makes Lianja Cloud Server so much better than other solutions?It is completely cross-platform (not just Windows, Linux x86 and x86_64 too), has a highly scalable embedded 64-bit database, has a small memory footprint and is a part of the Lianja APaaS so you have a single vendor providing support and updates. It is currently the only cross-platform solution for data-centric Visual FoxPro and JavaScript Server Pages. If I purchase Lianja Cloud Server do I need to also purchase Lianja SQL Server?No. Lianja Cloud Server includes Lianja SQL Server. When will the Lianja Cloud Server be available?The Lianja Cloud Server has already been released. As additional functionality is added and enhanced customers who purchase the Lianja APaaS subscription will receive these updates at no additional cost. How much does Lianja Cloud Server cost?Lianja Cloud Server pricing information can be found here. We are a software development shop. What does ISV (Independent Software Vendor) pricing look like?Lianja ISV pricing and qualification requirements can be found here. Do you have any further questions?If you have any questions not covered on this FAQ then contact us and ask us, we will be pleased to help you.
|