manual manual

Support the Lua community:
Buy Programming in Lua and reference manual at Amazon

Lua Server Pages

We are pleased to announce a new version of BarracudaDrive with our new LSP plugin. The Lua Server Pages (LSP) plugin makes it possible to extend BarracudaDrive and write customized web applications.

LSP example: A basic web counter

<html> <!-- A basic LSP hit counter --> <body> <?lsp page.count = (page.count or 0) + 1 ?> <h1>You are visitor <?lsp=page.count?></h1> </body> </html>

Compare the LSP example to this PHP example.

Which one is easier?

You will find learning LSP easy if you have experience with a scripting language such as PHP, ASP, etc.. We use Lua as the scripting engine, and learning Lua is a breeze if you have prior experience with any scripting language. The WEB server API available to LSP applications is similar to APIs in enterprise servers, and you can, therefore, use your existing knowledge when designing LSP applications.

The benefits of LSP:

The Barracuda LSP plugin makes it possible to handle multiple concurrent requests. Multiple requests are typically not possible in standard scripting servers as most scripting languages are not concurrent. The LSP plugin uses a combination of Lua Coroutines and Barracuda threads making it possible to have a database driven server application with multiple concurrent requests.

The Barracuda Embedded Web Server is different from most web servers as it is designed to be embedded into existing computer programs. BarracudaDrive is our free pre-assembled web server and is bundled with many exciting plugins. Please see the BarracudaDrive start page for more information on the other BarracudaDrive plugins.

Getting started

Download BarracudaDrive and follow the installation wizard. The installation wizard will show you how to download the LSP documentation, the Interactive Lua tutorial, and the LSP tutorials. The LSP documentation and tutorials are packaged as a LSP ZIP file. The compressed LSP application is installed by simply dropping the tutorial into the BarracudaDrive application container.

You can also read our online version of the LSP reference manual.

About BarracudaDrive

As mentioned above, BarracudaDrive is an application we have assembled by using the Barracuda Embedded Web Server toolkit. BarracudaDrive was initially designed to be a demo for a whitepaper; however, it has over time evolved into a useful application. The introduction of LSP in BarracudaDrive will dramatically increase its functionality. We will continue to provide a free community version of the LSP plugin and make it available in BarracudaDrive, which is free for non commercial use.

BarracudaDrive is integrated with a basic WEB 1 and WEB 2 user interface for controlling the Web File Manager, WebDAV, and the HTTPS tunnel. The interface cannot be altered by you. However, we appreciate suggestions for how we could improve it. We have already planned radical changes to this hard wired user interface.

Please register with the BarracudaDrive user forum if you would like to be involved in developing applications with our new LSP plugin.