473,503 Members | 972 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Stable - Isolated PlugIn Server

I am attempting to build a server application that will execute
disparate modules provided by any number of sources (internal or
customer provided). These 'Plug-Ins' are simply assembly's with
classes that adhere to a well known interface. The servers main job is
to load the 'plug-in', execute code, and make it 'agile' from a remote
management console. One of the critical features of the server
application is the ability to isolate the 'plug-ins' from each other in
a way that a fatal failure (IE, unhandled exception) in one module does
not result in the process space dying and subsequently terminating the
other 'plug-ins'.

My first crack at the server involved creating separate Application
Domain instances for each of the 'plug-ins'. This seemed logical at
the time because I was operating under the impression that I could
instantly get the isolation I needed (v1.1 worked this way). You also
get the benefit of being able to unload AppDomains, which would allow
me to dynamically upgrade the code running on one 'plug-in' without
affecting the operation of another. These separate AppDomains can be
running on single or multiple threads, which I found to be a good
option. This approach is perfectly suitable, except for the changes in
..NET 2.0 in regard to threading and AppDomain unhandled exception
'ignoring'. I actually think this change is for the better even though
it doesn't suit me on this particular project.

See these links for details on the AppDomain unhandled exception
discussion in .NET 2.0:
http://www.julmar.com/blog/mark/Perm...2f3cf1f1b.aspx

http://msdn2.microsoft.com/en-US/lib...exception.aspx

Implementing the <legacyUnhandledExceptionPolicy'workaround' is not
an option, as there is no guarantee that this would be supported in the
future, and I just dont find it a sound solution. Regardless, I've
been unable to get the workaround to work (Configuration Exceptions) so
it really doesn't appear to be a valid option.

So, the question becomes: What is a good architectural for a server
such as this built in managed code?

I can only think of a few options:

Option 1: Implement tight and ubiquitous exception handling around the
known interface calls, outside of the 'plug-in' code. Capturing,
reporting and managing unahandled exceptions and terminating
misbehaving modules. This doesn't at all guarantee that something
wouldn't slip through the cracks and result in process termination.

Option 2: Running 'plug-ins' in isolated processes. I don't feel this
is a valid option because of the resources required by each of the
'plug-ins' (I'm expecting possibly hundreds of 'plugins' per machine).
These resources include socket connections and the high frequency data
being delivered to them. It would be much more performant if the
'plug-ins' could share this data in the memory of a process, not
distributed via socket or IPC. This is a last resort, and even then,
the requirement of isolation would possibly be removed before using it.

Option 3: Enforce a certification process? I don't want to have to
review every line of code that could possibly be executed in the
server... not feasible and not 100% reliable.

If anyone has anymore options, I'm all ears.

Thanks for any comments-

Nov 3 '06 #1
0 993

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

Similar topics

4
348
by: Nick | last post by:
Hi, I have a client windows application (VB.Net) interacting with a server that has been coded in java. I basically need to pass a java object from the server into a binary format over the...
1
1899
by: malcolm | last post by:
Hello, We use several user controls and derived custom controls. Some of which actually hit the database at design time to show data (such as filling a list box, etc...) Our c# client server...
0
1852
by: Namratha Shah \(Nasha\) | last post by:
Hey Group, After a long week end I am back again. Its nice and refreshing after a short vacation so lets get started with .NET once again. Today we will discuss about Isolated Storage. This is...
3
1499
by: Wm. Scott Miller | last post by:
We have been looking at how to develop in a team environment where our servers are all Windows Server 2003 (IIS 6.0) and all our development machines are Windows XP (IIS 5.1). We are doing all...
0
1390
by: sayalikulkarni | last post by:
Hello all, I have been trying to develop a security plugin for DB2 V8.2 using the GSS APIs. I have a library of GSS APIs implemented by a third party which I am using in my plugin. This plugin is...
3
2586
by: U.C. | last post by:
Hello, My client needs to collect data on a disconnected computer. I am hoping I could store data in Isolated Storage as XML files and expose later to a server (does anyone have experience with...
0
2002
by: Zeya | last post by:
Situation: Using C#, ASP.Net Requirement: 1. ASP.net application with virtual hosting service. 2. Requires a service that will run every predefined frequency in minutes (2, 30, 100, 10000)...
12
6967
by: nyathancha | last post by:
Hi, I have a question regarding best practices in database design. In a relational database, is it wise/necessary to sometimes create tables that are not related to other tables through a...
0
7089
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
7282
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
7339
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
5581
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,...
1
5017
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4678
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3168
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1515
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
389
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.