2 ms·
What's buried under the lede: this harness is using Cordis v4 (the paper that dropped today). Cordis has already been used for four years in a different project
by ef2k 3mo ago
What's buried under the lede: this harness is using Cordis v4 (the paper that dropped today). Cordis has already been used for four years in a different project called Koishi that uses v3. Cordis itself is a way of hot loading and unloading plugins without restarting a running process. The cool part is that when it unloads it can revert any state and side effects it created, cleaning up its connections, memory allocations, registered handlers, etc. and it can also deactivate any dependencies it relied on without disturbing other plugins.
- ziofill 3mo agoSounds very cool! What do you mean by “revert side effects it created”?
- ef2k 3mo agoAnythign that needs to be cleaned up or undone goes in ctx.effect. It returns the "inverse" (the cleanup function) when the plugin loads. Cordis then stores it and runs it when the plugin unloads. Take a look at 5.1.1 in the paper.
- deleted 3mo ago[deleted]
- shostack 3mo agoCould memories and blocks of context be made pluggable and unpluggable in this manner to "hot swap" context?
- roywiggins 3mo agoNot without nuking your cache, I figure.
- JHonaker 3mo agoAs far as I can find, Cordis didn't exist before they shared it with this harness. It is very likely that its because I didn't search in Chinese (as I don't know it). Can you explain the evolution of it from the different versions?