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
1021 Views

Similar Articles

[PageSpeed] 13

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 (15974)
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 (15974)
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:

Control Validation
I am trying to add a validation to a form that I have. To maintain unique course ID numbers, I have set the course ID number as primary key. The instructor has the authority to create their own course number based on what course numbers have not already been used. Over time, the course numbers expire and become available again. But that is a seperate course number that is also a primary key. Students can see the Course ID Number and select the course from there. The course number is used internally to track what courses have been offered, when and by whom. On the form that I am d...

How to set controls' Z-order
I'm trying to modify the Z order of a (CStatic label) control so it appears on top of a (CStatic bitmap) control. My bitmap background covers the entire dialog window and is created in the resource editor. I want all my controls that I create at run time to go on top of the background. So in my OnInitDialog().. // CStatic *Label1; (in the class decl) Label1 = new CStatic(); Label1->Create(_T("Label1 !"), WS_CHILD|WS_VISIBLE, CRect(700, 500, 800, 600), this); Label1->SetWindowPos(&wndTopMost, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE); And the label ...

Convert access into other developer program
I have developed dictionary in Microsoft Access. I want to make this Dict in C++ or Visual Basic Does anybody have search engine source who can send to me. Thanks very much ...

Retriev controls in a Dialog
Hi all, resizing a Dialog I need to move all the Buttons too. I do no have direct access to Controls - custom Dialog loaded from DLL - so I need to enum controls inside the Dialog and send them the appropriate messages... How to handle this!? Thanks Ale Use: EnumChildWindows function. You will get all the child windows of the dialog in a callback function. Yoav. "Ale" <Ale@discussions.microsoft.com> wrote in message news:55ED88C0-1B1A-4211-8176-0D308F69BF3B@microsoft.com... > Hi all, > resizing a Dialog I need to move all the Buttons too. > I do no have direct ...

finding contrls text given dialog id and control id
Hi I want to find a control's text without creating the dialog. Is there any way ? thanks & regards ~ Rudresh "Rudresh" <Rudresh@discussions.microsoft.com> wrote in message news:C81B7D0F-3DAC-4E51-8039-038E45589672@microsoft.com... > Hi > I want to find a control's text without creating the dialog. > Is there any way ? The only way that springs to mind is to LoadResource the DLGTEMPLATE[EX], parse it and walk the subsequent DLGITEMTEMPLAT[EX] elements looking for an id match and then parse through it to find the title text if present. -- Jeff Partch [...

Programming Discussion Forum
Hello All, We have started with a new programming discussion group on Gmail. TechnicalTalk is a group dedicated to computer programming discussion, programming tutorials, programming articles and much more. Feel free to join this group and solve your programming queries while discussing them to other programs in the group. We invite you all to visit the group once and join the group! Visit the Group http://groups.google.co.in/group/Technical_Talk This group is part of online programming discussion forum. http://www.technicaltalk.net Feel free to join this online forum. ...

strange Error and program can't exit() normally
I have a console project and contain only simple code int main(void) { printf("1234567\n"); return 0; } but when the program execute to the end it will pop-up a window like this http://tw.f2.pg.photos.yahoo.com/ph/askqq9898/detail?.dir=/ac2b&.dnm=3dba.jpg anybody meet the same problem? At first, I should delcare that I also inculde the other *.c and *.h in the project but the main only contain the simple code as above. The error message like follow Debug Assertion Failed! Program: E:\Sock\debug\sock.exe File: Sockcore.cpp line: 177 "Jove" <jove...

Drawing Bitmap into CStatic control
Im trying to draw into a CStatic cotnrol (Rectangle type) thats in a dialog. using found examples my OnPaint looks like this: CPaintDC dc(this); // device context for painting CBitmap *bmp,*oldBmp; CDC memdc; BITMAP bmInfo; RECT w; m_templatePreview.GetWindowRect(&w); this->ScreenToClient(&w); if (m_lTemplateID != -1) { //CTemplate::drawTemplatePreview(dc,w,m_lTemplateID); memdc.CreateCompatibleDC(&dc); bmp = CTemplate::getTemplateBitmap(m_lTemplateID); bmp->GetObject(sizeof(BITMAP),&bmInfo); oldBmp =...

External program access #2
There's a feature in Outlook that tells you if a an external program is trying to send emails thru Outlook. Normally you can just click yes, however, our client is trying to do bulk emailing and they have to click yes for every email. Is there a way to turn this feature off ? Thanks, Tony See http://www.slipstick.com/outlook/esecup.htm#autosec for information on how to work around the security prompts. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Absolute Beginners Guide to Microsoft Office Outlook 2003 Reminder Manager, Extended Reminders, Attachment Options http...

how to address controls at runtime?
How can I address controls at runtime placed on a usercontrol at design time? I want to write a general scrolling usercontrol which consists of a vertical and a horizontal scrollbar only and is able to move up/down or left/right all the other controls placed on it at design time. The simplest way to move them would be to address them directly and to change their top/left properties. A more elegant way might be to have a panel object where the external controls are placed on it, and then I only have to move the panel object to move all other controls, but that ends up in th...

Can DLookup be used to compare to a control value.
I've thought myself into a corner and am probably missing something blindingly obvious so I'd appreciate being pointed in the right direction. I have an Access database that has linked tables to 2 SQL servers. The main back end, I have full control of but the second one provides read only access to the full contact details of about 500 contacts. My main form is based on a set of publications that are for sale. I have a set of sub-forms on a tab control one of which is the record of sales for each publication. Out of the contacts, there are about 20 non-subscribers and as...

Controls Theme in MFC Dialogs (VC7.1 and 8.0)
Hi All, I make one application by VC wizard MDI and Dialog APP, both in VC7.1 and 8. The controls in thease apps don't have WINXP style. Why? How I enbed XP style in buttons, edits etc.. Thanks have a look at the link below..... http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwxp/html/xptheming.asp Hi, Welcome to MSDN Newsgroup! Making controls XP style is even easier. You don't actually have to do anything because the OS is responsible for drawing the button and if you are running the program on XP then XP will draw it in the XP style. However, there is...

Adding new interface to activex control
I have added a new interface to my activex control (ACEvt) I have modified the odl file, and added the necessary BEGIN_INTERFACE_MAP, BEGIN_DISPATCH_MAP etc.... in the class implementation file. [ uuid(BED02315-567E-4a5d-A56B-5F00F228E041)] dispinterface ICount { properties: methods: }; [ uuid(7C39BF1F-66DE-423e-B526-87626D80AE4D)] coclass Count { [default] dispinterface ICount; }; When I try to call CoCreateInstance and QueryInterface, i'm getting E_NOINTERFACE error. IUnknown *pUnk = NULL; HRESULT hr = CoCreateInstance(CLSID_ACEvt,NULL,CLSCTX_ALL,IID_IUnknown,(void **)&pUnk);...

Displaying on a Static Text Control #2
Hi, Here is the code snippet. Please have a look at the same and let me know where I am doing wrong :) CNew_Configure_ApplicationDlg::CNew_Configure_ApplicationDlg(CWnd* pParent /*=NULL*/) : CDialog(CNew_Configure_ApplicationDlg::IDD, pParent) , m_button_text(_T("")) ,m_static_text(_T("")) { m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); } void CNew_Configure_ApplicationDlg::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); DDX_Control(pDX, IDC_BUTTON_TEST, m_button_control); DDX_Text(pDX, IDC_BUTTON_TEST, m_button_text); DDX_Control(pDX, ID...

Change events for all controls on a dialog
Is it possible to have a single method that handles all change notifications to text boxes on a dialog? I want to enable the OK button if any text box changes. The application I am porting to MFC has the following code in its dialog handling procedure: switch ( uMessage ) { case WM_COMMAND: // Enable the OK button only when changes are made if ( GET_WM_COMMAND_CMD( wparam, lparam ) == EN_CHANGE ) { Button_Enable( GetDlgItem( hdlg, IDOK ), TRUE ); break; } switch ( GET_WM_COMMAND_ID( wparam, lparam ) ) { // handle other commands } break; .... It seems that in ...

Hyperlink in my Dialog control
I want my text in a dialog control to behave like a hyperlink in a web page. Is it possible and how(VC 6.0) Thanks I. Lesher http://www.codeproject.com/miscctrl/hyperlink.asp Here are some examples: http://www.codeguru.com/staticctrl/HyperlinkStatic.html http://www.codeproject.com/staticctrl/cmyhyperlink.asp http://msdn.microsoft.com/msdnmag/issues/01/01/c/default.aspx (look for CStaticLink) -- Ajay Kalra [MVP - VC++] ajaykalra@yahoo.com "Lesher" <Lesher@triplebit.com> wrote in message news:uRDIoju#DHA.808@TK2MSFTNGP12.phx.gbl... | I want my text in a dialog contr...

ActiveX
I get the message "abnormal program termination" once it try to use a method implemented as protected. The method was build using the Wizard - Automation - Add Method. Void return type, and short as argument (or OLE_COLOR), I did not use any pointer as argument. So what should it be? thank you Mathieu ...

Disable write-cache on SCSI controller?
Hello. My Exchange 2003 Server is getting corrupted every few weeks with -1018 errors. I have updated the SCSI controller's firmware and am going to upgrade the system BIOS tomorrow. The machine is a HP Proliant DL380 G4 with a P600 SCSI Array controller card and has SAS drives installed. I found this quote below on Vertias' web site on how to configure am Exchange 2003 Server. Disable write-cache on the SCSI controller. Windows does not use buffers, so when Exchange (or other applications) receives a write complete notice from Windows, the write-to-disk has been completed. If ...

Excel files/data to C program ?
Can anyone guide me on how am i suppose to write in my C program t access datas in rows/columns of data in an excel file. have to do some analysis with these data using C/C++ thank -- Message posted from http://www.ExcelForum.com Use ADO. -- tirades <<tirades.11db8f@excelforum-nospam.com>> wrote in message news:<tirades.11db8f@excelforum-nospam.com>... > Can anyone guide me on how am i suppose to write in my C program to > access datas in rows/columns of data in an excel file. > have to do some analysis with these data using C/C++ > > thanks > > ...

Excel Add-in: Setup Wizard or Installation program needed
Hello, I have created an add-in that I want to be able to distribute as shrink-wrap solution. The problem is that I can't find a way to create an install progra that will identify the user's O/S, Excell version, and the Add-in pat to place the module in. I had thought I could use the "setup wizard" but I have Office 200 Professional (not the developer edition) and so it appears that th wizard is not in my version... I also thought that I could use the "Package & Deployment wizard" fro VB studio 6, but it only looks for "Visual Basic Projects (*.vba) wh...

control to change sheet
I want to be able to change a sheet by choosing an option from a drop-down list, just like a jump-menu in web design. I have a collection of macros that work as expected, but how do I attach the combo-box to the macro? any ideas?? MrD Assuming combobox from the control toolbox toolbar in the click event, call your macro. -- Regards, Tom Ogilvy EssieP <mdd-delete@mdalgleish.clara.co.uk> wrote in message news:e8HWGQpwDHA.2000@TK2MSFTNGP11.phx.gbl... > I want to be able to change a sheet by choosing an option from a drop-down > list, just like a jump-menu in web design. I hav...

insert control to parent at reverse order.
Hello. I see that, when insert controls to the same parent on the following way : control1.parent = commonParent control2.parent = commonParent commonParent.controls(0) ' this is coltrol1 commonParent.controls(1) ' this is control2 But, when I am doing so on design time, the order is reversed (and that what's I need). commonParent.controls(0) ' this is coltrol2 commonParent.controls(1) ' this is control1 How can I insert into the parent, the controls with reverse-order? Thanks :) Design time and runtime is not different in VB versions newer th...

Change the anchor property of a control.
Hello. How can I capture the event, when changing the anchor property of the control ? I.e : myPanel.anchor = AnchorStyles.Left & AnchorStyles.Bottom .... How can I know, when the Anchor property is changed (which event?) ? Thanks :) Am 12.06.2010 23:46, schrieb Mr. X.: > Hello. > How can I capture the event, when changing the anchor property of the > control ? > > I.e : > myPanel.anchor = AnchorStyles.Left & AnchorStyles.Bottom > .... > How can I know, when the Anchor property is changed (which event?) ? Like I said, about once o...

LParam in a list control
I am trying to create objects and store their pointers in the LParam of my list control. This all works, but clearly I need to tidy up these objects when an item is deleted from the list. I have written a DeleteAllItems method which loops round all the items and clears the list and deletes the objects so all should be well. Problem is that I get memory leaks when the app closes, so I am obviously not deleting the objects. My test populates the list with 5 objects and deletes them, then re-populates with 5 objects again. I call my DeleteAllItems method once myself, then once automaticall...

Transparent Controls
Hello, I was wondering how I can make transparent controls in Visual C++ .NET 2003. The application type I am using is MFC, and I am using a dialog based application design. I looked at the samples in codeguru and codeproject however when I tried the examples posted the transparency effect would go away after a while. Does anyone know how to make a control transparent in Visual C++? Sincerely, James Simpson Straightway Technologies http://www.straightwaytech.com James Simpson wrote: > Hello, > I was wondering how I can make transparent controls in Visual C++ .NET 2003. > The a...