I have developed a database plugin for NodeBB in the past few months and I want to release it to the public, but before that I want to submit some TS type declarations -- more specifically I manually cherrypicked and observed some type interface, behavior and expected inputs for the database functions, and I want to make sure that NodeBB team would continuously keep track of that in the future so that my plugin can work consistently throughout upgrades. I hope NodeBB team could accept the contribution so that I can release it out to the public ASAP. I have always wanted to extend NodeBB to work on MySQL, MSSQL and Oracle with that plugin.
stevefan1999-personal
Posts
-
-
We all know NodeBB plugin is such a pain in the ass, because we do not have type information and we aren't sure about the hooked data structure and made unintended modification and can even unexpectedly corrupt the database. We should move on to use TypeScript, with the added benefit of being able to use ES modules that will make it able to start much faster (since ES modules are static and CommonJS are dynamic, this decreases pressure on module resolution)
-
I have a database plugin for sale, powered by TypeORM.
I have also made sure it could work with most of the database out of the box that supports multiple database backend, including MySQL, Postgres, SQLite, SQL Server and of course SQLite. But to install it there might be some patches needed. I'm still coming up with some idea of how to run the integration test in NodeBB main DB test suites. Once I got 100% conformance on all supported databases mentioned, this will be on https://privjs.com/ soon.
-
I use a k8s deployment and scale it up according to my need to run the cluster instead of using the official guide of using built-in worker cluster forking mode, so I think that maybe there will be some problem if I run that with k8s, and I think the most notable potential problem would be the websocket requirement? Because it is a stateful protocol, there can be some disassociation problem of message ordering/context difference.
I also see that I can add a Redis pubsub, and would that help solving this problem?
Typescript type contribution -- submit to main repo?
Eventual migration to TypeScript
SQLite Integration
Is it safe to run multiple isolated instances of NodeBB and use LB to distribute load?