You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To achieve aspects of the use cases (#14) @NiteshKant and I propose that we treat servers and clients as functions that can be composed. For the rest of this I'll talk about servers, but it applies to clients as well.
It effectively behaves like "mapping" a server to a new server. This is somewhat monadic, except we don't think there is ever a time a Server<Server<I, O>> makes sense, so it won't have flatMap/bind so isn't actually a monad. It works quite similarly though so one should be able to define a server:
Server<I, O> s = ...
and then transform it into a new server definition with additional behavior such as logging:
// pseudo-codeServer<II, OO> s2 = s.intercept(server -> {
// do logging herereturnserver; // pass thru as we are just side-effecting with logging
});
In a few days @NiteshKant and I will submit a PR proposing this approach to making RIPC loosely-coupled yet capable of achieving the many use cases #14 via layering and composition.
The text was updated successfully, but these errors were encountered:
To achieve aspects of the use cases (#14) @NiteshKant and I propose that we treat servers and clients as functions that can be composed. For the rest of this I'll talk about servers, but it applies to clients as well.
It effectively behaves like "mapping" a server to a new server. This is somewhat monadic, except we don't think there is ever a time a
Server<Server<I, O>>
makes sense, so it won't haveflatMap
/bind
so isn't actually a monad. It works quite similarly though so one should be able to define a server:and then transform it into a new server definition with additional behavior such as logging:
and then transform data:
In a few days @NiteshKant and I will submit a PR proposing this approach to making RIPC loosely-coupled yet capable of achieving the many use cases #14 via layering and composition.
The text was updated successfully, but these errors were encountered: