lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

I am just trying to work something out in my head and I was hoping someone might give me a little feedback.

I really like Ada but I have had a hard time working with it. The state of the libraries is not good and GTK Ada is incomprehensible for mere mortals. I have thought about creating a mixed language GTK application but this has it's own problems and my emails are always too long, as is :)

I am thinking about using another language for GTK and communicating with an autonomous Ada program.

I would like to write an instrument server in Ada to handle threading, timing, data collection and general communication with scientific instruments over serial, Ethernet and GPIB.

The communication can be "batch oriented" as in a bunch of commands sent and then no communication for several minutes or even hours.

A system call would work but it might be hard to handle a large number of arguments and then how do I communicate once the process has started.

Various sockets will work but I would like to make it as simple as possible.

So I was thinking that I could use Lua files as IPC.

Does anyone see any downsides to this:

1)The GTK application auto-generates a Lua script, writes it to disk and calls the Ada instrument server as a system call.

2)The Ada server is preconfigured to read this file name and reads in the Lua script and processes the directions contained in it, deletes the file on the drive and runs independently.

4)If the GTK application wants to send new instructions it writes another file to disk

5)The Ada server has been periodically checking for a new file and now finds a new one, reads it in to process it and so on....

Is anyone else using Lua for this sort of thing?

Thanks for reading.