10. distributed object-based systems i cse5306 lecture quiz 36 due 5pm saturday, 28 november 2015...

75
10. Distributed Object- Based Systems I CSE5306 Lecture Quiz 36 due 5PM Saturday, 28 November 2015 [Team 1 : Chanakya, Mounika]

Upload: rosemary-goodman

Post on 17-Jan-2016

220 views

Category:

Documents


0 download

TRANSCRIPT

10. Distributed Object-Based Systems I

10. Distributed Object-Based Systems ICSE5306 LectureQuiz 36 due 5PMSaturday, 28 November 2015[Team 1 : Chanakya, Mounika]IntroductionAn object plays an important part in attaining distribution transparency. Clients are offered services in the form of objects invoked.It is easy to hide distribution aspects behind an objects interface.

[Team 1 : Chanakya, Mounika]ARCHITECTUREObject orientation forms an important aspect in software development and is popular since its inception.The natural ability to build software into well-defined and more or less independent components is the reason for its popularity.Object orientation began to be used for developing distributed systems in the 1980sThe notion of an independent object hosted by a remote server while attaining a high degree of distribution transparency formed a solid basis for developing a new generation of distributed systems.

[Team 1 : Chanakya, Mounika]R U O K ?1. An object plays an important part in attaining distribution transparency, becauseClients are offered services in the form of objects invoked.It is easy to hide distribution aspects behind an objects interface.All the aboveNone of the above[Team 1 : Chanakya, Mounika]NamingIt evolves around the way references to object are supported.In JAVA the object references effectively correspond to portable proxy implementation.However, this a language-dependent way of being able to refer to remote objects. Again taking CORBA as an example, let us seeSEC. 10.4 NAMING 467 describes how basic naming can also be provided in a language and platform-independent way.

[Team 1 : Chanakya, Mounika]RUOK2.Which of the following effectively describes naming?a. It evolves around the way references to object are supported.b. In JAVA the object references effectively correspond to portable proxy implementation.c. All the aboved. None of the above[Team 1 : Chanakya, Mounika]10.1.1 Distributed ObjectsData encapsulated by objects known as States and Operations on those data is called methods which are offered through interface.Object interfaces are used by processes to access or manipulate the state of object by invoking methods available to it.Strict separation between interfaces and objects implementing interfaces is important for distributed systems i.e. having interface on one machine and object on another machine. This organization is called distributed objects.

[Team 02 Nikhil Joshi Shravan Kokkula]

10.1.1 Distributed Objects contd..As shown in fig, client binds to a distributed Object.Proxy is the implementation of object`s interface on client side which is then loaded into client's address space.(analogous to client stub in RPC)It marshals method invocations into messages and unmarshals reply messages to return result of method invocation.Objects reside on server machine which has same interface as client machines wherein Incoming invocation requests are sent to server stub, that unmarshals it to offer method invocation at the object's interface at server side and forwards reply messages to the client side proxy.

[Team 02 Nikhil Joshi Shravan Kokkula]

10.1.1 Distributed Objects contd..The server-side stub is often called as skeleton as it facilitates bare means for letting the server middleware access the user-defined objects. Distributed objects doesnt have state distributed as it is present on one machine. Interfaces implemented by objects are made available on other machines known as remote objects.Therefore distributed objects, have the state itself which may be physically distributed across multiple machines, but this distribution is hidden from clients behind the object's interfaces.

Team 02 Nikhil Joshi Shravan Kokkula

R U O K ?3)Skeleton that facilitates bare means for its middleware access the user-defined objects? A. Server side stub.B. Client side stub. C. Server side stub and client side stub. D. None of the above.[Team 02 Nikhil Joshi Shravan Kokkula]R U O K ?4)What is true about distributed objects?A. Distributed objects doesnt have state distributed.B. State is object encapsulating data. C. Implementation of the objects interface is called proxy.D. All of the above.E. None of the above.[Team 02 Nikhil Joshi Shravan Kokkula] ObjectsObjects appear in many forms in distributed systems,such as in object oriented languages .Compile time objects differ from run time objects.An object can be defined as an instance of class. A class is nothing but a blueprint or a template for creating different objects which defines its properties and behaviorsTeam03-Sashanka Teja lakkakula ,Savankumar Akbari

RUOK?5)Which of the following exhibit behavior related to its class?

MethodInterfaceObjectAll of the above

Team03-Sashanka Teja lakkakula ,Savankumar AkbariCompile time ObjectsCompile time objects makes easier to build application in distributed system In Java, compiler compiles the class definition , which allows to create object of classInterface adds functionality to class, allowing them to compile into client or server side stub By this way distributed system can call remote machine

Team03-Sashanka Teja lakkakula ,Savankumar Akbari

Compile time ObjectsCompile time object depends on efficiency of programming language for the compilation.Above limitation can restrict the working & functionality of distributed system.Inorder to mitigate above drawback, Distributed objects can be created at runtime instead of Compile time

Team03-Sashanka Teja lakkakula ,Savankumar Akbari

Runtime ObjectsThis objects are created during the execution of the program.Used in many distributed operating application since it removes language dependency.Such objects can be written in multiple language like java,c++,etc.Object adapter can be used to invoke method on remote maachineTeam03-Sashanka Teja lakkakula ,Savankumar Akbari

RUOK?6) What is the major drawback of compile time object?

They are dependent on programming language used They utilize more resourcesThey are comparatively slowAll of the above None of the above

Team03-Sashanka Teja lakkakula ,Savankumar AkbariRUOK?7) Why run time objects are mostly used in distributed system application ?It is independent of language being used for execution They are mainly machine independent They can call remote machine to run instance from local machine All of the above Team03-Sashanka Teja lakkakula ,Savankumar AkbariObject Adapter Used for executing program on remote machine Allows defining run time object in terms of interface they implement This interface is used to make remote call and takes care of all the remote access request

Team03-Sashanka Teja lakkakula ,Savankumar Akbari

RUOK?8) What is the main purpose of Object Adapter?Adapter bind the object to its classIt allows remote execution of distributed system Provides interface to local object All of the aboveNone of the above Team03-Sashanka Teja lakkakula ,Savankumar AkbariPersistent ObjectsThe objects that continue to exist even if they are currently not contained in the address space of any server process.

It is not dependent on its current server.

Team : 04 AISHWARYA RAJAGOPALAN AISHWARYA RAJAN

R U OK?9)A persistent object is The objects that continue to exist even if they are currently not contained in the address space of any server process. Not dependent on its current server.All of the aboveNone of the above

Team : 04 AISHWARYA RAJAGOPALAN AISHWARYA RAJAN

Persistent Objects contd.The server that is currently managing the persistent object , can store the objects state on secondary storage and then exit.

A newly started server can read the objects state from storage into its own address space and handle invocation requests.Team : 04 AISHWARYA RAJAGOPALAN AISHWARYA RAJAN

R U OK?10)The functions of the server that is managing a persistent object are:Can store the objects state on secondary storage and then exit.A newly started server can read the objects state from storage into its own address space and handle invocation requests.All of the aboveNone of the above

Team : 04 AISHWARYA RAJAGOPALAN AISHWARYA RAJAN

Transient ObjectsTransient object is an object that exists only as long as the server hosting it exists.Once the server is out, the object also ceases to exist.For example, the message is discarded if it cannot be delivered to the receiver immediately. A message will be delivered only if the receiver is active.Team : 04 AISHWARYA RAJAGOPALAN AISHWARYA RAJAN

R U OK?11) Difference between Transient and Persistent objects is that:a)Transient objects live by the virtue of the server ,i.e. if the server exists so will the object while persistent objects live independently from a server, i.e. is the server exits, the object code and state remains on disk. b)An example of transient object is HTTP request while an example of persistent object is an email.c) Both a & bd) None of themTeam : 04 AISHWARYA RAJAGOPALAN AISHWARYA RAJAN

Enterprise Java BeansAn EJB is a Java object hosted by a special server.

Offers different ways for remote clients to invoke that object.

EJB technology supports application development based on a multiplier, distributed object architecture in which most of applications logic is moved from the client to the server.

[Team 05 - Abhinav Joshi, Sandeep Raveendran Thandassery]

27R U O K?12) Which of the following is true of an Enterprise Java Beans (EJB)?

EJB is a Java object hosted by a special server.Offers different ways for remote clients to invoke Java object.EJB technology supports application development based on a multiplier, distributed object architecture.All of the above.None of the above.[Team 05 - Abhinav Joshi, Sandeep Raveendran Thandassery]EJB Server

Provides support to separate application functionality from systems-oriented functionality.Contains:Container holds EJBs, and provides interfaces to underlying services.Services JMS, JNDI, JDBC, RMI

[Team 05 - Abhinav Joshi, Sandeep Raveendran Thandassery]

R U O K?13) Which of the following components an EJB server contains?

Container to hold EJBsServices - JMS, JNDI, JDBC, RMIBoth a and b.None of the above.[Team 05 - Abhinav Joshi, Sandeep Raveendran Thandassery]Types of EJBsStateless session beansA transient object which is invoked once, does its work, after which it discards any information related to client.Stateful session beansMaintains client related state, but lifetime is limited. When the client is finished bean is automatically destroyed.Entity beansA long living persistent object. Generally stored in database.Message-driven beansUsed to program objects to react to incoming messages. Cannot be directly invoked by client. Better suited in a publish subscribe environment.[Team 05 - Abhinav Joshi, Sandeep Raveendran Thandassery]

R U O K?14) Which of the following accurately describes Message-driven beans?

Used to program objects to react to incoming messages. Cannot be directly invoked by client. Better suited in a publish subscribe environment.All of the above.None of the above.

[Team 05 - Abhinav Joshi, Sandeep Raveendran Thandassery]10.1.3 Example: Globe Distributed Shared ObjectsScalability plays an important role in globe distributed shared objects.Similar to other object based systems it also follows encapsulation and operation on the stateBut the main difference from other object based system is that objects are expected to encapsulate the implementation of policies that describe the distribution of an object`s state across multiple machines.Objects are in charge in globe distributed shared objects which decide how, when & where it should be migrated.Also it takes decision regarding replication, Security policies and implementation.

[Team 06 (Shrey Ahluwalia, Shriya Shriya)]33R U O K ?15.Q: What are the characteristic of Global Distributed Shared Objects?Scalability plays an important role in globe distributed shared objectsIt takes decision regarding replication, Security policies and implementation Objects are in charge in globe distributed shared objects which decide how, when & where it should be migratedNone of theseAll of these[Team 06 (Shrey Ahluwalia, Shriya Shriya)]OBJECT MODELObjects in Globe :- Objects in Globe can be physically distributed and replicated across multiple processes. Objects in Globe are termed as distributed shared objects, to reflect that objects are normally shared between several processes. Local representative Each process that is bound to a distributed shared object has a local implementation of the interface known as local representative. Implementation details of the objects are hidden by the interface and only methods are made visible. Classification of Globe local objects :-Primitive local object a local object that does not include any other local objectComposite local object combination of multiple local objects.

Team 07 Abhinaya Ramachandran 1001268347 Dona Maria Jose 100123275735

General organization of a local object for distributed shared objects in GlobeSemantics sub object implements the functionalityCommunication sub object provides standard interface to the underlying networkReplication sub object implements actual distributionControl sub objects intermediate between the user defined interfaces and standardized interfacesTeam 07 Abhinaya Ramachandran 1001268347 Dona Maria Jose 1001232757

36R U OK?Match the following:- 16) Local representative - 17) Primitive local object - 18)Composite local object - 19)Replication sub object 20)Communication sub object-

Combination of multiple local objectsLocal implementation of the interfaceIncludes only a single local objectprovides standard interface for underlying networkimplements actual distribution

Team 07 Abhinaya Ramachandran 1001268347 Dona Maria Jose 100123275737Processes OverviewA key role in object-based distributed systems is played by object servers, that is, the server designed to host distributed objects.We will concentrate on general aspects of object serversNext we focus on discuss open-source JBoss server.Team 08Akash Rana Anmol BhargavaObject ServersAn object server is a server tailored to support distributed objectsImportant point to notice is that object server by itself does not provide a specific service.Server provides only the means to invoke local objectsObject server thus acts as a place where objects live.Team 08Akash Rana Anmol BhargavaRUOK21. Object server by itself provides a specific service. (Say whether true or false)TrueFalse (Correct answer)Cant say!

Team 08Akash Rana Anmol BhargavaOpen Source JBOSS ServersJBoss Application Server (or JBoss AS) is a free software/open-source Java EE-based application server.Important distinction for this class of software is that it not only implements a server that runs on Java, but it actually implements the Java EE part of Java.JBoss application server operates cross-platform: usable on any operating system that supports Java.Team 08Akash Rana Anmol BhargavaRUOK22. Important distinction about JBOSS a) Not only implements a server that runs on Java, but it actually implements the Java EE part of Java. (Correct answer)b) JBoss application server does not operate on Java hence cross-platform.c) Paid software that makes it open source.d) None of the above.Team 08Akash Rana Anmol Bhargava10.2.1 Object ServersServers tailored to support distributed objects, which doesnt provide specific service like other servers.Specific services are implemented using specific objects in the server.It provides only the means to invoke those objects through remote clients request.So its easy to change those services by adding and removing objects.Objects has 2 main parts; either separated or as single unitData representing its State Code for executing its methods can be shared among multiple objects.Object server invokes these objects in a different way as compared to the conventional one.

[Team 09; Nikhil Ravindran, Ruchir Kadam]

43R U O K ?23Which of the following is NOT true for Object Servers?Servers tailored to support distributed objects.Services are being implemented using specific objects in the server, as its not like traditional servers.It provides means to invoke local objects by remote clients request.Object has 2 main parts State, CodeChanging services by adding and removing objects is not possible.

[Team 09; Nikhil Ravindran, Ruchir Kadam]Alternatives for invoking an object For an object to be invoked, the object server needs to know which code to execute, on which data it should operate, whether it should start a separate thread to take care of the invocation.A much better approach is for a server to support different policies. Consider, for example, transient objects.A reasonable policy is to create a transient object at the first invocation request and to destroy it as soon as no clients are bound to it anymore. The advantage of this approach is that a transient object will need a server's resources only as long as the object is really needed.The drawback is that an invocation may take some time to complete.

There are many different policies with respect to threading. The simplest approach is to implement the server with only a single thread of control. Alternatively, the server may have several threads, one for each of its objects. Whenever an invocation request comes in for an object, the server passes the request to the thread responsible for that object. The advantage of this approach is that objects are automatically protected against concurrent access.RUOK24 What is the advantage of using transient objects ?

a. An in memory, read-only copy of a file could typically be implemented as a transient object.b. An invocation may take some time to complete.c. A transient object will need a server's resources only as long as the object is really needed.d. NoneObject AdapterThe object must be brought into servers address space before they can be invoked.The decisions on how to invoke an object is part of activation policies.The need is there for grouping the objects as per policy which can be done by mechanism called object adapter/wrapper.It can be defined as software implementing a specific activation policy.It can have more than 1 objects under control and several object adapters may reside in server implementing various policies.Team 11Vineet NairArth Vyas

When invocation request is sent to server , it is first dispatched to appropriate object adapter.Here we can observe that object adapters are unaware of the specific interfaces of objects they control.The main activity for adapter is to extract object reference from an invocation request and subsequently dispatch the request to the referenced object following the policy.Also seen in figure is that adapter directly hands the invocation request to the sever side stub of object. Team 11Vineet NairArth Vyas

Object Adapter can support different activation policies by simply configuring it at the runtime.E.g. We can specify whether object should continue to exist after its associated adapter has been stopped.Similarly it can be configured to generate object identifiers or let application provide one. Also it maybe configured to operate in single threaded or multi threaded mode.To further the discussion, we see what the objects are really.As part of the implementation of such objects , server may access databases or call special library routine.These implementation details are hidden from the adapters who communicates only with a skeleton.The implementation of objects are different from language level objects. Hence, a different terminology has been used.Servant is piece of code that implements an objects. Thus , java bean is seen as nothing but as another kind of servant.

Team 11Vineet NairArth Vyas

RUOK?25Which of the following statements are True?Objects can be invoked only after they have been brought to address space of the server.The mechanism for grouping of objects as per policy is object adapters job.Object Adapter is piece of software that can be used to implement specific activation policy.All of the above.None of the above.Team 11Vineet NairArth Vyas

THE ICE RUNTIME SYSTEM Introduction Ice runtime system have been developed in response to commercial object based distributed system.An object server in Ice is nothing but an ordinary process that simply starts with initializing the Ice runtime system (RTS).Run time environment is termed as CommunicatorCommunicator manages number of basic resources, of which the most important one is formed by a pool of threads.Communicator provides the means for configuring the environment.A communicator can also be used to create an object adapter.

Question26 Which of the following is true about communicator?It manages a pool of resources.Configuration of environment It is a part of ice runtime system.All of above

Continue:Ice provides support for special objects known as locators.A locator is called when the adapter receives an incoming request for an object that has not been explicitly added. For example, suppose a locator is handed a request for an object of which the locator knows that its state is stored in a relational database system. The locator has been programmed explicitly to handle such requests. There can be more than one locator added to an adapter. In that case, the adapter would keep track of which object identifiers would belong to the same locator.Using multiple locators allows supporting many objects by a single adapter

Question:27Do an adaptor can have multiple locators?A. TrueB. FalseTHANK YOUCommunicationObject Based Distributed Systems handle communication by:Invoking an object through a remote clientThe mechanism is based on remote procedure calls (RPCs)Prior to the remote procedure calls, other issues need to dealt with Team 13Raman KumaresanAnkit Sheth

R U O K ?28What mechanism does Object Based Distributed Systems use to handle communication?Parameter passing.Reference passing.System call.Remote Procedure calls.All of the above.

Team 13Raman KumaresanAnkit ShethBinding a client to an object[Team 14 - Rehana Devani & Supreme]60Binding a client to an objectsystems supporting distributed objects provides systemwide object references.object are freely passed between processes on different machines.hiding the actual implementation of an object reference makes it opaque.When process holds an object referencefirst bind to the referenced object before invoking any of its methodsBinding results in a proxy being placed in the process's address spaceimplementing an interface containing the methods the process can invoke

[Team 14 - Rehana Devani & Supreme]Implicit and Explicit BindingWith implicit binding, the client is offered a simple mechanism that allows it to directly invoke methods using only a reference to an objectWith implicit binding, the client is transparently bound to the object at the moment the reference is resolved to the actual objectthe client should first call a special function to bind to the object before it can actually invoke its methodsExplicit binding generally returns a pointer to a proxy that is then become locally available

[Team 14 - Rehana Devani & Supreme]R U OK?29)The order when process holds an systems supporting distributed object referencefirst bind to the referenced object.Binding results in a proxy being placed in the process's address spaceinvoking any of its methodsimplementing an interface containing the methods the process can invoke

i -> iii -> iv ->iiiii -> i -> ii -> ivi -> ii ->iv->iiii -> ii -> iii -> iv

[Team 14 - Rehana Devani & Supreme]Implementation of Object ReferencesTeam 15,Padmashri Nonabur Krishnamurthy - 1001084560Utphala Puttananjammagari - 1001246180

Implementation of Object ReferencesThe object references should include most of the information necessary.A simple object reference includes Network address of the machineEnd point identification of the serverThe object identification

Team 15,Padmashri Nonabur Krishnamurthy - 1001084560Utphala Puttananjammagari - 1001246180

30What information does the object reference include?a. Network address of the machineb. End point identification of the serverc. The object identificationd. All of the abovee. None of the aboveTeam 15,Padmashri Nonabur Krishnamurthy - 1001084560Utphala Puttananjammagari - 1001246180

DrawbacksThe server is assigned different end point after recovery when the servers machine fails. Now all object references are invalid.

Solution: DCE has a local daemon per machine listening to a well known end point. It has an end point table where it keeps the server to end point assignments. The daemon is first contacted for the servers current end point while client to object binding. This requires encoding server ID into the object reference that is used as an index to the end point table.Team 15,Padmashri Nonabur Krishnamurthy - 1001084560Utphala Puttananjammagari - 1001246180

Drawbacks2. Encoding the network address of the servers machine to the object reference is not a good idea.

Solution: Instead of the local daemon maintaining the end point table, let the location server keep the track of the machine where the object servers are running.Team 15,Padmashri Nonabur Krishnamurthy - 1001084560Utphala Puttananjammagari - 1001246180

RUOK 231. What are the two drawbacks of implementing object references?a. The server is assigned different end point after recovery when the servers machine fails. Now all object references are invalid.b. Encoding the network address of the servers machine to the object reference is not a good idea.c. Both a and bd. Not a and bTeam 15,Padmashri Nonabur Krishnamurthy - 1001084560Utphala Puttananjammagari - 1001246180

32. What is the solution for the drawback 1?Encoding server ID into the object reference.Enhancing the end point tableBoth a and bNone of the aboveTeam 15,Padmashri Nonabur Krishnamurthy - 1001084560Utphala Puttananjammagari - 1001246180

33. What is the solution for Drawback 2?Encoding server ID into the object reference.Enhancing the end point tableBoth a and bNone of the above

Team 15,Padmashri Nonabur Krishnamurthy - 1001084560Utphala Puttananjammagari - 1001246180

Client and the ServerClient and server are configures to use the same protocol stack.Apart from using the same transport protocol such as TCP, they are use same protocols for marshaling and un-marshaling parameters.They also use same parameters for setting up connections, handling errors and flow control.Team 15,Padmashri Nonabur Krishnamurthy - 1001084560Utphala Puttananjammagari - 1001246180

34. Client and server role in object references?a. Client and server are configures to use the same protocol stack.b. Apart from using the same transport protocol such as TCP, they are use same protocols for marshaling and un-marshaling parameters.c. They also use same parameters for setting up connections, handling errors and flow control.d. All of the aboveTeam 15,Padmashri Nonabur Krishnamurthy - 1001084560Utphala Puttananjammagari - 1001246180

10.3.2 Static versus Dynamic Remote Method InvocationsStatic invocation:Uses predefined interface definitions.Required to know the objects interface while developing client application.Change in the interfaces leads to recompilation of application. General form: fobject.append(int)Dynamic invocation:Method invocation composed at runtimeApplication choses at runtime which method to invoke.General form: invoke(fobject,id(append),int)Team 16 (Hardik Parekh, Ankur Patel)

RUOK ?35 What is the difference between static and dynamic invocation ?

Static invocation uses interface definitions that are predefined.In dynamic methods, invocations are created during runtime.Both a and b.None of the above.

Team 16 (Hardik Parekh, Ankur Patel)