|
|
Lua Server Pages
(For Developers)
- Powerful server side scripting language
Lua Server Pages, LSP for short, is a blinding fast general-purpose scripting language that is well suited for Web development and can be embedded into HTML. LSP supports the latest Web development techniques such as WEB 2.0 applications, Ajax, and Web-Services.
- Extremely fast
LSP is powered by the powerful, light weight programming language Lua and is comparable to the speed of a compiled language such as C++. As an example, a XML parser designed in Lua is just as fast as a XML compiler designed in C code.
|
|
- Web Services and LSP
Designing Web Services in LSP is simple. You declare your Lua functions as web-services, which instantly makes these functions available to a client Bindows application. The Bindows JavaScript application calls the server side functions as if the functions were local JavaScript functions in the client.
Benefits of LSP
- Fast: Lua is one of the fastest scripting languages.
- Small: Lua is one of the smallest scripting languages, making it ideal for systems with limited resources.
- Easy deployment: LSP applications are simple ZIP files and, consequently, very easy to install.
- Concurrency: LSP makes it possible to handle multiple concurrent requests.
- Extensible: Lua is extensible and powerful. It is possible to migrate 90% of a C/C++ application to Lua, including but not limited to web-applications.
- Security: The LSP plugin and the Barracuda Web Server come with many advanced security features, making it easy to enable security in any application.
- Web 2.0: The integrated Web 2.0 Bindows SDK and the built in web-services support makes it very easy to design advanced Web 2.0 applications.
- Compiler: LSP can be compiled so that LSP source code does not have to be distributed.
The initial load time for WEB 2.0 applications can be slow on many servers. We solve this problem by storing deployed applications as zip files. The zip file does not need to be uncompressed by the server as the server can directly mount the ZIP file as a file system. Files inside the ZIP file are sent compressed directly to the browser, thus reducing the browser load time by a factor of 3.
Online LSP documentation
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? |

