DAFA: abstract design of the whole system
The idea of this post is to try to abstract DAFA's ecosystem to create a high-level series of states that I’ll be able to test using TLA+.
A STEP BACKWARD
After having released the very first post announcing DAFA, I had some interesting interactions with a couple of users on Discord, and one of them is @tibra.
From what I got from our chat and his blog, he’s a unique thinker, and I was fascinated since our very initial conversation to his level of abstraction and analysis.
Thinking abstractly is one of the most complicated things in our western society since our education systems tend to repress abstraction to specificity.
Usually, developers and engineers are those more distant to abstract thinking and easily lose themselves after specific tasks. I do the same, in the implementation phase, it’s difficult to keep the abstract layer focused.
However, for DAFA, I want to define its ecosystem using TLA+, a software I wasn’t even aware before chatting with @tibra.
TLA+ uses maths to abstract any programming language and to define complex ecosystems as state machines. In this way, you’ll be able to test flows and flaws.
A STEP FORWARD
Let’s start listing down the main variables, constants and behaviours of the whole system:
VARIABLES:
- PATRONS 0..
- DAFA_VAULT 1.. (where the FOOD is stored)
- SEEDS 1..
- SEED_VAULT 1..
- NODES 0..
- NODE_VAULT 1..
CONSTANTS:
- BLOSSOM_THRESHOLD = 7 (units of FOOD)
- PAYOUT_RECURRENCE = 7 (days)
BEHAVIORS:
PATRONS:
- feedDafa
DAFA VAULT:
- feedNodes
- feedSeeds
- cutNode
SEED:
- becomeNode
NODE:
- payout
STATE:
- responsive (from @tibra: actors collect messages and decide what to do with them when sufficient information to decide is available)
This list should cover all the possible states and actors playing within the system.
The next step now is to write it down in TLA+ and check if the system works correctly before doing any implementation.
I'll share the TLA+ work in a future post along with the results and possible amendments. The code will be available on DAFA's Github repository and will hopefully kickstart the project within @utopian-io as well.
Thank you!
LEARN | CONTRIBUTE | PROPAGATE
You got a 9.16% upvote from @upme thanks to @venalbe! Send at least 3 SBD or 3 STEEM to get upvote for next round. Delegate STEEM POWER and start earning 100% daily payouts ( no commission ).
Upvoted and read because I feel what you're doing is worth continuing. I might speak a lot of languages but I never really got into programming. It was/ they were too complicated, abstract or boring languages for me. I tried my hand on Turbo Pascal and Visual Basic in the 90s and then I got this awful maths teacher, the last three or four years of high school who made me really get to dislike everything related to mathematics and even programming.
We need people like you though and I think it's even better if they are creatives too. Nice to hear that you hooked up with @tibra
I'm curious where this will lead to.