4 ms·
> I don't know at this point how often I've read that something is better because it's modern and declarative. Why it's easy to understand because it's declarat
by ClumsyPilot 5y ago
> I don't know at this point how often I've read that something is better because it's modern and declarative. Why it's easy to understand because it's declarative, etc.
I feel most comments here miss the point of declerative systems - resillience.
You write a script to stand up an Application on a clean system, a declarative system does the same. But what if current state is not a blank slate? A declarative system is meant to be smart enough to achieve target state even if machine crahsed half way through the setup last time, or has a different config already running.
Writing a shell script that addresses all edgecases is hard. Now, declarative systems do fail, but that's the promice.
- jpthurman 5y agoI agree with the ‘promise’ of the declarative. A useful analogy is human teams. Effective leaders are often good at the declarative - they provide a vision or end state and the creative problem solving team members determine how to implement the stated vision in relation to the current state. The result is determined by the problem solving ability of the element to which the end state was given.
- deleted 5y ago[deleted]
- jimbokun 5y agoIn other words, a declarative system has the capability to do a diff with the current system and apply changes to eliminate those differences.
- j3s 5y agoNo - imperative systems can do that too. Take Chef (an imperative tool) for example - it can trivially examine a tracked file and mutate the state if the state is not correct. This satisfies the "diff" criteria you mentioned above. Isn't Chef looking sort of declarative? The nuance is subtle but important. Let's say you stop tracking that file. In Chef, the file will simply remain in its last known state, because Chef forgot about it. Likewise, if you do the same process on other systems, files will be left in various states - causing configuration drift. This is what a declarative tool is meant to solve. A proper declarative tool would _delete_ the file, because it's no longer tracked, to ensure that the system is in the state the user expects.