MODiX 2.0 Discussions
Pursuant to @patrickklaeren's mild suggestion, which of course everyone has immediately turned up to 11, there seems to be more than enough interest in discussing a MODiX 2.0 re-write.
https://discord.com/channels/143867839282020352/536023005164470303/797160211764084766
The main points of the proposal are:
- We should consider re-writing MODiX from scratch, with a focus on only porting over the pieces of functionality that are most critical, until we reach a minimum-viable-product.
- We should look at alternatives frameworks to Discord.NET, the primary proposal at the moment being https://github.com/Nihlus/Remora.Discord.
- We should consider doing what many of us have wanted for a while and implementing plugins, to give us better control over what goes into the bot in the csharp-discord server, while not alienating other users who host the bot for their own servers and have different needs.
With those goals in mind, the roadmap as I see it is...
- Everyone who wants to participate in this discussion should actually sit down and code something with Remora, maybe even build their idea of a "skeleton" MODiX.
- We need to formally map out what functionality MODiX provides today, and needs to provide tomorrow, and prioritize their porting to 2.0.
- We should implement a MODiX "core", especially if we're going to proceed with supporting plugins, and have that be reasonably finalized before we start implementing plugins or functional modules.
As it so happens, I was in the process of building a demo app in ASP.NET Core/Blazor this past week, right before @patrickklaeren 's proposal, and that kinda plays directly into this.
- While I still don't like the fundamental premise of Blazor, in that it is really just HTML-rendering, relying entirely on JS to do all I/O, I can't deny that the development experience is great. I think it's more than mature enough for our usage.
- I was also playing with gRPC, and I feel basically the same way about it as Blazor. It strikes me as rather ridiculous that we've circled around back to SOAP, but the development experience is really nice, and it offers a lot of concrete performance advantages over a JSON REST API. Given that MODiX isn't in the business of publishing an API for anyone to use (I.E. the server and client are rightly-coupled) I think gRPC is a strong candidate for 2.0.
- After a few days of playing with Remora, I have mixed feelings. I'm very happy with the fundamental approach Remora takes of simply mapping the APIs that are there, and not adding intermediate Domain layers, or massaging and transformation of data. I'm happy to see railway-programming concepts at the core, in the form of "result" objects being returned from API calls, and being supported throughout the stack. I'm put off a bit by the implementation of the "results" system itself, which seems far more convoluted than it should be, based on my own experience with the concept. I definitely want to get in voice with @Nihlus and other MODiX developers and get some feedback on this. I know one of the principal complaints about MODiX's current architecture is "it's too enterprise" and after writing out some basic commands, I think it's arguable that Remora takes us even further down the "enterprise" road. It's also off-putting that all the most basic functions of the library were broken out-of-the-box, and it took like half-a-dozen bugfixes published on NuGet to make the library usable.
I've pushed what I've implemented so far to a prototype branch. It contains the following:
- A skeleton Blazor frontend, with GRPC server/client communication.
- A skeleton Bot frontend, with some diagnostic commands and a few basic UI controls.
- A skeleton Business layer, to contain logic needed by both frontends.
- A hosting layer that stitches everything together.
Looking forward to everyone else's thoughts and concepts.
Yeah, the multiple issues you ran into wasn't a good look. That said, Remora.Discord is a new and immature product, so some growing pains are to be expected - it's been extremely valuable so far for me to have some actual users fiddling with it, and not just my, myself, and I.
On the topic of the results - yeah, they are a bit clunky. They do the job, and that's mainly why I've not worked further on them - I'd happily look at other options.
And it's not like the issues weren't fixed promptly. ;)
I think my impression ultimately is that if we use Remora for MODiX, we need to be okay with actively participating in Remora development alongside MODiX, at least for a break-in period. Which I think I'm okay with, myself.