Opinions Wanted: "Auto Responders"? #83
Replies: 3 comments 4 replies
-
Callback-style handlersOne option would be to offer some kind of callback-style handlers that can immediately handle some kind of request. This could be passed in as a list of function pointers, that would have some kind of access to the inner portion of the netstack, and allow for immediately handling requests, without having an explicit socket for this. We would need to define some kind of interface for this, and define where in the dispatching stage it occurs, for example BEFORE searching for sockets, or AFTER searching for sockets. This could be difficult, because we need to define what kind of access these handlers have, they may want to query the list of sockets, or the profile/interface. I could also see wanting to be generic over the Profile, or even having some kind of context. |
Beta Was this translation helpful? Give feedback.
-
A single many-service taskAnother option would be to provide an async fn that handles some subset(s) of baseline functionality, and open a socket for each of them. This fn could then select on all of the sockets, and handle their requests. This still leaves some question on how to access the information, and does still consume N sockets for handling this. Users would then need to spawn this function to do the handling, but it would reduce the boilerplate a bit. |
Beta Was this translation helpful? Give feedback.
-
Status Quo: Just provide handler tasks for thisOne option would be to just provide async fns for automatic handling. This means we can re-use existing socket infrastructure, at the cost of asking users to spawn a task/tasks to handle this, and using up ports to do so. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
There are certain tasks we probably want the netstack to "automatically" handle. Off the top of my head, this could include:
The current capability for this requires users to spawn a worker task/socket for each of these. This allows users to define which ones they want to support, but might have some boilerplate: if we have 4-5 "minimal functionality" services, that means all users need to set that up.
I'll explore some potential options of how we could handle this below.
Beta Was this translation helpful? Give feedback.
All reactions