deploy-rs icon indicating copy to clipboard operation
deploy-rs copied to clipboard

Client-Server Split RFC

Open MagicRB opened this issue 3 years ago • 8 comments
trafficstars

Signed-off-by: Magic_RB [email protected]

You can find the text of this RFC here.

MagicRB avatar Dec 16 '21 21:12 MagicRB

At this point might as well rewrite it from scratch. Wouldn't be the first time in this project's life (3 2 1 0)

balsoft avatar Dec 16 '21 22:12 balsoft

Every time we do so, it improves bit by bit, learning from past mistakes but starting with a clean slate.

MagicRB avatar Dec 16 '21 22:12 MagicRB

As for whether it's actually a good idea? I don't know. When I started writing deploy, the vision I had was of a really simple and dumb script that just does one thing. It turns out even the simplest profile deployment can get complicated once you add all the rollback logic. Maybe rewriting it and splitting it up is the right step. Maybe we should take a step in the other direction and get rid of some extra features (magic-rollback, other fancy activation stuff) in the name of simplicity and reliability of the tool itself, so that there's no need for a separate activate binary, and then implement those features on top using a separate, optional, server. The result should be pretty much the same, but with less rewriting (since we can dumb down the existing codebase quite easily, and then implement the features in a new way on top).

balsoft avatar Dec 16 '21 22:12 balsoft

At this point might as well rewrite it from scratch.

in which case having a referenceable specification would be a good thing!

I also kindof wanted to do a lot of rewriting already, I've been pondering some issues and limitations of magic-rollback and came to the conclusion that most of that logic has to be redesigned from scratch, and could probably convert a lot of my thoughts to a similar RFC too

notgne2 avatar Dec 16 '21 22:12 notgne2

Rollback stuff makes it complicates yes, but at least after our current iteration of the codebase we know how it makes it complicated, so if we include it again we are aware how to implement it more cleanly without creating annoying logic problems and disrupting the readability of the rest of the code

notgne2 avatar Dec 16 '21 22:12 notgne2

in which case having a referenceable specification would be a good thing!

If I had to describe how I'd imagine a perfect future for this RFC and deploy-rs/yeet generally is that before writing a single line of code, we go though all the code we have now, write down all the features we have and then analyze what each feature encompasses, the requirements and such. Create api specifications. Then as the last step we just write code which compiles and works on the first attempt :D.

MagicRB avatar Dec 16 '21 22:12 MagicRB

Maybe rewriting it and splitting it up is the right step. Maybe we should take a step in the other direction and get rid of some extra features

How would that work? Because we need a smarter program on the remote machine to do cooler things, so I can't really imagine a way where we build something complex on a simpler base than we have now. Maybe plugins on both ends?

The way I imagined it is that when you run yeet in single-client-mode, it installs the server component and then after its done removes itself from the target automatically, the complex nature would be completely hidden from the user in that case.

MagicRB avatar Dec 16 '21 23:12 MagicRB

should I expand on the proposal? I'd start with a detailed functionality description and feature set.

MagicRB avatar Dec 17 '21 10:12 MagicRB