What is Application domain?
In application domains Multiple appication can run in same process with out influencing each other.If one of the application domain throws error it doesnot affect aother applicaation domain.TO invoke method in a objec wunning in differnt application domain .Net remoting is used.
What is .NET Remoting
.Net remoting is the replacement of DCOM.Using .Net remoting we can make remote object calls to the methodsthat are running in differnt application domains.As the remote objects run in differnt process client callingthe remote object canot call it directly.so the client uses a proxy which looks like a real object.
when a client want to make a method call on the remote object it uses proxy of it.These method call are called "Messae".Messages are serialized using "formatter" class and sent to the client "chanel".Client channel communicate with the server channel.Server channel uses a formatter class to deserialize themessage and send to remote object.
which class does remote object to inherit?
All remote objects must inherit System.MarshallByRefObject Class
what are two differnt types of remote objects creation mode in .net?
The two different types of remote objects creation are
Server Activated Object mode
Client activated Object mode
Server Activated object is also called as "Call mode".In this type of creation we have two differnt modes ofcreating object."Single Call" and "Singleton".
In single Call mode object is created for every method call hence it is stateless.In Singleton mode object is created only once and it is shared to all clients.
Client activated objects are statefull.In CAO the creation request is sent from clientside. Client holds a proxy to the server object created on server.
Describe in detail Basic of SAO architecture of Remoting?
Left to user.
What is fundamental of published or precreated objects in Remoting?
In scenarios of singleton or single call the objects are created dynamically. But in situationswhere you want to precreate object and publish it you will use published object scenarios.
Dim obj as new objRemoteobj.Initvalue = 100
RemotingServices.Marshal(obj,”RemoteObject”)
RemotingServices.Marshal(obj,”RemoteObject”)
where “obj” is the precreated objectedon the server whose value is initialized to 100
What are the ways in which client can create object on server in CAOmodel ?
Activator.CreateInstance(). By Keyword “New”.
In CAO model when we want client objects to be created by “NEW”keyword is there any precautions to be taken ?
Remoting Clients and Remoting Server can communicate because they share a commoncontract by implementing Shared Interface or Base Class.
But according to OOP’s concept we can not create a object of interface or Base Classes
Shipping the server object to client is not a good design practice. InCAO model we can use SOAPSUDS utility to generate Metadata DLL from server whichcan be shipped to client, clients can then use this DLL for creating object on serverRunthe SOAPSUDS utility from visual studio command prompt for syntax see below :-
soapsuds -ia:RemotingServer -nowp -oa:ClientMetaData.dll
Where RemotingServer is your server class name.ClientMetaData.dll is the DLL name by which you will want to create the metadll.
What are LeaseTime, SponsorshipTime, RenewonCallTime and LeaseManagerPollTime
In normal .NET environment objects lifetime is managed by garbage collector. But in remoting environment remote clients can access objects which are out of control ofgarbage collector. Garbage collector boundary is limited to a single PC on which frameworkis running; any remote client across physical PC is out of control of GC (GarbageCollector).
This constraint of garbage collector leads to a new way of handling lifetime for remotingobjects, by using concept called as “LeaseTime”. Every server side object is assigned bydefault a “LeaseTime” of five minutes. This leasetime is decreased at certain intervals.Again for every method call a default of two minutes is assigned. When i say method callmeans every call made from client. This is called as “RenewalOnCallTime”.Let’s put the whole thing in equation to make the concept more clear.
Total Remoting object life time = LeaseTime + (Number of method calls) X(RenewalTime).
If we take NumberOfMethodCalls as one.159
Then default Remote Object Life Time = 5 + (1) X 2 = 10 minutes (Everything is inminutes)
When total object lifetime is reduced to zero, it queries the sponsor that should the objectbe destroyed. Sponsor is an object which decides should object Lifetime be renewed. Soit queries any registered sponsors with the object, if does not find any then the object ismarked for garbage collection. After this garbage collection has whole control on theobject lifetime. If we do not foresee how long a object will be needed specify the“SponsorShipTimeOut” value. SponsorShipTimeOut is time unit a call to a sponsor istimed out.
“LeaseManagerPollTime” defines the time the sponsor has to return a lease time extension.
Which config file has all the supported channels/protocol ?
Machine.config file has all the supported channels and formatter supported by .NETremoting.Machine.config
What is a Web Service ?
Web Services are business logic components which provide functionality via the Internetusing standard protocols such as HTTP.Web Services uses Simple Object Access Protocol (SOAP) in order to expose the businessfunctionality.SOAP defines a standardized format in XML which can be exchangedbetween two entities over standard protocols such as HTTP. SOAP is platform independentso the consumer of a Web Service is therefore completely shielded from anyimplementation details about the platform exposing the Web Service. For the consumer itis simply a black box of send and receive XML over HTTP. So any web service hosted onwindows can also be consumed by UNIX and LINUX platform.
What the different phase/steps of acquiring a proxy object inWebservice
Client communicates to UDI node for WebService either through browser orUDDI's public web service.
UDII responds with a list of webserviceEvery service listed by webservice has a URI pointing to DISCO or WSDLdocument
After parsing the DISCO document, we follow the URI for the WSDL documentrelated to the webservice which we need.
Client then parses the WSDL document and builds a proxy object which cancommunicate with Webservice.
What is WSDL?
Web Service Description Language (WSDL)is a W3C specification which defines XMLgrammar for describing Web Services.XML grammar describes details such as:-
Where we can find the Web Service (its URI)?
What are the methods and properties that service supports?
Data type support. Supported protocols
What is DISCO ?
DISCO is the abbreviated form of Discovery. It is basically used to club or group commonservices together on a server and provides links to the schema documents of the servicesit describes may require.
What is UDDI ?
Full form of UDDI is Universal Description, Discovery and Integration. It is a directorythat can be used to publish and discover public Web Services
What is ObjRef object in remoting ?
All Marshal() methods return ObjRef object.The ObjRef is serializable because itimplements the interface ISerializable, and can be marshaled by value. The ObjRef knowsabout :-
√ location of the remote object
√ host name
√ port number
√ object name.
Thursday, February 18, 2010
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment