Skip to content
PKMMphamkhanhminhman.com
Saturday, May 23, 2026
Da Nang, Vietnam — 11:24:00 PM
Pixel-art illustration of a developer workspace
API INTEGRATION • E-COMMERCE AUTOMATION • LLM-AGENT MEMORY
Portrait of Phạm Khánh Minh Mẫn

Phạm Khánh Minh Mẫn (Pham Khanh Minh Man, PKMM) — Backend engineer, 5+ years on e-commerce systems and multi-marketplace API integration.

I write and maintain open-source clients for the Shopee, TikTok Shop and Lazada Open APIs — request signing, token refresh, webhooks.

Currently at DiproTech on manufacturing simulation, subscription billing and content platforms for Japanese clients. Since 2026, a Master's student in Computer Science at Danang University of Science and Technology.

REPRESENTATIVE LIBRARIES & PACKAGES

[ Last week stats from npmjs.org ]

INDEPENDENT RESEARCH

[ Exploratory · no published results ]
2026 — presentExploratory — no published results

When Does Graph Memory Help Beyond Verbalized Relations? Isolating Representation from Structure in LLM-Agent Memory

Independent research — not committed as a thesis topic

Graph memory is widely believed to help LLM agents remember better. But when graph memory is compared against flat memory, existing work changes TWO things at once: structure (the ability to traverse relations) and representation (information rewritten as typed relational sentences — unavoidable, because an LLM can only read text). So which of the two does the observed benefit belong to?

LLM agent memoryKnowledge graphRetrievalAblation studyPre-registrationCluster-aware statistics
Full method & status →

TECHNICAL ARTICLES & GUIDES

[ Notes from production systems ]
26Sept

Refresh token rotation caught the thief. It also caught my second tab.

A three-line note on refresh token rotation with reuse detection, built and measured: it catches a stolen token, but two tabs refreshing at once logged the real user out 30 times out of 30, a page firing parallel requests 200 out of 200, and a lost response 50 out of 50. A naive check-then-write server hid the parallel case by minting two tokens 199 times out of 200. A grace window removes the logouts, but only one of the two ways to build it still catches a thief.

25Sept

My worker_threads benchmark said 4× faster. On a server, that was the least important number.

Re-running an old Node.js worker_threads benchmark on 10 cores: one of six workers got no jobs, a slice-for-splice bug in the earlier version ran 2 jobs as 5 and made four workers slower than none (991 ms vs 915 ms), the speedup topped out near 5.8× while os.cpus() ignored a container's CPU limit, and the number that matters on a server was /ping: 1.8 s with the work on the main thread, 0.5 ms with a worker pool.

25Sept

I measured my old index notes on PostgreSQL 18. Five of them were wrong.

Study notes on indexing, re-run with EXPLAIN (ANALYZE, BUFFERS) on PostgreSQL 18.6: there is no clustered index, and CLUSTER decayed from 17 to 283 pages after one round of writes; 'most selective column first' read 632 index pages where equality-first read 6; skip scan turned a 36 ms table scan into 1.9 ms, but not when the leading column has 200,000 values; LIKE 'abc%' ignores a normal index under en_US collation; and a boolean index pays off when the value is rare, best as a 456 kB partial index.

27Aug

PostgreSQL has four isolation levels. You only get three.

The isolation table everyone copies belongs to the SQL standard, not to PostgreSQL. Measured on PostgreSQL 16: READ UNCOMMITTED is accepted and quietly ignored, Repeatable Read blocks phantoms the standard says it should allow, a plain SELECT at Repeatable Read blocks a writer for 1ms against 4003ms for a real lock, and the one anomaly that separates Repeatable Read from Serializable costs you a 40001 you have to retry.

21Aug

Overselling in a flash sale: which lock to reach for, and when you need none

A flash sale with 100 shirts in stock took 200 orders — and the stock column still read 94. Measured on real PostgreSQL: the one-line fix nobody reaches for first, the lock that makes checkout 149× slower, the case where pessimistic locking cannot be used at all, and why a perfectly correct row lock still loses inventory once a queue is in the path.

24Aug

Three calls get you a Shopee token. Keeping it alive is the hard part.

The quick start is three functions long and works first try against your own test shop. What it leaves out: the auth endpoints sign differently from every other call, the refresh token is single-use so two workers will quietly kill each other's copy, and the thing that actually expires is the seller's authorization — which you cannot read from the token in your hand.