Driver search in one call
nearby returns drivers sorted by distance, filtered by status, vehicle type, or rating, and capped with limit — ready to offer the job.
Match every request with the closest available driver, tell riders when their driver is about to arrive, and manage pickup zones at airports and venues — all from live positions held in memory.
On-demand dispatch lives and dies by latency. Every request needs the nearest available drivers right now, filtered by vehicle type and status. Once a match is made, the rider wants to know when the driver is close — which means comparing two moving positions continuously.
Doing that with polling burns resources and still reacts late. Doing it with custom code means reimplementing spatial indexing and proximity detection.
nearby returns drivers sorted by distance, filtered by status, vehicle type, or rating, and capped with limit — ready to offer the job.
Roaming geofences fire when a driver comes within a set distance of a waiting rider. nodwell ensures one alert per approach, not one per position update.
Airport lots, stations, and event venues become geofences. Enter and exit events let you keep a fair queue of waiting drivers.
Update a driver's status field when a trip starts or ends; the next search reflects it immediately without resending the position.
Store open ride requests as objects with expire_seconds. Abandoned requests are deleted by the expiry sweep, stop matching proximity fences, and fire Del events your dispatch service can use to release them.
Stream geofence events to operations dashboards over WebSocket channels, with tokens that can subscribe but not write.
The request is stored in a riders collection with a TTL and queried against nearby available drivers.
Your matching service offers the job to the closest drivers and updates the winner's status.
A roaming geofence between drivers and riders detects the approach.
The roam event triggers an "arriving now" push through your notification service.
A roaming geofence compares every driver update with open rider requests. Register it once; it applies to every ride.
curl -s -X POST http://127.0.0.1:7421/hooks \
-H 'content-type: application/json' \
-d '{
"name": "driver-near-rider",
"endpoint": "https://notifications.internal.example.com/arriving",
"def": {
"collection": "drivers",
"query": {
"Roam": {
"target_collection": "riders",
"target_pattern": "*",
"meters": 150,
"options": {},
"nodwell": true
}
},
"detect": ["Roam"],
"commands": ["Set"]
}
}' Detect when a driver gets close to a waiting rider — or any moving object nears another — without polling.
Beginner · 15 min Build a real-time vehicle trackerCreate a fleet, register vehicles with status fields, stream position updates, and find the nearest available vehicle.
Intermediate · 10 min Stream live geofence events over WebSocketUse channels and the TypeScript SDK to push enter and exit events to a backend service or dashboard in real time.
Store drivers as point objects with a status field and run a nearby query with a where-in filter on status and a limit. Results are sorted by distance and include the distance in meters.
Use a roaming geofence between the drivers collection and the riders collection with a radius such as 150 meters and NODWELL enabled. latlng sends one event when a driver first comes within range.
Register the waiting lot as a polygon geofence with enter and exit detection. Your queue service adds drivers on enter events and removes them on exit events or when they accept a trip.
Store requests with expire_seconds. When the TTL runs out the request is removed, so it no longer appears in queries or triggers proximity alerts.
Organize vehicles into fleets, track live positions and status, find the nearest available vehicle, and get alerts when vehicles enter or leave depots.
Delivery zones and arrival notificationsCheck which delivery zone an address falls into, and notify customers and dispatchers the moment a driver arrives at or leaves a stop.
Asset tracking and theft alertsKeep track of trailers, containers, and equipment across sites, raise an alert when an asset leaves its yard, and detect trackers that stop reporting.