leostera / reactor

🚀 Native Actors for Reason and OCaml
70 stars 5 forks source link

FullStack re:actor #3

Open kamilchm opened 5 years ago

kamilchm commented 5 years ago

Cool experiment :+1: It reminds me another cool experiment - gen_browser by @CrowdHailer. I wonder if it's possible to have the re:actor communicating safe actors between browser and the backend?

leostera commented 5 years ago

Interesting question! I think it is possible, but it would require a bit of work.

Message safety would require strict checks at the boundaries of both sides, and possibly sharing type-definitions of some sort. Perhaps GraphQL or ATDGen could act as intermediary for the type-definitions.

Guaranteed-delivery would need to be implemented at the boundaries for both sides too, so that sending something will require an acknowledgement from the received. This means that we end up in the land of more than once delivery. That is, if I send a message, and you timeout acknowledging it the first time, you will receive it again.

kamilchm commented 5 years ago

GraphQL for message safety could be used to highlight re:actor using the GQL hype.

As for delivery guarantee, what's the current notion of delivery for Web Worker backed actors?

leostera commented 5 years ago

This just became very relevant again now that I’ve rewritten reactor to work natively.

I’ll reopen.