Talk:Marshalling (computer science)

Latest comment: 10 months ago by Zectbumo in topic .NET not a language

Reference or value edit

This article needs to be expanded on the difference between marshalling by reference and marshalling by value. Marshalling by value is roughly equivalent to serialization, while marshalling by reference is not. Medinoc (talk) 14:38, 23 April 2008 (UTC)Reply

Very good point. Right now there is alot of content on serialization / general parsing, but the text does not manage to get the point of marshalling clear. (I think alot of people today use marshalling as a synonym to serialization or parsing even, so it reflects a widespread muddy understanding.) Chipbite-mawi (talk) 08:30, 25 September 2022 (UTC)Reply

Merger proposal edit

The concepts of serialization and marshalling seem basically the same. The serialization article says that it is also called marshalling. Conversely, the marshalling article says that marshalling is also called serialization. —Preceding unsigned comment added by Neverdream (talkcontribs) 20:09, 21 August 2008 (UTC)Reply

I agree to merge. Despite what the RFC says, what I (think I) know is that neither serialization nor marshalling save the class definitions in Java. Both save the object state, not the codebase. AFAIK the classes must still be available via a classloader, otherwise deserialization will fail for an unknown type. If there is any difference between the two methods, perhaps it's that marshalling is done via accessor methods while serialization uses some JVM magic to restore the state, even in private fields with no accessors. But that's just for java. Generally I think the two terms are synonymous. Alex.g (talk) 09:01, 20 October 2008 (UTC)Reply
If a merger is done, it should merge Serialization into Marshaling. In my opinion (which is just an opinion), Marshaling is simply creating a representation of the data which can be unmarshaled back into the data. Serialization is a subset of marshaling where the representation is defined to be a stream of bits/bytes. By my choice of definition, it is fair to marshal data into a tree or cyclic graph, but cannot be serialized into a cyclic graph. Software which needs to serialize cyclic graphs (such as DEFLATE) seem to talk about first marshaling the data into a cyclic graph, then serializing the graph (as two independent operations).199.46.170.96 (talk) —Preceding undated comment was added at 17:51, 8 December 2008 (UTC).Reply
The main difference is that Marshalling involves a client and a server, while serialization is usually done by the same application. When only one application is involved, the data representation needs not to be standarized, a very different situation when marshalling is used. —Preceding unsigned comment added by Robgomez (talkcontribs) 17:35, 15 June 2009 (UTC)Reply
Marshalling and serialization are two similar things, but not same. We cannot say that these are two different names of a concept. The article should sketch a clearer line between the two concepts instead of making confusions by merging them in a single. 119.153.71.135 (talk) 14:31, 3 June 2009 (UTC)Reply
Agreeing with 119.153.71.135 author. One example is Marshalling seems to be used when transforming XML into generated objects (such as with JAXB), but Serialization seems to be used when transforming objects to a byte stream, for example when used with load balancing. See the following technical articles and forums for various opinions from the software development community. Javabeans blog, JGuru forum, Stackoverflow forum, and Java Ranch. Some other related topics, see RMI and SOA. -Legaia (talk) 15:33, 21 July 2009 (UTC)Reply
I'm seeing this from C# perspective, and while these notions may be considered somewhat similar at the higher level, in .NET practice they are two completely different things. Serialization is creating representation of an object for storage or tranfer, and marshaling is used almost exclusively for data interop with unmanaged code. Merging seems like a terrible idea to me. —Preceding unsigned comment added by 195.131.128.45 (talk) 11:18, 18 April 2010 (UTC)Reply
Definitely absolutely not the same thing.
Serialization is the process of preparing parallel data for serial transmission.[1] see Serial communication and Parallel communication. That said, I think the term is often misused because there is no analogous term (that I know of) to use when coordinating parallel transmission.
Marshalling is a more abstract concept that does not imply any particular transmission scheme, and may also involve converting data to and from agreed-upon representations (e.g. converting two-byte unicode characters to UTF-8).[2]. Marshalling between CLR-managed memory and unmanaged memory does not require serialization because it is only moving over the (parallel) memory bus.
You guys are completely wrong. You are make language and system specific distinctions, where none exists. The actual method used does not change the meaning of the terms. — Preceding unsigned comment added by 192.35.35.34 (talk) 14:18, 13 August 2015 (UTC)Reply
Bringing up distributed object technologies like RMI, DCOM, or .NET Remoting will probably just cause confusion, because they are designed to provide Location transparency. While there is no technical reason to serialize an object just to move it from process to process on the local machine, these API's treat local processes exactly the same as a mainframe on the other side of the world. —Preceding unsigned comment added by 70.190.210.250 (talk) 15:24, 28 August 2010 (UTC)Reply
I came here thinking "Why two pages? they should be merged" - but after reading i think now there should be a third page --or a new section in one of the two pages-- called "difference between Marshalling and Serialization". MarmotteiNoZ —Preceding undated comment added 01:58, 13 March 2018 (UTC)Reply
Hello, I also stumbled here trying to understand what is marshalling and what serialization and after reading more about it I would say these are two different terms, the confusion was, with me at least, that serialization seems to be the only way to do marshalling. At least to my extent of understanding serialization. I also made a small update to what marshalling is as I believe the sentence where it was compared to serialization was a bit misleading. Duskox (talk) 08:53, 1 April 2021 (UTC)Reply

Marshalling in COM edit

I'm currently reading up on marshalling in COM and by the time I'm finished I will probably be able to write a few paragraphs on how it works. If I choose to do so, should I include it here, on marshalling (computer science), on Component Object Model or as a separate article marshalling in COM? Shinobu (talk) 04:49, 6 September 2008 (UTC)Reply

Maybe you could put the theory under marshalling and the COM-specific implementation details in COM. Alex.g (talk) 11:10, 22 October 2008 (UTC)Reply

I agree, in fact, in spanish the term defined under "Marshalling" is the definition we use for Serialization and is used this way in a lot of books and sources in the Internet —Preceding unsigned comment added by 201.241.153.154 (talk) 12:14, 19 November 2008 (UTC)Reply

Marshalling - done by the client or the server edit

I had added the following sentence which was then removed:

'When transporting information in a Client/Server architecture the Client normally handles the marshalling of data; ensuring a decoupling of the Server from the Client.'

This was removed with the comment:

'this sentence makes no sense in the general point of view. clients typically do unmarshalling, servers marshalling. but it is reversed with say ajax, wher the client does marshalling.'

Let me try and restate what I was trying to explain. This is specific to the act of Marshalling data to allow 2 programs to communicate, not marshalling for transport purposes. Consider both a client application and a server application on the same machine. Marshalling is needed to ensure that data in the client is translated into a format that the server understands. The response from the server may then need to be marshalled back into a format that the client natively uses. In this case, both the marshalling and unmarshalling are typically handled by the client. This is 'normal' as this approach allows maximum flexibility regarding the server. The service can be used by any client, the burden of integration (and marshalling data to be able to use the service API) is on the client alone. This de-couples the client and server.

I suspect that the original objection was in interpreting the original comment as being related to a distributed client/server architecture and the Marshalling/Unmarshalling of data for transport purposes. This is not my point (I agree with that point BTW).

Marshalling is not limited to manipulating data for transport purposes, but also for translating from one program's internal representation into another program's internal representation. In this context, typically, the client is responsible for these translations (marshalling/unmarshalling). To me, this is an important point. If someone can state it better or offer some critique in my explanation then please shout out and we'll see if we can get an agreeable explanation put together. Dbnull (talk) 17:49, 25 March 2009 (UTC)Reply

Why (not) break things edit

I was reading an article about something call QuickBase and saw something about Marshalling and Unmarshalling. A quick google found this article at site:wikipedia.org

Why merge it into a higher cloud? Things are hard enough when a person who started with assembler language on a museum relic wants to keep up. If you make it harder, we'll just start collecting social security that much sooner (and thereby perhaps cost you money you'd rather spend on a new StarTrek-inspired electronic toy).

Is that reason enough to leave this un"merged" ? —Preceding unsigned comment added by 207.69.139.146 (talk) 05:10, 30 April 2009 (UTC)Reply

Spelling with one or two l ? edit

Is it spelled with one l or two? I found different sources (e.g. even in the WP-article, its called "marshaling" sometimes). See https://www.lexico.com/definition/marshal for a possible answer to that question: `marshal [...] VERB (marshals, marshalling, marshalled; US marshaling, marshaled)'. Thus it depends on whether one follows standard (British) English grammar or US English grammar.

Origin of term? edit

Is the origin of the term at the end of the article serious? Is "serialization" named for Gregory Serial? Marshal is a plenty good verb that predates the 1960s. —Preceding unsigned comment added by 128.2.177.155 (talk) 22:39, 3 March 2010 (UTC)Reply

I'm extremely skeptical about this, and think it should probably be removed if it can't be shown to be true. I suspect it is a prank. —Preceding unsigned comment added by Daschepers (talkcontribs) 02:52, 4 April 2010 (UTC)Reply

Surely the origin of the term is by analogy with sending freight cars over a single rail line as per Marshalling_yard 192.93.164.28 (talk) 15:09, 16 March 2015 (UTC)Reply

This article only states where marshal is used, but not clearly states what it is. edit

Can someone add more explanation of what it is? — Preceding unsigned comment added by Deqing.huang (talkcontribs) 06:31, 15 January 2014 (UTC)Reply

Marshaling vs. Serialization edit

Your distinction between the two terms is language-specific and irrelevant. Who cares how Java uses the terms? In Computer Science, they are the same thing. — Preceding unsigned comment added by 192.35.35.34 (talk) 14:15, 13 August 2015 (UTC)Reply

Validity of OpenGL / D3D Example edit

Beginning with Windows Vista, driver vendors write their own user-mode frontend for the Direct3D runtime separate from Microsoft and do this for the very reasons discussed (avoiding context switches as much as possible). This is a good example, but seems to overreach. — Preceding unsigned comment added by 2601:6C4:4003:10A0:D025:5086:8FAA:3722 (talk) 20:50, 17 August 2016 (UTC)Reply

Merge Unmarshalling into this page edit

It's just two parts of the same process. Marshalling is the entire concept.--Henke37 (talk) 00:14, 26 December 2018 (UTC)Reply

Agree. Deserialization redirects to Serialization. Widefox; talk 10:31, 25 November 2019 (UTC)Reply
    Y Merger complete. Klbrain (talk) 17:23, 1 May 2020 (UTC)Reply

Remote parsing edit

Can be included remote parsing in the marshalling concept?. --BoldLuis (talk) 13:54, 12 May 2020 (UTC)Reply

@BoldLuis: I think you'd first have to come up with a consensus definition for remote parsing. Wikipedia itself has no matches for that term, and a quick google search seems to unearth 100 different uses, each one meaning something different.
However, if we sort of generalize it to mean just "parsing data in one {thread, process, service, machine}, then somehow passing the parsed form to another {thread, process, service, host} for processing", then I'd say no. If anything, it's the other way around ­— a remote parsing implementation may use techniques like marshaling and/or serialization, as its means of transferring the parsed data from the remote parsing code to the local processing code — or it may not, depending on the language(s) / API(s) involved and how remote parsing is implemented on top of them. But there's nothing about marshaling that targets or facilitates remote parsing in particular, and remote parsing itself (as it's defined by most of the uses I've found in a quick search) isn't any kind of marshaling technique. -- FeRDNYC (talk) 07:53, 12 February 2021 (UTC)Reply
@FeRDNYC: "A remote parsing implementation may use techniques like marshaling and/or serialization, as its means of transferring the parsed data from the remote parsing code to the local processing code", OK. --BoldLuis (talk) 09:05, 12 February 2021 (UTC)Reply

Very wrong characterization of XML edit

The article's § Formats contains the following offhand claim:

While this typically results in a lengthier (i.e., more verbose) message wire format, XML's fully-bracketed "start-tag", "end-tag" syntax allows provision of more accurate diagnostics and easier recovery from transmission or disk errors.

Here's the problem: Not only is that claim uncited, it's very wrong. As our own XML article quite clearly explains:

The definition of an XML document excludes texts that contain violations of well-formedness rules; they are simply not XML. An XML processor that encounters such a violation is required to report such errors and to cease normal processing. This policy, occasionally referred to as "draconian error handling," stands in notable contrast to the behavior of programs that process HTML, which are designed to produce a reasonable result even in the presence of severe markup errors.[1]

Not only is XML's format not intended to be conducive to error recovery, but the XML definition actually prohibits the recovery of errors due to corrupted data. A valid and correct XML parser cannot and will not attempt any sort of recovery from ill-formed data streams, whether due to incorrect construction, transmission corruption, or any other sort of damage. It will simply reject the document as invalid XML, as is required by the standard. -- FeRDNYC (talk) 08:04, 12 February 2021 (UTC)Reply

Logical error here. XML may well make it easier to detect and recover from errors; it's just that in the eyes of the idiots who had this brilliant idea, you are not allowed to call the program that saves your project by doing the recovery a "valid and correct XML parser". It's something more powerful. Imaginatorium (talk) 13:55, 12 February 2021 (UTC)Reply

References

  1. ^ Pilgrim, Mark (2004). "The history of draconian error handling in XML". Archived from the original on 2011-07-26. Retrieved 18 July 2013.

.NET not a language edit

"marshalling differs across programming languages such as Python, Java, and .NET" problem: .NET is not a language. Zectbumo (talk) 05:43, 29 May 2023 (UTC)Reply