Re: Dynamic C to C Data Transfer
- From: Tom <Thomas-911@xxxxxxxxxxxxx>
- Date: Sun, 17 Dec 2006 10:38:02 GMT
On Sun, 17 Dec 2006 08:15:46 +0000, Richard Heathfield
<rjh@xxxxxxxxxxxxxxx> wrote:
Tom said:
On Sat, 16 Dec 2006 23:33:27 +0000 (UTC),
gazelle@xxxxxxxxxxxxxxxxxxxxx (Kenny McCormack) wrote:
In article <45845237.1596155@xxxxxxxxxxxxxx>,
Roland Pibinger <rpbg123@xxxxxxxxx> wrote:
On Sat, 16 Dec 2006 18:11:49 GMT, Tom wrote:
The scenario is: Several networked machines. Each performing stock
analysis on individual or a small group of financial instruments and
then passing buy/sell instructions to an order placing machine.
Is the platform, by any chance, Windows?
If so, try using INI files. Works real well.
Thanks for the tip Kenny.
It's a tip that doesn't do you any good, though, always assuming your
problem isn't that of opening and writing and reading and closing the
files. For that, any old format will work. But the advice is no more than
we'd expect from Mr McCormack.
The proper way to do this is via sockets, but yes, you could hack at it with
files if you wanted, if you wanted something short-term while you were busy
learning sockets.
Someone suggested starting off in the basement ("00000000.tom"), and writing
each new message in the next file up ("00000001.tom"), with the receiver
deleting as it reads. That sounds workable to me, and doesn't involve the
(easy-to-get-wrong) swapping of two filenames.
Thanks for your incite Richard.
The basement approach to the file naming is very interesting. The
receiving computer could just attempt to open the next sequential file
on a scheduled basis and fail gently if it does not exist. Slick! :)
The receiver deleting prevents filling the drive. Slick again. :))
Certainly sockets is more capable. In the event the receiver is not
available ... the drive space could fill. So the robustness of sockets
is clearly superior. However, there is still that benefit of rotating
between just two (or a few) file names to avoid the drive filling
scenario. My guess is a conflict would eventually surface in the
rotating approach with two machines accessing the same file name. Even
though the receiver would be restricted to read-only privileges. Just
a WAG on my part and experience is needed to go any further in that
evaluation. The sockets approach would be purely memory resident? Thus
the hard drive is not even in the loop and performance is light years
beyond file manipulation? Perhaps add another milliwatt of juice to my
cold light filament. :)
I appreciate everyone's suggestions. Each piece shapes my thinking and
helps start a groove in my totally smooth networking brain cell. Seems
that brain cell is teflon coated at times too. I am starting pursuit
the sockets approach (gulp). This is a daunting task for me. Simply
getting the file transfer working on my two machine network took me
days to figure out. Step-by-step instructions for the task of file
sharing on a LAN (that has been done by tens of thousands of others
and perhaps millions) are amazingly unavailable. Seems those that have
figured it out want to hoard that knowledge and turn providing the
basic instructions into a business all too often.
Classifying the file sharing approach as a short term hack is
"exactly" as it now appears. Earlier I thought it might be elegant.
(The simplest solution that works.) But now it seems to be sprouting
warts all over. Certainly the thinking process to get the hack to work
makes one appreciate the robustness of sockets.
Again, thanks! For reals. :)
-- Tom
.
- Follow-Ups:
- Re: Dynamic C to C Data Transfer
- From: Bill Reid
- Re: Dynamic C to C Data Transfer
- From: Roland Pibinger
- Re: Dynamic C to C Data Transfer
- References:
- Dynamic C to C Data Transfer
- From: Tom
- Re: Dynamic C to C Data Transfer
- From: Roland Pibinger
- Re: Dynamic C to C Data Transfer
- From: Tom
- Re: Dynamic C to C Data Transfer
- From: Roland Pibinger
- Re: Dynamic C to C Data Transfer
- From: Kenny McCormack
- Re: Dynamic C to C Data Transfer
- From: Tom
- Re: Dynamic C to C Data Transfer
- From: Richard Heathfield
- Dynamic C to C Data Transfer
- Prev by Date: Re: How do I call a function taking only "const char *a"
- Next by Date: Re: Dynamic C to C Data Transfer
- Previous by thread: Re: Dynamic C to C Data Transfer
- Next by thread: Re: Dynamic C to C Data Transfer
- Index(es):
Relevant Pages
|