Using Laszlo with WebBrick

Using Laszlo with WebBrick
Originally Posted on Tuesday, May 24 @ GMT Daylight Time
 
Laszlo is a way of creating gorgeous graphics for GUIs. Its basically an XML based language with Javascript extensions that renders a shockwave object that can be viewed in 99% of all web browsers.
We've put together a short term live demo connected to a real WebBrick, read on for more ....


Background

In this particular case we have a Laszlo Presentation Server that is collecting XML from a standard WebBrick

That XML is combined with the 'lzx' source XML and then build as a shockwave object, which is then rendered by the Flash player integrated into your web browser.

This very effectively creates a 'application' style firewall between the internal LAN and the the outside world. The Laszlo application calls the WebBrick internal IP addresses which are blocked from the outside world at the router.

Laszlo is open and runs on just about every thing, we have it running here on:

  • Windows XP
  • Mac OSX
  • Linux Fedora Core 3

     

    For more details about Laszlo and the fun you can have see this sweet tutorial: Laszlo in 10 minutes

     

    About this short term live demo

    Please note that when you operate the analogue outputs there will be a delay as they fade to the set point you have selected. This means that it will take up to 10 seconds for the page to reflect the actual output. This is because we've put in a 10 second refresh timer from the last operation. We chose 10 secs because this demo might get very popular and flood the internet connection to the demonstration server. nb Trigger 7 drives analogue output 1

    The demonstration starts in a 'dormant' state, you'll need to cleack away within the demo to start it. 60 seconds after your last click, it should return to a dormant state, again this was done to conserve bandwidth. You need to be able to reach port 8080 if you're behind a firewall, if not this section will be blank!

    You can right-click and zoom in on the above demo.

    May the source be with you

    It would be rude not to let you have a look at the source, so here it is zipped up: LZX, FLA and SWF sources

     

    A note about SitePlayer HTTP request limitations

    During the testing of Laszlo we found that sometimes we could not directly consume the XML from our WebBricks, which use SitePlayer as their HTTP server.

    On investigation we found that wherever the HTTP request is built using multiple TCP/IP packets the SitePlayer will fail with a 200 not found error!! (should be a 403). This means that the SitePlayer is not waiting for the request termination characters " ". This therefore is not RFC 1945 conformant behaviour and should be treated as a limitation, or more correctly a bug. Note: Sir Tim Berners-Lee is right at the top of the authors of that RFC.

    If you are part of the SitePlayer development community you can try this simple test:

    First select and copy the request

    GET INDEX>HTM HTTP/1.0
    Host: me.com 
    
    
    telnet SPaddr 80
    
    Now paste in the request and note that the page comes back successfully.

     

    Now try the same test, but this time type the GET request, you'll be disconnected after the first character typed.

    If you try the same test again with any other web server you'll see that you'll get to end of request before either the page or an error is returned

    Is this a real problem?

    Basically, not really, in 999 cases out of 1000 the URL request will arrive in one packet, after all TCP/IP packets are big enough.

    But you'll need to be aware that Laszlo can split URLs that look like:

    http://spaddr/factory.spi?var=value
    into two packets and therefore SitePlayer will barf with a 200 not found message.

     

  • Published 23 July 2007 12:29 by Community.Organiser

    Comments

    No Comments