Google Sign-In Required

Use your company Google account to access the BetterFleet private content.

Back to private home

BetterFleet Support Private
Skip to content
BetterFleet Dev Wiki
0014 - Service Granularity
Initializing search
    bf-dev
    • Home
    • Product Capabilities
    • Process
    • Current Work
    • System Design
    • Software Reference
    • Operations
    bf-dev
    • Home
      • Overview
      • Manage
      • Overview
      • Product Engineering Workflow
      • Product Engineering Delivery
      • Product Engineering Workflow in Linear
        • GitLab Feature Flags
        • In-App Docs Authoring
        • Release Notes
      • Templates
      • Publishing
      • Workflow Companions
      • Overview
      • Active Artifacts
      • Backlog Artifacts
      • Archived Artifacts
      • Overview
      • Microgrid
      • OSCP
        • Challenge
        • Specification
        • Spec
        • Architecture
        • Overview
        • Script Runtime Model
        • Compose Profiles and Modes
        • Repo Topology
        • CI and Release Integration
        • Overview
        • Internal Application Diagrams
          • Overview
          • Web Model
          • Core Model
        • Service Interaction Flows
        • Data and State
          • Index
          • bf-manage-web
          • bf-manage-core
          • bf-manage-connect
          • bf-manage-sitepwrmon
          • bf-manage-incidents
          • bf-telematics
          • bf-depot-sim
          • bf-manage-roaming
          • bf-support-microsite
          • bf-digital-twin
          • bf-schedule-creator
        • Overview
        • Internal Application Diagrams
        • Migration and Flags
        • Simulation Request Lifecycle
          • Index
          • bf-bnl-ui
          • bf-bnl-settings
          • bf-bnl-schedule-analysis-compute
          • bf-route-modelling
          • bf-schedule-creator
          • bf-digital-twin
        • Overview
        • Secrets and Env Strategy
        • Vendors and Local Dependencies
        • ADRs
        • Service Matrix
        • Cloud Dependencies
        • Ports and URLs
      • Onboarding
      • Daily Operations Runbook
        • Overview
        • Staging Hotfix Release
        • Production Hotfix Release
        • Terraform Plan Dry Runs
      • Troubleshooting
      • Testing Guide
    • Date
    • Status
    • Context
    • Decision
    • Consequences

    0014 - Service Granularity¶

    Date¶

    2023-05-22

    Status¶

    Proposed

    Context¶

    We are using the terms microservice, miniservice, mesoservice, and monolith to refer to different levels of scope.

    Microservices are services that house the logic for one and only one business behaviour. Microservices are able to be organised by any of the following:

    • strict business behaviour/service (e.g. registration, login, save site, etc)
    • entity (account, customer, project, etc.)
    • technical concern

    Mesoservices are services that house multiple related business behaviours. Monoliths are services that house many business behaviours and could/should perhaps be separated in future.

    Decision¶

    We are defining the above terms and choosing to prefer Meso-services by default.

    They need to be at a scale where their name and other organisational elements make sense at a glance and where service boundaries are meaningful.

    This default choice is balanced by:

    • Microservices can be justified when there is real independent scale or organisational pressure to separate them.
    • Monoliths can be justified for the implementation of tightly coupled behaviour or when the initial development cost of splitting the service would add more complexity than value.

    Consequences¶

    Meso-services will become the default scope for new services, because they allow a reasonable amount of related behaviour to sit together without the overhead and fragmentation of microservices.

    This means that developers need to think deliberately about service boundaries and whether an existing mesoservice should absorb new behaviour, whether a microservice is truly warranted, or whether a temporary monolith is the safer move.

    We expect this to produce more consistent naming, more coherent repos, and less accidental proliferation of ultra-small services.

    Made with Material for MkDocs