Made to help you easily design web applications
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 device management applications. The Mako Server is delivered as one binary executable file and 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.
Why Mako Server?
- Extremely Fast
- Rich Developer API
- Easy Deployment
New to Application Servers?
Embedded.com features two articles on how to get on the Internet of Things fast with a web application server.
- Easy installation/deployment of server (one small executable file)
- Easy deployment of web applications which can be packaged as ZIP files
- Super fast and small (great for resource constrained devices such as the Raspberry Pi)
- Integrated database (no database connector configuration necessary)
- HTML5 and WebSocket ready
- Easy to use server side Lua API
- Easily write advanced server side logic in the Lua scripting language and optionally write using C/C++
- Server side Lua API can easily be extended for management of custom solutions (such as custom hardware)
- Virtualized file system makes the mapping of URL's to database queries and other non physical resources very easy
- Advanced security and authorization logic makes writing secure apps a breeze
- Includes a scripting language that is easy to learn for beginners and, at the same time, enables hard core programmers to design advanced server side web applications
The Lua Scripting Language
- Easy to learn
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.
The Mako Server consists of one executable file that includes all of the following four components:
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" ?>
- The Mako Server startup code
- The Barracuda Embedded Application Server library
- The SQLite database
- Lua Server Pages which enable Lua script code to access lower level C functionality
Figure 1: Mako Server running 3 Lua web applications
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.
Mako Server Benchmarking -- Speed Test
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 Raspberry Pi:
- Apache: 26,624 static files
- Mako Server: 45,577 dynamic pages
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 BarracudaDrive, which is another Barracuda Application Server derivative product. The Mako Server and BarracudaDrive will provide the same benchmarking results since they are derived from the same product.
See the BarracudaDrive 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.