VB Remoting
VB Remoting
VB Remoting
APP PMA
Memory Block
Other Computer
When ever an application uses the definitions
of the DCOM then a request will be given to
the COM server of the local system where the
DCOM server info will be identified using the
client registration of DCOM then based on this
information a request will be given to the COM
server of Remote system where the DCOM is
identified and the processing of the DCOM
might take place in the PMA of remote system
or in the memory block of client system or in
any specified computer based on the definition
of the DCOM.
Once the processing is completed the result
will be given back to the application.
Drawback it has to be registered in the
client system always.
A Dot net assembly present in one system with .net
assembly present in another system
Points to remember :
Dot Net Remoting Architecture
Channels to be used for communication between
the systems connected with in a network.
How server has to provide the response to the
client request.
How client application should send a request to
the server.
ARCHITECTURE
Remoting Remoting
System System
2 5 11 9
6
1 Proxy 10 Formatters 7
3 4 12 8
“system.Runtime.Remoting. “system.Runtime.Remoting.
Channels.Tcp.Tcpchannel”
Always a special port has to Channels.HTTP.Httpchannel
No special port is required it
class
be opened exclusively for ” class
has a capability to use the
comm. default web server.
Supports Intranet based Supports Intranet and
applications Internet based applications
Cant pass the data or info. If Can pass the data across
any firewalls are defined firewalls
It is manditory to define the Can use default windows
custom security for the authentication provided
application which uses TCP provided by the web server
channel for its
communications
Performance is very fast Performance is slow
Note It is manditory to define at least one
channel and to register the channel to support
dot net remoting in all the systems which are
connected within a network and involved in
remoting.
Syntax to register a channel
channelservices.registerchannel(channelobject)
Syntax to unregister a channel
channelservices.unregisterchannel(channelobject
)
Server can provide the response to the remoting
system of the client in 2 ways:
1 } the result of the object might be serialized
and it might be given as a value to the client
system where serialization is a process of
maintaining the state of an object across the
network or within the system.
2 } only the reference of the remote class object
will be given to the client system.
Note in order to use any assembly in remoting
infrastructure it is manditory that the remote
class has to either inherit “MarshallByRefObject”
or “MarshallByValueobject” class.
MarshallByRefObject when ever a remote class
inherits the MarshallByReference object class
then the response of the remote class object will
be given only as a reference to the remoting
system of the client from the remoting system of
the server.
MarshallByValueobject when ever a class
inherits MBV object class then the result of the
remote class object will be serialized and the
Client can send a request to access the remote
class definitions in 2 ways:
ServerActivatedObject Method when ever an
object is defined for the remote class then the
remoting system of the server will try to define
an object at the server and process the request
and the result will be given to the client system
based on the definitions of the remote class.
It is of 2 types
SingleCall Method when ever the client uses
the single call method to use the definitions of
the remote class object then an object will be
defined at the server once the response is given
back to the application the object created at the
server will be implicitly garbage collected i.e. the
object will be destroyed.
SingleTon Method when ever the client
application uses the definitions of the remote
class using SingleTon method then for the ever
first request for the remote class an object will be
defined at the server which will have a capability
to send the response back to any no of
Syntax to invoke the remote class object
definitions using serverActivatedobject method
registerWellKnownServiceType(gettype(remotecl
ass),URL,Single call / SingleTon)
registerWellKnownServiceType(gettype(remotecl
ass),URL)