Replies: 4 comments
-
What's the problem with the nested |
Beta Was this translation helpful? Give feedback.
-
Btw these the Set|Remove operations together with old and new state can be used to derive virtually all sorts of changes like Rename|Insert|etc. I used that in one of our projects so if you want I can try to dig up the code |
Beta Was this translation helpful? Give feedback.
-
I see what you mean. I think I had this question somewhere in the beginning of my experience with the library. I then noticed that
I thought about it a little bit too. It would be nice to send one |
Beta Was this translation helpful? Give feedback.
-
Hi again, I did a little bit more thinking about the question. I think it boils down to the serialization of nested adaptive types. To make it a bit more concrete, I'm currently trying to implement a virtual table similar to that demoed by Jane Street in incr_dom but the virtualization part performed on the backend. In short, instead of transmitting the full table, a slice of it currently observed is transmitted. I modeled such a slice as Unfortunately, it's not easy to leave the world of Adaptive with such a structure. I could (and I did for the time being) squash the nestedness to I was wondering if you have experience of doing something similar to that. I remember seeing your demo where a 3D scene state (a sphere with some dots on it) was broadcasted over the wire. Could you point me to something here? Ultimately, I have a feeling that it could be such a wonderful way of remoting to efficiently get some streaming state. Then, given a decoder, the client could receive updates in the most efficient way. Different strategies (push all vs. push-pull) could also be used based on the bandwidth vs. latency tradeoff with backpressure out of the box. Further, the client could feed the output into its own adaptive computation graph, effectively staging a given adaptive computation over several nodes. It may be that something akin to |
Beta Was this translation helpful? Give feedback.
-
I previously asked open questions like this one in the Discord channel (thank you all for helping me out :) ) but I feel like placing it here might help other people too.
I'm interested in distributing the results of an incremental computation from the server to the client. To give a concrete example, suppose that the output of a computation is a table with a dynamic number of columns represented by the data structure
HashMap<rowkey, HashMap<colkey, double>>
. Now to broadcast it to the client I could diff the rows efficiently since the outer map will be anamap
and I get efficiently calculated deltas that are a part of computation for free. However, diffing the inner map is more tricky. It feels somewhat wasteful to diff 2HashMap
to get aHashMapDelta
. Ideally, these deltas were already computed and I could simply extract them.How to structure such a computation is also not entirely clear to me. I could not find a solution for how to represent an
amap<'a, amap<'b, 'c>>
. If I understand it correctly, it's not possible since the onlyElementOperation
s available to us areSet
andRemove
.How do you approach such a structure? Going back to the example above, it's clear that column and row indices could be merged into a tuple and everything would be fine. But in general, it may not always be achievable or natural for the problem.
Beta Was this translation helpful? Give feedback.
All reactions