Remix.run Logo
mgaunard 7 days ago

in the systems I built I didn't bother with backwards compatibility.

If you make any change, it's a new message type.

For compatibility you can coerce the new message to the old message and dual-publish.

o11c 7 days ago | parent | next [-]

I prefer a little builtin backwards (and forwards!) compatibility (by always enforcing a length for each object, to be zero-padded or truncated as needed), but yes "don't fear adding new types" is an important lesson.

jimbokun 7 days ago | parent | prev [-]

That only works if you control all the clients.

mgaunard 7 days ago | parent [-]

Dual-publishing makes it transparent to older clients.

Obviously you need to track when the old clients have been moved over so you can eventually retire the dual-publishing.

You could also do the conversion on the receiving side without a-priori information, but that would be extremely slow.