473,397 Members | 2,084 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,397 software developers and data experts.

Performance of Dynamically Loaded Assemblies

I have a core web service that acts as a gateway for several third
party web services. Each one of the third party web services has it's
own "interface" class derived from a main interface. When the main web
service receives a request it will load the appropriate class with
Activator.CreateInstance. Currenty all classes are compiled into a
monolithic assembly.

I want to be able to move each "interface" to its own assembly. The
end result is that I would like to add a new interface without
recompiling and redploying the whole assembly. I want to be able to
add a new assembly for each new interface, and dynamically load the
assembly when a request of that type is received.

The question that I have is about performance. The main web service
will be very busy and will be processing thousands of request per hour.
Am I sacrificing a great amount of performance by doing this? Is
there a way to do this without sacrificing performance?

Thanks,

Brian Gabriel
br***********@gmail.com

Feb 1 '06 #1
2 1663
Brian,

It sounds like your interface design is not too good if you are going to
do this. If you want to create a new interface and have it loaded into your
main assembly, then how will your main assembly know how to use the
interface? The only option you have at that point is to use reflection, and
that is going to kill you in the long run, I think.

What you really want to do is use ONE base interface which supports the
operations across all (or broken up in some way where you can have a clearly
defined interface which you can reference) and then have all of the
different providers implement it.

You don't have to compile all the classes into one assembly. If
anything, have one assembly that has the interface definitions. Your loader
assembly will have a reference to this, as will the implementation
assemblies. Then, you can split out the implementations to different
assemblies, however you want. As long as they implement the same interface,
you will be fine.

Hope this helps.

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

<br***********@gmail.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
I have a core web service that acts as a gateway for several third
party web services. Each one of the third party web services has it's
own "interface" class derived from a main interface. When the main web
service receives a request it will load the appropriate class with
Activator.CreateInstance. Currenty all classes are compiled into a
monolithic assembly.

I want to be able to move each "interface" to its own assembly. The
end result is that I would like to add a new interface without
recompiling and redploying the whole assembly. I want to be able to
add a new assembly for each new interface, and dynamically load the
assembly when a request of that type is received.

The question that I have is about performance. The main web service
will be very busy and will be processing thousands of request per hour.
Am I sacrificing a great amount of performance by doing this? Is
there a way to do this without sacrificing performance?

Thanks,

Brian Gabriel
br***********@gmail.com

Feb 1 '06 #2
Brian,
In addition to Nicholas' excellent advice, you should keep in mind that if
your WebService is very busy that once an assembly is loaded into its
AppDomain it stays loaded. So from a performance standpoint, it may actually
be better to have fewer larger assemblies since the main "performance hit" is
when the assembly is loaded the first time.
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"br***********@gmail.com" wrote:
I have a core web service that acts as a gateway for several third
party web services. Each one of the third party web services has it's
own "interface" class derived from a main interface. When the main web
service receives a request it will load the appropriate class with
Activator.CreateInstance. Currenty all classes are compiled into a
monolithic assembly.

I want to be able to move each "interface" to its own assembly. The
end result is that I would like to add a new interface without
recompiling and redploying the whole assembly. I want to be able to
add a new assembly for each new interface, and dynamically load the
assembly when a request of that type is received.

The question that I have is about performance. The main web service
will be very busy and will be processing thousands of request per hour.
Am I sacrificing a great amount of performance by doing this? Is
there a way to do this without sacrificing performance?

Thanks,

Brian Gabriel
br***********@gmail.com

Feb 1 '06 #3

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

Similar topics

3
by: lanky_tx | last post by:
Hi All, We have an automated build and test environment using NAnt and Nunit. Some of our assemblies are being strong named by modifying the AssemblyInfo.cs and having csc compile it. Some of...
1
by: Robert Vasquez | last post by:
I would like my application to be able to load modules dynamically and release them once they aren't needed. For example in c++ I would load a dll containing the required function, run it, then...
1
by: Benjamin | last post by:
Hi, I'm currently writing a Web Services that interacts with a database. To allow me to use not just one database provider (for example, I could use MS Access, SQL Server or MySQL), the Web...
0
by: Verane | last post by:
Hi all, I am working with C# and Visual studio 2003. What I want to do is the following : I have 3 assemblies, let call them A.exe, B.dll and C.dll. I want to dynamically load B and C when A...
1
by: Ashish | last post by:
hi all, Iam trying to investigate some serious memory problems and ways to optimize them in our web application. some of the information i collected using the performance monitor, is that ...
0
by: Konstantin Gonikman | last post by:
Hi, I just played around with WebResource and embeding .js and .css files into my dlls. All works perfectly except following: As I try to embed any WebResources in assemblies that are loaded...
2
by: Ravi | last post by:
We have an application which dynamically loads an assembly and creates instances of classes. For this we have written a factory class which reflects the assembly and creates the classes and returns...
2
by: Smithers | last post by:
I have a Windows Forms application that implements a plug-in architecture whereby required assemblies are identified and loaded dynamically. Here are the relevant classes: A = application =...
1
by: Jordan S. | last post by:
I plan to load an assembly during application startup, and load that assembly via reflection (i.e., it isn't referenced in the application's assembly manifest). The assembly will be loaded into the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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...

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.