CAO and scalability

dotnet framework

    Sponsored Links

    Next

  • 1. Remoting Configuration
    Is there a way to 'reset' or reinitialize the Remoting Infrastructure after it has been initialized. Example: using configuration files I would like to expose the config properties to the client, and if the client were to change those properties the application could reconfigure itself accordingling after a call to RemotingConfiguration had been made. Thanks -dec
  • 2. getting MSPRess ".NET Remoing" LoadBalancingCLient delegates to work
    Hi All, recently I bought MSPress's .NET Remoting, in CHapter 5, the LoadBalancingClient/Server sample code, the client's delegate doesn't seem to work (in that the Server's event handler is always NULL). I've gotten the delegate to propogate to the server using some tricks (i.e., to set the server's variable correctly) but get an exception: JobEvent Exception : System.Runtime.Remoting.RemotingException: This remoting pr oxy has no channel sink which means either the server has no registered server c hannels that are listening, or this application has no suitable client channel t o talk to the server. at System.Runtime.Remoting.Proxies.RemotingProxy.InternalInvoke(IMethodCallMe ssage reqMcmMsg, Boolean useDispatchMessage, Int32 callType) at System.Runtime.Remoting.Proxies.RemotingProxy.Invoke(IMessage reqMsg) at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgDa ta, Int32 type) at LoadBalancing.JobEventHandler.BeginInvoke(Object sender, JobEventArgs args , AsyncCallback callback, Object object) at LoadBalancing.LoadBalancingJobServerImpl.NotifyClients(JobEventArgs args) in e:\download\dot_net_remoting\chapter 5\loadbalancingremoteobject\jobserverimp l.cs:line 102 Has anyone gotten this to work at all? or clues as to what this means? Using .NET 1.0 SP 2 , VS NET 1.0 , C# THanks Marteen
  • 3. Possible memory leak in singleton object hosted in window service
    Raghu Check my post "Memory problem using SOAP over HTTP, Help!!" of Jan 20, 2003 Are we seeing two instances of the same problem Nei

CAO and scalability

Postby Sergey Klementiev » Sat, 17 Jan 2004 19:55:54 GMT

As fas as I understand, every solution using CAO isn't scalable due to
specific uri to each object.
Is there any ways to make CAO scalable? What Microsoft suggest?

WBR,
Sergey Klementiev



Re: CAO and scalability

Postby Allen Anderson » Wed, 21 Jan 2004 02:07:00 GMT

The quick answer is no, you need to try and make singlecall objects
work if you want good scalability.  The longer answer is yes, but its
very painful.

you can make CAO's scalable to a certain degree, but not as scalable
as singlecall objects.  A company I recently consulted for (I do a lot
of .net remoting consulting now) needed to have a large CAO farm due
to their authentication taking upwards of 10 seconds per object due to
a legacy system backend so they 'had' to use CAO's.  The solution
ended up being that we created a 'routing server' that took the
incoming calls, figured out which pooled server was best, sent the
data back and had the client reconnect to that server.  This was all
done under the hood in the sink chain so the user was never the wiser.
It was quite painful but it worked.

Remember though, even after all this pain, your still not getting an
even load balancing because CAO's have indeterminate lifetimes.  Hence
you would sometimes end up with 20 objects open on one server and 5
open on another.  Granted, all new requests would go to the 5 server,
but it was still less than ideal.


Allen Anderson
 http://www.**--****.com/ 
mailto: allen@put my website url here.com


On Fri, 16 Jan 2004 14:55:54 +0400, "Sergey Klementiev"





Similar Threads:

1.How to access a CAO serverside, or - how to achieve CAO functionalities with a Singleton

Hello,

I'm trying to design a remoting architecture with the following requirements :
*** An object for each client instance ; that is, not only having ClientA and ClientB point to different objects, but also, for a given client, having 2 different ObjectA_1 and ObjectA_2 to proxy to a different server MBR. I know the first part is feasible with CAO, I don't know for the second one.

*** My server-side code is going to look like :
void DoSomething(string myArgs)
{
	// Fire an Event
	OnDoSomething(myArgs);
}
because I don't know what the implementation will be like : the user will do it himself.
He therefore needs to be able to add an event handler to the server object (the event handler is exclusively server-side I repeat - the client-side Dll uses an eventless interface).


- I tried to do this with CAO, but the 2nd clause was the problem : how can I add an event handler to a CAO when I don't know where the CAO is located server-side ? I tried to seek a way of getting a signal that a client had just created a proxy, but alas so far I had no such luck.
- I then tried to do it with a Singleton, but the 1st clause was the problem : how can I keep a separate state for each client with that ? I thought of using a Hashtable where the key would be the client Ip (I'd have to create a custom server sink), but that wouldn't work with the requirement of having multiple client objects point to multiple server objects. Besides, how would I go on to maintain the object changes in the Hashtable - that is, what would be the *value* in the Hash ?


At the moment I'm completely stuck on the CAO approach, can't figure out a way to do something that doesn't seem heavy as hell with the Singleton approach - in short I'm about to stop MBR and go brute force with MBV ... I'd hate to have to that, so if anyone can give some light on this problem, I'd appreciate it *a lot*.
Thanks in advance !

2.Performance VS Scalability

Dear Sourabh,

I will be in favor of approach 1. As you have rightly mentioned approach 2
puts an high dependency on class 2 which is inherited from class1. Approach
2 assumes that it knows every attribute of class1, here if you change any
attribute of class1 you will have to update class2. And I feel this also
breaks the encapsulation for class1 (although due to inheritance
relationship it has a legal way to do that).

I agree that due to two database calls there will be performance impact in
approach 1. But things are changing now and whenever we encounter a
situation of Scalability versus Performance, we need toconsider that there
is a higher cost with Scalability while with bigger machines Performance is
not that big issue now.

There could be one more hybrid approach where you can generate a single
database call in Class2 but it delegates the responsibility of constructing
Class1 dependent part (query construction and data population) to Class1
itself. Never tried this but you can give it a try.

Please let me know if any body has any idea on this.

Thanks
Alok

"sourabh" < XXXX@XXXXX.COM > wrote in message
news:% XXXX@XXXXX.COM ...
> Hi
> Perhaps this question does not fit in this news group but I need some
advice
> and could not figure out where to post this.
> This is a design / inheritance qus.
> I have class Task.
> This is a base class for some specific tasks
>
> Say
> WorkOrderTask : Task
> TimeSheetTask : Task
>
> Now   Task has a function GetDetails() which gets all info about task.
This
> makes a database call.
> I override this in the derived class. For implementing this in  derived
> class i see following 2 approaches.
>
> Approach 1. WorkOrderTask .GetDetails()
>    {
>         Calls base.GetDetails(); to get base details, populates in the
> object
>         Gets details specific to WorkOrderTask, populates in the object
>         returns;
>     }
>
> Approach 2. WorkOrderTask .GetDetails()
>    {
>         Get details specific to WorkOrderTask as well as the base class
> details, populates in the object
>         returns;
>     }
>
> The problem with
> Approach 1
> I have to make 2 database calls.
> Approach 2
> If theres some change in base class I need to take care of these in all
the
> derived classes as well.
> Whereas, Approach 1 is advantageous here as by modifying only the
> Task.GetDetails funciton ( this is the base class ) function i have all
the
> values and i do not need to touch the derived classes.
>
>
>
> Was thinking this might be a very common problem, so perhaps many of might
> be able to guide me on the approach i must take here. Perhaps anything
other
> then the two i have talked about.
>
> Thanks in advance
> Sourabh
>
>



3.Smart Clients' Scalability

Hi!
We want to develop a distributed application with Smart Clients using
.NET Remoting and No Touch Deployment (loading the Assemblys directly
from the Webserver except that there is no younger version). However,
wie are wondering, how scalable the Smart Client is, for example, if
thousand people want to download the new release on monday morning.
Does anyone know, if there are limits, where you should use a web
client instead?
Are there any possibilities to solve this problem?
Thank you, Christoph

4.Performance vs Scalability A design ( inheriteance / overriding ) question

Dear Sourabh,

I will be in favor of approach 1. As you have rightly mentioned approach 2
puts an high dependency on class 2 which is inherited from class1. Approach
2 assumes that it knows every attribute of class1, here if you change any
attribute of class1 you will have to update class2. And I feel this also
breaks the encapsulation for class1 (although due to inheritance
relationship it has a legal way to do that).

I agree that due to two database calls there will be performance impact in
approach 1. But things are changing now and whenever we encounter a
situation of Scalability versus Performance, we need toconsider that there
is a higher cost with Scalability while with bigger machines Performance is
not that big issue now.

There could be one more hybrid approach where you can generate a single
database call in Class2 but it delegates the responsibility of constructing
Class1 dependent part (query construction and data population) to Class1
itself. Never tried this but you can give it a try.

Please let me know if any body has any idea on this.

Thanks
Alok

"sourabh" < XXXX@XXXXX.COM > wrote in message
news:% XXXX@XXXXX.COM ...
> Hi
> Perhaps this question does not fit in this news group but I need some
advice
> and could not figure out where to post this.
> This is a design / inheritance qus.
> I have class Task.
> This is a base class for some specific tasks
>
> Say
> WorkOrderTask : Task
> TimeSheetTask : Task
>
> Now   Task has a function GetDetails() which gets all info about task.
This
> makes a database call.
> I override this in the derived class. For implementing this in  derived
> class i see following 2 approaches.
>
> Approach 1. WorkOrderTask .GetDetails()
>    {
>         Calls base.GetDetails(); to get base details, populates in the
> object
>         Gets details specific to WorkOrderTask, populates in the object
>         returns;
>     }
>
> Approach 2. WorkOrderTask .GetDetails()
>    {
>         Get details specific to WorkOrderTask as well as the base class
> details, populates in the object
>         returns;
>     }
>
> The problem with
> Approach 1
> I have to make 2 database calls.
> Approach 2
> If theres some change in base class I need to take care of these in all
the
> derived classes as well.
> Whereas, Approach 1 is advantageous here as by modifying only the
> Task.GetDetails funciton ( this is the base class ) function i have all
the
> values and i do not need to touch the derived classes.
>
>
>
> Was thinking this might be a very common problem, so perhaps many of might
> be able to guide me on the approach i must take here. Perhaps anything
other
> then the two i have talked about.
>
> Thanks in advance
> Sourabh
>
>


5.scalability of single SqlConnection instance

I have coded a data-access class in which is encapsulated all code which 
makes calls ADO.NET via System.Data.SqlClient  (  SqlDataAdapter.Fill() , 
SqlCommand.ExecuteReader() , etc.  )

All public methods of these classes are thread safe.

My data-access class has a single private SqlConnection.

In my WinForms app, I always utilize a singleton to obtain a reference to 
the single global instance of my data-access class , and therefore all app 
code is talking to the databases via the same SqlConnection instance.

My app performs a fair amount of background processing which is 
multi-threaded.  So, all threads talk to the databases via a single 
SqlConnection.

So far, I have encountered no performance problems , however I have only 
tested with a handful of background processing tasks running simultaneously. 
Potentially, there could be 100 threads running simultaneously.


Here are my questions :

Is a single SqlConnection sufficient for my scalability needs ?

Does ADO.NET implement any "under the hood magic" that would provide good 
scalability for my single SqlConnection architecture ?   e.g.  a load 
balanced connection pool within ADO.NET

Is there a 1:1 correspondence between my .NET SqlConnection instance and 
ADO.NET's lower-level connection to my Sql Server database ?

Any other relevant information most appreciated.

Thank-you.







6. SQLAdapter and scalability

7. Dataset and scalability issue

8. .Net Scalability problem



Return to dotnet framework

 

Who is online

Users browsing this forum: No registered users and 6 guest