[Freeciv-Dev] Re: Working on client APIs
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Mon, Jul 17, 2000 at 04:56:35PM -0400, Jed Davis wrote:
> This would also be very useful for client-side
> scripting/automation/whatever. However I'm not quite clear what a callback
> would involve here:
The term "control program" is misleading. My current idea consists only
of one process, which would be the interpreter of the scipting language.
The general layer is a dynamic library which will be loaded into the
process. There is a module/class in the scipting language which does the
loading of the library and mapping between the C interface of the general
layer and the module/class. So the execution starts in the control program
and after some initiation it gives control to the network handler of the
general layer.
> I first thought that it would involve calling a C
> function (which could dispatch the call to an embedded interpreter), but
> the "written in any language" implies that these callbacks involve some
> kind of IPC with the controller running as a separate process, which is
> probably a better idea in the long run. Since I'm sort of working on
> (read: planning and trying in vain to find time for) GUILE scripting, I'd
> appreciate any information on this.
Using seperate processes and some communication channel
(IPC/pipes/socket/...) between them:
pro:
- cleaner distinction
con:
- the general layer stub would be very small
- another protocol
Using more processes will IMHO the multithreading question obsolete.
IMHO can the protocol issue reduced by using some higher level mechanism.
CORBA for example.
Raimar
--
email: rf13@xxxxxxxxxxxxxxxxx
The trick is to keep breathing.
[Freeciv-Dev] Re: Working on client APIs, Jeff Mallatt, 2000/07/08
|
|