To familiarize yourself with DLL interface, I recommend doing a prototype of C client calling J DLL. Only when you feel comfortable and make it work, move to C++, sockets and threads.
Please see more below. > From: Yuvaraj Athur Raghuvir <[EMAIL PROTECTED]> > > With this option, I have the following points: > > a) The data will be interpreted in the "embedded" J instance. So, what > happens when the data "moves" from J to C++? I guess I would need explicit > data conversion. Or? The DLL interface provides access to J data in the form of arrays of native types (ints, chars, doubles, etc.) , so can use or copy them directly. > b) My current requirement is that on the C++ side, I would need an iterator. > If the iterator has to fetch data explicitly each time from embedded J > server, would it not be expensive? Iterator is implementation detail. In general: fetching a scalar at a time via network is of course expensive. But you could cache it locally. > c) Can I embed J without COM? I have VC++ Express 2005 which clearly does > not have ATL/MFC. My attempts to get a trial version of VC++ Express 2008 > fails - there is a download error. I am still trying to procure Standard > VC++ 2005. You could get ATL from Platform SDK, but it is even easier to use DLL interface, as mentioned earlier. > On Mon, Nov 3, 2008 at 2:50 PM, Oleg Kobchenko wrote: > > > What you may want to consider is let J handle > > the low-level socket protocol with jsss/jssc, while > > you instantiate J locally via DLL interface. > > This will require synchronizing as only one J > > instance is possible. However, this will give you > > a starting point. Then you may decide if to re-implement > > it in C++. > > > > > > > > ----- Original Message ---- > > > From: Yuvaraj Athur Raghuvir > > > To: Programming forum > > > Sent: Monday, November 3, 2008 5:18:07 PM > > > Subject: [Jprogramming] Data over the socket: J to C++ > > > > > > Hello, > > > > > > Has anyone tried to send data over the socket from J to C++? I want to > > build > > > a iterator in C++ that consumes data from J. The communication between > > the > > > C++ & J is via sockets. > > > > > > It is a simple database application that I want to build. I am using > > > J/SQLite as the data base and running a multi-threaded client driver from > > > C++. I have established basic socket communication. So far, I have not > > > interpreted data that the server sends back. > > > > > > I would like to extend this to results of queries. I am stuck on the low > > > level details of transforming tables into data streams and interpreting > > the > > > data stream back to a 2 D table in the C++ client. > > > > > > Any suggestions on how to proceed? > > > > > > Thanks, > > > Yuva > > > ---------------------------------------------------------------------- > > > For information about J forums see http://www.jsoftware.com/forums.htm > > > > > > > > > > ---------------------------------------------------------------------- > > For information about J forums see http://www.jsoftware.com/forums.htm > > > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
