So typically we create schemas, mime-types, etc for our objects when we're communicating to another system about objects.
The document usually defines data structure of the objects for serialization purposes with no recording of the object's methods. All I am left with on the client are effectively structs with no methods.
So for example let's say I have multiple classes and let's say those included an Account and an Order. Let's also specify that orders are tied to an account. Now let's say I have a client who wants to fetch a certain order that's related to an account from a distributed service that provides this information. I could code all of the searching, scanning and other types of logic into the distributed server and make the client rely on it for everything it could want to do (extreme RPC). I could just write code to scan through object graphs on the client, forcing each client with type of interest to replicate the code. I could create a library that contains common functions. But what I'd really like, is the ability to replicate methods on the object to the client as part of the contract. The client would not only know the data structure of the distributed object, but could also call and execute operations on the object that was distributed with it.
Is there any system out there that serializes operations\code along with data structure for objects? Ideally it shouldn't just be an RPC client stub that invokes operations on a server.