C++ Network Solution -- Where should I begin?

T

Tom

My skill level is intermediate in C and beginner in C++.

I need to learn how to create a centralized program to interface with
remote programs running over a local, hardwired network.

My scenario is the following:

The centralized program is the global accountant for the remote
computers. The remote computers are running independent optimization
programs that seek permission from the global accountant to initiate a
position in a financial instrument(commodity, index future, currency,
etc.). If permission is granted ... the remote computers periodically
report to the accountant the current profit/loss status of that
particular position.

My networking skill level is total novice. I need beginner level
examples and books so basic they even teach the nomenclature.

Please advise me about how and where to begin.

Perhaps there are some canned utility programs that provide the
backbone for this task? The logging on of a remote computer while
other clients are "in session" seems a daunting task for me. Maybe
this is what the dot.net stuff is all about?

Thank you in advance for any help and even for your time to have read
the above.

-- Tom
 
L

Luke Meyers

Tom said:
My skill level is intermediate in C and beginner in C++.

I need to learn how to create a centralized program to interface with
remote programs running over a local, hardwired network.

Client/server model; gotcha.
The centralized program is the global accountant for the remote
computers. The remote computers are running independent optimization
programs that seek permission from the global accountant to initiate a
position in a financial instrument(commodity, index future, currency,
etc.). If permission is granted ... the remote computers periodically
report to the accountant the current profit/loss status of that
particular position.

Okay, sounds straightforward. The clients send a task description to
the server, which responds by granting or denying permission. They
send a different type of message to report status. Season to taste.
Probably easiest with an event model driven by an in- and out-queue
for each client and for the server.
My networking skill level is total novice. I need beginner level
examples and books so basic they even teach the nomenclature.

Andrew Tanenbaum's networking book is a classic introductory survey,
and it's pretty easy to find a cheap used copy. Check on amazon.
Perhaps there are some canned utility programs that provide the
backbone for this task?

Certainly; there is a wide variety of networking libraries available.
However, you should make some decisions about your design before
getting too deep into the details. First learn enough to make an
informed decision about what kind of networking to use, then focus
your search on libraries specific to that technology.
The logging on of a remote computer while
other clients are "in session" seems a daunting task for me.

In what sense would the clients be "in session?" From your
description, they sound fairly autonomous. Organize it in terms of
messages and queues and you'll have no problem.
Maybe this is what the dot.net stuff is all about?

While .NET (like many things) partly involves network technology, it
is by no means "the way to do networking." There are plenty of
resources to tell you more about it, if you want to understand what it
is.
There are also many ways to do networking that have been around
a lot longer.

Luke
 
L

loufoque

Tom a écrit :
My networking skill level is total novice. I need beginner level
examples and books so basic they even teach the nomenclature.

You will need to learn about sockets.

You can use the C posix sockets library or C++ libraries like ASIO
(http://asio.sourceforge.net/)


Maybe
this is what the dot.net stuff is all about?

..NET is a multi-language framework designed for win32 that interacts
very badly with C++, actually creating a totally different language :
C++/CLI.
If you want to do .NET stuff you'd better use C#, which was designed to
fit with that framework.
 
V

Victor Bazarov

loufoque said:
[..]
.NET is a multi-language framework designed for win32 that interacts
very badly with C++, actually creating a totally different language :
C++/CLI.

I think that your "totally different" statement is uncalled for.
C++ is just as "totally different" from C then. (Hint: it's not)
 
L

Luke Meyers

Victor said:
loufoque said:
[..]
.NET is a multi-language framework designed for win32 that interacts
very badly with C++, actually creating a totally different language :
C++/CLI.

I think that your "totally different" statement is uncalled for.
C++ is just as "totally different" from C then. (Hint: it's not)

It's not? I suppose if you define "totally different" as "completely
lacking resemblance or commonality," then yes. But if what's meant is
"distinct, and different in many important or even fundamental ways,"
then I think it's perfectly accurate. C++ is a very different animal
from C. They share plenty of syntax, but the best approaches to C++
programming are far from possible in C; that's why C++ exists. C++/CLI
introduces a bunch of new constructs which some people find helpful,
and in many cases trades those off against some of C++'s benefits. The
Java-like use of a virtual machine, and the increased emphasis on
dynamic typing, are significant departures from C++ canon.

Lastly, because the name "C++/CLI" can be misleading, it's best to err
on the side of pointing out that it's not "the new C++" or anything
like that. Microsoft's own documentation makes this mistake regularly.

Luke
 
V

Victor Bazarov

Luke said:
Victor said:
loufoque said:
[..]
.NET is a multi-language framework designed for win32 that interacts
very badly with C++, actually creating a totally different language
: C++/CLI.

I think that your "totally different" statement is uncalled for.
C++ is just as "totally different" from C then. (Hint: it's not)

It's not?

Of course it's not. Just read D&E.
I suppose if you define "totally different" as "completely
lacking resemblance or commonality," then yes. But if what's meant is
"distinct, and different in many important or even fundamental ways,"

"Many important" is definitely much less than "totally". We can continue
this discussion in 'alt.english.usage'.

V
 
L

Luke Meyers

Victor said:
Of course it's not. Just read D&E.

I have. I maintain that C++/CLI is a different language than C++, and
that C++ is a different language than C. In all cases, there are
overlapping subsets of compatibility where semantics are preserved.
That doesn't make them the same. More importantly, the preferred
paradigms of each language are not particularly philosophically
compatible with those of the others. C++/CLI runs in many ways
contrary to the fundamental design values of C++.

In the original context, the purpose of the statement was that the OP's
offhand question about .NET was misguided, because the binding of C++
to .NET (C++/CLI) is not C++ at all, but a distinct language which does
not conform to the C++ standard or language philosophy. Debate the
subtleties or disagree if you want, but it's a perfectly "called for"
point to make.

Luke
 
J

Jim Langston

Tom said:
My skill level is intermediate in C and beginner in C++.

I need to learn how to create a centralized program to interface with
remote programs running over a local, hardwired network.

My scenario is the following:

The centralized program is the global accountant for the remote
computers. The remote computers are running independent optimization
programs that seek permission from the global accountant to initiate a
position in a financial instrument(commodity, index future, currency,
etc.). If permission is granted ... the remote computers periodically
report to the accountant the current profit/loss status of that
particular position.

My networking skill level is total novice. I need beginner level
examples and books so basic they even teach the nomenclature.

Please advise me about how and where to begin.

Perhaps there are some canned utility programs that provide the
backbone for this task? The logging on of a remote computer while
other clients are "in session" seems a daunting task for me. Maybe
this is what the dot.net stuff is all about?

Thank you in advance for any help and even for your time to have read
the above.

-- Tom

It sounds like you need to do a bit of research on client/server
architecture. There are a number of ways to do what you want and you need
to determine which way you want to do it/which is best for you.

A few questions you'll need to ask yourself.
Are the remote computers going to be consitantly connected to the server or
are they going to connect, get request then disconnect?
If they are constantly connected, how are you going to handle disconnects?
If they are constantly connected, how do the clients (remote computers)
react when the main server goes down?
In what method are the remote computers going to state who they are to the
server?
Plus many more. Start searching for client/server on the internet and
looking at the different types of architectures. I did a quick search and
this one gives a rough breakdown on some of them:
http://www.sei.cmu.edu/str/descriptions/clientserver_body.html

Good luck.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top