From b7ba23827f2d3f6e8afd84a5ba3e56a3350b4cd0 Mon Sep 17 00:00:00 2001 From: Philippe PITTOLI Date: Fri, 31 May 2024 05:52:49 +0200 Subject: [PATCH] Some explanations about netlibre. --- paper/paper.ms | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/paper/paper.ms b/paper/paper.ms index 272fb9e..63282a4 100644 --- a/paper/paper.ms +++ b/paper/paper.ms @@ -1031,10 +1031,47 @@ No authorization mechanism prevents the application to access un-authorized data Since this implementation of DODB is related to the Crystal language (which isn't fully ported to the OpenBSD plateform at-the-moment), this is a problem. . . +.SECTION Real-world usage: netlib.re + +Netlibre is a service providing free domain names and a website to manage DNS zones. +Domains can be shared and transfered between users, so organizations do not have to rely on a single person. +Resource records are managed with dedicated interfaces, users are helped as much as possible through many automatic zone verifications. +Resource records can be automatically updated via +.I tokens , +enabling users to host a service despite having a dynamic IP address. +The resource can be updated with a trivial command: +.SOURCE Ruby ps=9 vs=10 +wget "https://netlib.re/token-update/" +.SOURCE + +.B "The technical parts" . +The service is split into two main components: a user interface (website written in purescript) and a daemon (dnsmanagerd) handling all the server operations. +Several "databases" are maintained + +.BULLET Common and RAM-only databases +.BULLET database: users, domains, tokens, connected users (for collaborative work) +.ENDBULLET + +Performance-wise, netlibre handles between 2 to 3k req/s with a single core, without any optimization. +Code is written in an almost naive\*[*] way and still performing fine. +.FOOTNOTE1 +Keep in mind that netlibre uses poll(2), a very old syscall to handle its event loop (from the 80's!); not newest and way faster event facilities such as epoll(2) and the like. +.FOOTNOTE2 + +Indexes with file-system representation enables quick debugging sessions and to perform a few basic tasks such as listing all the domains of a user which, in practice, is great to have at our fingertips with simple unix tools. + .SECTION Conclusion The .I common database should be an acceptable choice for most applications. + +.BULLET talk about netlib.re +.BULLET triggers are available and can be adapted to do anything, indexes are a simple use of triggers +.BULLET common db is great for most applications +.BULLET indexes can provide a view of the current state of the database +.BULLET ramdb is a great tool, same API than the rest so you can attach indexes to it +.ENDBULLET + .TBD .APPENDIX FIFO vs Efficient FIFO