Inheritance over the Internet

An IMOP interface can be inherited in a way similar to a Java interface, except that the type relationship is established across the Internet. The imop:leet.net/type.IBulletinEx interface above extends the imop:api.org/service.IBulletin interface, where these two interfaces are defined at two different hosts. The imop:social.com/usr.Group object on the left implements the extended interface, and thus it may interact with new clients through the IBulletinEx interface, as well as existing clients through the inherited IBulletin interface. This allows a service to gradually evolve by adding new functionalities, while maintaining its compatibility with existing clients.

Discovering this OO relationship through IMOP's reflection conversion is easy and light-weight. Assume that a compiler at the client side needs to acquire the definition of imop:social.com/usr.Group for type checking. The following figure shows the IMOP conversions for that. The compiler will first connect to social.com and obtain a JSON-based descriptor of the type. From the descriptor, the compiler knows that imop:social.com/usr.Group is an object, and it implements the imop:leet.net/type.IBulletinEx interface. To reflect the definition of this interface, the compiler will make a new connection to leet.net. The returned type definition shows that it is derived from yet another interface imop:api.org/service.IBulletin. The compiler will recursively reflect every data type it encounters until all types are fully defined.

Note that the Meso source code is never transferred over the network. Even for a concrete object like imop:social.com/usr.Group, the compiler at the client side can only obtain an abstract definition of it, but not its source code or internal implementation. The implementation is completely encapsulated.