What is the difference between Serialization and Marshaling?

前端 未结 12 1603
忘了有多久
忘了有多久 2020-12-02 03:30

I know that in terms of several distributed techniques (such as RPC), the term "Marshaling" is used but don\'t understand how it differs from Serialization. Aren\'

12条回答
  •  被撕碎了的回忆
    2020-12-02 03:52

    My understanding of marshalling is different to the other answers.

    Serialization:

    To Produce or rehydrate a wire-format version of an object graph utilizing a convention.

    Marshalling:

    To Produce or rehydrate a wire-format version of an object graph by utilizing a mapping file, so that the results can be customized. The tool may start by adhering to a convention, but the important difference is the ability to customize results.

    Contract First Development:

    Marshalling is important within the context of contract first development.

    • Its possible to make changes to an internal object graph, while keeping the external interface stable over time. This way all of the service subscribers won't have to be modified for every trivial change.
    • Its possible to map the results across different languages. For example from the property name convention of one language ('property_name') to another ('propertyName').

提交回复
热议问题