Open michielbdejong opened 2 years ago
The monolith solution would be pretty similar to the generic MVC solution, running one Prejournal instance as a server with a long-lived database, and having 3 user accounts (one for each company). We would need to add a movement type 'task' for bugs probably, since so far movements can only be of type 'invoice', 'payment', or 'worked'. I guess 'worked' more or less relates to 'task' in the same way 'payment' relates to 'invoice'.
The comments can be statements.
We support a few different access control systems:
So I think my approach would be:
Maybe the list of possible grants is becoming a bit unwieldy this way. I don't know if there is a better solution, maybe refactoring the whole access control system. Food for thought! :)
Going from a monolith solution to a 3-node federated network, the obvious way would be that instead of the (GUI) client sending its commands to 1 API, simply send it to all 3. Except when it's a draft comment and the current user is user A or user B, then you would only send it to node A and node B, not to node C. And the client doesn't know this, because that business logic only exists server-side.
So then maybe the (GUI) client sends the operation only to your own node and then your node checks which other nodes are allowed to see the item that was updated, and does filtered diff propagation that way.
Updating thread with new reference link replacing the one above following tidy-up of source Wiki page.
Generalising the problem in a 3-party system (whether a single instance of Prejournal or a federation of 3 Prejournal nodes, or different systems), there are 7 read access scenarios (given by s = n^2 - (n - 1)
in general, where n
is the number of parties or nodes):
For write (discounting immutable and write-only data), we have the following 16 scenarios (which effectively include the 7 above, and can be generalised as s = (n + 1)^2
):
This has been somewhat simplified by excluding the 3 scenarios where data are writeable by only one system and inaccessible to others.
From https://github.com/federatedbookkeeping/timesheets/wiki/Follow-on-Project-Proposals-and-Milestone#strawman-simple-bug-tracker