Hyeonggeun Oh

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.

[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....

March 18, 2025

[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....

March 16, 2025

[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....

March 12, 2025

[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의 개입 없이 데이터를 교환하도록 한다. 이 기술은 고성능 컴퓨팅, 빅데이터 처리, 분산 시스템 등 여러 영역에서의 성능 향상에 크게 기여하고 있다....

March 11, 2025

[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 코드로 변환하는 과정을 거친다....

March 9, 2025

[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...

March 9, 2025

[RDBMS with zig] - Lexer

Zig의 allocator와 comptime에 대한 이해를 더하기 위해, facebook의 RocksDB를 기반으로 하는 RDBMS를 구성한다. 가장 먼저 SQL문을 분해하고 분류하는 Lexer를 제작한다. 모든 코드는 https://notes.eatonphil.com/zigrocks-sql.html 레포지토리를 기반으로 하며, 추가적인 기능을 구현하는 내용을 포함한다. Ready for 일단 가독성 및 효율성을 위한 유틸리티를 제작한다. pub const String = []const u8; pub const Error = String; pub fn Result(comptime T: type) type { return union(enum) { val: T, err: Error, }; } Lexer Lexer는 SQL문을 분석하는 도구를 말한다....

March 8, 2025

First Time Ziggy

Zig JS 문법을 사용했다면 인터페이스 상으로 익숙하게 접할 수 있는 언어. 보기에는 JS같지만 Rust의 향기가 많이 난다. Rust의 경우 새로 도입되는 개념들이나, 독자적인 기능들이 많아 접근이 쉽지 않았는데, 오히려 그런 부분에서는 C와 유사한 부분들이 많이 보여서 좋았다. 그 안에서도 메모리를 관리나 코드 관리 차원에서 명시성을 주요하게 가져간다는 점이 Go와 닮은 듯하다. C와 거의 같다고 해도 될 정도로 호환이 잘 되며, 라이브러리도 내가 원하는 헤더파일을 가져와서 그 기능을 어렵지 않게 붙여 쓸 수 있도록 되어 있다....

January 22, 2025

[Networks] Unix Socket

Unix socket Unix 소켓은 동일 호스트 내에서 프로세스 간 통신 (IPC, Inter-Process Communication)을 가능하게 하는 기능이다. 이는 네트워크 소켓과 유사한 API를 사용하지만, TCP/IP프로토콜을 사용하지 않고 로컬 파일 시스템을 기반으로 작동한다. Unix 도메인 소켓(UDS)는 주로 성능 및 메모리 효율성을 위해 사용되며, TCP소켓보다 더 빠른 통신을 지원한다. 특징 및 장점 로컬 통신: 동일 호스트 내에서 통신이므로, 속도가 빠르다. FS기반: 이는 포트를 통해 연결되지 않고, 파일시스템의 경로를 통해 식별되어 일반적인 파일처럼 다룰 수 있다....

November 30, 2024

[Networks] Local and Private Network IPs

In general, developers often use non-public IP like 192.168.1.111, 127.0.0.1…etc. What’s the difference between them? And why there are various ranges for Private usage IPs? Loopback IP At first, Let’s talk about Loopback IP. Loopback IP, which helps individual host to interconnect between processes using port number, is defined in RFC3330. Be specific, it includes range of 127.0.0.0/8 and we use 127.0.0.1 (as known as localhost) in common. That means we can use other CIDR blocks like 127....

November 23, 2024