Chrome, lchttpd and a possible Livecode socket bug?

Richard Gaskin ambassador at fourthworld.com
Wed Jul 15 19:04:31 CEST 2015


David Bovill wrote:

 > The prototype I am working on is to create a Livecode daemon/server
 > that has the follewoing functions:
 >
 >    1. Drop dead easy to set up for local use on a laptop, or to serve
 >       a LAN in a teaching / workshop scenario
 >    2. Fast and minimal REST API provider.
 >    3. Deployable behind a load balancing server
 >    4. Plays well with Node, Nginx, Apache in a load balancing
 >       production environment.

In that setup, what is the relationship between the LC daemon and the 
NgineX and Node daemons?


 > My understanding is that it should be possible to script the
 > deployment of custom servers in an environment like Linode in a
 > few minutes - whether that be a single Livecode server or several
 > of them behind a load-balancing proxy.

Linode has a good reputation, and I've also had good luck with VPSes 
from InterServer and Chunkhost.


 > I'm also interested in moving beyond using libraries and front and
 > back scripts to exploring the use of chained behaviors in this
 > architecture.

Interesting.  I've used behaviors extensively for UI things, but hadn't 
considered them for server use.  What is the advantage there?


 > Finally I'm wandering about an architecture which allows you to deploy
 > standalone servers that speak to each other via (as you say) custom
 > binary protocols.
 >
 > I'm going to have a whole bunch of questions I am sure - the first
 > one is whether running a daemon on a cloud based server can be
 > achieved using LiveCode server?

I can't say.  I've never tried using LC Server as a daemon, and I don't 
even use it as a CGI in production work, only for testing to help others.

I use Linux standalones run facelessly with -ui for all server apps, 
mostly because it allows me to run and test everything in the IDE with 
close to zero behavioral differences over runtime.

LC Server is a very good choice if you're accustomed to PHP-style 
wokflows, but even when delivering Web pages I don't normally mix much 
LC and HTML in the same file so calling the merge function explicitly is 
as good for me as LC Server's implicit merge.

For non-HTML output, such as the binary data you're describing, either 
the LC Server or desktop engines may do well with that (provided the 
event and socket handling in Server is as good as it is in the desktop 
engine), but using a standalone will allow the system to be MUCH more 
easily testable.

-- 
  Richard Gaskin
  Fourth World Systems
  Software Design and Development for the Desktop, Mobile, and the Web
  ____________________________________________________________________
  Ambassador at FourthWorld.com                http://www.FourthWorld.com



More information about the use-livecode mailing list