-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create WASM system for embedding Thema operations in a browser #36
Comments
@myitcv i know you put together the CUE playground with WASM - any tips on where to start with this? |
https://github.com/mattn/golang-wasm-example - I think the wasm_exec.js is where the connection (complicated?) part happens. I haven't done Go -> WASM in a hot minute. This may be of interest as well: https://github.com/hack-pad/hackpadfs |
Excellent, will check those out, ty! i'm also excited by the possibility that hackpadfs could mean we could stop using laher/mergefs in various places |
I haven't tried it, but someone in my slack was speaking highly of it |
i used hackpadfs :) Yep it's really useful and fast. I also use Cue Server side. I just run the Cue that the Users write in the front end at runtime. @sdboyer |
@gedw99 thanks for the info! And yeah, i've been feeling a little Leibnizian about Cambria - i started work on all this before i knew it existed, then learned about it later. That, and Thema goes aggressively in a different direction with its insistence on linear ordering, were enough to make me back off a bit. But it's just me being precious. I'll add a section to the README with Cambria, and some others. |
@sdboyer cheers. thanks for the explanation. It makes total sense now that you told us. I was reading Thema and Cambria, and they looking like "same same but different" but i couldn't put my finger on the difference. One of the associated domain problems with Schema Evolution that sort of goes hand in hand is data reconciliation in terms of CRDT. Have you ever considered Cue for doing CRDT ? Cue is definitely NOT a one trick pony !! I am playing with the idea. Both CRDT and CUE are based on semi lattice maths, non order dependent mutations and reconciliation. I have a sync system and using lamport vector clocks but i wonder if Cue is up to the challenge of CRDT style data sync without relying on virtual clocks / date time stamps for context. I know this is totally left field from Thema, but I figured if anyone is making jokes about Leibnizian, they will have an opinion on CRDT and CUE. If you wanna chat offline about Data sync and thema it would be cool too. I really liked your video presentation where you framed the domain problem really well. Schema Evolution and front or back versioning approaches is something i have also been banging my head against and asking " is there is a better way ". |
❤️ i've thought a bit about a potential relationship between CUE and CRDTs (and to some other lattice-related work i've done), though i've had trouble seeing one. I lack the formal maths knowledge to know how to express the breakdown well, but it starts somewhere around my intuitive sense that a prerequisite for creating a useful CRDT is the construction of a semilattice where all values in the lattice are meaningful. Because CUE's lattice is predetermined, and join operations all ultimately converge towards bottom - generally an unuseful value - the applicability isn't straightforward. ...but i don't find that convincing, either. Bottom occurs when you're directly banging two CUE values together: it indicates that the two values have reached a terminal state. That's only "unuseful" in a scenario where there is no larger, meaningful structure from which they derive, implying some recourse. And that really is the meaning of bottom - it tells the user where irreconcilable disagreement lives. And if you make the "user" a machine which knows that, when a given pair of values reach bottom, to take some new action that relates to where those values came from...i mean, then, you may have the basis for a CRDT. It seems plausible that you could model tombstone records e.g. in the Treedoc case using bottom. So, yeah, possible. But i can't see far enough down that path to picture what i'd try to model. I'd like to, though - i think there's probably something valuable there for CUE's config-oriented domain.
Sure! send me a DM on the CUE slack or le tweets |
Thema operations in a browser, in the form of a Thema Playground has come true! 🔥🔥 App: https://grafana.github.io/play-thema -- However, we still need to explore which are the (viable) alternatives to build a WASM/WASI artifact. |
Do you @sdboyer think we can close this issue and start tracking upcoming work there, on the Play Thema repository itself? 🤔 |
i do! 🎉 amazing |
The
thema
command offers (or will offer) basic Thema operations via CLI and HTTP. It'd be absolutely amazing if we could also represent those operations as something that was easily embedded in a webpage.This'd clearly be WASM. I've never worked with WASM and don't know where to start, but if the CUE playground is feasible, this must be, too.
I'm picturing three linked text input boxes:
-v
in the same way they do across thethema data
subcommands. I suspect that being able to see how all three operations harmoniously relate will reinforce something about how Thema itself works in a way that could be missed when individually runningthema data
commands.The text was updated successfully, but these errors were encountered: