Mako Server Logo

Get ready to supercharge your device with the Mako Server! This tiny, ready-to-run application server packs a punch with its super compact and efficient Lua web framework and its non-blocking asynchronous sockets. Plus, it comes with everything you need built-in, including an integrated database, SMTP, HTTP client/server, and even IoT protocols like MQTT and industrial protocols like OPC-UA and Modbus.

Lua Programming Language

Lua + Batteries = Mako Server

Why Lua?

  • Small
  • Fast
  • Easy to learn
  • Powerful

Experience the power and versatility of Lua with the Mako Server! This lightweight programming language supports a variety of programming paradigms and is easy to learn with the Mako Server's step-by-step interactive examples. But the Mako Server doesn't stop there – it also extends Lua by providing features like Lua Server Pages, asynchronous sockets, and WebSockets. With so much to offer, the Mako Server is the ultimate tool for mastering Lua and taking your programming skills to the next level.

Lua Logo

Lua Server Pages

Discover the power and simplicity of Lua Server Pages (LSP) for both web & IoT development! LSP is built on the reliable and efficient Lua programming language, making it a breeze to create dynamic web applications. Plus, LSP's high-level socket APIs make it a snap to develop secure asynchronous, non-blocking socket applications. You'll have a fast, safe, and enjoyable development experience with LSP. And if you have previous experience with technologies like PHP, you'll find it easy to get up and running with LSP quickly!

The Number of the Day Example

<html> <body> <h1> The Number of the Day is <?lsp=ba.rnd(1, 10)?> </h1> </body> </html>

Getting Started

  1. New to Lua? Explore the online Lua tutorials if you're new to Lua programming. These interactive tutorials, which you can also run on your computer, are a great way to get comfortable with the language.
  2. Download Binaries or Compile the Mako Server: Depending on your platform (Windows, Linux, etc.), you may download a pre-compiled Mako Server. If a specific version is required or you have special needs, you can also (cross) compile the C code. See Download Mako Server for details.
  3. Install the Mako Server: After downloading, simply unpack and run the server from the command line; no installation is required. For Linux, you may deploy the server as a daemon, and for Windows as a service.
  4. Learn Command Line Basics: If you need to become more familiar with command-line interfaces, it's a good idea to go through a basic tutorial. The Getting Started with the Mako Server guide provides a good introduction for beginners.
  5. Explore Additional Resources: For more in-depth learning, delve into the extensive list of written tutorials provided. These cover many topics, from Lua development to hosting IoT servers.

Mako Server vs. other Lua Frameworks

Looking for a lightweight, efficient Lua web framework that won't slow you down? The Mako Server has you covered! Unlike other frameworks that require a complex setup and can be big and bulky, the Mako Server is based on the super fast and resource-friendly Barracuda App Server Library.

Not only that, but all the documentation you need is easily accessible online, including specifics on the Mako Server's features. So why waste time with slow, clunky frameworks? Choose the Mako Server and enjoy the lightning-fast performance and easy setup.

Mako Server Powered Dashboard App

The Mako Server is ideal for powering any dashboard app. Learn How to Build Dashboard Apps using the Mako Server.

Dashboard App

Hosting Online Web Sites with the Mako Server

Although the Mako Server is great for small embedded (Linux) devices, the Mako Server is also a great fit for hosting online websites cheaply. With Mako Server, you can host anything from static HTML files to advanced server-side and database-driven websites.

Pub/Sub Protocol

Experience the power of the Mako Server's highly efficient SMQ publish/subscribe protocol for chats, IoT, and multiplayer gaming infrastructure. The SMQ broker, an integral part of the Mako Server, can easily be extended through its public server API, allowing seamless integration with your own messaging infrastructure and Lua server logic as well as database services.

The SMQ protocol enables clustering and scaling. See the SMQ cluster demo for more information. SMQ includes ready-to-use stacks for Java/Android, JavaScript, and C/C++.

Internet Of Things (IoT) Server

The Mako Server's included SMQ protocol is ideal for IoT. See the IoT page for more information on the SMQ protocol.


Includes Easy to Use Lua Debugger

The Mako Server includes a Lua debugger, making it easy to step through Lua code, set breakpoints, and inspect/modify variables.

Lua Debugger Screenshot


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 could generate dynamic content much faster than Apache could deliver static content.

Two-minute speed test on a generation 1 Raspberry Pi (700MHz ARMv6):

  • 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 could not find reliable benchmarking data. In any event, PHP is slower than static content when run on an Apache server.

License and Internals

The Internals

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 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

Mako Server vs. Barracuda App Server

The Barracuda App Server (BAS) is the foundational layer upon which the Mako Server is built. Unlike a standalone product, BAS is a C source code library providing core functionalities. In simpler terms, think of BAS as the raw materials and Mako Server as the finished product. Just as you can't use the ANSI C library without writing at least a "Hello World" program, BAS also requires a framework to become operational. The Mako Server fills this role as the "Hello World" equivalent for high-level operating systems (HLOS). It integrates BAS, the SQLite database, and additional features to create a fully configurable application server product. Industrial companies widely use BAS to web-enable equipment and connect them to various cloud services. If you're interested in diving deeper into how BAS compares with other technologies, you may also be interested in our Barracuda App Server and Node.JS comparison.

The Barracuda App Server library scales from microcontrollers to cloud server use:

The Barracuda App Server's unique design enables the server to scale from running on microcontrollers to running on online cloud servers, managing several hundred thousand connections. The image below is a clip from a Barracuda App Server microcontroller video. The Barracuda App Server runs on the microcontroller to the right of the servo. Check out the Xedge32 ESP32 Lua IDE if you are interested in learning how to design your own IoT applications using the Barracuda App Server and Lua. Check out the tutorial Embedded Linux Web Interface Design if you are using embedded Linux.

ESP32 with Lua FreeRTOS WebSockets

License

  • Source code:
    A Barracuda App Server/Mako Server open source GPL C source code version is available on GitHub.
  • Binaries:
    The pre-compiled Mako Server is a commercial product but is free for small companies and non-commercial use.

See Real Time Logic's license page for details.