Deterministic Programming
Features of Deterministic Programming
Predictability: Always produces the same output for the same input.
Reproducibility: Ensures consistent results under identical conditions.
Ease of Debugging: Consistent outcomes make it easier to trace errors.
State Invariance: Unaffected by external state or randomness.
Drawbacks
Deterministic coding has its limitations and can sometimes require a higher level of programming skill to achieve identical results.
Lack of Flexibility: Forces the same result in every situation, making flexible handling difficult.
Complex State Management: Requires explicit management of all variables.
Performance Issues: Additional code and resources are needed to maintain deterministic states.
Limited External Interaction: Struggles to incorporate randomness or changes in external systems.
Importance of External Interaction in DeSoc
From the perspective of a decentralized consensus, anything not within the decentralized consensus system is considered ‘external interaction.’
Let’s assume there’s data that provides information on a DeSoc user’s points.
Suppose there are three machines, A, B, and C, querying these points in parallel. The results are as follows:
A: 530 points
B: 530.1 points
C: 530 points
The primary cause of this discrepancy is the difference in query times. Machines A, B, and C cannot query the user’s points at the exact same moment and duration.
Such external interactions often involve numerous unforeseen variables, beyond the given example.
Therefore, you must be familiar with Deterministic Programming.
Machines A, B, and C should be able to retrieve the user’s points using the following instruction:
“Tell me the user’s points as of UTC 18:30:05.”
This implies that users must directly control and configure the environment to ensure it is deterministic.
Easing the Complexity of Deterministic Programming
We offer a product called DAGG (Data Source Aggregator), which alleviates the limitations and challenges of deterministic programming, at least in terms of data sources.
Users interacting with DAGG only need to specify the “desired result”
they want. DAGG intelligently handles the rest of the tedious and complex processes internally.
For more detailed information, please refer to the next page.
Last updated