472,805 Members | 1,150 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,805 software developers and data experts.

Remoting Singleton v.s. SingleCall

I understand the difference between the two types (Singleton & SingleCall)
but what affect does this have if the Remoting Server accepts multiple
connections from multiple clients, and they're all sending messages or using
methods? Does it (server) manage this automatically?

Aug 3 '05 #1
3 15030
On Wed, 3 Aug 2005 13:55:00 -0700, JSheble wrote:
I understand the difference between the two types (Singleton & SingleCall)
but what affect does this have if the Remoting Server accepts multiple
connections from multiple clients, and they're all sending messages or using
methods? Does it (server) manage this automatically?


Yes. If you published your object as a Singleton (or used Remoting.Marshall
to publish your object), the server will make sure that there is always at
most one instance of your object created and all your clients will always
access the same object.

If you publish your object as Single Call, then the server will alwasy
create a new instance of the object whenever a client calls one of its
method and will destroy the object afterwards, which ensures you that
you'll never have 2 clients or the same client accessing the same instance
twice.
Aug 3 '05 #2
Ok, but I'm still a bit confused about multiple clients connecting to a
Singleton object... what if multiple clients all call the same method
simultaneously? Say 3 clients all call the same method, does the 2nd and
3rd call wait until the first finishes? Meaning does it queue the calls?
"Mehdi" <vi****@REMOVEME.gmail.com> wrote in message
news:1v******************************@40tude.net.. .
On Wed, 3 Aug 2005 13:55:00 -0700, JSheble wrote:
I understand the difference between the two types (Singleton &
SingleCall)
but what affect does this have if the Remoting Server accepts multiple
connections from multiple clients, and they're all sending messages or
using
methods? Does it (server) manage this automatically?


Yes. If you published your object as a Singleton (or used
Remoting.Marshall
to publish your object), the server will make sure that there is always at
most one instance of your object created and all your clients will always
access the same object.

If you publish your object as Single Call, then the server will alwasy
create a new instance of the object whenever a client calls one of its
method and will destroy the object afterwards, which ensures you that
you'll never have 2 clients or the same client accessing the same instance
twice.

Aug 3 '05 #3
JSheble wrote:
Ok, but I'm still a bit confused about multiple clients connecting to a
Singleton object... what if multiple clients all call the same method
simultaneously? Say 3 clients all call the same method, does the 2nd and
3rd call wait until the first finishes? Meaning does it queue the calls?


If I'm not completely mistaken, it runs multiple threads, one for each
incoming request. That's why it's important to code Singleton objects
thread-safe for use in Remoting.

Oliver Sturm
--
omnibus ex nihilo ducendis sufficit unum
Spaces inserted to prevent google email destruction:
MSN oliver @ sturmnet.org Jabber sturm @ amessage.de
ICQ 27142619 http://www.sturmnet.org/blog
Aug 4 '05 #4

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

Similar topics

9
by: Sudesh Sawant | last post by:
Hello, We have an application which communicates using remoting. There is a server which is a Windows Service. The server exposes an object which is a singleton. The client is a Web Application...
1
by: Yoni Gibbs | last post by:
Hi, I need to build a "login manager" using C#, for a desktop application. I am new to .NET, having previously only worked in COM, so please forgive my ignorance. What I need is a "login...
1
by: Greg Bacchus | last post by:
Hi, have got a Windows Service that is a remoting server, like <wellknown mode="Singleton" objectUri="CacheService.rem" type="ObjectCache, Cache" /> but when used by a client, it does not appear...
1
by: Jignesh | last post by:
Situtation: I want to send mails from the site on regular basis may be weekly/daily to all subscribed users. This activity should be automated/sheduled. My Thinking: Possible solution can be...
3
by: JSheble | last post by:
I understand the difference between the two types (Singleton & SingleCall) but what affect does this have if the Remoting Server accepts multiple connections from multiple clients, and they're all...
2
by: hharry | last post by:
hello all, when using .net remoting, is there a way to preserve objects in memory ? example scenario: zipcode/state lookup - for a given zipcode, return the state. i have a class library...
6
by: Palvinder Singh | last post by:
Hello google group peeps, I am new to remoting, but have a grasp of it. I am trying to create a server/client application, which will be deployed over an intranet. I have upwards of five...
3
by: =?Utf-8?B?ZmFpcnl2b2ljZQ==?= | last post by:
we know that if the type is registered as singleton in the host side, then all the remoting clients share one object, like: host: ===== TcpServerChannel chn = new TcpServerChannel(9999);...
1
by: Steve K. | last post by:
I'm working on my first remoting project. It's going well and I have one (that I know of!) bug left to work out. I understand how remote objects have leases and those leases expire. I fixed a...
0
linyimin
by: linyimin | last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
0
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: lllomh | last post by:
How does React native implement an English player?
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

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.