Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

Using Go for Device Connectivity and Geofencing in a Shared E‑Bike Platform

Description and use

Using Go to manage IoT device connections, handle traffic bursts, and perform low‑latency geofencing in a shared e‑bike platform.

Problem

Managing real‑time device connections, burst traffic, and low‑latency geofencing for a city e‑bike sharing service.

Outcome

The Go‑based microservice architecture improved connection handling, reduced latency for geofencing, and allowed independent scaling of workloads, leading to a more resilient and maintainable e‑bike platform.

Workflow

  • 1. Bike IoT controller sends GPS, battery, lock, and fault data via TCP or MQTT.
  • 2. Go device gateway decodes the protocol and forwards events to Kafka.
  • 3. Kafka buffers events; Go consumers update Redis, MySQL, and trigger business services.
  • 4. Geofencing service (Go) validates unlock/return locations against service area, parking zones, and no‑parking areas, optionally using Bluetooth beacons or RFID.
  • 5. API gateway (Gin) handles user requests for scanning, unlocking, and returning bikes, delegating to the device gateway and geofencing service.
  • 6. Background workers process asynchronous tasks such as pricing, promotions, and analytics.
  • 7. Each service is containerized with static binaries, deployed on Kubernetes, and scaled independently based on traffic patterns.

Evidence

Go’s lightweight goroutines and networking support make it practical to manage many long‑lived device connections without requiring a complicated threading model.

Source

Kafka provides buffering between live device traffic and downstream processing. This is important when bikes continue reporting data while a database or business service is temporarily slow.

Source

The geofencing service is written in Go and kept separate from general business APIs. This lets us optimize and scale geometry‑heavy checks independently.

Source

  • Record date: 2026-09-19T23:45:42.667Z