Software Engineer
- Love tools that streamline processes(like neovim & nix..)
- Delving deeper into Operating System, Network and Database
- Does not locked in specific programming language,
use proper language in each context
- Friendly using Go, Typescript and Zig
At home, post general purpose programming stuffs like Distributed System,
System Programming,,, or everything I'm interested in.
Linux Namespaces
Linux Namespace 리눅스 네임스페이스는 프로세스를 실행할 때 시스템의 리소스를 분리해서 실행하도록 도와주는 기능으로, 현대 컨테이너 기반 운영체제 가상화 기술의 기반이 되는 기술이다. 하나의 시스템에서 프로세스들은 기본적으로 시스템의 리소스들을 공유해서 실행하게 되는데, 이는 하나의 root namespace라고 생각할 수 있다. 실제로도 프로그램 실행 시 PID 1번 (launchd 혹은 systemd) 프로세스의 자식 프로세스들로 부팅이 되기 때문에, 모두가 단일 네임스페이스 내에서 동작하고 있다고 생각할 수 있다. 이러한 네임스페이스는 /proc/{PID}/ns 파일을 확인해서 현재 프로세스에서 사용 중인 네임스페이스의 고유 ID를 확인하도록 할 수 있다....
[Computer Networks] Data Plane
해당 글은 Computer Networks: Top-Down Approach 에 대해 읽고 정리한 글입니다. 책과 동일한 순서로 정리하지 않습니다. Router 라우터 내부에는 입력 포트와 출력 포트, 이를 이어주는 스위치 구조로 이루어진 데이터 평면(하드웨어)이 존재하며, 그 위에는 이를 제어하기 위한 라우팅 프로세스가 있는 제어 평면(소프트웨어)이 존재한다. 입력 포트 입력 포트는 1~2계층의 기능을 수행한다. 기본적으로 입력 포트의 입력 링크에서 물리적인 비트를 받는다. 또한 반대편에서는 물리적인 비트를 내보낸다. 또한 입력 포트는 들어오는 링크의 반대편에 있는 링크 계층과 상호 운용하기 위해 필요한 링크 계층을 추가적으로 수행하게 되는데, 이는 미들박스로서 표시된다 (나는 미들박스를 우선적으로 미들웨어로 치환하여 생각했다....
[System Engineering] How to improve kernel observability with LKM code modification
Loadable Kernel Modules & Micro Kernel Loadable Kernel Modules (hereinafter referred to as LKM) stretches standard monolithic kernel’s flexibility, and become a enormous turning point that expanded its facilities which are work as as an open source so developers can reform it without building the whole kernel agian. If a microkernel is like a brick house where developer can build different kernels from scratch, then building kernel with LKM is simply removing the built-in furniture, such as built-in cabinets, and filling it with their own furniture with ease....
[Computer Networks] SDN Basic
Software Defined Network (SDN) is a new paradigm of network architecture that allows streamlined traffic control by detaching controlling part from each switch and merge it into one control tower which is called as controller. This article deeply introduces a whole basic information of SDN and also offers cutting-edge technologies of it, too. Traditional Network Architecture In previous times, many organizations that have their own network(it can be virtual/physical, public/private network,,,and everything) are struggling with packet controls....
[Computer Networks] More About Keep Alive
Compare the two Keep-Alive techniques of TCP and HTTP. TCP Keep Alive TCP Keep-Alive is a mechanism that works on the transport layer (L4), which checks if the remaining TCP socket is still in use. If not, it disconnects and frees idle resources. Purpose These are the main purposes of TCP Keep-Alive. Detect dead connections: Detect if the other host has shut down abnormally or is disconnected due to network issues....
[RDBMS with zig] - Storage
Zig의 allocator와 comptime에 대한 이해를 더하기 위해, facebook의 RocksDB를 기반으로 하는 RDBMS를 구성한다. 데이터를 저장하기 위한 직렬화 / 역직렬화를 수행하는 코드를 작성한다. 모든 코드는 https://notes.eatonphil.com/zigrocks-sql.html 레포지토리를 기반으로 하며, 추가적인 기능을 구현하는 내용을 포함한다. 이제는 RocksDB에 데이터를 저장할 때의 직렬화 및 데이터 조회 시 역직렬화를 위한 코드를 작성한다. Serialize & Deserialize pub fn serializeInteger(comptime T: type, buf: *std.ArrayList(u8), i: T) !void { var length: [@sizeOf(T)]u8 = undefined; std.mem.writeInt(T, &length, i, std....
[System Programming] More about RVMA
Google Scholar RVMA is a new approach for data access which is useful in distributed systems. It overcomes remain restrictions in RDMA and behaves properly in distributed & large scale systems. This article summarize and organize key concepts of it. Remain Restrictions of RDMA RDMA is a technology that enables memory access between multiple nodes, and maximizes its benefits when used in large scale computing architectures that distinguish between data nodes and worker nodes in distributed networks....
[System Programming] More about RDMA
Study of RDMA (Remote Direct Memory Access) Intro RDMA is technology to transfer data efficiently in network, enables data exchanged between multiple device mem eory buffer without OS or CPU’s interruptions. It contributes significantly in RDMA는 네트워크 상에서 데이터를 효율적으로 전달하기 위한 기술로, 여러 기기 간 메모리 전송에서 OS나 CPU의 개입 없이 데이터를 교환하도록 한다. 이 기술은 고성능 컴퓨팅, 빅데이터 처리, 분산 시스템 등 여러 영역에서의 성능 향상에 크게 기여하고 있다....
[RDBMS with zig] - RocksDB Interface
Zig의 allocator와 comptime에 대한 이해를 더하기 위해, facebook의 RocksDB를 기반으로 하는 RDBMS를 구성한다. RocksDB Header file을 불러와 직접적으로 RocksDB API와 소통하는 인터페이스를 제작한다. 모든 코드는 https://notes.eatonphil.com/zigrocks-sql.html 레포지토리를 기반으로 하며, 추가적인 기능을 구현하는 내용을 포함한다. RocksDB Interface RocksDB는 고성능의 Persistent Key-Value Store로 c++로 작성되었기에 zig에서는 빌드된 내용을 header file을 import하여 소통할 수 있다. Zig는 내부적으로 Clang 컴파일러를 내장하고 있어, @cimport()를 사용하여 c 헤더파일을 가져오는 경우 내부적으로 Clang을 활용하여 AST를 만들고 이를 Zig 코드로 변환하는 과정을 거친다....
[RDBMS with zig] - Parser
Zig의 allocator와 comptime에 대한 이해를 더하기 위해, facebook의 RocksDB를 기반으로 하는 RDBMS를 구성한다. Lexer 에서 전달한 Token 배열을 기반으로 각 인자들을 추출하는 Parser를 제작한다. 모든 코드는 https://notes.eatonphil.com/zigrocks-sql.html 레포지토리를 기반으로 하며, 추가적인 기능을 구현하는 내용을 포함한다. Parser Parser 는 Lexing 파트에서 각 역할 별로 나눠둔 Segment들을 분석하여 내부의 인자들을 해당 Token의 역할에 맞는 AST로 변환하는 과정을 포함한다. 생성된 AST들은 추후 Executor에게 전달되어 실질적인 구현체(RocksDB)에 전달되어 그에 맞는 Operation을 수행한다. Ready for...