#[lustre] rsvp or lustre_http ?
1 messages · Page 1 of 1 (latest)
rsvp is newer, i published it beacuse it was unclear if/when lustre_http would update its gleam_json dependency around the time when that was being bumped
its also possible to use rsvp in server components, and is capable of sending/receiving bits
You can also use a HTTP client inside an effect, if you would prefer extra control for some reason. Lustre is really good at not restricting you to a particular set of libraries
aye i think that's what steerlab were doing when they were using lustre, just using gleam_fetch or maybe even ffi to fetch directly.
if you care about such things, rsvp also has a simulate function for testing
oh that's v nice
When you said « too fast ». Are you applying you are in a race with her 😅 (I’m joking about the race thing if it was not obvious)
Yup, that’s why lustre effects are nice to work with since they’re quite polyvalent in lots of use cases. I’m quite impressed the dispatch method can be either use for single message back or reuse multiple time at any time.
i'll have some effects-based improvements in the next release! 👁️
By curiosity, how does rsvp manage to both do http on browser and on server ? I tough the async model was different
the async model is different but its entirely contained inside the effect, because the way to get the result of the request is always by dispatching a message. it doesnt matter if thats from a promise or not
Oh so on the erlang side you can spawn a process, do the thing and send back the result through a message ? It’s just hard to me how you would called the dispatch function or do you just send directly from the other process a message directly for the update function ?
Hummm you make me curious and want to ask you if I can know what will be new 
you could just go look at the implementation 😄 theres not that much code
You mean the rsvp implementation or new lustre effect improvement surprise ^^ ?
i meant rsvp, but i suppose you could look at the effect pr when i open that too 😂