From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,e429176c9adb07b X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-02-17 13:05:36 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!fu-berlin.de!uni-berlin.de!71102-cm.able.ES!not-for-mail From: Jano <402450@cepsz.unizar.es> Newsgroups: comp.lang.ada Subject: Re: Re; [OT] Best way to isolate a GUI? Date: Mon, 17 Feb 2003 22:12:19 +0100 Message-ID: References: NNTP-Posting-Host: 71102-cm.able.es (212.97.171.102) X-Trace: fu-berlin.de 1045515930 49784150 212.97.171.102 (16 [49872]) X-Newsreader: MicroPlanet Gravity v2.50 Xref: archiver1.google.com comp.lang.ada:34179 Date: 2003-02-17T22:12:19+01:00 List-Id: En el mensaje , bdbryant@mail.utexas.edu dice... > On Mon, 17 Feb 2003 08:25:06 +0100, Jano wrote: > > > Anyways, I not need to be secretive about my project, since is a > > personal one. I'm trying to implement a basic Gnutella servant, just to > > improve my skills in Ada. You see now what's the core and what's the > > GUI... > If you want a run-time separation, you still need to give a clearer > explanation of what kind of separation you want. If you just want to > write a client for Gnutella you will have to write your client to use > whatever communication protocol Gnutella is based on, which is only an Ada > question when it comes down to "how do I implement that?". I want total isolation between core and GUI. Really, that it's going to be a Gnutella servant is not relevant except for background. For total isolation I mean that the core could run without a GUI. I.e., the GUI code is not necessary at compile time. Indeed, a Gnutella servant doesn't need the GUI except for feedback and getting new searches from the user. That could be accomplished with a single input box. I'll detail my first thought, so you can see what I want and you can reduce then my idea to pieces ;-). I was thinking of using a proccess for the core, and none..many proccesses as GUI. To accomplish that: a) The core opens a listening socket. b) Spawn a child for every new connected "thing" (GUI) to the listening socket. c) These new connections (streams) are used by the core to notify the listener (client in this context) about events, to pass data, or by the GUIs to request specific data it want to display/refresh. The communication protocol could be anything I want (hence the suggestion of XML). I need "only" :) to define a proper protocol (but my first idea is, given that I expect to use heavily XML for config files and persistence of objects, simply pass the objects as its XML representation and a bunch of requesting/notifying words). One GUI proccess could be a web server (AWS), or could be a GtkAda GUI, or whatever. But that's the point. Thoughts? The only example that comes to my mind like that is the WinGate router/NAT software. It's a NT service that listens in 808 for the GUI, which is a regular Windows app. Oh, and Audiogalaxy Satellite was also using that approach. But I'm only beginning to get at the other suggestions. -- ------------------------- Jano 402450[at]cepsz.unizar.es -------------------------