Communications Between Program and Controlling Program

Hi All,

I'm looking for feedback on the best way to code communications between
Programs.

The architecture we are looking at is similar to Symantec AV or others
- a control program sends messages to the worker program on a different
machine. The worker program communicates back when complete (with a
result), and gets another chunk of work.

The messages will be small. What will be communicated is as follows:

Control Program:
Control Program Start
Control Program Stop (Worker queues messages)
Control Program sends a piece of work when requested

Worker Program:
Worker Program Start
Worker Program Stop
Worker Program Completed Job

Both the Control and Worker will be System Services on Win 2k & 2k3
Server, or 2000 & XP Workstations.

Any feedback would be appreciated,
Jeff

0
noloader (26)
5/30/2006 7:22:45 PM
vc.mfc 33608 articles. 0 followers. Follow

7 Replies
863 Views

Similar Articles

[PageSpeed] 43

Hi All,

I should have speciifed the kind of feedback:

Named Pipes \ Mailslot versus a socket, etc.

Jeff

0
noloader (26)
5/30/2006 8:55:35 PM
Named pipes if you are working within a single Windows domain (or domains with mutual
trust arrangements) and want security.

Sockets if you need to work across multiple domains.  At that point, concepts like SSL and
other encryption layers have to be dealt with or any 12-year-old (of any age) with a
network connection can attack you.

Mailslots are not "reliable" communications mechanisms.

Also, no matter what your protocol is, make sure that you can handle multiple startup
messages, multiple shutdown messages, etc. (I built such a pair of programs, and debugging
them was a nightmare until I built a robust protocol so that either could be shut down and
restarted and the protocol would resynchronize)
					joe

On 30 May 2006 13:55:35 -0700, "Jeff" <noloader@gmail.com> wrote:

>Hi All,
>
>I should have speciifed the kind of feedback:
>
>Named Pipes \ Mailslot versus a socket, etc.
>
>Jeff
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
0
newcomer (15972)
5/31/2006 9:03:59 PM
"Joseph M. Newcomer" <newcomer@flounder.com> wrote in message 
news:701s72teu0jfauq49a5gqpv18fsmn8shgc@4ax.com...
> Named pipes if you are working within a single Windows domain (or domains 
> with mutual
> trust arrangements) and want security.
>
> Sockets if you need to work across multiple domains.  At that point, 
> concepts like SSL and
> other encryption layers have to be dealt with or any 12-year-old (of any 
> age) with a
> network connection can attack you.
(snip)

I'm curious about this previous statement.  I work with an application that 
uses sockets, but we don't currently support SSL.  The application is 
designed to run on an intranet (meaning, no external access to the PC 
running our socket-app).  Is this a known security risk?  Most clients have 
a router between their internal network and the internet, and they are using 
non-routable-IP's (192.168.*.*).

Thanks in advance for any advice.
DanB


0
Dan
5/31/2006 9:57:48 PM
The 12-year-olds do not necessarily exist outside the intranet.  It depends on what you
are trying to protect.  I have some wonderful internal attacks that can be done by unhappy
employees, which I describe in my security course.

It depends on whether or not you trust the folks on the network.  The 192.168.* addresses
are not forwarded by routers, but in large corporations, the ability to slip into the
corporate network and work from within, even for outsiders, means that you need a lot more
trust than major corporations are willing to grant.  SSL at least gives you protection
from packet sniffers and unhappy internal people.  
					joe

On Wed, 31 May 2006 15:57:48 -0600, "Dan Baker" <dbmail> wrote:

>"Joseph M. Newcomer" <newcomer@flounder.com> wrote in message 
>news:701s72teu0jfauq49a5gqpv18fsmn8shgc@4ax.com...
>> Named pipes if you are working within a single Windows domain (or domains 
>> with mutual
>> trust arrangements) and want security.
>>
>> Sockets if you need to work across multiple domains.  At that point, 
>> concepts like SSL and
>> other encryption layers have to be dealt with or any 12-year-old (of any 
>> age) with a
>> network connection can attack you.
>(snip)
>
>I'm curious about this previous statement.  I work with an application that 
>uses sockets, but we don't currently support SSL.  The application is 
>designed to run on an intranet (meaning, no external access to the PC 
>running our socket-app).  Is this a known security risk?  Most clients have 
>a router between their internal network and the internet, and they are using 
>non-routable-IP's (192.168.*.*).
>
>Thanks in advance for any advice.
>DanB
>
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
0
newcomer (15972)
6/1/2006 3:01:35 AM
"Joseph M. Newcomer" <newcomer@flounder.com> wrote in message 
news:7vls72lgsftkn3ndkgcrh7fqukma9rvbnf@4ax.com...
> The 12-year-olds do not necessarily exist outside the intranet.  It 
> depends on what you
> are trying to protect.  I have some wonderful internal attacks that can be 
> done by unhappy
> employees, which I describe in my security course.
>
> It depends on whether or not you trust the folks on the network.  The 
> 192.168.* addresses
> are not forwarded by routers, but in large corporations, the ability to 
> slip into the
> corporate network and work from within, even for outsiders, means that you 
> need a lot more
> trust than major corporations are willing to grant.  SSL at least gives 
> you protection
> from packet sniffers and unhappy internal people.
> joe

Excellent response.  All good news.

Thanks
DanB


0
Dan
6/1/2006 5:18:50 PM
Hi Joe,

Thanks for the response.

> Named pipes if you are working within a single Windows domain (or domains with mutual
> trust arrangements) and want security.
It is a Windows 2003 domain.

I was also thinking about an AD partition. That is, the controlling
program places information in the partition, and the worker grabs it up
and does work. If two workers perform the same work - it is OK (great
burden lifted :).

Do you have any experience with the 2003 partitions? I was intorduced
to it in a Architecture class taught by Microsoft, but not from a
programmic standpoint.

Jeff

Joseph M. Newcomer wrote:
> Named pipes if you are working within a single Windows domain (or domains with mutual
> trust arrangements) and want security.
>
> Sockets if you need to work across multiple domains.  At that point, concepts like SSL and
> other encryption layers have to be dealt with or any 12-year-old (of any age) with a
> network connection can attack you.
>
> Mailslots are not "reliable" communications mechanisms.
>
> ...
> 					joe
> ...
> Joseph M. Newcomer [MVP]
> email: newcomer@flounder.com
> Web: http://www.flounder.com
> MVP Tips: http://www.flounder.com/mvp_tips.htm

0
noloader (26)
6/5/2006 2:57:01 PM
In case anyone was wondering about the data partitions, here's a link:

http://www.microsoft.com/windowsserver2003/techinfo/overview/adam.mspx

Jeff wrote:
> Hi Joe,
>
> Thanks for the response.
>
> > Named pipes if you are working within a single Windows domain (or domains with mutual
> > trust arrangements) and want security.
> It is a Windows 2003 domain.
>
> I was also thinking about an AD partition. That is, the controlling
> program places information in the partition, and the worker grabs it up
> and does work. If two workers perform the same work - it is OK (great
> burden lifted :).
>
> Do you have any experience with the 2003 partitions? I was intorduced
> to it in a Architecture class taught by Microsoft, but not from a
> programmic standpoint.
>
> Jeff
>
> Joseph M. Newcomer wrote:
> > Named pipes if you are working within a single Windows domain (or domains with mutual
> > trust arrangements) and want security.
> >
> > Sockets if you need to work across multiple domains.  At that point, concepts like SSL and
> > other encryption layers have to be dealt with or any 12-year-old (of any age) with a
> > network connection can attack you.
> >
> > Mailslots are not "reliable" communications mechanisms.
> >
> > ...
> > 					joe
> > ...
> > Joseph M. Newcomer [MVP]
> > email: newcomer@flounder.com
> > Web: http://www.flounder.com
> > MVP Tips: http://www.flounder.com/mvp_tips.htm

0
noloader (26)
6/6/2006 12:59:40 PM
Reply:

Similar Artilces:

MFC program works fine on XP but not on WINNT
Greetings, I'm using VC++ 6.0 and the application I have built works fine with XP platform but pop-ups standard "abort, retry, ignore" window when I try to run it on WINNT platform. Is it because of the dll file incompatibility or some other reason? I have generated the EXE file through "using MFC in static library" project settings mode. Thank you for your time and consideration, Regards, KK If you post the message on the "standard abort, retry, ignore" maybe we could help you. You can cut and paste the messagebox using control + c when the messagebox...

Money Plus Premium
Just installed M+ Premium on Windows 7 (64 bit) OS. I have Money 2003 installed on the old computer running Windows XP. Copied my money.mny file from Money 2003 on old computer to documents folder on Windows 7/M+ computer and started the M+ Premium program. It prompted me for password and brought up "converting file" screen. Program then stops responding. Is there a way to get my data file from Money 2003 converted to use with M+ Premium? Thanks. Bob In microsoft.public.money, bobinwa wrote: >Just installed M+ Premium on Windows 7 (64 bit) OS. I have Money 2003...

Chrome and Menu Control
I have an asp.net 3.5 framework website that uses asp.net Menu controls both horizontal and vertical. When I use the website on IE or Firefox the controls work and look fine. However, when using Google Chrome, they look strange and background, alignment and hover properties do not work correctly. Is there any way to assure the Menu control works the same in all major browsers? Thanks. -- David ...

What controls what appears in the Title Bar?
I have a user who usually runs Outlook 2007 with several calendars open: her own, and calendars of two other people in her department If she has only her own calendar open the title bar says 'Calendar - Microsoft Outlook'. If she has these shared calendars open, the title bar shows the name of one of the people who's calendar she has open, i.e. 'Bob Smith - Microsoft Outlook' She would like the title bar to display 'Calendar - Microsoft Outlook' all the time, regardless of who's calendar she has open. Can this be done? Thanks, Jim By the way, our back...

How to realize communication problem?
Hello everybody. I am working on a project in which I read/write data via rs-232 from/to my Windows application to/from an microcontroller. Now, my boss wants me to write a library which he can use for different microcontrollers. This library should store any changes of data. So the desired microcontroller should just be able to pick up the data. You can think of it this way: Me, representing the Windows application, put a sheet of information into a drawer. A buddy of mine, (representing a microcontroller) can go to the drawer an pick up the sheet for further treatment. So, my quest...

Slow or no communication at all
Hello all. Since I'm new around here, please let me know if this is the right place to post this. I've been checking these forums for a long time now, but fortunately I always found what I was looking for and never had the need to post. For that, I want to thank you all for the tremendous work (and help) everyone participating here have been given throughout these years. The problem that brings me here today, relates not entirely to the SBS 2003. What happens is that we have several MAC OS machines connecting to several shares in a SBS 2003. Everything was ok untill one o...

A click or control click on a hyperlink in an e-mail goes nowhere
Why can't I folow a hyperlink with a click or a control-click? version of outlook? Which folder is the message in? -- Diane Poremsky [MVP - Outlook] Author, Teach Yourself Outlook 2003 in 24 Hours Need Help with Common Tasks? http://www.outlook-tips.net/beginner/ Outlook 2007: http://www.slipstick.com/outlook/ol2007/ Outlook Tips by email: dailytips-subscribe-request@lists.outlooktips.net Outlook Tips: http://www.outlook-tips.net/ Outlook & Exchange Solutions Center: http://www.slipstick.com Subscribe to Exchange Messaging Outlook newsletter: EMO-NEWSLETTER-SUBSCRIBE-REQUEST@PEACH...

How to communicate between threads?
Hi, there I used "AfxBeginThread()" to run a background working thread, while keeping the displaying thread. Because I got many file names in working thread, I want to show them in the displaying thread. How to get those CStringArray pointer from working thread? Thanks Gary On Tue, 13 Apr 2004 09:31:07 -0700, "Gary" <anonymous@discussions.microsoft.com> wrote: >Hi, there, > >I used "AfxBeginThread()" to run a background working thread, while keeping the displaying thread. Because I got many file names in working thread, I want to show them i...

Delegate Control?
I have two Routing Groups in my Exchange Organization. I am responsible for the servers at the home office in RG1, and want to delegate control to another admin in a branch office that is in RG2 so they he only has permissions to his RG. What is the best way to accomplish this? Routing Groups are not an administrative boundary. Administrative Groups are. To install servers in a new Administrative Group, you need to create the Administrative Group before you start Exchange setup for the (new) server(s). Once installed, you cannot move a server across Administrative Groups even in a...

Trying to make Outlook my default email program
I am Trying to make Outlook my default email program (Earthlink 5.0 was coming up) but when I click on an email link (mailto:whoever@whatever) a error message comes up saying that my "default email program is not installed properly". I have opened control panel and re-set web settings. I have made sure Outlook is set as default under tools- configure-use other mail client, in my browser and it still doesnt work. When I click on an email link Outlook opens up but the error message still says "default email program is not installed properly". any help would be greatly...

Most successful affiliate program out there!!
Check it out! It's free!! http://www.vmcsatellite.com/channels/affiliates.cfm?aid=194607 ----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==---- http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups ----= East and West-Coast Server Farms - Total Privacy via Encryption =---- ...

how to make this grid control
I need to make a grid like the one in this picture's right window pane. But I can't find anything like it in the MFC control classes. http://www.eng.uwaterloo.ca/~flei/grid.png How do you make it? =( If these are any relevance: - I'm not using it for database purposes - I keep seeing a reference to an MsFlexgrid, what is it? - I am looking for a (v)c++ method, NOT a VB control Thanks!!! MFC does not include a grid class. MsFlexgrid is an ActiveX object that ships with Windows, you can use from any language can support COM. The IDE will create a C++ wrapper class for it if...

program is not a valid win32 application
I have publisher 2007, office 2007, and vista. I can create a document in publisher, but when I try to access it after I have closed it, I get the response "program is not a valid Win32 application". Before the word program is the name of whatever document I am trying to open. Any ideas? Do you have an anti-virus product? I'd do a scan of my hard drive if I were you. -- Mary Sauer MSFT MVP http://office.microsoft.com/ http://msauer.mvps.org/ news://msnews.microsoft.com "Shawn" <Shawn@discussions.microsoft.com> wrote in message news:BD56396A-7BEE-4192-9D37-...

URGENT: Outlook 2003 / Exchange 2003 SP1 communication ports.
Hi, If anyone could help me with this I would be more than grateful. We have moved our Exchange Server to a DMZ with public address space, we are trying to connect Outlook 2003 clients to the server from our private address space. The routing is all set up correctly as we can ping both ways which leads me to believe it's a port problem, i.e. I haven't opened enough up. I've searched TechNet for the relevant documents and have made the needed changes where necessary. I have set a high static port in the registry on the exchange server and our domain controllers for RPC AD re...

Communicating
Hello! I am writning a program that will communicate with a server (Linux) using RS232 or TCP/IP. The server is using the same protocol for both. The protocol is rather 'chatty', so for each command there is a lot of sending and receiving. I have created a test program for the RS232 communication using blocking. It works but the program freezes until the communication is done... So I thinking about using some kind of event driven way. I have looked at Mr. Ramon de Klein's serial classes, and they look very good http://www.codeproject.com/system/serial.asp However I need t...

Custom control with a scrollbar and converting dialog box units to pixels in a CWnd derived class
Hello, Lets first state the problem I need to solve: Our application has a protocol debug view, which graphically displays the last round of some UHF reader commands done in a device attached via a serial port (some UHF reader). This display consists of several rows (one per time slot) and each row has severl columns (for the various actions done in this time slot). Depending on what happened the column fields in each row get different colors and text. Originally this was done by placine a lot of static labels on the dialod and just changing their text and foreground/background ...

Programming Windows XP !
I am just now learning that old fashioned Win32 programming is NOT completely compatible with the Windows XP operating system. When I run my old Win 95/98/NT programs on Windows XP, I notice all kinds of changes/problems. For example, I tried using a light gray brush for my background color, and Windows XP displayed a WHITE brush instead... Also, when I run my OpenGl programs, the client area does not get painted at startup! It paints the client area only if I resize the main window. Do I need to throw out my old Win32 skills and learn a new style of programming for XP?? On the MSDN websi...

Problems moving Microsoft Date and Time Picker Control on MFC dialog
I've got an MFC CDialog class that displays and manages a dialog. There are several controls on the dialog (combo boxes, edit boxes, static text boxes, etc.). Included in the mix are four Microsoft date and time picker controls. The dialog is used in three separate instances. Not all of the controls are relevant in all three instances so we hide the controls that aren't relevant in each instance, move the controls around on the screen, and resize the dialog to eliminate dead areas on the dialog. We are getting the CWnd for each control and using the SetWindowPos method for each control...

the correct program
This is by no means a bash against MS Publisher. I am working with a client that is assembling hundreds of reports utilizing MS Publisher. These are intricate financial reports with tables, graphs, charts etc. that are many pages long, so it is by nature a very intense procedure. The information comes mainly from Excel workbooks by way of copy and paste. This has been an OK procedure but the fact remains that to insert a page...redo page numbers and deal with the idiocincracies of ever changing information have made this a nightmarish duty to say the least. Would someone at least give me...

Firewire communication
Hi guys, I am trying to interact with a camera through firewire. I wrote a code based on the example given in MSDN. When I execute the code it always return the value 1 no matter whether the device is connected or disconnected. Please let me know what went wrong, i couldnt figure out the problem so for. My code is as follows. -------------------------------------- void CFireDlg::OnDeviceNotify() { // TODO: Add your control notification handler code here CString cs; bool bDevInterResult=FALSE; HDEVNOTIFY *hdn=NULL; bDevInterResult = DoRegisterDeviceInterface(GUID_MP1394MI,...

Passing a Control Value from a Form to a Query
I use Access 2000. I have a form that has a command button to Create an Invoice. When this button is clicked a Dialog Pop-up form appears. The user is required to enter 2 pieces of data in this form. On this form there is a command button to Preview the invoice. I have no problem of passing the 2 pieces of user data from the Dialog Pop-up to the underlying query. What I do not know how to do is pass the initial form's CustomerID control value to the query and/or the code for the Preview command button. I know this should be pretty simple to accomplish but I am bew...

startup programs
hello, I'm trying to check & modify the progs that run at startup. I go to control panel / change startup programs. I get a message that windows defender is turned off, and I can get no further unless I turn it back on. Defender is off because I have Norton. I don't particularly want to have to to turn it on. Advice please ? Thanks KK KRK wrote: > I'm trying to check & modify the progs that run at startup. I go to > control panel / change startup programs. I get a message that > windows defender is turned off, and I can get no further u...

Dialog Box controls/CListBox
I am having trouble accessing the contents of a list box after I close the dialog box. I want to find out what items are left in the box.. Am I not allowed to access the list box outside of the dialog box? If the dialogbox is destroyed, all its child controls are also destroyed. You should get the data out of the controls in OnOk or similar function. -- Ajay Kalra [MVP - VC++] ajaykalra@yahoo.com "William Gower" <w_gower@hotmail.com> wrote in message news:uNdgmw3lDHA.1488@TK2MSFTNGP12.phx.gbl... | I am having trouble accessing the contents of a list box after I close t...

communication
My client needs to communicate between two computers. Is there anyway they can share calendars without a server. I think I know the answer and its nuts. The work arounds I have tried do not work efficiently. Can someone steer me in the right direction? I need to share calendars and winfax pro files ? Thanks Take a look here, it may help: http://www.slipstick.com/outlook/share.htm --� Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. Due to the (insert latest virus name here) virus, all mail sent to my personal account will be deleted without r...

Excel communicating to csharp application
In Excel I need some information that the csharp application holds. What would be the best aproach for this problem. Any help is really appreciated. THANKS ...