Tlytics v0.1.0 - Analytics Microservice
Initial Release
Tlytics is a lightweight, real-time analytics microservice written in Go. This initial release provides a complete microservice architecture for centralized analytics collection.
ποΈ Architecture
- Microservice Design: Standalone analytics server with HTTP client libraries
- Remote Connectivity: Applications connect via IP:port configuration (e.g.,
http://192.168.1.100:8081) - Centralized Storage: Single SQLite database for all analytics data
- Network Communication: All events sent over HTTP with batching
β¨ Features
- Remote Event Collection: HTTP client automatically sends events to remote server
- Batch Processing: Efficient client-side batching with configurable flush periods
- SQLite Storage: Persistent storage on the analytics server
- HTTP API: REST endpoints for event submission and data retrieval
- Gin Middleware: Ready-to-use middleware for automatic request tracking
- Docker Support: Containerized deployment with health checks
- Pagination: Built-in pagination support for event retrieval
- Network Resilience: Graceful handling of network errors
π Quick Start
Server (Analytics Microservice):
go run cmd/tlytics/main.go --port 8081Client (Your Application):
config := tlytics.Config{
ServerURL: "http://192.168.1.100:8081",
FlushPeriod: 5 * time.Second,
}
analytics, err := tlytics.NewClient(config)
analytics.Emit(tlytics.Event{
Key: "user_action",
Data: map[string]interface{}{"action": "signup"},
})π API Endpoints
POST /events- Submit analytics eventsPOST /batch- Submit batch of eventsGET /view- Retrieve events with paginationGET /health- Health check
π³ Docker Deployment
docker-compose up --buildThis follows semantic versioning (SemVer) - this is the first stable release with the core microservice architecture.