473,399 Members | 4,192 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

Advice sought on App Design, IPC threads Remoting etc

JH
I have a GUI app and i have a console app that performs some processing. The
GUI app calls the console app to do processing at various times. The console
app will need to be run in a separate thread (in order to leave the UI
useable) however it will need to report various messages (strings) during
its processing to the GUI app's output window. Similar fashion to the output
window in visual studio.

In the old MFC days a nice way to do this was using the WM_COPYDATA message
and send the string to the window that way. However, i'd like to do it the
..NET way.

I have briefly looked at App Domains and .NET remoting and this seems like
it could do it. However that route looks a bit like using a sledge hammer to
bang in a nail. Are there any nice quick solutions? What would the proper
way to do something like this be?

Nov 16 '05 #1
4 1192
Will the user need to see the "console app" or is it purely a mechanism for running tasks the GUI wants to display the results of? Does the console app have to be a separate standalone application?

Regards

Richard Blewett - DevelopMentor
http://staff.develop.com/richardb/weblog

nntp://news.microsoft.com/microsoft.public.dotnet.languages.csharp/<#I*************@TK2MSFTNGP12.phx.gbl>

I have a GUI app and i have a console app that performs some processing. The
GUI app calls the console app to do processing at various times. The console
app will need to be run in a separate thread (in order to leave the UI
useable) however it will need to report various messages (strings) during
its processing to the GUI app's output window. Similar fashion to the output
window in visual studio.

In the old MFC days a nice way to do this was using the WM_COPYDATA message
and send the string to the window that way. However, i'd like to do it the
.NET way.

I have briefly looked at App Domains and .NET remoting and this seems like
it could do it. However that route looks a bit like using a sledge hammer to
bang in a nail. Are there any nice quick solutions? What would the proper
way to do something like this be?


---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.770 / Virus Database: 517 - Release Date: 27/09/2004

[microsoft.public.dotnet.languages.csharp]
Nov 16 '05 #2
JH

"Richard Blewett [DevelopMentor]" <ri******@develop.com> wrote in message
news:un**************@TK2MSFTNGP12.phx.gbl...
Will the user need to see the "console app" or is it purely a mechanism for running tasks the GUI wants to display the results of? Does the console
app have to be a separate standalone application?


Hi Richard,
The console app is purley a mechanism for running tasks the GUI wants to
display the results of. Yes the the console app has to be a separate
standalone app.

Basically all i need is a mechanism to pass strings from the console app to
the GUI app. Events might need to be triggered on the GUI app to display
these messages.

John
Nov 16 '05 #3
The supported "out-of-the-box" mechanism is remoting for this type of interaction, but there are other mechanisms e.g. I wrote a shared memory wrapper [1] a while back.

If the console app is under your control (which it would have to be for either of the above mechanisms) I'm just wondering why it has to run as a separate process and not just be tasks spawned on to separate thread(s). It it also a separate application that is used standalone? Does it have a tendency to crash and so need resilence?

[1] http://staff.develop.com/richardb/we...5-39ca338d906d

Regards

Richard Blewett - DevelopMentor
http://staff.develop.com/richardb/weblog

nntp://news.microsoft.com/microsoft.public.dotnet.languages.csharp/<uF**************@TK2MSFTNGP12.phx.gbl>
"Richard Blewett [DevelopMentor]" <ri******@develop.com> wrote in message
news:un**************@TK2MSFTNGP12.phx.gbl...
Will the user need to see the "console app" or is it purely a mechanism for running tasks the GUI wants to display the results of? Does the console
app have to be a separate standalone application?


Hi Richard,
The console app is purley a mechanism for running tasks the GUI wants to
display the results of. Yes the the console app has to be a separate
standalone app.

Basically all i need is a mechanism to pass strings from the console app to
the GUI app. Events might need to be triggered on the GUI app to display
these messages.

John

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.770 / Virus Database: 517 - Release Date: 27/09/2004

[microsoft.public.dotnet.languages.csharp]
Nov 16 '05 #4
JH

"Richard Blewett [DevelopMentor]" <ri******@develop.com> wrote in message
news:#f**************@TK2MSFTNGP14.phx.gbl...
The supported "out-of-the-box" mechanism is remoting for this type of interaction, but there are other mechanisms e.g. I wrote a shared memory
wrapper [1] a while back.
If the console app is under your control (which it would have to be for either of the above mechanisms) I'm just wondering why it has to run as a
separate process and not just be tasks spawned on to separate thread(s). It
it also a separate application that is used standalone? Does it have a
tendency to crash and so need resilence?

The console app is also a command line utility that users can use separatly
if they wish. The intention is to have it operate in a similar fashion to a
file compressor utility, i.e. where the console app can compress files
individually but it is also used the the GUI to compress multiple
files.Thats the reason for separation.

I am using a call to System.Diagnostics.Process.Start("MyApp.exe") to start
the console app.
I have complete control over both apps. It does not have a tendency to crash
and resilence is not needed.

It's looking that ill go down the Remoting route. I'd rather not use a
shared memory system as i'd prefer to let the .NET framework handle any ipc,
but thanks for your link.

Nov 16 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Leo Tohill | last post by:
In our IIS application we have C# "behind code" that calls across remoting to a service. In the service, we keep local storage on the thread. From instrumentation, I now realize that hundreds of...
2
by: dee | last post by:
hi, I considering designing a online snipe system. This where i input a price and the application will submit the snipe at the desired time to the site. I have been thinking about the design of...
1
by: Tim Smith | last post by:
Hi, I have a system which comprises of a number of server side application and services. There is a thread per service or application and some threads may also create their own application...
5
by: Sunny | last post by:
Hi, I have to implement client/server application. The client have to instaniate an remoting object via http and pass some auth info. If the auth is OK, the client should invoke a method (or...
6
by: frizzle | last post by:
Hi there, I'm going to build a simple forum in mySQL. I've thought about it for a while now, but still can't figure it out completely: If i have say 5 main categories, One has 5...
1
by: David Van D | last post by:
Hi there, A few weeks until I begin my journey towards a degree in Computer Science at Canterbury University in New Zealand, Anyway the course tutors are going to be teaching us JAVA wth bluej...
11
by: vzaffiro | last post by:
Does the magic number of 25 only apply to the thread pool? Does it also apply to manually creating threads?
13
by: Alan Silver | last post by:
Hello, MSDN (amongst other places) is full of helpful advice on ways to do data access, but they all seem geared to wards enterprise applications. Maybe I'm in a minority, but I don't have those...
0
by: jeremyje | last post by:
I would like to create an application where I have many concurrent processes being managed by a monitoring process. Each process that is "managed" will be invoked from an assembly dll (think...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.