473,473 Members | 2,111 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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 15062
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
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
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...
1
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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,...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
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 ...

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.