sending a message from one program to another

M

Matthijs de Z

Hi,

What is the best way to send a message from one application to another
and handle the incoming message?
What I would like to achieve is the following:

One application is running (app1). Another application is started
(app2) without app1 knowing it started. I would like to send a
signal / message from app2 to app1.

Any suggestions?
Regards,

Matthijs
 
A

Andy O'Neill

Matthijs de Z said:
Hi,

What is the best way to send a message from one application to another
and handle the incoming message?
What I would like to achieve is the following:

One application is running (app1). Another application is started
(app2) without app1 knowing it started. I would like to send a
signal / message from app2 to app1.

Any suggestions?
Regards,

Matthijs

I use ms message queue for this sort of thing.
Often you can't guarantee app1 is running.
Another simpler approach is a triggers/message table.
You write your data from app2 into this table.
App1 occasionally polls the table and sees what messages it's got.
An extension of this is available in some of the fancy new development stuff
such as silverlight and wpf.
You can have something called an observablecollection.
With newer versions of sql server it can notify changes to data.
Together with an observablecollection that app1 has open you could trigger
events just by app2 adding a record to a table.
 
M

Mr. Arnold

Matthijs de Z said:
Hi,

What is the best way to send a message from one application to another
and handle the incoming message?
What I would like to achieve is the following:

One application is running (app1). Another application is started
(app2) without app1 knowing it started. I would like to send a
signal / message from app2 to app1.

Any suggestions?

I guess it would be Windows Communications Foundation (WCF) using Named
Pipe, assumning the two programs are running loacally on the same machine.

app1 would host the WCF service, and app2 would be the client to app1. You
send a WCF message from app2 to app1.

You could also use WCF and MSMQ .

It's not that hard.
 
T

tzarpho

Hi,

What is the best way to send a message from one application to another
and handle the incoming message?
What I would like to achieve is the following:

One application is running (app1).  Another application is started
(app2) without app1 knowing it started. I would like to send a
signal / message from app2 to app1.

Any suggestions?
Regards,

Matthijs

Hi Matthijs,

Maybe it's worth looking at NServiceBus?
http://www.nservicebus.com/

Kofi Sarfo
 
M

Matthijs de Z

Hi Matthijs,

Maybe it's worth looking at NServiceBus?http://www.nservicebus.com/

Kofi Sarfo

Thanks all for the tips / hinds. I didn't know where to start. Now
Google will be my friend for the next couple of days, together with
the key words mentioned by the three of you.
regards,

Matthijs
 
A

Arne Vajhøj

What is the best way to send a message from one application to another
and handle the incoming message?
What I would like to achieve is the following:

One application is running (app1). Another application is started
(app2) without app1 knowing it started. I would like to send a
signal / message from app2 to app1.

There are lots of possibilities:

TCP/IP sockets
named pipes
traditional remoting
traditional asmx web service
message queue
enterprise services (COM+/DCOM)
shared memory
WCF

Which one is best will depend on:
- binary or text messages
- size of messages
- frequency of messages
- .NET version
- portability to Mono requirments

Arne
 

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

Top