Replies: 1 comment
-
Data structures are currently serialized alongside their schemas (winery data structures which include information on how to serialize/deserialize), so there is definitely room for optimization in curryer to trim this fat, but it's a constant overhead, so not particularly worrisome. Let me know if this is blocking you and I can work on trimming the overhead. Also note that the lengths are encoded over-the-wire in network byte order, so watch out for that. If you are looking for a more common communications method, check out the WebSocket server and client. It's designed for communications with non-Haskell programs via a simple JSON API derived from existing Project:M36 data structures. |
Beta Was this translation helpful? Give feedback.
-
Hi, I was trying to see if it is feasible to use idris2-sop to talk to Project-M36, so I added some instrumentation to see the messages dumped when running SimpleClient. Then, I tried to take the length of that message, and it seems really large. This is what I executed in GHCI with Codec.Winery and ProjectM36.Client:
Data.ByteString.length $ serialise (Define "person" [NakedAttributeExpr (Attribute "name" TextAtomType),NakedAttributeExpr (Attribute "age" IntAtomType)] :: DatabaseContextExprBase ())
It gives me back a number over 100KB. Are these blobs really sent over the wire? It seems really large. It seems like it includes all constructors of the types involved. Seems like way too much effort to replicate in Idris, and it'd be super fragile.
Beta Was this translation helpful? Give feedback.
All reactions