Nuccio Raciti |
Hi Bogdan,
I'm near to have a good web server on the "uip", now the next step is to interpret some "elua" code starting from a string. (the code inside "<?elua ?> tags.) Is there a simple way to call the elua API in order to run it? Many thanks for you help. Ciao, Nuccio _______________________________________________ eLua-dev mailing list [hidden email] https://lists.berlios.de/mailman/listinfo/elua-dev |
Hi,
On Wed, Mar 2, 2011 at 8:28 PM, Nuccio Raciti <[hidden email]> wrote: > Hi Bogdan, > > I'm near to have a good web server on the "uip", > now the next step is to interpret some "elua" code > starting from a string. > (the code inside "<?elua ?> tags.) > Is there a simple way to call the elua API in order to run it? > Many thanks for you help. I don't understand the full context of this. Is your server written in C? If so, you need to create a Lua state and call the Lua interpreter. Something like this: http://www.lua.org/pil/24.1.html If that's not the case please give me more details so I can understand your situation better. Best, Bogdan _______________________________________________ eLua-dev mailing list [hidden email] https://lists.berlios.de/mailman/listinfo/elua-dev |
Nuccio Raciti |
good, it seems pretty simple.
I'm using the "web server" example of uip: http://www.sics.se/~adam/uip/uip-1.0-refman/a00185.html Thanks. Nuccio Il giorno mer, 02/03/2011 alle 20.35 +0200, Bogdan Marinescu ha scritto: > Hi, > > On Wed, Mar 2, 2011 at 8:28 PM, Nuccio Raciti <[hidden email]> wrote: > > Hi Bogdan, > > > > I'm near to have a good web server on the "uip", > > now the next step is to interpret some "elua" code > > starting from a string. > > (the code inside "<?elua ?> tags.) > > Is there a simple way to call the elua API in order to run it? > > Many thanks for you help. > > I don't understand the full context of this. Is your server written in > C? If so, you need to create a Lua state and call the Lua interpreter. > Something like this: > > http://www.lua.org/pil/24.1.html > > If that's not the case please give me more details so I can understand > your situation better. > > Best, > Bogdan _______________________________________________ eLua-dev mailing list [hidden email] https://lists.berlios.de/mailman/listinfo/elua-dev |
Tim Michals |
In reply to this post by Nuccio Raciti
I might be way off base with this answer...
So, the goal is to have PHP/ASP, now eLua tags, in the HTML pages. So the uIP stack would listen for the http commands and do some processing on the HTML until a eLua tag is found, then send it over to eLua for compile and processing. The eLua tag is really a bunch of eLua code that gets compiled then executed. A new/clone "state" from the "eLua state" has to be created because once the socket is over, the state is then deleted. Or you can use the same state and use it to cache the code, and just execute the instructions. Since the html pages are static on the web server/ micro-controller. The main issue to me is memory, having a state per socket would use a lot of memory. Caching would make sense, but that is a lot of work. In simple terms, move all of the eLua script out from the HTML and just have simple asp tags that map to eLua/Lua functions. Just upload a new Lua script/web pages then you have a way to extend the interface. Another Idea, use Lua to do XMLPRC/Ajax processing, i.e. post XML pages and do all of the parsing in eLua, return the data, tables, etc, so on the web browser do all your work in Java script, i.e. tables, processing etc. Thus using XML to get data, java script for presentation. |
Dado Sutter |
Hi,
On Wed, Mar 2, 2011 at 18:32, Tim Michals <[hidden email]> wrote: I might be way off base with this answer... Yes, I think this is what Nuccio has in mind. Pretty much what COSMO (http://cosmo.luaforge.net/) and many other template engines do for Lua. The eLua tag is really a bunch of eLua code that gets compiled then Yes, with some sort of sandbox for security. A new/clone "state" from the "eLua state" has to be created because once Exactly. Depending on the application (ie: a web UI for an instrument), it may be better to keep the state alive. The main issue to me is memory, having a state per socket would use a lot of And yes, I think the main issue is memory. Even with newer and not that more expensive chips, it still seems too early to dream on embedding some nice and powerful Lua libs for this area. Having a C-based server, in opposition to our http server example in Lua will indeed be very nice, specially if it can extract some better performance from the uIP stack. Best Dado
_______________________________________________ eLua-dev mailing list [hidden email] https://lists.berlios.de/mailman/listinfo/elua-dev |
Tim Michals |
Yes, I did a project with uIP web server with tag processing, painful. The only board I have is with USB.. Guess need to get CDC Ethernet working !
|
Nuccio Raciti |
In reply to this post by Tim Michals
yes,
I'd like to get a good performance web server for small applications in AJAX, might be acceptable have one or two connections, so Mizar with 32Mbyte of ram, should keep a little array of one/two elua state..... sounds interesting. Nuccio. Il giorno mer, 02/03/2011 alle 13.32 -0800, Tim Michals ha scritto: > I might be way off base with this answer... > > So, the goal is to have PHP/ASP, now eLua tags, in the HTML pages. So the > uIP stack would listen for the http commands and do some processing on the > HTML until a eLua tag is found, then send it over to eLua for compile and > processing. > > The eLua tag is really a bunch of eLua code that gets compiled then > executed. > > A new/clone "state" from the "eLua state" has to be created because once > the socket is over, the state is then deleted. Or you can use the same state > and use it to cache the code, and just execute the instructions. Since the > html pages are static on the web server/ micro-controller. > > The main issue to me is memory, having a state per socket would use a lot of > memory. Caching would make sense, but that is a lot of work. In simple > terms, move all of the eLua script out from the HTML and just have simple > asp tags that map to eLua/Lua functions. Just upload a new Lua script/web > pages then you have a way to extend the interface. > > Another Idea, use Lua to do XMLPRC/Ajax processing, i.e. post XML pages and > do all of the parsing in eLua, return the data, tables, etc, so on the web > browser do all your work in Java script, i.e. tables, processing etc. Thus > using XML to get data, java script for presentation. > > -- > View this message in context: http://elua-development.2368040.n2.nabble.com/Elua-with-a-web-server-wrote-in-true-C-inside-tp6082080p6082701.html > Sent from the eLua Development mailing list archive at Nabble.com. > _______________________________________________ > eLua-dev mailing list > [hidden email] > https://lists.berlios.de/mailman/listinfo/elua-dev _______________________________________________ eLua-dev mailing list [hidden email] https://lists.berlios.de/mailman/listinfo/elua-dev |
Tim Michals |
I think the easiest would be a simple "C" web parser, to pull ASP tag and post (AJAX) requests. The AJAX and ASP then could run on a lua coroutine in a single lua state. So, inside of the main lua code you have a simple scheduler/dispatcher for events, serial, A/D, AJAX, Web post requests, etc. Yes, you loose the power have having lua script in the HTML, but to me that is replaced by having javascript parsing etc in the bowser. Using HTML5 you can have a graphics ie gauges etc and just post values via socket and do all of the drawing graphics in java script... One of the projects I was working with pulled java script, icons etc, from an external web site, so the embedded platform was nothing more then a simple get value/ set value using basic
XML. But if you have SPI flash, it can live there... From: Nuccio Raciti <[hidden email]> To: [hidden email] Sent: Thu, March 3, 2011 12:52:28 PM Subject: Re: [eLua-dev] Elua with a web server (wrote in true 'C') inside. yes, I'd like to get a good performance web server for small applications in AJAX, might be acceptable have one or two connections, so Mizar with 32Mbyte of ram, should keep a little array of one/two elua state..... sounds interesting. Nuccio. Il giorno mer, 02/03/2011 alle 13.32 -0800, Tim Michals ha scritto: > I might be way off base with this answer... > > So, the goal is to have PHP/ASP, now eLua tags, in the HTML pages. So the > uIP stack would listen for the http commands and do some processing on the > HTML until a eLua tag is found, then send it over to eLua for compile and > processing. > > The eLua tag is really a bunch of eLua code that gets compiled then > executed. > > A new/clone "state" from the "eLua state" has to be created because once > the socket is over, the state is then deleted. Or you can use the same state > and use it to cache the code, and just execute the instructions. Since the > html pages are static on the web server/ micro-controller. > > The main issue to me is memory, having a state per socket would use a lot of > memory. Caching would make sense, but that is a lot of work. In simple > terms, move all of the eLua script out from the HTML and just have simple > asp tags that map to eLua/Lua functions. Just upload a new Lua script/web > pages then you have a way to extend the interface. > > Another Idea, use Lua to do XMLPRC/Ajax processing, i.e. post XML pages and > do all of the parsing in eLua, return the data, tables, etc, so on the web > browser do all your work in Java script, i.e. tables, processing etc. Thus > using XML to get data, java script for presentation. > > -- > View this message in context: http://elua-development.2368040.n2.nabble.com/Elua-with-a-web-server-wrote-in-true-C-inside-tp6082080p6082701.html > Sent from the eLua Development mailing list archive at Nabble.com. > _______________________________________________ > eLua-dev mailing list > [hidden email] > https://lists.berlios.de/mailman/listinfo/elua-dev _______________________________________________ eLua-dev mailing list [hidden email] https://lists.berlios.de/mailman/listinfo/elua-dev _______________________________________________ eLua-dev mailing list [hidden email] https://lists.berlios.de/mailman/listinfo/elua-dev |
Nuccio Raciti |
I don't understand fully the "eLua" internals and I have just a little
knowledge on WEB technologies, but I'm enjoying it, and I began to see that something works. As first step, I'm converting the "lhttpd" example in native 'C' code.... after some performance tests, I will try some AJAX example in order to understand where I have to optimise/implement. Thanks for the help that I give. Il giorno gio, 03/03/2011 alle 11.35 -0800, Tim michals ha scritto: > I think the easiest would be a simple "C" web parser, to pull ASP tag > and post (AJAX) requests. The AJAX and ASP then could run on a lua > coroutine in a single lua state. So, inside of the main lua code you > have a simple scheduler/dispatcher for events, serial, A/D, AJAX, Web > post requests, etc. Yes, you loose the power have having lua script > in the HTML, but to me that is replaced by having javascript parsing > etc in the bowser. Using HTML5 you can have a graphics ie gauges etc > and just post values via socket and do all of the drawing graphics in > java script... One of the projects I was working with pulled java > script, icons etc, from an external web site, so the embedded platform > was nothing more then a simple get value/ set value using basic XML. > But if you have SPI flash, it can live there... > > > ______________________________________________________________________ > > From: Nuccio Raciti <[hidden email]> > To: [hidden email] > Sent: Thu, March 3, 2011 12:52:28 PM > Subject: Re: [eLua-dev] Elua with a web server (wrote in true 'C') > inside. > > yes, > I'd like to get a good performance web server for small applications > in > AJAX, might be acceptable have one or two connections, so Mizar with > 32Mbyte of ram, should keep a little array of one/two elua state..... > > sounds interesting. > > Nuccio. > > > Il giorno mer, 02/03/2011 alle 13.32 -0800, Tim Michals ha scritto: > > I might be way off base with this answer... > > > > So, the goal is to have PHP/ASP, now eLua tags, in the HTML pages. > So the > > uIP stack would listen for the http commands and do some processing > on the > > HTML until a eLua tag is found, then send it over to eLua for > compile and > > processing. > > > > The eLua tag is really a bunch of eLua code that gets compiled then > > executed. > > > > A new/clone "state" from the "eLua state" has to be created because > once > > the socket is over, the state is then deleted. Or you can use the > same state > > and use it to cache the code, and just execute the instructions. > Since the > > html pages are static on the web server/ micro-controller. > > > > The main issue to me is memory, having a state per socket would use > a lot of > > memory. Caching would make sense, but that is a lot of work. In > simple > > terms, move all of the eLua script out from the HTML and just have > simple > > asp tags that map to eLua/Lua functions. Just upload a new Lua > script/web > > pages then you have a way to extend the interface. > > > > Another Idea, use Lua to do XMLPRC/Ajax processing, i.e. post XML > pages and > > do all of the parsing in eLua, return the data, tables, etc, so on > the web > > browser do all your work in Java script, i.e. tables, processing > etc. Thus > > using XML to get data, java script for presentation. > > > > -- > > View this message in context: > http://elua-development.2368040.n2.nabble.com/Elua-with-a-web-server-wrote-in-true-C-inside-tp6082080p6082701.html > > Sent from the eLua Development mailing list archive at Nabble.com. > > _______________________________________________ > > eLua-dev mailing list > > [hidden email] > > https://lists.berlios.de/mailman/listinfo/elua-dev > > > _______________________________________________ > eLua-dev mailing list > [hidden email] > https://lists.berlios.de/mailman/listinfo/elua-dev > > _______________________________________________ eLua-dev mailing list [hidden email] https://lists.berlios.de/mailman/listinfo/elua-dev |
Nuccio Raciti |
In reply to this post by BogdanM
Hi Bogdan,
I have a first (and limited) version of the web server, working enough for a little demo. here: http://mizar32.dyndns.org/ Also there is a little AJAX application running on EVK1100. Thanks for comments. Nuccio Il giorno mer, 02/03/2011 alle 20.35 +0200, Bogdan Marinescu ha scritto: > Hi, > > On Wed, Mar 2, 2011 at 8:28 PM, Nuccio Raciti <[hidden email]> wrote: > > Hi Bogdan, > > > > I'm near to have a good web server on the "uip", > > now the next step is to interpret some "elua" code > > starting from a string. > > (the code inside "<?elua ?> tags.) > > Is there a simple way to call the elua API in order to run it? > > Many thanks for you help. > > I don't understand the full context of this. Is your server written in > C? If so, you need to create a Lua state and call the Lua interpreter. > Something like this: > > http://www.lua.org/pil/24.1.html > > If that's not the case please give me more details so I can understand > your situation better. > > Best, > Bogdan _______________________________________________ eLua-dev mailing list [hidden email] https://lists.berlios.de/mailman/listinfo/elua-dev |
Is the code published anywhere?
On Thu, Mar 10, 2011 at 11:23 AM, Nuccio Raciti <[hidden email]> wrote: > Hi Bogdan, > > I have a first (and limited) version of the web server, working enough > for a little demo. > > here: http://mizar32.dyndns.org/ > > Also there is a little AJAX application running on EVK1100. > > Thanks for comments. > > Nuccio > > > Il giorno mer, 02/03/2011 alle 20.35 +0200, Bogdan Marinescu ha > scritto: >> Hi, >> >> On Wed, Mar 2, 2011 at 8:28 PM, Nuccio Raciti <[hidden email]> wrote: >> > Hi Bogdan, >> > >> > I'm near to have a good web server on the "uip", >> > now the next step is to interpret some "elua" code >> > starting from a string. >> > (the code inside "<?elua ?> tags.) >> > Is there a simple way to call the elua API in order to run it? >> > Many thanks for you help. >> >> I don't understand the full context of this. Is your server written in >> C? If so, you need to create a Lua state and call the Lua interpreter. >> Something like this: >> >> http://www.lua.org/pil/24.1.html >> >> If that's not the case please give me more details so I can understand >> your situation better. >> >> Best, >> Bogdan > > > _______________________________________________ > eLua-dev mailing list > [hidden email] > https://lists.berlios.de/mailman/listinfo/elua-dev > eLua-dev mailing list [hidden email] https://lists.berlios.de/mailman/listinfo/elua-dev |
Nuccio Raciti |
not yet!
Il giorno gio, 10/03/2011 alle 12.41 -0500, Mike King ha scritto: > Is the code published anywhere? > > On Thu, Mar 10, 2011 at 11:23 AM, Nuccio Raciti <[hidden email]> wrote: > > Hi Bogdan, > > > > I have a first (and limited) version of the web server, working enough > > for a little demo. > > > > here: http://mizar32.dyndns.org/ > > > > Also there is a little AJAX application running on EVK1100. > > > > Thanks for comments. > > > > Nuccio > > > > > > Il giorno mer, 02/03/2011 alle 20.35 +0200, Bogdan Marinescu ha > > scritto: > >> Hi, > >> > >> On Wed, Mar 2, 2011 at 8:28 PM, Nuccio Raciti <[hidden email]> wrote: > >> > Hi Bogdan, > >> > > >> > I'm near to have a good web server on the "uip", > >> > now the next step is to interpret some "elua" code > >> > starting from a string. > >> > (the code inside "<?elua ?> tags.) > >> > Is there a simple way to call the elua API in order to run it? > >> > Many thanks for you help. > >> > >> I don't understand the full context of this. Is your server written in > >> C? If so, you need to create a Lua state and call the Lua interpreter. > >> Something like this: > >> > >> http://www.lua.org/pil/24.1.html > >> > >> If that's not the case please give me more details so I can understand > >> your situation better. > >> > >> Best, > >> Bogdan > > > > > > _______________________________________________ > > eLua-dev mailing list > > [hidden email] > > https://lists.berlios.de/mailman/listinfo/elua-dev > > > _______________________________________________ > eLua-dev mailing list > [hidden email] > https://lists.berlios.de/mailman/listinfo/elua-dev _______________________________________________ eLua-dev mailing list [hidden email] https://lists.berlios.de/mailman/listinfo/elua-dev |
Martin Guy |
In reply to this post by Nuccio Raciti
On 10 March 2011 17:23, Nuccio Raciti <[hidden email]> wrote:
> I have a first (and limited) version of the web server, working enough > for a little demo. > > here: http://mizar32.dyndns.org/ > > Also there is a little AJAX application running on EVK1100. Grande! E complimenti! :) Can you extract the patch(es) to enable avr32 eth support as a first thing? Or send me (or make public? :) the modified version and tell me which version it's based on and I'll see if I can prepare a patch M _______________________________________________ eLua-dev mailing list [hidden email] https://lists.berlios.de/mailman/listinfo/elua-dev |
Martin Guy |
PS Works fine for me, if a bit slow.
Can I optimize your lua/C code for speed? :D M _______________________________________________ eLua-dev mailing list [hidden email] https://lists.berlios.de/mailman/listinfo/elua-dev |
I agree it is slow. I'm interested in seeing the code. Maybe I can help.
On Fri, Mar 11, 2011 at 6:11 PM, Martin Guy <[hidden email]> wrote: > PS Works fine for me, if a bit slow. > Can I optimize your lua/C code for speed? :D _______________________________________________ eLua-dev mailing list [hidden email] https://lists.berlios.de/mailman/listinfo/elua-dev |
Is it currently up for others right now? I'm just getting timeouts,
and no ICMP response (although I can't recall if any of our other eth implementations support icmp :-) ) On Fri, Mar 11, 2011 at 5:14 PM, Mike King <[hidden email]> wrote: > I agree it is slow. I'm interested in seeing the code. Maybe I can help. > > On Fri, Mar 11, 2011 at 6:11 PM, Martin Guy <[hidden email]> wrote: >> PS Works fine for me, if a bit slow. >> Can I optimize your lua/C code for speed? :D > _______________________________________________ > eLua-dev mailing list > [hidden email] > https://lists.berlios.de/mailman/listinfo/elua-dev > -- James Snyder Biomedical Engineering Northwestern University [hidden email] PGP: http://fanplastic.org/key.txt Phone: (847) 448-0386 _______________________________________________ eLua-dev mailing list [hidden email] https://lists.berlios.de/mailman/listinfo/elua-dev |
Martin Guy |
> PGP: http://fanplastic.org/key.txt
Hi! This address redirects me to blog.* which then gives 404. Just thought I'd let u know Cheers M _______________________________________________ eLua-dev mailing list [hidden email] https://lists.berlios.de/mailman/listinfo/elua-dev |
Thanks for the heads-up. Fixed :-)
On Fri, Mar 11, 2011 at 5:20 PM, Martin Guy <[hidden email]> wrote: >> PGP: http://fanplastic.org/key.txt > > Hi! > This address redirects me to blog.* which then gives 404. > Just thought I'd let u know > > Cheers > > M > _______________________________________________ > eLua-dev mailing list > [hidden email] > https://lists.berlios.de/mailman/listinfo/elua-dev > -- James Snyder Biomedical Engineering Northwestern University [hidden email] PGP: http://fanplastic.org/key.txt Phone: (847) 448-0386 _______________________________________________ eLua-dev mailing list [hidden email] https://lists.berlios.de/mailman/listinfo/elua-dev |
Nuccio Raciti |
In reply to this post by Martin Guy
> Can you extract the patch(es) to enable avr32 eth support as a first
thing? yes, I have to do it soon. Il giorno sab, 12/03/2011 alle 00.10 +0100, Martin Guy ha scritto: > On 10 March 2011 17:23, Nuccio Raciti <[hidden email]> wrote: > > I have a first (and limited) version of the web server, working enough > > for a little demo. > > > > here: http://mizar32.dyndns.org/ > > > > Also there is a little AJAX application running on EVK1100. > > Grande! E complimenti! :) > > Can you extract the patch(es) to enable avr32 eth support as a first thing? > > Or send me (or make public? :) the modified version and tell me which > version it's based on and I'll see if I can prepare a patch > > M _______________________________________________ eLua-dev mailing list [hidden email] https://lists.berlios.de/mailman/listinfo/elua-dev |
Nuccio Raciti |
In reply to this post by BogdanM
Hi Bogdan,
I made the GitHub fork, now a my project https://github.com/nuccioraciti/eLuaWebServer is there. Regarding the network support for AVR32, I can prepare a patch file or if you prefer I can use the great GitHub (in which case I might need help). Let me know. Nuccio _______________________________________________ eLua-dev mailing list [hidden email] https://lists.berlios.de/mailman/listinfo/elua-dev |
Free forum by Nabble | Edit this page |