Skip to content

Commit

Permalink
evening 0x21F6
Browse files Browse the repository at this point in the history
  • Loading branch information
rajp152k committed Feb 19, 2024
1 parent 4e03f4d commit 19078cd
Show file tree
Hide file tree
Showing 11 changed files with 144 additions and 6 deletions.
5 changes: 4 additions & 1 deletion Content/20230911115154-computer_science.org
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,8 @@
:ID: 6f9a4752-aa66-42cf-9b88-2e4fa2091511
:END:
#+title: Computer Science
#+filetags: :tbp:cs:
#+filetags: :cs:

* Sentinels
** [[id:a3d0278d-d7b7-47d8-956d-838b79396da7][Distributed Compute]]

2 changes: 0 additions & 2 deletions Content/20231213144411-database.org
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
:END:
#+title: DataBase
#+filetags: :programming:data:

Towards managing [[id:d45dae92-5148-4220-b8dd-e4da80674053][data]] stores.

Speaking formally, databases represent another layer of abstraction over a computer system's [[id:ea72d66a-8192-4cb2-a7be-b05ee928f814][filesystem]] that intend to provide convenient endpoints for tasks (like templated insertion, deletion, searches, etc) that would be performed with higher frequencies : they facilitate structured storage, pushing for reliability and efficiency.
Expand Down Expand Up @@ -89,7 +88,6 @@ checkout : https://docs.digitalocean.com/glossary/acid/
- introduces delays for maintenance of data consistency
** Monitoring
- Profiling processes, analysing frequency of certain queries, etc, help with better structuring the templates (index, schema, etc) to push for performance
-
* Sentinels
** Entity Relation Diagrams
:PROPERTIES:
Expand Down
2 changes: 2 additions & 0 deletions Content/20231214110805-system.org
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@
In a very generic sense:
This captures of the notion of the collection of [[id:20240114T203601.390070][Entities]] and their [[id:20240114T204304.033004][Interactions]]

* Specifics
** [[id:314236f7-81ae-48b7-b62b-dc822119180e][System Design]]
30 changes: 27 additions & 3 deletions Content/20231227160414-devops.org
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,34 @@
:ID: 58ea31e4-95ae-4c25-b475-c8686fe23817
:END:
#+title: Devops
#+filetags: :tbp:meta:programming:
#+filetags: :meta:programming:

A software development practice that promotes collaboration between development and operations, resulting in faster and more reliable software delivery.

* Article Cache
- https://www.kalzumeus.com/2010/12/12/staging-servers-source-control-deploy-workflows-and-other-stuff-nobody-teaches-you/
Note that these two have somewhat conflicting priorities. Developers measure their progress via amount of patches, feature upgrades and version releases.
IT Operations, on the other hand, are repsonsible for stability and avoiding changes that break the deployement. The practices that enable the two cooperate are encompassed by the domain of Devops.

To summarize: Devops is about ..
#+begin_quote
... bringing together people, processes and tools that enable business agility.
#+end_quote

A generic Flow :

#+begin_src mermaid :file images/devops.png :exports results
graph LR
A[IDEA] --> B
B[CODE] --> C
C[BUILD] --> D
D[DEPLOY] --> E
E[MANAGE] --> F[LEARN]
F --> A
#+end_src

#+RESULTS:
[[file:images/devops.png]]


* Resources
** blogs
- https://www.kalzumeus.com/2010/12/12/staging-servers-source-control-deploy-workflows-and-other-stuff-nobody-teaches-you/
2 changes: 2 additions & 0 deletions Content/20231227162344-computer_networks.org
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ The OSI Layers:
5. Session
6. Presentation
7. Application

The communication between any of the two layers across two computers is said to be compliant with the respective [[id:11d303f1-d337-4f51-b211-db435a9f2cd0][Protocol]]

* Practical
** [[id:24f4040a-7c18-416a-8460-e69280d437bf][Internet]]
Expand Down
65 changes: 65 additions & 0 deletions Content/20240219144517-system_design.org
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
20 changes: 20 additions & 0 deletions Content/20240219150231-distributed_compute.org
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
7 changes: 7 additions & 0 deletions Content/20240219150852-decentralized_applications.org
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:

17 changes: 17 additions & 0 deletions Content/20240219151152-protocol.org
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.

Binary file added Content/images/basic_data_scale.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Content/images/devops.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 19078cd

Please sign in to comment.