Click here to Skip to main content
15,897,891 members
Home / Discussions / C#
   

C#

 
QuestionSpreadsheet COM in window form application Pin
Binqing15-Apr-09 8:47
Binqing15-Apr-09 8:47 
AnswerRe: Spreadsheet COM in window form application Pin
buachaill cliste15-Apr-09 10:40
buachaill cliste15-Apr-09 10:40 
GeneralRe: Spreadsheet COM in window form application Pin
Binqing15-Apr-09 11:01
Binqing15-Apr-09 11:01 
QuestionCreating a DataTable with the data from an SQL SELECT statement Pin
stonebergftw15-Apr-09 8:31
stonebergftw15-Apr-09 8:31 
AnswerRe: Creating a DataTable with the data from an SQL SELECT statement Pin
PIEBALDconsult15-Apr-09 10:17
mvePIEBALDconsult15-Apr-09 10:17 
GeneralRe: Creating a DataTable with the data from an SQL SELECT statement Pin
stonebergftw15-Apr-09 11:02
stonebergftw15-Apr-09 11:02 
GeneralRe: Creating a DataTable with the data from an SQL SELECT statement Pin
PIEBALDconsult16-Apr-09 6:59
mvePIEBALDconsult16-Apr-09 6:59 
QuestionMultithreaded remoting in C# Pin
NickoT15-Apr-09 7:46
NickoT15-Apr-09 7:46 
Hi All,

I'm predominately a Java programmer usually but have been doing some work in C# of late and am having a problem I hope someone can shed some light on for me.

There is a client and a server component to the application I'm writing. The way it works is that the client connects to a lot of servers that are running on a LAN (31 to be precise). All the servers expose a singleton MarshalByRefObject that is used by the client to call methods on the servers.

The client, when run, attempts to connect to all the servers at once, spawning a thread for each connection which basically just does this:

<code>
while (true)
{
try
{
RemoteInterface ri = (RemoteInterface)Activator.GetObject(typeof(RemoteInterface), url);
cparams.Callback(connectParams.ServerNumber, ri);
break;
}
catch (Exception ex)
{
log.Error("Error connecting to server " + cparams.ServerNumber + ": '"+ ex.Message+"'");
}
}
</code>

So attempting to connect to the server repeatedly, executing a callback (then terminating) when it's successful or logging errors each time it times out (or some exception occurs).

The problem I'm having is that when, say, 30 of the servers are down, and 1 is connected remoting calls to that server's RemoteInterface delay for something like a minute when they are performed. It's almost as if the other threads attempting to connect to the other servers are interfering with the thread that's making the call on the RemoteInterface of the connected server. I'm really unfamiliar with Remoting as this is the first project I've worked on that uses it so any help with finding a possible cause of this slowdown would be greatly appreciated. It seems to me that there is some singleton resource being shared by all the remoting threads that's blocking them and letting only one through at a time? I really don't know enough about remoting to speculate.

Thanks in advance,
Nick
AnswerRe: Multithreaded remoting in C# [modified] Pin
DaveyM6915-Apr-09 9:45
professionalDaveyM6915-Apr-09 9:45 
Questiongetting a handle to an embedded flash movie inside a webbrowser Pin
jeanbern15-Apr-09 7:00
jeanbern15-Apr-09 7:00 
QuestionCannot connect to SQL Server 2005 Pin
arimao15-Apr-09 6:38
arimao15-Apr-09 6:38 
AnswerRe: Cannot connect to SQL Server 2005 Pin
stonebergftw15-Apr-09 8:54
stonebergftw15-Apr-09 8:54 
GeneralRe: Cannot connect to SQL Server 2005 Pin
arimao15-Apr-09 9:14
arimao15-Apr-09 9:14 
GeneralRe: Cannot connect to SQL Server 2005 Pin
stonebergftw15-Apr-09 10:32
stonebergftw15-Apr-09 10:32 
QuestionHow to Scan Remote PC For UDP Open & Closed Ports? Pin
alparody15-Apr-09 6:34
alparody15-Apr-09 6:34 
QuestionInvoking a WMI method on a Remote Machine Pin
bbranded15-Apr-09 6:05
bbranded15-Apr-09 6:05 
AnswerRe: Invoking a WMI method on a Remote Machine Pin
bbranded15-Apr-09 8:22
bbranded15-Apr-09 8:22 
Questionsynchronous and asynchronous communication Pin
yesu prakash15-Apr-09 5:52
yesu prakash15-Apr-09 5:52 
AnswerRe: synchronous and asynchronous communication Pin
0x3c015-Apr-09 6:29
0x3c015-Apr-09 6:29 
GeneralRe: synchronous and asynchronous communication Pin
yesu prakash15-Apr-09 18:08
yesu prakash15-Apr-09 18:08 
QuestionProblem in disabling close button(X) of window. Pin
priyamtheone15-Apr-09 5:25
priyamtheone15-Apr-09 5:25 
AnswerRe: Problem in disabling close button(X) of window. [modified] Pin
DaveyM6915-Apr-09 5:31
professionalDaveyM6915-Apr-09 5:31 
AnswerRe: Problem in disabling close button(X) of window. Pin
agent00zelda15-Apr-09 5:32
agent00zelda15-Apr-09 5:32 
GeneralRe: Problem in disabling close button(X) of window. Pin
priyamtheone15-Apr-09 20:16
priyamtheone15-Apr-09 20:16 
AnswerRe: Problem in disabling close button(X) of window. Pin
Luc 64801115-Apr-09 5:40
Luc 64801115-Apr-09 5:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.