Description
Given our recent discussion in a team meeting, I think we should adjust command line flags to reflect our long term direction before we make "v0.1" next week.
I'm going to propose couple of ideas and give my opinion on them, but I encourage everybody to give their opinion, propose alternatives, etc.
One thing that we should keep in mind is that certain dependency between networks should be enforced (in order for content to be validated).
For example, if state is enabled, history has to be as well (and probably soon if history is enabled, beacon has to be enabled as well).
This is not major issue as we can just shut down at startup and print the message.
Type A - Subnetwork and total capacity (different radius per network)
What we have at the moment, but with smarter distribution of storage per network (e.g. if only 100 MB is given, split it 50/50, if 10GB split it 90/10, etc)
Example: --portal_subnetworks=history,state --mb=1000
Pros: Simple user for beginners experience (for beginners)
Cons: Not custom enough for expert users, weird behavior if different subnetworks are enabled between restarts
Type B - Explicit capacity for each network
Each subnetwork has its own storage capacity that is configured separately
Examples (1GB for history, 2GB for storage):
--portal_subnetworks=history:1000,state:2000
--portal_subnetworks=history:1000 --portal_subnetworks=state:2000
--history=1000 --state=2000
Note: We can support examples 1 and/or 2, or alternatively only 3, or if somebody has some other ideas.
Some ideas for making it easier to use (not required for first implementation): instead of explicitly specifying the capacity, one can set "auto" (or not set anything, in which case "auto" is default).
Meaning of "auto" can be discussed separately. Some ideas:
- 1GB if all capacities are "auto", otherwise average of all non-auto values
- "auto" is allowed only if all capacities are "auto", in which case it means 1GB per subnetwork
Pros: explicit, fully customizable (good for expert users)
Cons: harder to define default values and make it clear to the user
Type C - Subnetwork and total capacity (unified radius per network)
It seems that we don't want to go with this approach, but I added it for completeness.
Similar to "Type A", but capacity per subnetwork will be dynamic.
All subnetwork will have the same radius, and the amount they store per network will be byproduct of that and having fixed total capacity.
Pros: simple user experience, user's storage distribution should be the same as total storage capacity of each subnetwork
Cons: weird behavior if users enables/disables subnetwork between restarts, can cause weird behavior on global scale (content from one network can disappear because another network gossiped a lot of new content)
I'm strongly in favor of "Type B". Out of alternative way to achieve it, I'm leaning the most towards 3rd example (--history=1000 --state=2000
).