Mirai Re-design #38
Replies: 3 comments 10 replies
-
9a0f2a6 begins the journey. Re-writes This leads to much safer behaviour. For example we can now have a local dispatcher with daemons, kill the dispatcher process and the daemons will all exit (was not the case previously). Also no need to send any exit signals!! A bit less magic, but bigger overall magic! Another side effect is that the server process exits gracefully and silently in all scenarios now rather than through error. @wlandau when you have the chance to test the new behaviour, it might allow you to remove some of your safeguards in |
Beta Was this translation helpful? Give feedback.
-
With shikokuchuo/nanonext#5073346 we should now be up to the task. Pipe events (i.e. disconnects) can be easily distinguished as they can be set to trip a flag. The This allows us to write clean code such as: wait(cv) || break And we don't need to check for unresolved status any more. |
Beta Was this translation helpful? Give feedback.
-
This has come in one drop as lots of stuff tied together, but the non-polling dispatcher is complete in 3891ddf. Has gone through a fair amount of stress testing and passes well. This throughput test is now instantaneous: My original test which spurred all of this, now returns an overhead of an incredibly miniscule 13 ms on my laptop!! In no particular order: 'pollfreqh' and 'pollfreql' arguments removed as have no more meaning. 'exitlinger' removed from dispatcher as no longer applicable there. These should be backwards compatible as extra arguments should get lost and ignored in the '...'. No minimum socket lifespan needed. There is now a little ack exchange between client and dispatcher to guard against hanging processes such as: wlandau/crew#41 (comment). Manually-launched dispatchers are still possible though and does not have this to allow normal operation. dispatcher and server will now exit gracefully when parent process exits/crashes etc. (whenever the connection is dropped). This should help minimise orphan processes. Self-repairing local daemons (when auto-launched) was a nice proof of concept, but removed to reduce complexity and enhance overall logic flow at dispatcher. Would have been rarely needed for the local cases. 'exitlinger' applicable now only to
|
Beta Was this translation helpful? Give feedback.
-
Which was always in the works even prior to the 0.8.0 release. Inviting @wlandau.
This uses synchronisation primitives from the NNG library newly-exposed in
nanonext
(to be 0.8.1). We should confirm we have all we need formirai
before we releasenanonext
.Beta Was this translation helpful? Give feedback.
All reactions