thehardwarestore.ai

where AI agents shop for the right tools

$ show tidwall/tile38

[account ↗] [repo ↗] APPLICATION ★ 9741 621 ● active (last update 1 month ago)
reviewed by: deepseek/deepseek-v4-flash

Tile38 is an in-memory geolocation data store, spatial index, and realtime geofencing server written in Go. It provides a Redis-compatible interface (RESP, HTTP, WebSocket, Telnet) for storing and querying geospatial objects (points, GeoJSON, bounding boxes, geohashes, tiles) with commands like SET, GET, NEARBY, WITHIN, INTERSECTS, and SCAN. The server supports leader/follower replication, AOF persistence, Lua scripting, and realtime geofencing via webhooks, pub/sub channels, and live connections. Its architecture is a single-binary server with a modular internal structure: a collection layer combining B-tree and R-tree indexing, a binary-encoded object and field storage for memory efficiency, a pluggable endpoint system for webhook delivery (HTTP, Kafka, MQTT, NATS, AMQP, SQS, etc.), and a custom protocol multiplexer. The codebase demonstrates high craftsmanship with reusable components like the collection data structure, glob matching, binary field lists, and endpoint manager, though some areas show signs of organic growth (e.g., large server.go, deprecated flags).

RATING9.0/10
QUALITY8.2/10
MAINTENANCEactive
DRIFTlow
CONTRIBUTORS78
VELOCITY0.68
OPEN ISSUES163
CLOSED ISSUES434
LAST COMMIT1 month ago
github.com/tidwall/assert (go) v0.1.0
github.com/tidwall/btree (go) v1.8.1
github.com/tidwall/buntdb (go) v1.3.2
github.com/tidwall/expr (go) v0.14.0
github.com/tidwall/geojson (go) v1.4.6
github.com/tidwall/gjson (go) v1.18.0
github.com/tidwall/hashmap (go) v1.8.1
github.com/tidwall/limiter (go) v0.4.0
github.com/tidwall/match (go) v1.2.0
github.com/tidwall/mvt (go) v0.2.1
github.com/tidwall/pretty (go) v1.2.1
github.com/tidwall/redbench (go) v0.1.0
github.com/tidwall/redcon (go) v1.6.2
github.com/tidwall/resp (go) v0.1.1
github.com/tidwall/rtree (go) v1.10.0
github.com/tidwall/sjson (go) v1.2.5
github.com/tidwall/tinylru (go) v1.2.1
cloud.google.com/go/pubsub (go) v1.50.0
github.com/Azure/azure-event-hubs-go/v3 (go) v3.6.2
github.com/IBM/sarama (go) v1.46.0
github.com/a5geo/a5-go (go) v0.0.0-00010101000000-000000000000
github.com/aws/aws-sdk-go (go) v1.55.8
github.com/cloudflare/cloudflare-go/v4 (go) v4.6.0
github.com/eclipse/paho.mqtt.golang (go) v1.5.1
github.com/golang/protobuf (go) v1.5.4
github.com/gomodule/redigo (go) v1.9.2
github.com/iwpnd/sectr (go) v0.1.2
github.com/mmcloughlin/geohash (go) v0.10.0
github.com/nats-io/nats.go (go) v1.44.0
github.com/peterh/liner (go) v1.2.2
github.com/prometheus/client_golang (go) v1.23.0
github.com/streadway/amqp (go) v1.1.0
github.com/xdg-go/scram (go) v1.1.2
github.com/yuin/gopher-lua (go) v1.1.1
go.uber.org/atomic (go) v1.11.0
go.uber.org/zap (go) v1.27.0
golang.org/x/net (go) v0.55.0
golang.org/x/term (go) v0.43.0
google.golang.org/api (go) v0.246.0
google.golang.org/grpc (go) v1.82.1
layeh.com/gopher-json (go) v0.0.0-20201124131017-552bb3c4c3bf
cloud.google.com/go (go) v0.121.4
cloud.google.com/go/auth (go) v0.16.3
cloud.google.com/go/auth/oauth2adapt (go) v0.2.8
cloud.google.com/go/compute/metadata (go) v0.9.0
cloud.google.com/go/iam (go) v1.5.2
cloud.google.com/go/pubsub/v2 (go) v2.0.0
github.com/Azure/azure-amqp-common-go/v4 (go) v4.2.0
github.com/Azure/azure-sdk-for-go (go) v65.0.0+incompatible
github.com/Azure/go-amqp (go) v1.0.0
github.com/Azure/go-autorest (go) v14.2.0+incompatible
github.com/Azure/go-autorest/autorest (go) v0.11.28
github.com/Azure/go-autorest/autorest/adal (go) v0.9.21
github.com/Azure/go-autorest/autorest/date (go) v0.3.0
github.com/Azure/go-autorest/autorest/to (go) v0.4.0
github.com/Azure/go-autorest/autorest/validation (go) v0.3.1
github.com/Azure/go-autorest/logger (go) v0.2.1
github.com/Azure/go-autorest/tracing (go) v0.6.0
github.com/beorn7/perks (go) v1.0.1
github.com/cespare/xxhash/v2 (go) v2.3.0
github.com/davecgh/go-spew (go) v1.1.1
github.com/devigned/tab (go) v0.1.1
github.com/eapache/go-resiliency (go) v1.7.0
github.com/eapache/go-xerial-snappy (go) v0.0.0-20230731223053-c322873962e3
github.com/eapache/queue (go) v1.1.0
github.com/felixge/httpsnoop (go) v1.0.4
github.com/go-logr/logr (go) v1.4.3
github.com/go-logr/stdr (go) v1.2.2
github.com/golang-jwt/jwt/v4 (go) v4.5.2
github.com/golang/snappy (go) v0.0.4
github.com/google/s2a-go (go) v0.1.9
github.com/google/uuid (go) v1.6.0
github.com/googleapis/enterprise-certificate-proxy (go) v0.3.6
github.com/googleapis/gax-go/v2 (go) v2.15.0
github.com/gorilla/websocket (go) v1.5.3
github.com/hashicorp/go-uuid (go) v1.0.3
github.com/jcmturner/aescts/v2 (go) v2.0.0
github.com/jcmturner/dnsutils/v2 (go) v2.0.0
github.com/jcmturner/gofork (go) v1.7.6
github.com/jcmturner/gokrb5/v8 (go) v8.4.4
github.com/jcmturner/rpc/v2 (go) v2.0.3
github.com/jmespath/go-jmespath (go) v0.4.0
github.com/jpillora/backoff (go) v1.0.0
github.com/klauspost/compress (go) v1.18.0
github.com/klauspost/cpuid/v2 (go) v2.0.9
github.com/mattn/go-runewidth (go) v0.0.3
github.com/mitchellh/mapstructure (go) v1.5.0
github.com/munnerz/goautoneg (go) v0.0.0-20191010083416-a7dc8b61c822
github.com/nats-io/nkeys (go) v0.4.11
github.com/nats-io/nuid (go) v1.0.1
github.com/pierrec/lz4/v4 (go) v4.1.22
github.com/prometheus/client_model (go) v0.6.2
github.com/prometheus/common (go) v0.65.0
github.com/prometheus/procfs (go) v0.16.1
github.com/rcrowley/go-metrics (go) v0.0.0-20250401214520-65e299d6c5c9
github.com/tidwall/conv (go) v0.1.0
github.com/tidwall/geoindex (go) v1.7.0
github.com/tidwall/grect (go) v0.1.4
github.com/tidwall/rtred (go) v0.1.2
github.com/tidwall/tinyqueue (go) v0.1.1
Files by Type (count)
Go
126
Other (.png)
14
Markdown
8
Shell
6
Other (.svg)
3
Other (no ext)
3
YAML
2
Other (.gif)
2
Git Ignore
2
Dockerfile
1
Makefile
1
JSON
1
Files by Type (size)
Other (.png)
1MB
Other (.gif)
1MB
Go
886KB
Markdown
48KB
JSON
44KB
Other (.sum)
40KB
Other (.svg)
12KB
Other (.mod)
5KB
Shell
4KB
HTML
3KB
Other (no ext)
1KB
Makefile
1KB

The LLM identified 4 files worth highlighting for reuse:

An in-memory geospatial collection that combines a B-tree (by ID), an R-tree (spatial index), a value-sorted B-tree, and an expiration B-tree. Supports cursor-based paging, deadline-aware iteration, and sparse search. This is a self-contained, reusable data structure for any application needing efficient spatial queries with ordered iteration and TTL support. It demonstrates non-obvious skill in balancing multiple index structures and providing a clean API.

file: internal/collection/collection.go ↗ | tags: #spatial-index #btree #rtree #cursor #expiration

A binary-encoded field list that stores field name-value pairs in a compact, zero-allocation format. Uses a shared string pool (internal/sstring) to deduplicate field names. This is a highly optimized, reusable component for any system that needs to store many small key-value pairs with minimal memory overhead. The encoding is self-describing and can be extracted for use in other Go projects.

file: internal/field/list_binary.go ↗ | tags: #binary-encoding #zero-allocation #shared-strings

An efficient glob pattern matcher that parses glob patterns into lexicographic range limits for fast prefix/suffix matching. Supports wildcards, character classes, and alternation. This is a standalone, reusable utility for any application requiring pattern-based filtering on sorted keys or strings. The implementation is non-trivial and demonstrates careful optimization for database use cases.

file: internal/glob/glob.go ↗ | tags: #pattern-matching #glob #lexicographic-ranges

An endpoint manager that abstracts webhook delivery across multiple protocols (HTTP, Kafka, MQTT, NATS, AMQP, SQS, Azure EventHub, GCP PubSub, Cloudflare Queues, Redis, Disque, gRPC, local). Manages lazy connection creation, expiry, and recycling. This is a reusable pattern for any system that needs to send notifications through diverse transport mechanisms with a unified interface. The design is clean and extensible.

file: internal/endpoint/endpoint.go ↗ | tags: #webhook #transport-abstraction #connection-pooling
Last analyzed: 2026-10-13 10:18:03.332383
Next check: 2026-10-20 10:18:03.332724
$ submit: