Alegor Tech
Case Study / IoT & Telematics

From Physical Asset to Real-Time Data Connecting hundreds of thousands of physical units directly into enterprise workflows.

ToolMetrica connects tools, vehicles, machinery, and physical assets with a centralized digital platform. GPS, Bluetooth, and telemetry streams continuously ingest into the system, processed in real time and converted into positions, history, alerts, and operational insights.

Product ToolMetrica
Company Tool Metrica AB
Domain IoT & Telematics
Type Real-time Platform
1. The Real-World Challenge

The Problem Starts in the Physical World

A modern enterprise in construction, infrastructure, or field services coordinates a massive, shifting fleet: 50 vehicles, 2,000 specialized tools, containers, satellite storage, active job sites, and mobile teams.

Traditional business systems record what an organization is supposed to own. However, they cannot tell you where that high-value equipment is physically located right now, whether it is running, or if it was left behind on a job site.

ToolMetrica was engineered to bridge this divide: The enterprise platform receives live state directly from the physical world.

Physical Ground Truth vs ERP

GROUND TRUTH
Legacy ERP (Static Assumption)
Asset #4102 registered at Central Depot. Last manually audited 3 months ago.
ToolMetrica (Live Telemetry)
Asset #4102 detected via BLE gateway in Service Van #14 at Slussen Job Site at 14:32 (Battery 92%, Active).
2. End-to-End Data Pipeline

From Signal to Insight

A comprehensive architecture transforming raw high-frequency telemetry into business logic and automated triggers.

01. Fysisk Tillgång

Physical Asset

  • • Power Tools
  • • Fleet Vehicles
  • • Heavy Machinery
  • • Containers
ASSET LAYER
02. Hårdvara

Sensors & Nodes

  • • GPS Trackers
  • • BLE Beacons
  • • Smart Battery Pack
  • • Vehicle Gateways
  • • RFID Taggar
HARDWARE LAYER
03. Transport

Connectivity

  • • GSM / LTE-M / NB-IoT
  • • Bluetooth 5.x BLE
  • • Wi-Fi & Gateways
  • • MQTT / EMQX
  • • UDP / TCP Raw
INGESTION TRANSPORT
04. Ingestion

Stream Ingestion

  • • Go Microservices
  • • Hög genomströmning
  • • Validering & Parsing
  • • Redis State Cache
HIGH-THROUGHPUT ENGINE
05. Bearbetning

Event Processing

  • • Position & Hastighet
  • • Rörelsedetektering
  • • Batteri & Diagnostik
  • • TimescaleDB Tidsserier
TIME-SERIES STORAGE
06. Affärslogik

Business Platform

  • • Geofence & Larm
  • • Projekt & Arbetsplats
  • • Lager & Tilldelning
  • • Alegor Core Engine
ALEGOR FRAMEWORK
07. Verksamhet

Action & API

  • • Live Kartvy & Flotta
  • • Stöldskydd & Notiser
  • • Automatiska Arbetsflöden
  • • REST/Webhook ERP-Sync
OPERATIONAL OUTCOME

Overview: Hardware, Gateways & Cloud Architecture

TOOLMETRICA IOT ECOSYSTEM
ToolMetrica IoT Ecosystem & Telematics Architecture
3. Architecture Paradigm

Real-Time Telemetry is an Architectural Challenge

Conventional business systems remain idle until a human user executes an action. Requests flow in a simple Request-Response lifecycle.

ToolMetrica operates on a completely different paradigm. Hundreds of thousands of trackers emit signals 24/7 without human intervention. The backend must continuously ingest, validate, update memory states, evaluate polygon rules, and persist streams with sub-millisecond precision.

Traditionellt Affärssystem SYNCHRONOUS REQUEST
User HTTP Request RDBMS DB Response
ToolMetrica IoT & Telematics Engine ASYNC EVENT-DRIVEN STREAM
100k+ Devices ── MQTT/TCP ──► Go Ingestion Cluster
Go Stream Processing ── Fork ──►
Redis (Current State)
TimescaleDB (History)
Alegor Core / Events ── Trigger ──► Geofence / Larm / ERP Sync
IoT
Dimensionerad Kapacitet
400 000+
devices in the same real-time cluster

Engineered and load-tested to ingest continuous telemetry streams from high-density fleets without dropping packets or degrading interface latency.

4. Scale & Capacity

Architected for Hundreds of Thousands of Active Trackers

A key architectural priority was establishing a foundation capable of handling enterprise-scale device fleets. The ingestion pipelines, caching tiers, and time-series schemas were engineered from inception to scale effortlessly from thousands to hundreds of thousands of concurrent nodes.

By offloading telemetry I/O to lightweight, compiled microservices and distributed message brokers, the platform effortlessly buffers high-concurrency bursts—such as morning fleet turn-ons and massive telemetry synchronization.

5. Dual Data Pipeline

When Every Data Point Becomes History

A tracker reports continuously. The backend must answer two completely different questions at microsecond speeds:

Fråga 1 • Realtid Redis In-Memory

”Var är verktyget JUST NU?”

Requires immediate sub-millisecond retrieval of the latest verified location, battery status, movement flags, and active gateway association across thousands of visible units.

GET device:{id}:current_state
Lat: 59.3293 | Lng: 18.0686 | Batt: 94% | Moving: false
Fråga 2 • Tidsserier TimescaleDB Hypertable

”Vad gjorde verktyget senaste 6 månaderna?”

Requires hyper-optimized time-series chunking and aggregation over millions of telemetry points to compute operating hours, movement traces, and site utilization history.

SELECT time_bucket('1 hour', time) AS bucket, avg(speed)...
WHERE device_id = 1842 AND time > NOW() - INTERVAL '180 days'
6. Contextual Event Processing

Intelligent Events Instead of Raw Coordinates

Raw GPS coordinates offer little standalone business value. The real breakthrough happens when telemetry is evaluated against organizational rules and spatial context.

ToolMetrica evaluates rules on the fly: If high-value machinery leaves a designated perimeter after hours, if a beacon loses contact with its assigned mobile gateway, or if equipment enters the wrong depot, smart alerts trigger immediately.

EVENT EVALUATION PIPELINE REALTIME TRIGGER
1
Position & Sensor Data
Lat: 59.3293, Lng: 18.0686 • Tid: 22:47
2
Kontextuell Matchning
Geofence: Byggarbetsplats Stockholm City (Projekt #882)
3
Regelutvärdering
Regel: Tillgång får endast flyttas vardagar 06:00–18:00
!
Automatisk Åtgärd
STÖLDVARNING triggad: Push, SMS & Notis till Jourhavande
7. Hybrid IoT Architecture

Combining GPS and BLE for Full Fleet Visibility

Different assets require distinct connectivity profiles. ToolMetrica unifies GPS telemetry and localized BLE beaconing into a unified hierarchy.

GPS

Fordon & Mobila Gateways

Kontinuerlig GPS/GSM-telemetri

Vehicles and heavy equipment carry active GPS/GSM trackers streaming position and ignition status while concurrently functioning as roving BLE gateways.

Servicebil #14 (GPS: 59.332, 18.064)
BLE

Verktyg, Batterier & Utrustning

Strömsnåla Bluetooth Beacons

Compact, rugged BLE beacons attach to hand tools and smart batteries. Whenever they come within range of a van or job site gateway, their presence is automatically synchronized.

20 verktyg detekterade i Servicebil #14: Bultpistol, Hilti Borr, Batteripaket #3...
8. Full Technical Stack

Hardware, Firmware, Cloud Backend, and Interface

True IoT engineering spans every technical layer: from device firmware and radio protocols to high-throughput cloud ingestion and intuitive enterprise UX.

L1
HARDWARE
GPS-trackers, BLE-beacons, gateways, smarta batterier, sensorer
L2
FIRMWARE & PROTOCOLS
Enhetskonfiguration, OTA-uppdateringar, sensortolkning, strömsnål logik
L3
CONNECTIVITY
GSM, LTE-M, NB-IoT, BLE 5.0, Wi-Fi, MQTT/EMQX brokers, TCP streams
L4
CLOUD REALTIME INFRASTRUCTURE
Go Ingestion microservices, Redis tillståndscache, TimescaleDB tidsserier
L5
ALEGOR BUSINESS PLATFORM
Användare, behörigheter, företag, tillgångar, projekt, lager, order, regler
L6
APPLICATION & INTEGRATION
Livekartor, dashboards, larm, rapporter, mobilapp samt ERP/WMS API:er
9. Operations Context

Connecting Telemetry Directly to Business Objects

ToolMetrica extends far beyond simple map pins. It delivers comprehensive business tooling for warehouse management, fleet operations, project tracking, tool rental, maintenance cycles, and crew assignments.

When raw telemetry links with business entities, real operational efficiency emerges: Organizations track precisely which worker operates which tool, which client project absorbs utilization costs, and when scheduled servicing is due.

Core principle: IoT delivers real value when physical telemetry gains contextual business meaning.

BLE Beacon #9812 ── Signal ──► Hilti TE 70 Borrhammare
Affärsobjekt ── Lager ──► Lager Stockholm Syd
Projektkoppling ── Tilldelad ──► Projekt Nacka Strand (#402)
Ansvarig ── Förare ──► Johan Andersson (Montör)
Status Aktiv drift • Service om 140 h
INTEGRATION MATRIX
ERP-system Visma / Fortnox / Business Central
WMS & Lager Lagersystem & Barkod
Projektverktyg Bygg- & Fältsystem
API Protocols REST API / Webhooks / MQTT
10. Integration Architecture

Integrate and Elevate – No Need to Replace Everything

ToolMetrica does not require enterprises to discard their legacy systems. The platform acts as a high-performance telemetry and telematics layer feeding real-time positional and operational data into existing ERP, WMS, and project suites.

”We build the missing high-scale technical component and integrate it seamlessly with existing corporate workflows.”

11. Deep-Dive Architecture

The Architecture Behind High-Scale Telemetry

Every architectural component is purposefully selected to ensure resilience, throughput, and sub-second latency.

Messaging / Ingestion

MQTT & EMQX

Ingests real-time telemetry streams and maintains hundreds of thousands of concurrent device connections with minimal network overhead.

Realtime Microservices

Go Worker Services

High-throughput compiled Go microservices for rapid payload parsing, geofencing polygon calculation, and device validation.

Time-Series Data

TimescaleDB & PostgreSQL

Hypertable-based time-series database engineered for billions of historical telemetry rows and rapid aggregate reporting.

In-Memory Cache

Redis State Layer

Keeps instantaneous device state, battery metrics, and live positioning directly in-memory for instant UI queries.

Business Engine

PHP / Laravel & Alegor Core

Executes rich domain workflows, multi-tenant security, enterprise asset management, reports, and administrative tooling.

Integration & UX

Web, Mobile & REST API

Interactive Mapbox/Leaflet live maps, responsive operator interfaces, and bi-directional integration APIs.

12. Performance Engineering

Scaling is About Architecture – Not Just Larger Servers

When telemetry volume escalates exponentially, vertical scaling rapidly hits bottlenecks. High-frequency I/O tasks were systematically extracted into dedicated, event-driven Go microservices.

By caching tracker configuration in Redis, batching time-series inserts into TimescaleDB chunks, and isolating current-state lookups from historical tables, server utilization dropped dramatically while throughput multiplied.

Architectural Transformation
Före: Monolitisk I/O
Every telemetry ping spawned a synchronous web process, locking relational database rows and causing CPU spikes during peak periods.
Efter: Specialiserad Go Ingestion + Cache
Sub-millisecond Go ingestion workers, Redis state caching, and batched TimescaleDB hypertable writes yielding ultra-low CPU utilization.
13. The Alegor Foundation

Standardize the Core. Innovate the Unique.

ToolMetrica illustrates the strategic advantage of the Alegor framework. Fundamental enterprise layers—multi-tenant authorization, audit logging, role hierarchies, and API infrastructure—are already proven.

Engineering firepower was 100% focused on ToolMetrica’s proprietary competitive edge: high-frequency ingestion, geofence polygon mathematics, time-series storage, and IoT hardware drivers.

PROVEN FOUNDATION
✓ Multi-Tenancy
✓ RBAC & Behörigheter
✓ Säker REST API
✓ Audit Logging
✓ Notishantering
✓ Dokument & Export
14. Verified Outcomes

Technical and Operational Achievements

A proven, high-concurrency IoT platform delivering end-to-end connectivity from physical sensors to executive intelligence.

Skala & Volym
Hundratusentals

Architecture engineered and benchmarked for high-density tracker fleets.

Realtidslatens
< 100 ms

Ultra-low latency from physical pulse ingestion to UI state update.

Hybrid IoT
GPS + BLE

Seamless pairing of vehicle GPS units with localized BLE beacons.

Affärskoppling
100% Integrerad

Telemetry is directly mapped to warehouses, jobs, and enterprise ERPs.

15. Interface & Visuals

Physical → Connected → Digital

From rugged hardware and beacons in the field to interactive real-time mapping, geofencing, and telemetry graphs.

Live Map & Fleet View

Interactive fleet dashboard monitoring vehicles, active geofences, and tools with instant status filters.

Geofence & Alert Engine

Custom polygon boundaries with automatic time-window rules and instant push/SMS security alerts.

Telemetry & Utilization

Detailed time-series telemetry charts tracking operational hours, routes, battery health, and utilization.

16. Next Step

Ready to Transform Physical Operations into Real-Time Intelligence?

Sensors and hardware produce raw data. The real challenge is engineering the cloud system that makes telemetry actionable. We build the complete pipeline—from device protocol ingestion to business logic, APIs, and intuitive web interfaces.

Cookie Usage

We use cookies to enhance your experience, analyze website traffic, and measure marketing performance. Read more in our cookie policy.

Cookie Usage

Strictly Necessary Cookies

Essential for core website operation and security. Cannot be disabled.