Newsgroups: comp.lang.smalltalk
Path: cantaloupe.srv.cs.cmu.edu!bb3.andrew.cmu.edu!newsfeed.pitt.edu!dsinc!news.acsu.buffalo.edu!newsstand.cit.cornell.edu!portc01.blue.aol.com!news-peer.gsl.net!news.gsl.net!news.mathworks.com!fu-berlin.de!news.gtn.com!blackbush.xlink.net!ins.net!heeg.de!hmm
From: hmm@heeg.de (Hans-Martin Mosner)
Subject: Re: VW: best way to communicate with C++ programs?
Message-ID: <E0Copr.FzK@heeg.de>
Sender: uucp@heeg.de
Organization: Georg Heeg Objektorientierte Systeme, Dortmund, FRG
X-Newsreader: TIN [version 1.2 PL2]
References: <32756994.1420@bmi.net>
Date: Mon, 4 Nov 1996 14:39:27 GMT
Lines: 44

Travis Griggs (tkc@bmi.net) wrote:
: We have a two part piece of software. One part is the processing engine,
: the other is various incarnations of interface. We are definitely going
: to do the interface with VW. The processing engine *may* be done in C++.
: The interface(s) need to be able to manipulate the processing engine
: directly and be able to be notified of state change events posted by the
: engine. What we're struggling with is how to communicate between these
: two processes. I see three technical solutions.

I'll talk only about the third, and related stuff...

: 3) Sockets - we could roll our own protocol and use TCP/IP sockets to
: pass data/command/events back and forth. If we use DLL&C Connect, we
: will most likely use this as a mechanism for the processing engine to
: post events. The support for these is rich in both VW and various C++
: libraries. This could be distributed between CPUs as well. The con of
: course is that this solution probably requires the most long term work
: and maintenance.

Rolling your own protocol is probably too cumbersome, so I'd rather
adopt an existing one:

3a) Sun RPC and XDR. Well documented, easily extended towards object
references, tools should be available for the C/C++ side, too.
Since Sun RPC is the basis of NFS and the NIS (nee YP) system, it
should be available on all kinds of platforms for C/C++ development.
You can buy Sun RPC tools for VisualWorks from us.

3b) Microsoft VC++ activate/passivate. (I can't remember the real name)
The mechanism is quite simple, and support is in the Visual C++ libs.
I don't know about cross-platform availability, though.
You would have to write the Smalltalk activation/passivation methods
but that's not too difficult.

Of course you need to handle connection establishment, naming, etc.,
but once your sockets talk to each other it's not too difficult.

Hans-Martin

--
+--- Hans-Martin Mosner ---- Senior Smalltalk Guru :-) ---+
| These opinions are entirely ficticious.  Any similarity |
| to real opinions is purely coincidental and unintended. |
+--- <hmm@heeg.de> ------ URL:http://www.heeg.de/~hmm/ ---+
