Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Mock Question on Protocols

 
veena madhukar
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As part of an application you are developing you need to move the state of an object but not its behavior. What should you use?

CORBA
RMI
JRMP
IIOP
 
Ricardo Ferreira
Ranch Hand
Posts: 156
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by veena madhukar:
As part of an application you are developing you need to move the state of an object but not its behavior. What should you use?

CORBA
RMI
JRMP
IIOP


Resp: CORBA

CORBA only moves the state of an object but RMI moves the objects behavior as well. Choice A is not appropriate as it is a stateful protocol and is not a framework for moving objects.

Best Regards
 
Ricardo Ferreira
Ranch Hand
Posts: 156
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by veena madhukar:
As part of an application you are developing you need to move the state of an object but not its behavior. What should you use?

CORBA
RMI
JRMP
IIOP


Resp: CORBA

CORBA only moves the state of an object but RMI moves the objects behavior as well. Choice "D" is not appropriate as it is a stateful protocol and is not a framework for moving objects.
 
Raghubir Bose
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think there is a point of confusion over here.

The question does not categorically say about the technology or protocol.It simply says what to use.

If we think from the framework perspective it is CORBA ..but if we think from the protocol perspective its IIOP.

 
Raghubir Bose
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
On second thought ...it might so happen the application might be developed in Java ...or a part of it ..(since nothing is said we can assume anything)..in that case CORBA is not the right answer IIOP would be correct ...I would go for IIOP

Comments pls ...
 
Harini Shree
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Guys, Any one of you please explain what is the state and behaviour of any object?

Regards,
Harini
 
Raghubir Bose
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Truely confusing .. I was just giving a whizlabs exam ...and I got the same question and the answer was CORBA

anyways coming back to your question of object state and object behaviour..

Simply put an object state is the set of data values and offered services that the object can deliver at a certain time, in fact, an object life is a sequence of states. - more simply data part of the object

Object behaviour needs more sentences ...
An object behaviour can represent :

1. an object invariant : An object invariant is a set of properties that are respected by all object states. For example, the number of subscribers that are referenced by a telephone dispatcher cannot exceed the dispatcher capacity.

2. an object state change : An object state change is a set of properties that must be respected when an object switches state. A state change can be a consequence of :

1. an object service out going call,
2. an object service in coming call,
3. a climatic event, or other non-formal events etc

example : the addition of a subscriber on a telephone dispatcher is an object state change behaviour

3. output values of object services :An object services can have parameters, and particularly output parameters. During a service call, their output parameters take new values, so an object behaviour can specify these output values.

-- more simply data + code.

Now whenever you pass behaviour ..you should be able to talk things like what kind of behaviour which definitely includes things like polymorphism, inheritance ..and encapsulation.Since CORBA also supports non OO languages like COBOL, it cannot pass behaviour only can pass state.

-- can somebody validate whether this thought process makes sense or not ?


 
rinsad ahmed
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there any restrictions on RMI, on sending the state only. Or, does RMI is intended only to send State with Behaviour. Please clarify

Thanx
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic