-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
144 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
:PROPERTIES: | ||
:ID: 314236f7-81ae-48b7-b62b-dc822119180e | ||
:END: | ||
#+title: System Design | ||
#+filetags: :cs: | ||
|
||
* Abstract | ||
|
||
This node cluster references all the technicalities that go into designing a system - this should as a good rounded tour of the practical aspects of computer science. | ||
|
||
An important aspect of system design is to be able to handle all the users that interact with the system. This usually calls for [[id:a3d0278d-d7b7-47d8-956d-838b79396da7][Distributed Systems]] | ||
|
||
System design is a problem oriented and not just limited to generical theoretical design patterns. | ||
|
||
* Design Factors | ||
Factors that the designer needs to consider when designing a system: | ||
** Availability | ||
- on how available is the system (temporally speaking) | ||
*** Key Terms and Calculations | ||
- MTBF (Mean Time Between Failures): Average time a component works before failing. | ||
- MTTR (Mean Time to Repair): Average time taken to fix a failed component and restore service. | ||
- Availability is often expressed as a percentage, like this: Availability (%) = (MTBF / (MTBF + MTTR)) * 100 | ||
|
||
** Database Access | ||
- when scaling, the data read/writes need to be correspondingly handled smartly rather than directing all of the requests to the main database. | ||
- an intermediate module is deployed in such cases | ||
** Concurrent Users | ||
- the capability of the system to handle multiple users at the same time | ||
** Manageability | ||
- the ability to detect failures and to recover from them | ||
** Reliability | ||
- implication that the required task will be executed consistently (and correctly) even with increased loads | ||
- an example would be a write on a globally distributed database network - it doesn't propogate throughout whole network at a point and data consistency can't be ensured without incurring a delay. | ||
** Latency | ||
- time to response : important factor in user experience | ||
|
||
** Cost | ||
- more hardware isn't always feasible and tangible resources need to be managed smartly | ||
|
||
* Performance Vs Scalability | ||
- Performance is about how fast or slow a system works for a single user | ||
- Scalability is how well the system retains that performs for multiple concurrent users. | ||
|
||
Scalability needs to be pre-emptively considered as altering a poorly designed solution to handle concurrent experiences is challenging. | ||
|
||
Scalability applies to different aspects of a system like compute and [[id:2f67eca9-5076-4895-828f-de3655444ee2][database]] accesses for instance. | ||
|
||
* Data Access Scalability | ||
|
||
a basic webserver might be modelled like: | ||
|
||
#+begin_src mermaid :file images/basic_data_scale.png :exports results | ||
graph LR | ||
A[User] --> B[Application Server] | ||
B --> C(Database) | ||
#+end_src | ||
|
||
#+RESULTS: | ||
[[file:images/basic_data_scale.png]] | ||
|
||
Such a system is susceptible to scale issues and quickly becomes unusable with increasing users. | ||
|
||
To explore the solution space for such and issue, looking into caches, indexes, queues, load-balancers and proxy-servers | ||
|
||
** Cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
:PROPERTIES: | ||
:ID: a3d0278d-d7b7-47d8-956d-838b79396da7 | ||
:END: | ||
#+title: Distributed Compute | ||
#+filetags: :cs: | ||
|
||
As the scale of the problem that one wishes to solve increases, several computers need to be able to [[id:a4e712e1-a233-4173-91fa-4e145bd68769][coordinate]] to solve the problem at hand, efficiently and correctly. | ||
|
||
These "compute"rs might not even be the conventional computer that pops up in one's mind and might rather be a group of servers, database instances or several edge devices such as in [[id:3c0c2077-b24a-4f6b-b93f-f06c08f7b3e9][decentralized applications]]. | ||
|
||
The uniting feature of all distributed systems is that the workload is distributed on the constituent "compute"rs. | ||
|
||
Some basic advantages of distributed compute: | ||
- efficiency increases if workload is distributed | ||
- fault tolerance in case of workload redundancy | ||
- execution modularity helps with debugging the specific module when an error arises rather than having to examine the whole code-base | ||
|
||
A few trade-offs incurred due to the above: | ||
- latency increases due to the communication overhead | ||
- poor system design can affect user experience |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
:PROPERTIES: | ||
:ID: 3c0c2077-b24a-4f6b-b93f-f06c08f7b3e9 | ||
:ROAM_ALIASES: dApps | ||
:END: | ||
#+title: Decentralized Applications | ||
#+filetags: :cs: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
:PROPERTIES: | ||
:ID: 11d303f1-d337-4f51-b211-db435a9f2cd0 | ||
:END: | ||
#+title: Protocol | ||
#+filetags: :meta: | ||
|
||
This is a decently overlaoded term that varies in connotations across domains. | ||
|
||
In the context of [[id:a4e712e1-a233-4173-91fa-4e145bd68769][Computer Networks]] for instance, these are the agreed upon standards that devices on a network communicate by (HTTP, TCP/IP, bitstreams in the physical layer) | ||
|
||
|
||
Regardless of the specific context, protocols provide a predictable and organized way to enable: | ||
|
||
- Interoperability: Different entities (devices, organizations, individuals) can interact smoothly as long as they all follow the same protocol. | ||
- Reliability: Well-defined protocols create consistency and minimize errors in communication or procedures. | ||
- Efficiency: Standardization allows for optimizations within the guidelines of a protocol. | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.