Are there any serialization schemes for OOP that include methods or operations in the contract in addition to data structure?

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 operationscode along with data structure for objects? Ideally it shouldn’t just be an RPC client stub that invokes operations on a server.

3

I think the reason this isn’t done more often is because you’re sending code along with your data, and therefore you no longer have total control over the code. Maintaining security over your operations would be a real challenge. This is not true of data, because you can sanitize, validate and authorize data, using code that you can control and secure.

Code is also not homogeneous, in the same way data is. Many different programming languages and techniques are used to create data processing systems, but the data remains in essentially the same form. This is especially true of XML data. XML data is specifically designed to be systems-agnostic; you can process it on any system with and XML reader.

If you want to look for a live example of code as data, you need look no farther than Lisp. Lisp has a deep philosophy of “code as data.” In “The Nature of Lisp,” the author explained this distinction by pointing out that you can translate any programming language to XML, transmit it over the wire, and execute it:

<define-function return-type="int" name="add">
    <arguments>
        <argument type="int">arg1</argument>
        <argument type="int">arg2</argument>
    </arguments>
    <body>
        <return>
            <add value1="arg1" value2="arg2" />
        </return>
    </body>
</define>

So all you have to do is send the source code in your transmitted object, compile it at the target, and execute it against your encapsulated data. 🙂

Your “serialization of code” then boils down to “include the necessary source code to process this object with every packet of data you send.” I think you can see how this can quickly become very unwieldy. If you’re going to transmit programs to a remote system that will operate on data you send it, it makes more sense to transmit those programs to the remote system ahead of time, install them, execute them, and then send your data.

1

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa

Are there any serialization schemes for OOP that include methods or operations in the contract in addition to data structure?

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 operationscode along with data structure for objects? Ideally it shouldn’t just be an RPC client stub that invokes operations on a server.

3

I think the reason this isn’t done more often is because you’re sending code along with your data, and therefore you no longer have total control over the code. Maintaining security over your operations would be a real challenge. This is not true of data, because you can sanitize, validate and authorize data, using code that you can control and secure.

Code is also not homogeneous, in the same way data is. Many different programming languages and techniques are used to create data processing systems, but the data remains in essentially the same form. This is especially true of XML data. XML data is specifically designed to be systems-agnostic; you can process it on any system with and XML reader.

If you want to look for a live example of code as data, you need look no farther than Lisp. Lisp has a deep philosophy of “code as data.” In “The Nature of Lisp,” the author explained this distinction by pointing out that you can translate any programming language to XML, transmit it over the wire, and execute it:

<define-function return-type="int" name="add">
    <arguments>
        <argument type="int">arg1</argument>
        <argument type="int">arg2</argument>
    </arguments>
    <body>
        <return>
            <add value1="arg1" value2="arg2" />
        </return>
    </body>
</define>

So all you have to do is send the source code in your transmitted object, compile it at the target, and execute it against your encapsulated data. 🙂

Your “serialization of code” then boils down to “include the necessary source code to process this object with every packet of data you send.” I think you can see how this can quickly become very unwieldy. If you’re going to transmit programs to a remote system that will operate on data you send it, it makes more sense to transmit those programs to the remote system ahead of time, install them, execute them, and then send your data.

1

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật