sys/node/tiersplit▲toc

An experimental module to try out tierSplitted applications.

type broadcastsys/node/tiersplit/broadcast: V -> V<a>

A channel to broadcast messages over

Create a broadcast channel

struct clientHandlerssys/node/tiersplit/clientHandlers: (V, V) -> V<a,b>(clientSessionInit : () -> nodeClientsys/node/tiersplit/nodeClient: E ((b) -> nodeClientsys/node/tiersplit/nodeClient: E ()std/core/(): V)clientSessionInteract : ((a) -> nodeClientsys/node/tiersplit/nodeClient: E ()std/core/(): V) -> nodeClientsys/node/tiersplit/nodeClient: E ()std/core/(): V)
alias nodeClientsys/node/tiersplit/nodeClient: E = <domsys/dom/types/dom: E,divstd/core/div: X>
alias nodeServersys/node/tiersplit/nodeServer: E = iostd/core/io: E
struct serverHandlerssys/node/tiersplit/serverHandlers: (V, V) -> V<a,b>(serverSessionInit : () -> nodeServersys/node/tiersplit/nodeServer: E ((a) -> nodeServersys/node/tiersplit/nodeServer: E ()std/core/(): V)serverSessionInteract : ((b) -> nodeServersys/node/tiersplit/nodeServer: E ()std/core/(): V) -> nodeServersys/node/tiersplit/nodeServer: E ()std/core/(): V)
type socketsys/node/tiersplit/socket: (V, V) -> V<a,b>

A socket that sends messages of type a and receives messages of type b

fun exit( code : intstd/core/int: V ) : iostd/core/io: E ()std/core/(): V

Exit the process with a specified exit code.

fun nodejsMoebius( serverCode : () -> nodeServersys/node/tiersplit/nodeServer: E (((a) -> nodeServersys/node/tiersplit/nodeServer: E ()std/core/(): V) -> nodeServersys/node/tiersplit/nodeServer: E ((b) -> nodeServersys/node/tiersplit/nodeServer: E ()std/core/(): V)), clientCode : () -> nodeClientsys/node/tiersplit/nodeClient: E (((b) -> nodeClientsys/node/tiersplit/nodeClient: E ()std/core/(): V) -> nodeClientsys/node/tiersplit/nodeClient: E ((a) -> nodeClientsys/node/tiersplit/nodeClient: E ()std/core/(): V)), nodeLocal : ?stringstd/core/string: V, nodeUrl : ?stringstd/core/string: V, nodePort : ?stringstd/core/string: V ) : iostd/core/io: E ()std/core/(): V

moebius tierSplitting

fun nodejsRpc( serverCode : () -> nodeServersys/node/tiersplit/nodeServer: E serverHandlerssys/node/tiersplit/serverHandlers: (V, V) -> V<b,a>, clientCode : () -> nodeClientsys/node/tiersplit/nodeClient: E clientHandlerssys/node/tiersplit/clientHandlers: (V, V) -> V<b,a>, nodeLocal : ?stringstd/core/string: V, nodeUrl : ?stringstd/core/string: V, nodePort : ?stringstd/core/string: V ) : iostd/core/io: E ()std/core/(): V

RPC based tierSplitting

fun nodejsSocket( nodeGlobal : () -> iostd/core/io: E c, nodeSession : (socketsys/node/tiersplit/socket: (V, V) -> V<a,b>, c) -> nodeServersys/node/tiersplit/nodeServer: E ()std/core/(): V, nodeClient : (socketsys/node/tiersplit/socket: (V, V) -> V<b,a>) -> nodeClientsys/node/tiersplit/nodeClient: E ()std/core/(): V, nodeLocal : ?stringstd/core/string: V, nodeUrl : ?stringstd/core/string: V, nodePort : ?stringstd/core/string: V ) : iostd/core/io: E ()std/core/(): V

Socket based tiersplitting