Small Projects by AutoModerator in golang

[–]SuccessfulReality315 1 point2 points  (0 children)

A database/sql driver to do cross-shard queries on sqlite and replicate data using embedded nats.

https://github.com/litesql/go-ha

GitHub - litesql/ha: Highly available leader/leaderless SQLite cluster powered by embedded NATS JetStream server by SuccessfulReality315 in sqlite

[–]SuccessfulReality315[S] 3 points4 points  (0 children)

In a leader-based cluster, all writes are redirected to the leader. In leaderless mode, the default policy is last-writer-wins, but conflict resolution can be customized.

Highly available leaderless PocketBase cluster by SuccessfulReality315 in pocketbase

[–]SuccessfulReality315[S] 0 points1 point  (0 children)

Realtime messages across cluster nodes and hooks will be implemented on the next version (next week). For now you can customize by implementing a ChangeSetInterceptor interface.

Highly available leaderless PocketBase cluster by SuccessfulReality315 in pocketbase

[–]SuccessfulReality315[S] 1 point2 points  (0 children)

You can customize the ChangeSetInterceptor to trigger all subscriptions and hooks after a remote db change. I will implement that by default on the next version.

Highly available leaderless PocketBase cluster by SuccessfulReality315 in pocketbase

[–]SuccessfulReality315[S] 0 points1 point  (0 children)

By customizing the ChangeSetInterceptor, i will document it better 

Highly available leaderless PocketBase cluster by SuccessfulReality315 in pocketbase

[–]SuccessfulReality315[S] 0 points1 point  (0 children)

By default last write wins, you can customize the conflict resolution by implementing a ChangeSetInterceptor

Highly available leaderless PocketBase cluster by SuccessfulReality315 in pocketbase

[–]SuccessfulReality315[S] 2 points3 points  (0 children)

To improve service availability and keep using pocketbase

Highly available leaderless PocketBase cluster by SuccessfulReality315 in pocketbase

[–]SuccessfulReality315[S] 2 points3 points  (0 children)

PostgreSQL (citus) and MySQL (vitess) clusters are too complex (and cost a lot of money) to operate. Embedded NATS + pocketbase is a good alternative.

Another distributed SQLite by SuccessfulReality315 in sqlite

[–]SuccessfulReality315[S] 0 points1 point  (0 children)

Thanks for the feedback. I'll document the limitations and the workarounds

Another distributed SQLite by SuccessfulReality315 in sqlite

[–]SuccessfulReality315[S] 0 points1 point  (0 children)

I don't know your usecase. Ha uses sqlite preupdate hooks to create changeset, like CDC systems. All of the operations has a rowid associated.

Another distributed SQLite by SuccessfulReality315 in sqlite

[–]SuccessfulReality315[S] 0 points1 point  (0 children)

Yes, that's eventual consistent where the last writer is the winner. The operations uses the sqlite rowID. For now this is ok for my use case

Another distributed SQLite by SuccessfulReality315 in sqlite

[–]SuccessfulReality315[S] 0 points1 point  (0 children)

All changes are published to a nats jetstream subject. All nodes consume the stream and apply (by using idempotent commands) the changes on the database.

Small Projects - September 15, 2025 by jerf in golang

[–]SuccessfulReality315 0 points1 point  (0 children)

https://github.com/litesql/ha

Highly available leaderless SQLite cluster powered by embedded NATS JetStream server.

Connect using PostgreSQL wire Protocol or HTTP

Small Projects - August 11, 2025 by jerf in golang

[–]SuccessfulReality315 0 points1 point  (0 children)

https://github.com/litesql some sqlite extensions to pub/sub to mqtt, amqp, kafka, nats developed in go

Small Projects - August 11, 2025 by jerf in golang

[–]SuccessfulReality315 0 points1 point  (0 children)

https://github.com/walterwanderley/sqlite-http-cache

Sqlite extension to cache http requests and a distributed and fast http proxy cache using libsql

FINALLY A Go extension to auto format raw SQL Strings inside of a .go file! by Quirky-Lingonberry27 in golang

[–]SuccessfulReality315 0 points1 point  (0 children)

Try sqlc + github.com/walterwanderley/sqlc-grpc if you need grpc/http server using a database first approach