Mako Server

Mako Server

As a compact application and web server, the Mako Server helps developers rapidly design server side web applications. The Mako Server provides a barebone web application server environment from which developers can design and implement complete, custom solutions.

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?

  • Small
  • 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.

Benefits:

  • 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

Why Lua?

  • Small
  • Fast
  • Easy to learn
  • Powerful

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 Logo

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 Mako Server consists of one executable file that includes all of the following four components:
  1. The Mako Server startup code
  2. The Barracuda Embedded Application Server library
  3. The SQLite database
  4. Lua Server Pages which enable Lua script code to access lower level C functionality

Figure 1: Mako Server running 3 Lua web applications

Mako Server Block Diagram

The Barracuda Embedded Application Server library includes the following components:

Makos Server loading external DLLs

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.

Getting Started

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
Benchmarking Apache and Mako Server

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.

License

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. It is your responsibility to make sure you comply with our two license agreements.

The Mako Server is primarily designed for hobbyists, for small companies, and for educational institutions and purposes. Larger companies should use the Barracuda Embedded Application Server source code library.

We offer two types of Mako Server licenses -- one for non-commercial (including educational) use and one for commercial use. The Mako Server is free of charge for non-commercial or educational use.

Links to the License Agreements and Pricing are: