Arranging things into the right order so they can move together. The bridge does not accept partial data.
On the sidings sit the fields of one object, parked any old way: an id, a name, a list of tags, a flag. Loose, they cannot travel — a wire carries one thing after another, in a fixed order, or it carries nonsense. Press marshal and the little shunting engine fetches each car and couples it into the one canonical sequence behind the locomotive. When the rake is made up — and only then — it rolls out to the right, down the wire, as a single ordered stream. That is all marshalling ever means, in the yard or in the protocol: take the things that are merely near each other and make them into a line that can leave.
From Old High German marah, “horse,” and scalc, “servant” — the marahscalc was the keeper of the stables. The office rose with the importance of cavalry until the horse-servant became a commander of armies. The word climbed from the barn to the rank of field marshal.
Beneath every later sense sits one idea: putting things into the correct order so they can move together. You marshal troops before they march, marshal a parade before it sets off, marshal arguments before you make a case. Order first, motion second — never the other way around.
A marshalling yard sorts railway wagons into the right trains. On the tarmac, a marshal with two wands guides an aircraft into precise position. The job is the same as the word: take things arriving out of order and arrange them so the next stage can accept them cleanly.
When data must cross a boundary — between processes, between machines — it is marshalled: serialized into an ordered byte stream that can travel, then unmarshalled back into an object on the far side. The parade metaphor is exact. Nothing crosses until it is in order.
Remote procedure calls and Microsoft's COM/DCOM made marshalling a daily concern: function arguments packed up, shipped to another process or machine, unpacked, and the result marshalled back. The proxy on one side and the stub on the other are just very diligent parade marshals.
Protocol Buffers, Thrift, Avro: define the shape once, and marshalling becomes compact, versioned, and fast. gRPC marshals every request and response across the network this way. The bridge now checks a schema at the gate, but the rule has not changed since the stables — order first.
JSON over HTTP, messages on a queue, arguments to a serverless function — all of it is marshalling and its inverse, happening billions of times a second. The word that began with a servant arranging horses now arranges the bytes of nearly everything. The parade does not stop.