What is the Fleet Engine service?

Fleet Engine is a backend service that integrates with the system you use to manage transportation services for your customers. It interoperates with a variety of APIs and SDKs to enhance mapping, routing, and location management.

Fleet Engine provides routing and status updates for vehicle entities modeled on your real-world vehicle fleet. As your system sends vehicle progress updates to Fleet Engine, Fleet Engine uses real-time vehicle location and routing information provided by the Driver SDK to provide accurate reports on the vehicle journeys: ETAs, traffic information, and vehicle availability.

Fleet engine

The Fleet Engine service works with both of the following Mobility Service offerings:

  • On-demand trips: In this offering, Fleet Engine models the lifecycle of a journey--from origin, through stops, to drop-off. In a trip lifecycle, a vehicle passes through pickup locations, intermediate waypoints, and drop-off locations as a means to fulfill a trip booked by a consumer request. See the On-demand trips documentation for details about on-demand trips.
  • Scheduled tasks: In this offering, Fleet Engine models the lifecycle of a delivery or service task, where each stop along a journey requires the driver to complete one or more scheduled tasks. Tasks can include delivering a package or completing a service call. See the Scheduled tasks documentation for details about scheduled tasks.

What you can do with Fleet Engine

Using Fleet Engine components, you can do the following:

  • Enable consumer trip tracking: For on-demand trips, you can use the consumer experience capabilities of Fleet Engine and integrate the Consumer SDK into your mobile or web apps. In this way, your consumers can use the same app to place a trip request and track its journey.
  • Provide real-time package information for customers: For scheduled tasks, you can use the consumer experience capabilities of Fleet Engine and integrate the JavaScript Consumer SDK to your web app. This can provide your consumers near real-time updates about the status of their packages. The SDK provides built-in filters and data privacy so that consumers see only the information relevant to their order.
  • Design fleet operator solutions: For scheduled tasks, use the JavaScript Fleet tracking library so that your fleet operators can better coordinate and manage vehicle assignments throughout the day.
  • Enhance your drivers' experience: The Driver SDK is a mobile app toolkit and a fundamental component of Fleet Engine. It uses functionality from the vehicles. With this SDK, your driving app can both manage work assignments and enable driver navigation and routing capabilities. At its core, the SDK uses an event listener to send location updates to Fleet Engine when your driver begins driving. It also sends signals to Fleet Engine about vehicle status. With this SDK, your driver can use a single app to manage assignments and navigate as they would using their consumer version of Google Maps, but without having to switch to another app.

More specifically, you can provide the following with these solutions:

On-demand trips

  • The live road-snapped position of the driver's vehicle.
  • The actual driver route with live traffic information.
  • The estimated time of arrival for pickup and drop-off locations.
  • Tracking for single-, multi-destination, and back-to-back trips.
  • Carpool rides for multiple customers over the same route.
  • Listing all vehicles within a specific region to find the best matches for requested rides.

Scheduled tasks

  • Real-time location updates rendered on the map.
  • Automatically adjusted ETAs that reflect changing circumstances, such as traffic.
  • Completed tasks and pending stops to provide insight into possible issues.
  • The number of stops and distance so that customers have increased confidence.

How Fleet Engine works

This section describes a general overview of operations of the Fleet Engine systems for each Mobility offering.

On-demand trips

The following diagram shows two key parts of on-demand trips: the start of the day when drivers enable location sharing to Fleet Engine, and a simplified view of trip management using Fleet Engine components. For a detail view of the trip process, see What is a trip? in the On-demand trips documentation.

Scheduled tasks

The following diagram shows a matrix of a typical shipment workday for a single driver along with how their work is handled in the Fleet Engine system using the Fleet Tracking library.

Note: Your system can use both shipment tracking or fleet tracking. With shipment tracking, Fleet Engine filters shipment and driver information so that a customer see only information relevant to their shipment.

Fleet Engine architecture

This section provides a system architecture for the different Fleet Engine offerings. Both services use the following:

  • A vehicle: On-demand trips and scheduled tasks rely on a vehicle as a means to model the real-world vehicles in your business used to carry out your operations. In Fleet Engine, a vehicle entity receives location information provided by its associated real-world vehicle through the driver app integrated with the Driver SDK. Fleet Engine vehicles are largely parallel entities between the two services, with a few differences. Read Introduction to vehicles to understand vehicles in Fleet Engine.
  • The Driver SDK: For both on-demand and scheduled tasks, the Driver SDK is fundamental component. The Driver SDK integrates with your driver app and provides Fleet Engine with a stream of location updates along with route information that Fleet Engine relies on to report real-time status for the journey, along with other information such as ETA and traffic data.
  • The Consumer SDK: A key benefit for both on-demand and scheduled tasks is the Consumer SDK, used to report to the consumer the status of their ride, food delivery or scheduled package delivery.

On-demand trips

For an explanation about vehicles, trips, and the SDKs, see the related documentation for on-demand trips:

  1. Introduction to vehicles
  2. On-demand trips
  3. Driver SDK for on-demand trips
  4. Consumer SDK for on-demand trips

Scheduled tasks

For an explanation about delivery vehicles, tasks, and the SDKs, see the related documentation for scheduled tasks:

  1. Introduction to vehicles
  2. Scheduled tasks
  3. Driver SDK for scheduled tasks
  4. Consumer SDK for scheduled tasks

Resources

On-demand trips

Vehicle
Services REST: v1.providers.vehicles
gRPC: maps.fleetengine.v1.VehicleService
Resource name providers/{provider}/vehicles/{vehicle}
Trip
Services REST: v1.providers.trips
gRPC: maps.fleetengine.v1.TripService
Resource name providers/{provider}/trips/{trip}

Scheduled tasks

Delivery vehicle
Resources REST: providers.deliveryVehicles
gRPC: maps.delivery.v1
Resource name providers/{provider}/deliveryVehicles/{vehicle}
Task
Services REST: providers.tasks
gRPC: maps.fleetengine.delivery.v1.Task
Resource name providers/{provider}/tasks/{task}

Resource naming in Fleet Engine

In Fleet Engine, as in all Google Cloud-based services, resources have unique identifiers called names, provided in string format. Part of that resource name is a resource ID, which you provide when you issue a creation request. However, Fleet Engine resources have no ID field, but rather an output-only name field, which includes the resource ID.

Fleet Engine uses relative resource names. These consist of collection IDs and resource IDs, structured in a way that indicates their hierarchy.

  • A collection ID: A collection holds resources or other collections.

On-demand trips

Three collections: providers, vehicles, and trips.

Scheduled tasks

Three collections: providers, deliveryVehicles, and tasks.

A resource ID: Resource identifiers in the reference documentation are indicated by curly braces in the name field. These are variables for the IDs you provide when you issue a creation request.

On-demand trips

  • {provider}: Your Cloud Project ID. Created once per project.
  • {vehicle}: Your vehicle resource, used for every vehicle creation, typically re-used for the same driver-vehicle pair.
  • {trip}: Your trip resource, used for every trip, and not typically re-used.

Scheduled tasks

  • {provider}: Your Cloud Project ID. Created once per project.
  • {vehicle}: Your delivery vehicle resource, used for every vehicle creation, typically re-used for the same driver-vehicle pair.
  • {task}: Your task resource, used for every task, and not typically re-used.

See Resource names in the Google Cloud APIs documentation for more details.

Google Cloud logs for Fleet Engine

Fleet Engine offers a basic logging service that lets you save its API requests and response payloads. With these logs, you can debug your integration, create monitoring metrics, and analyze traffic patterns.

See Cloud Logging for details.

How to use Fleet Engine

1 Set up your Cloud project.

You create a variety of service account roles in this step, in addition to enabling the related APIs.

Fleet Engine APIs and SDKs require the use of JSON Web Tokens (JWTs) that have been signed using service accounts created from the Cloud Console. Follow instructions in Create your Fleet Engine project. For a better understanding of these roles, read the Service account roles.

2 Verify your setup After creating service accounts, verify that your setup is complete and you can create a vehicle. This step ensures that you have addressed common authorization issues that can arise during project setup. Follow the guidance under Verify your setup.
3 Create your first journey This involves creating a single vehicle with a set of coordinates that represent stops along an on-demand trip or scheduled tasks. See the overview content for On-demand trips or Scheduled tasks to learn more.
4 Test your integration Fleet Engine services and components require real-time data from a fleet of vehicles. Designing, developing, and deploying apps to a fleet of drivers can take time. For this reason, it's best to first use mock data to explore your integration before doing a full-scale deployment. See Set up Fleet Engine for details.

What's next

  1. Understand Fleet Engine vehicles.
  2. Learn about on-demand trips or scheduled tasks.
  3. Set up Fleet Engine.