[Klone-users] recommended source code reading order
Patrick
spell_gooder_now at spellingbeewinnars.org
Tue Dec 1 08:04:27 EST 2009
Hi Steven
Sorry I missed the API. There is lots of documentation here, this should
answer pretty much everything.
I have two goals in mind. One I would like to design a device that would
translate URL arguments directly into GPIB commands. GPIB is a common
bus used in Lab and test and measurement applications. This way an end
user could control their GPIB instruments directly from an pure HTML page.
And....I guess I am lazy. I would like to stick to one stack as much as
I can . I would like to use Klone and Lua for my own site too.
So I guess with the embedded device I am looking at option 2,
pre-compiled but the web site would likely be option 1 with Lua code run
dynamically at run time.
I repair spectrometers for a living. I only program part time so my
suggestions/options should be taken with caution but I was
wondering...... have you tried to present Klone to web framework
projects? or have you ever thought about starting your own? 9000
requests per sec is crazy fast.
Here is a talk by Rasmus Lerdorf the creator of PHP:
http://www.ustream.tv/recorded/1509596
He is pretty pissed off in this video. He does not like front page
controllers, a single block of code to route a whole web application.
True Klone would require recompiling every time the front controller was
modified but what a performance gain it would give!. Most of the request
per seconds he was quoting in this video were a tiny fraction of what
klone could achieve.
I probably don't understand yet how Klone works with scripting languages
but can it forward requests? Even if there was a reason why it could not
be used as the front page controller on one machine with a pre-existing
framework, I suppose there is no reason why Klone could not be on one
machine routing requests to other machines serving PHP/Ruby/Java
frameworks etc
Again my qualifications are not particularly high but it is my
understanding that Facebook had to implement C++ code to over come speed
limitations of PHP. Perhaps Klone could have been a drop-in solution for
them.
Thanks again for your time Steven-Patrick
Steven Dorigotti wrote:
> Dear Patrick,
>
> for starters, have you taken a look at the APIs for an overview of
> klone's core objects?
> http://koanlogic.com/klone/api/html/index.html
>
> Now, coming to your specific Lua application, which of the following
> is your precise requirement?
> (1) using lua to modify web content dynamically / at runtime?
> (2) embed lua code into kl1 files to execute lua code via klone?
> (3) other?
>
> (1) sounds very powerful but would require executing the lua
> interpreter as a separate CGI and performance might be rather poor...
> otherwise you could look at building an engine (separate daemon)
> though which the interpreter would communicate with kloned (quite a
> substantial extension to klone's architecture).
>
> (2) requires recompilation of the your web application for each lua
> code modification but performance should be surprising. It should
> require only a few code extensions to link kloned to the interpreter
> library and to handle lua code embedded in kl1 pages.
>
> Let us know - cheers,
> sd
>
> ps: interesting link for other lua intergration projects:
> http://members.chello.nl/~w.couwenberg/
> you could use a similar approach to create lua wrappers around klone's
> io_t, request_t, response_t and session_t object methods which provide
> the interface to the kl1 execution engine.
>
>
>
>
More information about the klone-users
mailing list