IT1402-MIDDLEWARE TECHNOLOGIES Two Mark Questions With Answers 2014

Anna University, Chennai

Anna_University,_Chennai_logo

SRINIVASAN ENGINEERING COLLEGE, PERAMBALUR 

IT1402-MIDDLEWARE TECHNOLOGIES

2 Marks

UNIT I-CLIENT / SERVER CONCEPTS

1. What is Client/Server?

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 sends 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 runs 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.

2. Define File server.

File Server : File servers manage a work group’s applications and data files, so that they may be

shared by the group. File servers are very I/O oriented. They pull large amounts of data off their storage subsystems and pass the data over the network. When the data from the file is requested, a file server transmit all records from the file.

3. What are the Service Specific middleware available?

ODBC : Open database connectivity is a windows technology that lets a database client

application connect to a external database. To use ODBC, the database vendor must provide an

ODBC driver for data access.

HTTP : Hyper Text Transfer Protocol is the underlying protocol used by the world wide web. HTTP defines how messages are formatted and transmitted and what action web servers and browsers should take in response to various commands. HTTP only supports transmission of text.

4. Define the services provided by Web server.

Web server : A webserver is a computer system that delivers web pages. Every web server has

an IP address and possibly a domain name. for example an URL: http://www.niceindia.com/index.html in our browser. This sends a request to the server whose domain name is niceindia.com. the server fetches the page named index.html and sends back to our browsers.

5. Define TCP/IP and IPx/SPx.

TCP/IP : Transfer control Protocol and Internet Protocol.

6. What is Remote Procedure Call?

Remote Procedure Call (RPC): One of the earliest facilities that was created to help programmers

write client/server software is known generically as a Remote Procedure Call mechanism. When implementing a program, the programmer uses procedures to keep the code manageable. Instead of defining a single, large procedure that performs many tasks, the programmer divides the tasks into sets and uses shorter procedure to handle each set. A client procedure process calls a function on a remote server and suspends itself until it gets back the result. This process that issues the calls and waits until it gets the result is called remote procedure call.

7. What are the different categories of client/Server applications?

Classes of client/server applications: Client/Server applications can be categorized by

class, based on where most of the processing is done. Each class requires different hardware and software capabilities on the client, the server and the network.

1. Host-Based Processing

2. Client-Based Processing

3. Coopeartive Processing

8. What is meant by Client, Server & Network?

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 sends 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 runs 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.

Network : The network hardware is the cabling, the communication cards and the devices that link the servers and the clients.

9. Define Application server.

Application Server : Application server, which provides specific application services to an

application. Application servers are the type of middleware, which occupy a large chunk of computing territory between database servers and end users.

10. What is meant by HTTP and ODBC?

ODBC : Open database connectivity is a windows technology that lets a database client

application connect to a external database. To use ODBC, the database vendor must provide an

ODBC driver for data access.

HTTP : Hyper Text Transfer Protocol is the underlying protocol used by the world wide web. HTTP defines how messages are formatted and transmitted and what action web servers and browsers should take in response to various commands. HTTP only supports transmission of text.

11. Define Group Server.

Groupware Server : A Groupware server is a software designed to enable users to collaborate,

regardless of location through the internet or a corporate intranet and to work together in a virtual atmosphere.

12. Define TCP/IP and IPx/SPx.

TCP/IP : Transfer control Protocol and Internet Protocol.

13. What is Peer-to-Peer communication?

Peer-to-Peer : Most early client/server applications were implemented using low level

conversational peer-to-peer products. The term peer-to-peer indicates that the two sides of a communication link use the same protocol interface to conduct a networked conversation. Any computer can initiate a conversation with any other computer. A peer-to-peer network relationship defines one in which computer on the network communicate with each other as equals. Each computer is responsible for making its own resources available.

14. What are the different categories of client/Server applications?

a) Host-Based Processing

b) Client-Based Processing c) Coopeartive Processing

15. What is Server & Network?

Server : A server is the machine that runs 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.

Network : The network hardware is the cabling, the communication cards and the devices that link the servers and the clients.

16. What is meant by Client & Network?

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 sends the request to the server, accepts the result from the server and passes the request back to the client software.

Network : The network hardware is the cabling, the communication cards and the devices that link the servers and the clients.

17. What is Application server ?

Application servers, which provide specific application services to an application. An example is

a server that runs a database that a distributed application users. Application servers are the type of middleware, which occupy a large chunk of computing territory between database servers and end users, and they often connect the two.

18. What is Database servers ?

Database servers, which provide database storage and data sharing with other computers in the

network. Database servers more and store data records or databases over corporate networks and across the internet.

19. What is Group Server ?

A Groupware server is a software designated to enable users to collaborate, regardless of

location through the internet or a corporate intranet and to work together in a virtual atmosphere.

20. What is Web Server ?

A Web Server is a computer system that delivers web pages. Every web server has an IP address

and possibly a domain name.

21. What is FTP Servers ?

FTP servers one of the Oldest Internet services. It makes it possible to move one or more files

securely between computers while providing file security and organization as well as transfer control.

22. What is Mail Server?

Mail Servers move and store mail over corporate networks( Via LAN’s and WAN’s) and across

the Internet.

23. What is News Servers?

News Servers act as a distribution and delivery source for the thousands of bublic news groups

currently accessible over the USENET news network.

24. What is ODBC?

Open Database Connectivity is a windows technology that lets a database client application

connect to a external database. To use ODBC, the Database vendor must provide an ODBC

driver for data access.

25. What is HTTP?

Hyper Text Transfer Protocol is the underlying protocol used by the world wide web. HTTP

defines how messages are formatted and transmitted and what action web servers and browsers should take in response to various commands.

26. What is MOM?

Message Oriented Middleware allows general-purpose message to be exchanged in a

client/server systems using message queues. MOM messaging and queuing allow clients and servers to communicate across a network without being linked by a private, dedicated, logical connection.

27. What is File server ?

File server manage a work groups applications and data files, so that they may be shared by the

group. File servers are very I/O oriented, they pull large amount of data off their storage subsystems and pass the data over the network. When data from the file is requested, a file server transmit all records of a file and the entire index to the client.


 UNIT II-EJB ARCHITECTURE

2 Marks

1. What is EJB?

Enterprise Java Bean is a server-side component architecture that simplifies the process of

building enterprise-class distributed component application in Java.

2. What is the role of system administrator in EJB Server?

System administrators are responsible for the day-to-day operations of the EJB Server. Their

responsibilities include keeping security information up-to-date and monitoring the performance of the server.

UNIT III-EJB APPLICATIONS

2 Marks

1. Define Bean with Bean-Managed Persistent?

An Entity Bean with Bean-Managed Persistence contains code that updates the underlying

database. Each Entity bean instance has an associatied primary key. Logically, a primary key is a value or combination of values that allows to uniquely specify a row of data.

2. What is Entity Bean?

Entity beans are long-lived, they exist across client session, one shared by multiple clients and

remain alive even after a restart of the server or other failures. An entity bean must implement the entity bean interface.

3. What is Session Bean?

Session beans are generally tied to the lifetime of a given client session. They are relatively

short-lived, state full session object are created in response to a single clients request.

4. What is Enterprise Java Bean?

Enterprise Java Bean: EJBs are write-once, run-any-where middle-tire components.

Enterprise JavaBeans is a server side component architecture that simplifies the process of building enterprise-class distributed component applications in java.

5. What is session Bean?

Session beans are generally tied to the lifetime of a given client session. They are relatively

short-lived, statefull session object are created in response to a single clients request.

6. What is Statefull Session?

Stateful Session is a bean that changes state during a conversation, ie a bean that has

instance variables.

7. What is meant by Deployment?

Deployment is the process of installing an object in server side.

8. What is Interface?

An interface defines the protocol of communication between two separate components of a system. The interface describes what services are provide by a component and the protocol for using those services.

9. Write short notes on Transaction Monitor?

A transaction monitor service oversees transactions on behalf of other objects. A transaction, in

turn, is an operation or set of operation that must be performed automatically; that is, either all objects involved in the transaction must commit the transaction or all objects involved must abort the transaction.

10. Define Directory Services.

Directory services refers to a set of services that enable objects, which can be servers,

businesses, or even people, to be located by other objects.

11. What is Marshaling and unmarshaling?

Marhsaling refers to the process of translating input parameters to a format that can be

transmitted across a network. Unmarshaling is the reverse of marshaling; this process converts data from the network to output parameters.


UNIT IV-CORBA

2 Marks

1. Define CORBA.

The Common Object Request Broker Architecture (CORBA) from the Object Management Group (OMG) provides a platform-independent, language-independent architecture for writing distributed, object-oriented applications. CORBA objects can reside in the same process, on the same machine, down the hall, or across the planet. The Java language is an excellent language for writing CORBA programs. Some of the features that account for this popularity include the clear mapping from OMG IDL to the Java programming language, and the Java runtime environment’s built-in garbage collection.

2. What is meant by ORB?

A fundamental part of the Common Object Request Broker architecture is the Object Request

Broker (ORB). The concept of an ORB is this: When an application component wants to use a service provided by another component, it first must obtain an object reference for the object providing that service. After an object reference is obtained, the component can call methods on that object, thus accessing the desired services provided by that object. The primary responsibility of the ORB is to resolve requests for object references, enabling application components to establish connectivity with each other.

3. 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.

4. What is an Object reference?

When an object is passed by reference, the object itself remains "in place" while an

object reference for that object is passed. Operations on the object through the object reference are actually processed by the object itself.

5. What is IDL and why is it useful?

The Interface Definition Language (IDL) is a standard language used to define the

interfaces used by CORBA objects. The IDL specification is responsible for ensuring that data is properly exchanged between dissimilar languages. For example, the IDL long type is a 32-bit

signed integer quantity, which can map to a C++ long (depending on the platform) or to a Java int. It is the responsibility of the IDL specification--and the IDL compilers that implement it--to define such data types in a language-independent way.

6. Write short notes on Deployment Discriptor?

Deployment is the process of specifying middleware requirements to the container.

The deployment descriptor class is the base class used both Session Descriptor and Entity

Descriptor.

7. Define Language Mapping.

A language mapping is a specification that maps IDL language constructs to the

constructs of a particular programming language. For example, in the C++ language mapping, the IDL interface maps to a C++ class.

8. Define IDL Comments ?

// Comments in IDL follow the same conventions as Java and C++. Both C-style and C++-style

comments are allowed, as illustrated in Listing 3.1. (Note that the second comment in the listing contains embedded comment characters; these are for description purposes only and are not actually allowed by IDL.)

// This is a C++-style comment. Anything following the "//"

// characters, to the end of the line, is treated as part of the

// comment.

/* This is a C-style comment. Anything between the beginning "/*" characters and the trailing "*/" characters is treated

as part of the comment. */

9. What is Partitioning ?

The grouping together of similar interfaces, constant values, and the like is commonly

referred to as partitioning and is a typical step in the system design process (particularly in more complex systems). Partitions are also often referred to as modules (which should be no surprise) or as packages (in fact, the IDL module concept closely resembles the Java package concept--or the other way around, because IDL came first).

10. Define GIOP.

The General Inter-ORB Protocol (GIOP) is a high-level standard protocol for communication

between ORBs. Because GIOP is a generalized protocol, it is not used directly; instead, it is specialized by a particular protocol that would then be used directly.

11. What is Distributed Computing Environment ?

The Distributed Computing Environment is a set of standard pioneered by the open software

foundation (OSF), includes a standard for RPC. Although the DCE standard has been around for some time, and was probably a good idea, it has never gained wide acceptance and exists today as little more than an historical curiosity.

12. What is Java RMI?

Java Remote Method Invocation helps to invoke remote object from remote server.

13. What is Client Stub?

A client stub, which is generated by the IDL compiler, is a small piece of code that makes a

particular CORBA server interface available to a client.

14. What is Server Skeleton?

A server skeleton, also generated by the IDL compiler, is a piece of code that provides the

"framework" on which the server implementation code for a particular interface is built.

15. What is Language mapping?

A language mapping is a specification that maps IDL language constructs to the constructs of a

particular programming language. For example, in the C++ language mapping, the IDL interface maps to a C++ class.

16. Define serialization.

Serialization refers to the encoding of an object’s state into a stream, such as a disk file or

network connection. When an object is serialized, it can be written to such a stream and subsequently read and deserialized, a process that converts the serialized data containing the object’s state back into an instance of the object.

17. Define activation policy.

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.

18. What is Callback method?

Client callback method, or simply callback, is a generic term given to a method that is

implemented by a client and called by a server. Callbacks essentially make a client

19. Define the capabilities of OMA?

OMA capabilities include event management, licensing, object persistence, naming, security,

transactions, user interface management, data interchange, and much more. The interfaces for using these capabilities are standardized by the OMG, meaning that their usage is consistent across platforms and products.

20. Why are language mappings a necessary part of CORBA?

Because CORBA object interfaces are specified in IDL, which is independent of any

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 mappings for many common languages 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.

21. What is Naming Service?

Naming defines how CORBA objects can have friendly symbolic names.


UNIT V-COM

2 Marks

1. What is meant by COM?

Component Object Model (COM) specifies an architecture, a binary standard, and a supporting

infrastructure for building, using, and evolving component-based applications. 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 additional infrastructure that is required to further extend the benefits to networked environments.

2. Define the term Interface ?

An interface is a collection of functionally related abstract methods, and is identified by a 128-

bit globally unique identifier (GUID) called the interface ID (IID).

3. What is “Comman Language Runtime” (CLR)?

CLR is . NET equivalent of Java Virt ual Machine ( JVM) . I t is t he runt im e t hat convert s a

MSI L code int o t he host m achine language code, which is t hen execut ed appropriat ely .

4. What is Microsoft Intermediate Language (MSIL)?

A . NET program m ing language ( C# , VB. NET, J# et c. ) does not com pile int o execut able code; inst ead it com piles int o an int erm ediat e code called Microsoft I nt erm ediat e Language ( MSI L) . As a program m er one need not w orry about t he synt ax of MSI L - since our source code in aut om at ically convert ed t o MSI L

5. What is Common Type System (CTS) ?

Achieved t hrough int roduct ion of Com m on Type Syst em ( CTS) . CTS, m uch like Java,

defines every dat a t ype as a Class. Every . NET com pliant language m ust st ick t o t his definit ion. Since CTS defines every dat a t ype as a class; t his m eans t hat only Obj ect - Orient ed ( or

Obj ect - Based) languages can achieve . NET com pliance.

6. What is mean by Web forms ?

Just as the Win 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 forms engine, that provide a browser-based user interface.

7. What is Windows forms?

Windows forms (also called Win Forms) are used to create GUI for Windows desktop

applications. The idea of Win Form has been borrowed from Windows Foundation Classes (WFC) which were used for Visual J++. Win Form provide an integrated and unified way of developing GUI. It has a rich variety of Windows controls and user interface support.

8. What is Binary standard ?

COM specifies a binary standard for interfaces to ensure dynamic interoperability of binary objects possibly built using different programming languages. Specifically, any COM interface must satisfy two requirements. 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 is a pointer to a 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 methods are (1) QueryInterface() for navigating between interfaces of the same object instance, (2) AddRef() for

incrementing reference counts, and (3) Release() for decrementing reference counts.

9. What is programming model?

A typical client/server interaction in COM goes like this: client starts the 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 methods of the

interface through the pointer as if the object resides in its own address space. When the client needs to call methods of another interface of the same object, it calls QueryInterface() on the

current interface and specifies the IID of the second interface. Once it gets 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.

10. What is Distributed COM ?

The DCOM wire protocol extends the remoting architecture across different machines.

Currently, it is specified as a set of extensions layered on top of the DCE RPC specification . It adopts DCE RPC’ s Network Data Representation (NDR) format for marshaling data to be transmitted across heterogeneous network. It also leverages DCE RPC’ s 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 robust reference counting . It also defines the data structure of object references and the DCOM-specific portion of RPC packets.

11. What is Threading Model ?

If an application allows multiple clients to concurrently invoke methods of the same COM

object, some synchronization mechanisms 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 thread can use COM, it must first enter an apartment by calling CoInitializeEx( ). Every COM process can have at most one multithreaded apartment (MTA), but it can contain multiple single-threaded apartments (STAs). Multiple threads can execute in an MTA concurrently, so object data in an MTA need to be properly protected. In contrast, only one thread can execute in an STA and so concurrent accesses to objects in an STA are automatically serialized.

12. What is Versioning ?

COM’ s approach to versioning is based on the following three requirements: first, any interface

(identified by an IID) 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 evolution of client and server software. Suppose, on a particular machine, the server software is upgraded before the client is. Since the new server supports all old interfaces, the old client can still obtain all the interface pointers that it needs and run smoothly. When the client software is also upgraded, the new client will query the new interfaces to enjoy the new features. In contrast, suppose the client software is 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 features. 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 implementations of the same CLSID may not be willing to carry all old implementations.

13. What is Marshalling and Remoting ?

In computer programming, marshalling is the process of gathering data from one or more

applications or non-contiguous sources 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 and transforming it into a standard format before it is transmitted over a network so that the 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.

14. What is Object Creation ?

To create a COM object and get an interface from the object, you call the COM library API

CoCreateInstance(). The parameters are:

rclsid

The CLSID of the coclass. For example, you can pass CLSID_ShellLink to create a COM object used to create shortcuts.

pUnkOuter

This is only used when aggregating COM objects, which is a way of taking an existing coclass and adding new methods to it. For our purposes, we can just pass NULL to indicate we’re not using aggregation.

dwClsContext

Indicates what kind 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 on Windows 95 systems 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 coclass you requested.

15. What is Object Destruction ?

We don’t free COM objects, you just tell them that you’re done using them. The IUnknown

interface, which every COM object implements, has a method Release(). You call this method to 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 interfaces, 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 CoFreeUnusedLibraries() API during your idle processing. This API unloads any COM servers that have no outstanding references, so this also reduces your app’s memory usage.

16. Explain COM Interfaces ?

Every COM interface is derived from IUnknown. The name is a bit misleading, in that it’s not an

unknown interface. The name signifies that if you have an IUnknown pointer to a COM object, you don’t know what the underlying object is, since every COM object implements IUnknown. IUnknown has three methods:

1. AddRef() - Tells the COM object to increment its reference 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 purposes in this article.

2. Release() - Tells the COM object to decrement its reference count. See the previous

example for a code snippet demonstrating Release().

3. QueryInterface() - Requests an interface pointer from a COM object. You use this when a coclass implements more than one interface.

17. What is a component ?

Component is an independent piece of code that may be shared with different programs.

18. What is an Object ?

An Object is a set of code that is designed to be reusable with a well-defined interface.

19. What is DCOM ?

Distributed Component Object Model is the combination of COM plus the network protocols

that allow to run a COM Object on a remote Computer.

20. What is Class Module ?

The class module in Visual Basic is where we define an object’ s template. Within the class we

setup the properties, methods and events that the class will offer to outside users.

21. What are the elements of Class Module ?

It’ s merely a collection of subroutines, functions, variables and option declarations.

22. What is Module Variable ?

Variables declared outside the routines in a module are called variables

23. What is EXE files ?

EXE files contain object code that is run under control of windows. EXE files use the portable

Executable format, which is common across all windows systems, including those that run on different processors.

24. What is Dynamic Link Library?

Dynamic Link Library file contain collection of functions and subroutines that can be shared

among multiple programs, including EXE programs and other DLL’ s.

25. What is Method Routines ?

Method Routines are nothing but functions and subroutines that are buried in a class module.

26. What is Event Declaration ?

Event Declaration allow our class objects to call a subroutine in a client program.

27. What is Indirection ?

Many software problems can be solved by one more level of indirection. Supporting indirection is a special form of providing extensibility. In most traditional programming paradigms, offering one more level of indirection often involves tricky programming hacks that may impose certain

limitations. In contrast, COM builds into its architecture the support for indirection. As demonstrated in the following discussion, activation indirection can be used for on-line software

update and load balancing, while call indirection can facilitate fault tolerance and object

migration.

28. What is Coupling ?

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 reasons, such as the need to share data between modules or to facilitate common functionality between modules.) When there is little or no dependency between components, they are said to be loosely coupled.

29. What is Cohesion ?

Cohesion means that interfaces within the module are tightly integrated with each other. For example, a module called InternalCombustionEngine might contain interfaces such as

CylinderHead, TimingChain, 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 InternalCombustionEngine and, for instance,

AudioSystem; InternalCombustionEngine components such as OilFilter and SparkPlug are loosely coupled to AudioSystem components such as CompactDiscPlayer and Subwoofer.

30. Explain Constructed Type in Data types?

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 of IDL source code.

31. Explain Enumerated Data types?

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 might not be safe, and would almost certainly not be portable across languages. C and C++ also have an enumerated type that works similarly.

32. 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 types (even other structs). structs are especially useful in IDL because, unlike CORBA objects (which are represented by interfaces), structs are passed by value rather than 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.

33. Explain Union Data types?

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.

34. What is Discriminator?

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 be used also, including long, 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.

35. What is Method Signature ?

A method signature, often simply called a signature, describes 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 inout Parameters As already mentioned, parameters in a method can be declared as in, out, or inout. These names are fairly self-explanatory: An in parameter serves as input to the method; an out parameter is an output from the method; and an inout parameter serves as an input to and an output from the method

36. What is Blocking on a remote method call ?

The term blocking refers to any point at which a 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’ll see that remote methods can be invoked through a Request object.

37. What is .NET?

The .NET Framework introduces a completely new model for the programming and

deployment of applications. .NET is Microsoft’s vision of "software as a service", a development environment in which you can build, create, and deploy your applications and the next generation of components, the ability to use the Web rather than your own computer for various services.

38. What are the major Components ( Layers ) of the .NET framework:

The top layer includes user and program interfaces. Windows Forms are a new way to

create standard Win32 desktop applications, based on the Windows Foundation Classes

(WFC) produced for J++. Web Forms provide a powerful, forms-based UI for the web. Web Services, which are perhaps the most revolutionary, provide a mechanism for programs to communicate over the Internet using SOAP. Web Services provide an analog of COM and DCOM for object brokering and interfacing, but based on Internet technologies so that allowance is made for integration even with non-Microsoft platforms. Web Forms and Web Services, comprise the Internet interface portion of .NET, and are implemented through a section of the .NET Framework referred to as ASP.NET. The middle layer includes the next generation of standard system services such as ADO.NET and XML. These services are brought under the control of the framework, making them universally available and standardizing their usage across languages.

39. What is Remoting Architecture?

We use the term remoting architecture to refer to the entire infrastructure that connects COM

clients to out-of-process server objects. (See Figure 1.) The standard remoting architecture includes, among other things, (1) object proxies that act as the client-side representatives 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 objects 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 marshaler that marshals interface pointers into object references on the server side and unmarshals the object references 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 objects are application-independent and are provided by COM.

No comments:

Post a Comment