Fork me on GitHub
#transit
<
2022-02-10
>
javahippie14:02:13

Is there a plan to support transit+msgpack in the cljs implementation?

Alex Miller (Clojure team)14:02:50

there are currently no active plans for anything but I'm hoping we can spend some more intentional time on the transit impls in 2022

👍 1
Alex Miller (Clojure team)14:02:50

the expectation in the past was that js's built-in json support was very fast and thus maybe msgpack was not as valuable in cljs land

Alex Miller (Clojure team)14:02:03

(or maybe it didn't exist at the time, don't know)

Alex Miller (Clojure team)14:02:24

so I guess my question is why you're asking :)

javahippie14:02:42

Curiosity, mostly. Only knew about msgpack from the clj implementation of transit and was reading on https://msgpack.org Their claims about size and serialization speed sounded nice, but in our software we won’t see a volume to really benefit from that, anyways

souenzzo23:02:29

short time ago I had problems with the fact that JSON.parse is something internal in transit-cljs I was dealing with a huge payload, that I was able to represent as Uint8Array and parse with a specific library uint8array-json-parser Once JSON.parse is internal in transit-cljs, the only way to use transit was turning Uint8Array into a String, but this operation always failed, because the string would be too big.

souenzzo23:02:48

I was thinking if in the future, both JSON.parse and transit-cljs could use ReadableStream, to allow absurdly big payloads https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream

👍 3