As a compact application and web server, the Mako Server helps developers rapidly design IoT and web applications. The Mako Server provides a barebone application server environment from which developers can design and implement complete, custom solutions.
The Mako Server provides a framework for designing a vast range of server side web applications, everything from the very simple to the very advanced. The Mako Server is an application server where the server side code (aka business logic) is designed using the Lua scripting language, and unlike most other web application frameworks, the application server framework in the Mako server is an integral part of the server. The Mako Server has been designed and optimized as a fast and compact web application server suitable for small CPU-constrained systems.
The Mako Server can be used as the basis for a wide variety of web based applications, ranging from standard database driven business applications to custom hardware and IoT device management applications. The Mako Server is available for many platforms, including Windows and embedded Linux platforms such as the Raspberry Pi.
The Mako Server helps you create modern and innovative web based applications with an all-in-one-everything-you-need web development environment.
The Mako Server and the Lua/LSP tutorials are optionally available as a Docker image. Docker is available for Windows, Mac, and Linux.
After installing Docker, run the following command in a console window:
After running the command, use your browser and navigate to http://localhost.
To restart the tutorials, run the following command:
A demo server running the tutorials is also available online. You may use the online tutorials by navigating to http://lua-tutorial.tk.
The Mako Server includes an integrated secure Internet Of Things (IoT) protocol. The following video shows how a device can be controlled from a web browser in real time. The Mako Server acts as a broker for the communication between the browser and the device.
|How to setup your own secure IoT cloud server||ESP8266 Arduino WiFi IoT Device to Cloud Setup|
The Lua scripting language has many benefits and is easy to learn. You can read up on the basics of Lua in one day and you can start making LSP applications within a couple of days. You will have to learn the Lua scripting language and server side web development if you plan on writing your own Mako Server applications, although you do not have to write any low level C or C++ code. However, developers that have C/C++ experience can optionally extend the server with new functionality by loading additional C libraries at runtime.
Lua Server Pages
Lua Server Pages (LSP) are based on the Lua scripting language and make developing web applications extremely fast, simple, safe, and fun. Notably, LSP isn't limited to the development of web applications, but can also be used to provide high-level socket APIs that make developing secure socket applications very easy. Getting started with LSP is especially easy if you have prior experience with similar application server scripting technologies (such as PHP or ASP).
Hello World LSP Example
<?lsp local message="Hello World" ?> <html> <body> <h1><?lsp=message?></h1> </body> </html>
The Barracuda Embedded Application Server library includes the following components:
The above components and their API's are accessible to Lua scripts executing in the Lua virtual machine. In addition to the API provided by the Mako Server, developers with C or C++ experience can take advantage of the Lua module interface and write modules in C or C++ that are dynamically loaded by the server at runtime. In other words, one can extend the server's Lua bindings (Lua to C/C++ API) by dynamically loading shared libraries (DLLs on Windows). An example of such a dynamically loaded library could be to provide Lua bindings (interface) directly to the hardware in order to provide a custom solution for a particular hardware platform.
The Getting Started guide explains how to fast track your Mako Server and Lua Server Pages development.
The Mako Server is extremely fast at dynamic content generation. We compared the Mako Server delivering dynamically generated Lua Server Pages to the Apache Server delivering static content. We were able to generate dynamic content much faster than Apache could deliver static content.
Two minute speed test on a generation 1 Raspberry Pi (700MHz ARMv6):
The benchmarking should have been performed with other dynamic content frameworks such as PHP, but we were unable to find any reliable benchmarking data. In any event, PHP is slower than static content when run in an Apache server.
The benchmarking was performed with FuguHub, which is another Barracuda Application Server derivative product. The Mako Server and FuguHub will provide the same benchmarking results since they are derived from the same product.
See the FuguHub benchmarking results for details.
Note: the Mako Server does not include any type of license management, but a license is required if the product is used for commercial use.
The Mako Server is free of charge for non-commercial or educational use.