Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Need advice for scripting language.
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Need advice for scripting language.

I like being minimal, which can be kinda bad since im not a linux know-it-all with that said, I want to use the rwasa web server (its tiny as heck and has all the features I would need) now my problem is scripting language, I like lua but I have to compile any addons I need which I really don't want to do, but I don't know of any 1 MB or under scripting language that would be easy to use with rwasa.

Should I just stop being so picky and just use php (which I used to script alot years back) Its just that php is basically like apache in the sense they are bloated as hell.

I would be willing to use bacon converter (which has all the library's I need like curl, mysql) and it translates basic to c code (so it will be a binary when compiled) but the problem I have with that is will it spawn a new process each time a user access my cgi script? I don't like that and I believe FCGI takes care of that but I have no clue how create a bacon script that can be handled by cgi.

I would like to know your thoughts. Also today my 28th birthday woot :-P

Comments

  • Lwan for web-server. There's also OpenResty.

    Use lua-rocks for package management instead of compiling individual addons yourself.

    And happy birthday :)

  • @rincewind

    WOW! I can't believe I messed Lwan, its looks awesome!

    You just made my birthday! :-D

    Thanks!

  • BrianHarrisonBrianHarrison Member, Patron Provider

    IIRC, with Lwan you'd have to use C or Lua for any dynamic content. Do you really want to write something like this every time you want to create a new dynamic page? https://github.com/lpereira/lwan/blob/master/freegeoip/freegeoip.c

  • Lwan will appeal more to C/C++ folks, but it does have MVC frameworks like Sailor, and Mustache templating which look similar to what you would do in PHP/Python.

  • ricardoricardo Member
    edited September 2016

    Is NGINX not considered lightweight enough? You could probably compile it with the minimal number of modules you need.

    I'd wrote my own HTTP web server but resorted to nginx to save time on things like IP whitelisting, gzip encoding etc that any well written HTTP web server has. proxy_pass is quite flexible for any style of app.

  • After looking more at Lwan I might not go with it, it even states security was not the goal and that is not something I can take lightly, also its not so much the web server, I wanted a smaller alternative to php, but i guess lua is the only option if I go this route

  • raindog308raindog308 Administrator, Veteran

    Writing a web server entirely in assembler sounds like either an exercise in masochism or the sort of ubergeeky project that makes the world a fun place. I can't decide.

    Thanked by 1yomero
  • BrianHarrisonBrianHarrison Member, Patron Provider

    @ricardo said:
    Is NGINX not considered lightweight enough? You could probably compile it with the minimal number of modules you need.

    I'd wrote my own HTTP web server but resorted to nginx to save time on things like IP whitelisting, gzip encoding etc that any well written HTTP web server has. proxy_pass is quite flexible for any style of app.

    When you have to write your dynamic content in C code (LOL), it's gonna perform better than anything out there.

  • rincewindrincewind Member
    edited September 2016

    Stevie said: security was not the goal

    I am using Proxygen as webserver with statically linked LuaJIT. Secure, but compiling it is resource intensive - especially the dependencies like Folly. If you are comfortable in C++14 then writing event handlers is a breeze - almost like Python code.

    BTW, there is always OpenResty with the Lapis framework. NGINX webcore with a Lua bridge. CloudFlare uses Openresty at its core

  • MikePTMikePT Moderator, Patron Provider, Veteran

    Just replied to wish you an happy birthday!

  • I found a server/scripting language which seems small enough:
    http://cheyenne-server.org/

    The only problem looking at REBOL API there is no way to access remote servers, well I could do web socket but wouldn't that show in the users browser or with some tool? I need to post to nexmo.com and I don't want the client to see I am doing a api posting to nexmo.

    Also it don't support SSL, which I can use Hitch TLS proxy I guess.

    So I guess I am now looking for a small (as in ram/cpu and hard disk wise) web server with a small scripting language that I can make api calls to other sites and also needs to support a remote mysql database.

    I am looking for a total of about 1 megabyte space, and use as few ram/cpu cycles as possible (like 1 core 2.4ghz supporting 1,000 + connections)

    Hell I might even pay a bounty if someone can help me find what I am looking for.

  • Since you don't mind on getting your hands dirty, why don't you try:
    Kore or Ulfius?

    I got one microservice built with Kore, runs on top of Ramnode's 256MB (SKVM) and it runs really well.

  • @lontong
    C code is a bit too advance for me :-P
    but kore does look super interesting!

    But I think I found what I want to use what @rincewind said - which is openrusty, it has everything I need and it is low resource mined :-)


    Thank you all for your input!!

Sign In or Register to comment.