transient-haskell / transient

A full stack, reactive architecture for general purpose programming. Algebraic and monadically composable primitives for concurrency, parallelism, event handling, transactions, multithreading, Web, and distributed computing with complete de-inversion of control (No callbacks, no blocking, pure state)
MIT License
630 stars 28 forks source link

callService shouldn't need a previous established connection to call services #79

Open hughjfchen opened 4 years ago

hughjfchen commented 4 years ago

Currently, before you can use callService/callService' to call services on other nodes, you must use connection, listen or initNode established some connection state. This restrict should be removed because callService/callService' know how to connect to the node where the services it wants to call located.

agocorona commented 4 years ago

in the meantime, runCloud callService... work fine to call services under the TranIO monad.

callService is asynchronous, so it will execute alternative computations. If that is not desired, use sync . runCloud $ callservice..