473,216 Members | 1,287 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,216 software developers and data experts.

AppDomains and Threads Trying to create a robust, concurrentapplication.

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 reflection). I
want a way to invoke these processes in parallel utilizing multi-core
processors but I'd like to have the protection that AppDomains

I was doing some research where I found that there is no true
isolation between threads and AppDomains, Threads can cross over
AppDomains at the CLRs discretion.
'Under the .NET platform, there is not a direct one-to-one
correspondence between application domains and threads. In fact, a
given AppDomain can have numerous threads executing within it at any
given time. Furthermore, a particular thread is not confined to a
single application domain during its lifetime. Threads are free to
cross application domain boundaries as the Win32 thread scheduler and
CLR see fit."

This quote concerns me since if I have processes that can crash within
a thread it's completely unpredictable which AppDomain goes down.
My major concern is do AppDomains allow for concurrent processes or
are they blocking? I ran a test application where I had 2 AppDomains
created in a console app and each wrote to the console. It ended up
that the first one blocked the other domain. I was wondering if that
was because the console can only handle one domain at a time or if
AppDomains themselves do not provide concurrency.

If it's the case where AppDomains by themselves do not provide
concurrency how is it possible to execute multiple process with
AppDomain protection and remoting capabilities?

Simple ASCII diagram of how the code should behave.

Monitor Process (Main AppDomain also a Windows Service)
|-Dispatches Lightweight processes that are isolated. (Monitor
Process can control these processes via remoting calls, remoting calls
back to the monitor process are not allowed)
|-Dispatched process of system monitoring and control. (The actual
brains of the monitor process but ran as a separate AppDomain to keep
the Monitor process lightweight and more resilent to crashes.) (2 way
remoting can occur here.
Aug 23 '08 #1
0 1820

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

Similar topics

by: Daylor | last post by:
hi. i have mult thread vb.net application. it has 30 threads. each thread serves 1 phone caller. the question : is there a reason , to create appdomain for each Phone Service ? meaning 30...
by: Shaun McDonnell | last post by:
I have an application that uses the FileSystemWatcher to monitor for the "drop" of certain files in a folder. Custom actions are then executed based on the file name, size, etc. This...
by: cj | last post by:
I'm writing a TCP/IP server app that will have many simultaneous connections. The main thread listens for new connections and starts a thread to handle each requested connection. These are short...
by: Michael Bray | last post by:
I'm writing a library to provide plugin capability to my applications. It does this by loading DLL's into a new AppDomain for each plugin that is loaded. Now obviously when I write a plugin, I...
by: Carl J. Van Arsdall | last post by:
Alright, based a on discussion on this mailing list, I've started to wonder, why use threads vs processes. So, If I have a system that has a large area of shared memory, which would be better? ...
by: billr | last post by:
hi there, I hope that someone will be able to shed some light on little old confused me. We are developing an application which will be deployed onto a Terminal Server machine. The application...
by: Stephen Walch | last post by:
Our application environment consists of three basic layers: 1. Third-party unmanaged DLLs that were written before the CLR was invented and maintain a significant amount of information (including...
by: Fred Mertz | last post by:
I'm working towards an MCTS cert and I'm having to learn a bunch of stuff that I doubt I'd stumble across on my own. One such feature of .NET is AppDomains; programatically creating new AppDomains...
by: | last post by:
If this is simple, forgive my ignorance, but I'm coming from the CompactFramework where we don't use AppDomains. I did a fair bit of archive searching and couldn't find an answer and I got no...
by: veera ravala | last post by:
ServiceNow is a powerful cloud-based platform that offers a wide range of services to help organizations manage their workflows, operations, and IT services more efficiently. At its core, ServiceNow...
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....

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.