Skip to content

Instantly share code, notes, and snippets.

@misostack
Last active March 9, 2024 03:13
Show Gist options
  • Select an option

  • Save misostack/aaf1908e1a838d099f602c7c4f7db5e0 to your computer and use it in GitHub Desktop.

Select an option

Save misostack/aaf1908e1a838d099f602c7c4f7db5e0 to your computer and use it in GitHub Desktop.
100 days system design

100 days system design

References

General Overview

  1. Usecases

image

  1. Constraints

image

  1. Assumptions

  2. Risks

Design Considerations

  1. Goals

Functional requirements

  • As a user, I want to do something

Non functional requirements

  • Consistency - eventual consistency
  • Security
  • Persistency
  • High Availability
  • Latency - as low as possible
  1. Dependencies
  • Connect with an existing system

Overall System Architecture

  1. Conceptual View
  • Input: business requirements, actors and systems
  • Output: System Overview, High Level Class Diagram
  • Methodologies: Modules - object oriented analysis

image

image

  1. Functional View
  • Input: System Overview, Functional requirements
  • Output: Usecase Diagrams

image

  1. Logical View
  • Input: Dataset, Usecase Diagrams
  • Output: Dataflow Diagram, Database Schema diagram
  1. Component View

image

  1. Network View

image

  1. Security View

...

Design Decisions

  1. Conceptual View

image

FinanceData Component

image

  1. Funtional View

FinanceData Component - Import

image

  1. Logical View
@misostack
Copy link
Author

Template

1. Funtional

Design

2. Non-Funtional

  1. High Availability
  2. Persistency
  3. Consistency - eventual consistency
  4. Latency - as low as possible

image

3. Capacity

4. High Level

image

It should be interactions between components in system. No need to be specific, eg: database type

Notes

  • Login & Auth
  • Solution validation is not

@misostack
Copy link
Author

misostack commented Jul 2, 2022

CAP

Consistency and Distributed System

image

Availability

2 phase commit

image
image

@misostack
Copy link
Author

REST API Design Checklist Template

What is REST API

  • API : Application programming interface
  • Representational state transfer

REST API là gì?

Một loạt các quy tắc được đặt ra khi thiết kế và lập trình cho các ứng dụng, nhằm mục đích thống nhất các thể hiện của trạng thái được truyền tải trong những ứng dụng này.

Trong thực tế, bạn có một ứng dụng quản lí trạng thái bật/tắt của các bóng đèn trong nhà. Thì trạng thái của từng bóng đèn sẽ được lưu lại và cho phép người dùng biết được trạng thái của bóng đèn hiện tại.

Khi xây dựng ứng dụng này, sẽ có 3 phần: ứng dụng phía người dùng, ứng dụng kết nối và xử lý các yêu cầu của người dùng, ứng dụng điều khiển bóng đèn trực tiếp.

Cơ chế hoạt động chính là : khi người dùng tương tác với ứng dụng( có thể là trang web/ mobile app ) thì nó sẽ gửi yêu cầu lên ứng dụng quản kết nối và xử lý yêu cầu, để ứng dụng trung gian này tương tác với ứng dụng xử lý việc bật/tắt của bóng đèn tương ứng. Đồng thời cho phép người dùng biết được trạng thái hiện tại của từng bóng đèn.

Chính vì điều đó REST API được ra đời, nó là các nguyên tắc thiết kế dữ liệu truyền tải giữa các ứng dụng

Vậy các quy tắc đó là gì, chúng ta sẽ tiếp tục tìm hiểu chi tiết bên dưới đây.

@misostack
Copy link
Author

Testing

image

image

image

image

image

@misostack
Copy link
Author

Data

image

@misostack
Copy link
Author

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment