Skip to content

Add TCP server with EDN protocol - #1

Merged
verberktstan merged 4 commits into
mainfrom
tcp-server
Jun 2, 2026
Merged

Add TCP server with EDN protocol#1
verberktstan merged 4 commits into
mainfrom
tcp-server

Conversation

@verberktstan

@verberktstan verberktstan commented Jun 2, 2026

Copy link
Copy Markdown
Owner

Implements the TCP layer and EDN wire protocol, making Bitten accessible as a running server.

  • src/server.clj - ServerSocket accept loop, one thread per connection, handle-request dispatch
  • src/protocol.clj - EDN parse/serialize; malformed input returns {:error …}
  • :transact operation passes records directly to db/upsert!
  • bb start task with optional PORT and DB_PATH env vars

Some example EDN payloads:

{:op :transact :records [{:db/entity "user/1" :user/name "Alice"}]}
{:op :query :e "user/1" :as-of-valid "2024-06-01"}
{:op :ping}

@verberktstan verberktstan self-assigned this Jun 2, 2026
@verberktstan
verberktstan marked this pull request as ready for review June 2, 2026 20:55
@verberktstan verberktstan changed the title TCP server Add TCP server with EDN protocol Jun 2, 2026
@verberktstan
verberktstan merged commit 68471c2 into main Jun 2, 2026
1 check passed
@verberktstan
verberktstan deleted the tcp-server branch June 2, 2026 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant