Library check: mummy and db_connector #10

Closed
opened 2026-11-10 16:48:45 +01:00 by SirStone · 1 comment
Owner

Part of #2

Question

What do the sources of mummy tag 0.4.8 and db_connector actually support? Check against source, not memory.

  • mummy: WS upgrade hook and access to Origin/Cookie headers; refusing upgrades; maxMessageLen/frame limits; per-connection identity; sending from other threads; closing. HTTP routing, Set-Cookie, 302, X-Accel-Redirect passthrough.
  • db_connector sqlite: transactions, PRAGMA, prepared statements, BLOB, thread use.
  • Note gotchas.
  • Output: findings to docs/research/.md, linked here.
Part of #2 ## Question What do the sources of mummy tag 0.4.8 and db_connector actually support? Check against source, not memory. - mummy: WS upgrade hook and access to Origin/Cookie headers; refusing upgrades; maxMessageLen/frame limits; per-connection identity; sending from other threads; closing. HTTP routing, Set-Cookie, 302, X-Accel-Redirect passthrough. - db_connector sqlite: transactions, PRAGMA, prepared statements, BLOB, thread use. - Note gotchas. - Output: findings to docs/research/<name>.md, linked here.
SirStone added the wayfinder:research label 2026-11-10 16:48:45 +01:00
SirStone added a new dependency 2026-11-10 16:49:06 +01:00
SirStone self-assigned this 2026-11-10 16:49:39 +01:00
Author
Owner

Findings from source (mummy 0.4.8 = 77a7563e, repo is guzba/mummy; db_connector 29450a2). Full refs in docs/research/m3-mummy-db-connector.md, commit 91cea1a.

  • mummy: no upgrade hook. Handler reads request.headers (Origin/Cookie, first-match only), then upgradeToWebSocket or respond(403). Mummy does not check Origin.
  • WebSocket: private fields (server, clientSocket, clientId random per socket). Generic structural hash, no explicit ==. Key by app connId as planned.
  • Threads: handlers on worker pool, per-socket WS events serialized. send/close are lock+enqueue, safe from any thread. Request is freed after handler returns.
  • Limits: maxMessageLen 64 KB is inbound only; violation drops TCP with no close frame. Headers over 8 KB or body over 1 MB close the connection with no HTTP status. Ping/Pong reach handler, no auto-Pong.
  • Headers: [] replaces first match; two Set-Cookie need a direct seq append.
  • db_connector: raw DbConn, no lock, no busy_timeout. Transactions manual (no rollback helper). DbError carries errmsg only. BLOB bind via openArray[byte]. user_version via exec/getValue.
  • Unverified: WebSocket == (assumed Nim built-in), libsqlite3 threading mode, PRAGMA bind rule (SQLite docs).
Findings from source (mummy 0.4.8 = 77a7563e, repo is guzba/mummy; db_connector 29450a2). Full refs in docs/research/m3-mummy-db-connector.md, commit 91cea1a. - mummy: no upgrade hook. Handler reads request.headers (Origin/Cookie, first-match only), then upgradeToWebSocket or respond(403). Mummy does not check Origin. - WebSocket: private fields (server, clientSocket, clientId random per socket). Generic structural hash, no explicit ==. Key by app connId as planned. - Threads: handlers on worker pool, per-socket WS events serialized. send/close are lock+enqueue, safe from any thread. Request is freed after handler returns. - Limits: maxMessageLen 64 KB is inbound only; violation drops TCP with no close frame. Headers over 8 KB or body over 1 MB close the connection with no HTTP status. Ping/Pong reach handler, no auto-Pong. - Headers: [] replaces first match; two Set-Cookie need a direct seq append. - db_connector: raw DbConn, no lock, no busy_timeout. Transactions manual (no rollback helper). DbError carries errmsg only. BLOB bind via openArray[byte]. user_version via exec/getValue. - Unverified: WebSocket == (assumed Nim built-in), libsqlite3 threading mode, PRAGMA bind rule (SQLite docs).
Sign in to join this conversation.