Remoting & Web Services
What is fundamental of published or precreated objects in Remoting ?
Dec 5th
In scenarios of singleton or single call the objects are created dynamically. But in situations where you want to precreate object and publish it you will use published object scenarios.
Dim obj as new objRemote
obj.Initvalue = 100
RemotingServices.Marshal(obj,”RemoteObject”)
As shown in above sample following changes will be needed on server side. RemotingConfiguration.RegisterWellKnownServiceType is replaced by RemotingServices.Marshal(obj,”RemoteObject”) where “obj” is the precreated objected on the server whose value is initialized to 100.
What is .NET Remoting ?
Dec 5th
.NET remoting is replacement of DCOM. Using .NET remoting you can make remote object calls which lie in different Application Domains. As the remote objects run in different process client calling the remote object can not call it directly. So the client uses a proxy which looks like a real object.
When client wants to make method call on the remote object it uses proxy for it. These method calls are called as “Messages”. Messages are serialized using “formatter” class and sent to client “channel”. Client Channel communicates with Server Channel. Server Channel uses as formatter to deserialize the message and More >
What are the situations you will use singleton architecture in remoting ?
Dec 5th
If all remoting clients have to share the same data singleton architecture will be used.
Describe in detail Basic of SAO architecture of Remoting?
Dec 5th
For these types of questions interviewer expects small and sweet answers. He is basically looking at what you know about the specific subject. For these type of question this book will provide detail code which is not necessary to be said during interview. Only the basic steps and overall brief are enough to convince that you have knowledge about the subject. Even though this question has detail code and answer say only what is needed in interview.
Remoting has at least three sections :-
? Common Interface which will be shared between them. ? Server.
? Client.
What are two different types of remote object creation mode in .NET ?
Dec 5th
There are two different ways in which object can be created using Remoting :-
? SAO (Server Activated Objects) also called as Well-Known call mode. ? CAO (Client Activated Objects)
SAO has two modes “Single Call” and “Singleton”. With Single Call object the object is created with every method call thus making the object stateless. With Singleton the object is created only once and the object is shared with all clients.
CAO are stateful as compared to SAO. In CAO the creation request is sent from client side. Client holds a proxy to the server object created on server.
More >Which class does the remote object has to inherit ?
Dec 5th
All remote objects should inherit from System.MarshalbyRefObject.
What is an application domain?
Dec 5th
Previously “PROCESS” where used as security boundaries. One process has its own virtual memory and does not over lap the other process virtual memory; due to this one process can not crash the other process. So any problem or error in one process does not affect the other process. In .NET they went one step ahead introducing application domains. In application domains multiple applications can run in same process with out influencing each other. If one of the application domains throws error it does not affect the other application domains. To invoke method in a object running in different More >