Middleware Technologies IMP
Middleware Technologies IMP
Middleware Technologies IMP
Client: the client hardware is the desktop machine that runs client software. It could be
a micro or a workstation. The client software formulates data request and passes the
request to the network software. This software send the request to the server, accepts
the result from the server and passes the request back to the client software. Server: A
server is the machine that run data management software that has been designed for
server functionality. A server has operating system software, data management
software and a portion of the network software.
HTTP: hyper text transfer protocol is the underlying protocol used by the world wide
web. HTTP defines how message are formatted and transmitted and what action web
servers and browsers should take in response to various commands. HTTP only
supports transmission of text.
Database servers, which provide database storage and data sharing with other
computers In the network. Database servers more and store data records
or database over corporate networks and across the internet.
A web server is a computer system that delivers web pages. Every web server has an IP
address and possibly a domain name
Unit IV
43. What does IIOP stand for and what is its significance?
The Internet Inter-ORB Protocol (IIOP) is a specialization of the GIOP. IIOP is the
standard protocol for communication between ORBs on TCP/IP based networks. An ORB
must support IIOP (but can support other additional protocols) in order to be considered
CORBA 2.0 – compliant.
A server Activation Policy indicates how that particular server is intended to be accessed, for
example, if there is a single server used by all clients, or a new instance of the server should be
started for each client and so on.
Client callback method or simply callback is a generic term given to a method that is
implemented by a client called by a server .Callback essentially makes a client.
OMA capabilities include event management, licencing, object persistence, naming, security,
transaction, user interface management, data interchanging, and amd much more. The
interface for using these capabilities is standardized by the OMG, meaning that their usage is
consistent across platforms and products.
Because CORBA object interfaces are specified in IDL, which is independent of many
implementation language .it is necessary to specify a methodology for converting IDL data types
to data types of the implementation language(s) chosen. The language mapping for a particular
implementation language describes this methodology. Furthermore language mapping for
many common language are standardized, meaning that an application written to use one
CORBA product can be made to work with a different product with little or no modification.
Naming define how CORBA object can have friendly symbolic names.
UNIT-V
Component object model (COM) specifies architecture a binary standard, and a supporting
infrastructure for building, using and evolving component-based application. It extends the
benefits of object oriented programming such as encapsulation, polymorphism, and software
reuse to a dynamic and cross –process setting. Distributed COM (DCOM)is the distributed
extension of COM.It specifies the addition infrastructure that is required to further extend the
benefits to networked environment.
A .net equivalent of java virtual machine (JVM).it is the run time that converts a MSIL code into
the host machine language code. This is then executed appropriately.
Achieved through introduction of common type system (CTS).CTS much like java ,define every
data type as a class. Every .Net comp lint language must stick to this definition. since CTS define
every data type as a class. This means that only object oriented (or object based) languages can
achieves .NET compliance.
Web service is an extension of active. those of who have used ASP and JSP both, know the
apparent short comings of ASP.JSP has been enriched with the concept of beans and tags.ASP
equivalent for beans and tag was active controls and actives automation servers. let me take a
minute to explain this point a bit further .web service is not a micro propriety standard .it is a
W3Consort item standard and has been developed by Microsoft ,IBM an many names of the
industry.
Just as the web forms provide a unified way of developing GUI for desktop application the web
forms provide similar tool for web applications.web forms has been introduced in .Net as a part
of ASP.NET.Web forms are a engine ,that provide a browser –based user interface.
Window form (also called win forms)are used to create GUI for windows desktop application.
The idea of win forms has been borrowed from windows foundation classes (WFC) which were
used for visual J++.win forms provide an integrated and unified way of developing GUI.It has a
rich variety of windows controls and user interface support.
COM specifies a binary standard for interface to ensure dynamic interoperability of binary
objects possibly build using different programming languages.specically any COM interface
must satisfy two requirement .first its instantiation must follow a standard memory layout,
which is the same as the C++ virtual function table. In other words ,a COM interface pointer
that points to an array of virtual function pointers .second any COM interface must inherit
from the unknown interface so that its first three method are (1)Query interface () for
navigating between interfaces of the same object instance,(2)AddRef() for incrementing
reference counts and (3) Release() for decrementing reference counts.
A typical Client /Server interaction in COM goes like this client Starts activation phase by calling
CoCreateInstance () with the CLSID of the requested object and the IID of the requested
interface. It gets back an interface pointer from the call. Upon returning the interface pointer
the object calls AddREf () on itself. In the method invocation phase the client invokes method of
the interface through of pointer as if the object resides in its own address space .when the
client needs methods of another interface of the same object,it calls Query Interface() on the
current interface and specifies the IID of the second interface .once it get back a pointer to the
second interface, it can invoke methods as usual when the client finishes using either interface
pointer ,it calls Release()_ on the pointer.
The DCOM wire protocol extends the remoting architecture across different
machines.currently,it is specified as a set of extension layered on top of the DCE RPC
specification. It adopts DCE RPC’snetwork data representation (NDR) form for marshaling data
to transmit across heterogeneous network. It also leverages DCE RPC security capabilities for
authentication, authorization, and message integrity. In addition DCOM specifies the RPC
interfaces for remote server activation, ID-to-endpoint resolution, remote unknown method
invocation and pinging for rebuts referene counting. It also defines the data structure of object
reference and the DCOM Specific portion of R{C packets.
If an application allows multiple clients to concurrently invoke methods of the same COM
object, some synchronization mechanism need to be provided to protect the data COM
introduces the concept of apartments to allow objects with different concurrency constraints to
live in the same process. An apartment is a logical grouping of objects that share the same
concurrency constraints. Before a threat can use COM,it must first enter an apartment by
calling CoInitializeEx().every COM process can have at must one multithreaded apartment
(MTA),but it can contain multiple single threaded need to be properly protected .It contrast
only one thread can execute in an STA and so concurrent accesses to objects in an STA are
automatically serialized.
COM’s approach to versioning is based on the following three requirements: first any interface
must be immutable. Second, a new implementation of the same CLSID must support existing
interfaces. Finally any client must start interacting with a server by querying an interface with
an IID.such a combination allows independent evaluation of the client and server software
.suppose on particular machine, the server software is upgraded before the client is. Since the
new server support all old interface, the old client can still obtain all the interface pointers that
it needs an drunk smoothly. When the client software is also upgraded first on another
machine. The new client will try querying the new interfaces on the old server and fail. this
procedure forces the new client to handle the failure by, for example, providing only old
feature. But it will not cause the new client to crash or unknowingly execute incorrectly
.admittedly there are still problems in practice that remain to be solved .for example bug fixes
of an existing interface implementation may change the behavior, new implementation of the
same CLSID may not be willing to carry all old implementations.
In computer programming ,marshalling us the process of gathering data from one or more
application or non-contiguous source in computer storage, putting the data pieces into a
message buffer ,and organizing or converting the data into a format that is prescribed for a
particular receiver or programming interface .marshalling is usually required when passing the
output parameters of a program written in one language as input to a program written in
another language ,the process of gathering data can transcend network boundaries, in order for
an object to be moved around a network, it must be converted into a data stream that
corresponds with the packet structure of the network transfer protocol. this conversion is
known as data marshalling .data pieces are collected in a message buffer before they are
marshaled. When the data is transmitted the receiving computer converts the marshaled data
back into an object.
To create a COM object and get an interface from the object, you call the COM library API
CoCreateInstance ().
ReLsid
The CLSID of the coclass.for example you can pass CLSIDshelllink to create a COM object used to
create shortcuts.
Punk Outer this is only used when aggregationCOM objects, which is a way of taking an existing
coclass and adding new method to it .for our purposes, we can just pass NULL to indicate we’re
notdwClsContext.
Indicates what kinds of COM servers we want to use. For this article, we will always be using
the simplest kind of server, an in process DLL, so we’ll pass
CLSCTX_INPROC_SERVER One caveat: you should not use CLSCTX_ALL(which is the default in
ATL)because it will fail one windows 95 system that do not have DCOM installed.
Riid
The IID of the interface you want returned .for example you can pass IID_IShellLink to get a
pointer to an IShellLink Interface
PPV
Address of an interface pointer. The COM library returns the requested interface through this
parameter. When you call CoCreateInstance().it handles looking up the CLSID in the registry,
reading the location of the server, loading the server into memory, and creating an instance of
the co class you requested.
We don’t free COM objects you just tell them that you’re done using them. the Unknown
interface, which every COM object implement ,has a method Release ().You call this method tell
the COM object that you no longer need it. Once you call Release(),you must not use the
interface pointer any more ,since the COM object may disappear from memory at any time .If
our app uses a lot of different COM objects, It’s vitally important to call Release() whenever
you’re done using an interface. If you don’t release interface, the COM objects (and the DLLs
that contain the code) will remain in memory and will needlessly add to your app’s working set.
If your app will be running for a long time, you should call the Co FreeUnusedLibraries () API
during your idle processing .this API unloads any COM servers that have no outstanding
interfaces, so this also reduces your app’s memory usage.
Every COM interface is derived from Unknown .the name is a bit misleading ,in that it’s not an
unknown interface.tha name signifies that if you have an Unknown pointer to a COM object
,you don’t know what the underlying object is since every COM object implements I Unknown.
1. AddRef ()-Tell the COM object to increment its interface count. You would use this method if
you made a copy of an interface pointer, and both the original and the copy would still be used.
We won’t need to use AddRef () for our purpose in this article.
2. Release ()-Tells the COM object to decrement its interface pointer count .see the previous
example for a code snipped demonstrating Release ().
3. QueryInterface ()-Requested an interface pointer from a COM object .You use this when a co
class Implement s more than one interface.
Component is an independent piece of code that may be shared with different programs.
An Object is a set of code that is designed to be reusable with a well defined interface.
Distributed component object model is the combination of COM plus the network protocol that
allow running a COM object on a remote computer.
The class module in visual basic is where we define an object‘s template. With in the class we
setup the properties, methods and events that the class will offer to outside users.
Exe files contain object code that is run nuder control of windows. EXE files use the portable
Executable format, which is common across all windows systems, including those that run on
different processors.
Dynamic Link Library file contain collection of functions and subroutines that can be shard
among multiple programs, including EXE programs and other DLL’s.
Method Routines are nothing but functions and subroutines that are buried in a class module.
Many software problems can be solved by one more of Indirection. Supporting indirection is a
special from of providing extensibility. In most traditional programming paradigms, offering one
more level of indirection often involves tricky programming hacks that may impose certain
limitation. In contrast, COM builds into its architecture the support for indirection. As
demonstrated in the following discussion, activation indirection can be used for online software
update and load balancing, while call indirection can facilitate fault tolerance and object
migration.
Coupling means that components in separate modules are not tightly integrated with each
other, an application using components in one module generally need not know about
components in another module. (Of course, there is often some overlap between modules for
various reason, such as the need to share data between modules or to facilitate common
functionality between modules, such as the need to share data between components, they are
said to be loosely coupled
Cohesion means that interfaces within the module are tightly integrated with each other. For
example, a module called internal combustion Engine might contain interfaces such as Cylinder
Head, Timing Chain, crankshaft, piston, and many others. It is difficult to describe the purpose
of one of these components without referring to the others hence, one might say that the
components are tightly cohesive. By way of comparison, you would probably find very little in
common between the components of internal combustion Engine and for instance, Audio
System components such as compacDiscPlayer and Subwoofer.
Constructed types, which combine other types, enable the creation of user-defined types.
Perhaps the most useful of these constructs is the interface, which defines the services
provided by your application objects. Because IDL is after all the Interface Definition Language,
it seems fitting that interfaces should comprise the bulk source code.
The enumerated type, enum, allows the creation of types that can hold one of a set of
predefined values specified by the enum. Although the identifiers in the enumeration comprise
an ordered list, IDL does not specify the ordinal numbering for the identifiers. Therefore,
comparing enum values to integral values mighy not be safe, and would almost certainly not be
portable across language. C and C++ also have an enum erated type that works similarly.
94. Explain the Structure data Types?
IDL provides a structure type – struct –that contains, as in C and C++, any number of member
values of disparate type (even other structs). Structs are especially useful in IDL because, unlike
CORBA objects (Which are represented by interfaces), structs are passed by value rather by
reference. In other words, when a struct is passed to a remote object, a copy of that struct’s
values is created and marshaled to the remote object.
The IDL union type, like a struct, represents values of different types. The IDL union type will
appear somewhat odd to C and C++ programmers, resembling something of a cross between a
C/C++ union and a case statement, but pascal programmers should recognize the format.
A discriminator as used in an IDL union is a parameter that determines the value used by the
union In the example in Listing 3.5, a long was used for the discriminator, other types can used
also, including long, long short, unsigned long, unsigned long long, unsigned short, char,
Boolean, or enum. The constant values in the case statements must match the discriminator’s
type.
A method signature, often simply called a signature what a method does (ideally, the method
name should specify, at least in general terms, what the method does), what parameters (and
their types) the method takes as input, and what parameters(and their types) it returns as
output. In, out, and input Parameters As already mentioned, parameters in a method can be
declared as in, out parameter is an output from the method and an in out from the method.
The term blocking refers to any point at process or thread is waiting for a Particular resource or
another process / thread. Within the context of CORBA, if a client invokes a remote method and
must wait for the result to be returned, the client is said to block. A request is simply another
name for a remote method invocation. The term is commonly used when referring to the
operation of a distributed system. In fact, when you study CORBA’s Dynamic Invocation
Interface (DII), you’II see that remote methods can invoked through a Request object.
The .NET Framework introduces a completely new model for the programming and deployment
of application. .NET is Microsoft’s vision of “Software as a service”, a development environment
in which you can build, create, and deploy your application and the next generation of
components, the ability to use the Web rather than your own computer for various services.
100. What are the major components (layers) of .Net framework:
The top layer includes user and program interface .windows forms are a new way to create
standard win32 desktop application ,based on the windows foundation classes for J++.Web
form provide a powerful ,forms based UI for the web.Webservices,which are perhaps the most
revolutionary, provide a mechanism for program to communicated over the internet using
SOAP. Web services provides an analog of COM and DCOM for object brokering and interfacing
.but based on internet technologies so that all allowance is made for integration even with non-
Microsoft platforms.web forms and windows services, comprise the internet interface portion
of .NET and are implemented through a section of the .NET framework, making them
universally and standardizing their usage across languages.
We use the term remoting architecture to refer to the entire infrastructure that connects COM
client to out of process server objects. The standard remoting architecture includes, among
other things.(1) object proxies: that act as the client –side representative of server objects and
connect directly to the client;(2)interface proxies: that perform client side data marshaling and
are aggregated into object proxies;(3)client-side channel object that use remote procedure calls
RPCs to forward marshaled calls;(4)server-side endpoints that receive RPC requests,(5)server
side stub manager that dispatches calls to appropriate interface stubs(6)interface stubs that
perform server side data marshaling and make actual calls on the objects; and (7)standard
marshaled that marshals interface pointer into object reference on the server side unmarshals
that object reference on the client side. Note that interface proxies and stubs are application
specific and are generated by running an interface definition language(IDL)compiler on
application supplied IDL files .The other object are application –independent and are provided
by COM