Reinvent The Wheel

Round is nice, but we can do better!

Lua4Web

What is Lua4Web?

Lua4Web is a server-side web scripting engine which enables website (web app) developers to produce dynamic server-side scripts using the Lua language (in much the same way as one might use ASP, PHP etc.)
The main difference between Lua4Web and the more traditional web scripting languages is that Lua4Web provides a far more extensive toolkit right “out of the box”.

How does it work?

Lua4Web can be used in a multitude of ways:

  • As an integrated feature of LuaRAD (and can be applied in a LuaRAD-implemented web server application)
  • As a stand-alone server application (a complete solution for hosting Lua4Web-enabled websites)
  • As an ISAPI filter and Apache addon (to integrate seamlessly into your existing web hosting solution)

At the time of release, there may be further means of availability not shown above!

What can it do for me?

Well, that depends entirely on what you want from it! Lua4Web provides all the facilities you would expect from a web scripting platform like ASP, PHP etc. but goes beyond them! For example, Lua4Web provides the ability to construct entire 3D frames server-side, which can then be rendered as an image and displayed on your website, and so much more! Unlike any other web scripting platform, Lua4Web is 100% extensible without the need to produce complicated C/C++ plugin modules (though you can certainly do this if you wish). Lua4Web provides access to the same array of facilities and tools found in the LuaRAD Runtime Engine, and shares its ability to communicate with external methods without the need to wrap them in a custom binary. Put simply, Lua4Web can be fully extended using nothing but Lua code! This gives the web developer the same degree of control as a software developer.
For server administrators, Lua4Web can be restricted! Every facility/capability of Lua4Web can be enabled or disabled by the server administrator to meet any desired security needs. This means that once the server administrator has configured Lua4Web on their server, they need not worry about those features being potentially exploited. It is worth noting that at this moment in time, Lua4Web is not necessarily intended for use by public web hosting companies (at least until it has been thoroughly tested and deemed secure). Its original designed purpose is for use on proprietary “in-house” websites, where the web developer has a role of authority on the server itself.

What about performance?

As its name suggests, Lua4Web is a Lua application (redundant statement, I know) and as such wields a significant advantage in performance over more traditional server-side web scripting systems like ASP, PHP etc.

Program Source Code CPU secs Elapsed secs Memory KB Code B ≈ CPU Load
pidigits
Lua 2.80 2.80 1,648 414 0% 0% 0% 100%
PHP 634.20 634.16 8,108 736 0% 1% 0% 100%
binary-trees
Lua 585.40 585.37 908,060 446 0% 0% 0% 100%
PHP 2,704.54 2,704.37 1,775,548 493 0% 0% 0% 100%
fasta
Lua 73.06 73.06 1,104 1039 0% 0% 0% 100%
PHP 262.44 262.62 5,460 1030 0% 1% 0% 100%
mandelbrot
Lua 760.73 760.69 1,020 353 0% 0% 0% 100%
PHP 2,453.51 2,453.35 119,956 863 0% 0% 0% 100%
spectral-norm
Lua 254.16 254.15 1,088 329 0% 0% 0% 100%
PHP 793.09 793.04 8,364 397 0% 0% 0% 100%
k-nucleotide
Lua 264.03 264.02 556,608 613 0% 0% 0% 100%
PHP 660.20 660.44 249,948 914 0% 0% 0% 100%
n-body
Lua 552.37 552.34 868 1190 0% 0% 0% 100%
PHP 1,260.48 1,260.40 5,492 1255 0% 0% 0% 100%
reverse-complement
Lua 24.37 24.37 528,628 538 0% 0% 0% 97%
PHP 7.71 7.71 446,492 343 0% 0% 0% 100%

Benchmark results from http://shootout.alioth.debian.org/u32/benchmark.php?test=all&lang=lua&lang2=php
Above is a benchmark results table demonstrating Lua’s performance compared with that of PHP. As you can see, in almost every operation, Lua outperforms PHP. However, since Lua4Web supports the ability to interchange the Lua binary for any Lua binary compatible with the Lua 5.1 API (as do all of my Lua-related applications) you can attain even higher performance by using LuaJIT 2.0 (on any supported platform).
So great is the performance of Lua that Lua4Web may well be the highest performing server-side web scripting engine ever created to date.

Will it run on my server?

At present I am focusing my efforts on the stand-alone Windows implementation of Lua4Web. This is because my servers run Windows Server 2003/2008 and thus it is the easiest way for me to test (and subsequently develop) the system. As soon as a completed version is ready, I shall begin the Linux translation for those of you who require it. Initially I will be releasing the engine built for 32bit architecture (which of course will run on x86_x64 systems as well), with native 64bit builds following soon thereafter.
I can say at this point that the Windows version will not work in Linux under Wine, and since a native Linux version is planned there are no plans to make the Windows version work under Wine.

At this moment there are no plans to support operating systems other than Windows and Linux, though if you would like a build for any other OS, please let me know and I shall see if it is possible (no promises).

Are there any working demos I can try?

At present I am working on the first website to use Lua4Web (for one of my business clients). Once it is completed, I shall provide a link so that you can see for yourself just how powerful Lua4Web actually is.
As for a working build of the engine you can try for yourself, that will arrive soon after the aforementioned website is completed successfully.

How much does Lua4Web cost?

Short answer: It’s 100% FREE for any purpose!
Whilst the core engine itself will remain closed-source, there is absolutely no charge to use it (even in commercial websites). Lua4Web is being made to advance website development for everyone!

Can I have more information?

You are more than welcome to ask any questions regarding Lua4Web either by commenting on this page, or by e-mail to Simon at GreyCascade dot com. I aim to respond to all correspondence within 24 hours.

2 Comments

  1. Sound cool stuff.
    I am interested to see working demo as well as updates on the Delphi and Web projects availability.
    The LuaRAD site is not updated since May, hence my feedback here.

    • Lua4Web is built on Lua4Delphi, so those two projects are inherently linked (hence the wait before I can roll it out).

      LuaRAD is a separate project, and I’m presently trying to find an ASM “specialist” to help me with some of the linker issues which need to be resolved in order for the engine to work on the desired target platforms!

Leave a Reply

Required fields are marked *.

*


*