LiveNode Server

David Bovill david at viral.academy
Wed Apr 1 06:42:21 EDT 2015


The question is can you create in Livecode an aynchronous event-drive
architecture? Livecode is built after all around an event loop, and through
commands like dispatch, send in time, and wait with messages, it is
possible to create asynchronous call back mechanisms - so why can we not
create a node-like server in Livecode?

Perhaps the answer lies in the nature of the asynchronous commands that are
available? Still I don't see why this in an issue. From my experience of
coding an HTTP server in Livecode - I cannot understand why it should not
be possible to accept a socket connection, dispatch a command, and
immediately return a result on the connected socket. The event loop should
take over and allow new connections / data on the socket, and when the
dispatched command completes it will return a result that can then be send
back down the open socket.

So why is this not an asynchronous event driven architecture? If it is then
pwerhaps the way to go is to have LiveCode as another async event driven
server - which can talk to other node server processes

Assuming there is an issue with the above, the next question is that given
that Node already can be extended with C / C++ extensions api - so why not
treat Livecode as simply a Node extension and let Node do the async event
driven I/O that it is so good at?



More information about the use-livecode mailing list