rumdood / Moneo

Telegram Bot for Managing Scheduled Tasks and Reminders
MIT License
2 stars 0 forks source link

MoneoFunctions Project is not in Isolated Process Mode #20

Closed rumdood closed 8 months ago

rumdood commented 8 months ago

The hosting for MoneoFunctions is currently not in IsolatedProcess. This creates an issue with moving forward to dotnet 8 and beyond.

Moving to an IsolatedProcess in the Moneo.Functions.Isolated project presents new issues with the massive modifications to the Durable Entities API and the fact that Moneo has evolved to be significantly more complex than it started (and has carried over some ultimately poor design choices).

Primary issues arising are:

rumdood commented 8 months ago

Labeling this as both an enhancement (nothing is TECHNICALLY broken) and a bug (limited ability to follow the framework going forward will become an issue).

rumdood commented 8 months ago

At the moment, my preferred solution is to create a two-tiered store for the tasks.

  1. A database for storing the tasks so that basic CRUD can be done on the tasks without having to invoke durable entities every time (I shouldn't need to run an orchestration to change the description of a task)
  2. Durable Entities strictly for managing the longer-running orchestrations (e.g. reminders and badgers). This will basically mean that instead of storing the full state in the durable entity, the durable entity state will be an ID to find the task in the database and then perform its necessary updates against that entity and finally saving any changes back to the database before completing.

Candidates for storage are pretty much anything. Could easily use Azure Tables to keep everything in the same basic location - or potentially move to using something like a Document Database like Mongo for storing tasks and letting Durable Entities be managed in their default approach.

I am intrigued by the MSFT package for using SQL Server as a backing store for Durable Entities, as that would provide the ability to host everything on-prem if so-desired as well as put all data into a single data source that is easily queryable, etc. Cost for hosting in Azure would go up significantly though, so I need to think about it more deeply.