序列化和封送处理有什么区别?

编程入门 行业动态 更新时间:2024-10-19 18:32:17
本文介绍了序列化和封送处理有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我知道就几种分布式技术(例如RPC)而言,使用了封送处理"一词,但不了解它与序列化有何不同.他们不是都将对象转换为一系列位吗?

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't they both transforming objects into series of bits?

什么是序列化?

什么是对象编组?

推荐答案

在远程过程调用的上下文中,封送处理和序列化是松散的同义词,但从意图上来说在语义上是不同的.

Marshaling and serialization are loosely synonymous in the context of remote procedure call, but semantically different as a matter of intent.

特别地,封送处理是关于从此处获取参数,而序列化是关于在诸如字节流之类的原始形式之间复制结构化数据.从这个意义上讲,序列化是执行封送处理的一种方法,通常实现按值传递语义.

In particular, marshaling is about getting parameters from here to there, while serialization is about copying structured data to or from a primitive form such as a byte stream. In this sense, serialization is one means to perform marshaling, usually implementing pass-by-value semantics.

还可以通过引用将对象编组,在这种情况下,在线"上的数据只是原始对象的位置信息.但是,这样的对象可能仍然适合于值序列化.

It is also possible for an object to be marshaled by reference, in which case the data "on the wire" is simply location information for the original object. However, such an object may still be amenable to value serialization.

如@Bill所述,可能还有其他元数据,例如代码库位置甚至对象实现代码.

As @Bill mentions, there may be additional metadata such as code base location or even object implementation code.

更多推荐

序列化和封送处理有什么区别?

本文发布于:2023-11-25 23:54:25,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1631841.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:有什么区别   序列化

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!