dsriseah / ursys

an opinionated javascript library for prototyping realtime web apps
1 stars 2 forks source link

URSYS Message Distribution Rules #7

Closed dsriseah closed 15 hours ago

dsriseah commented 1 month ago

There are subtleties in how messages are routed. In this version of URSYS, there both "local" and "network" message.

Local messages are defined on the local Endpoint only, and do not go out to the server

Call      ('MESSAGE', data).then( response => {} );
Send      ('MESSAGE', data).then( success => {} );
Signal    ('MESSAGE', data);
Ping      ('MESSAGE').then( count => {} );

Network (or SRV:) messages are send to the message dispatcher on the URNET server.

NetCall   ('NET:MSG', data).then( response => {} );
NetSend   ('NET:MSG', data).then( success => {} );
NetSignal ('NET:MSG', data);
NetPing   ('NET:MSG').then( uaddr[] => {} );

Messages can have multiple handlers, so URNET has to figure out who gets what.

The distinction between each type:

TO RESOLVE