Particular Service Platform Documentation

website·Indexed 35 days ago

https://docs.particular.net

Architectural guidance and configuration for building distributed systems using the Particular Service Platform. Includes documentation on messaging patterns, NServiceBus, and cloud-specific implementations for Azure and AWS, covering event-driven architectures, microservices, observability, and high availability.

Tokens
1.8M
Snippets
7.3K
Records
11.3K
Agent score
59%

What's inside Particular Service Platform

  1. Overview of NServiceBus Metrics plugin

    The Metrics plugin collects performance data from running endpoints and forwards it to a ServiceControl monitoring instance, which then makes the data viewable in ServicePulse. Note that the metrics feature cannot be used on send-only endpoints. Starting with version 8, OpenTelemetry is supported as an alternative to the NServiceBus.Metrics package.
  2. Overview of ServiceControl and ServicePulse authentication

    ServiceControl and ServicePulse use standards-based authentication via OpenID Connect (OIDC). When enabled, users must authenticate through an identity provider (IdP) to access ServicePulse, and all API calls to ServiceControl require a valid JSON Web Token (JWT).

    Critical Requirements:

    • HTTPS is mandatory: Authentication requires TLS to prevent tokens from being transmitted in plain text.
    • Default State: Authentication is disabled by default; the platform is accessible without credentials until configured.
    • Configuration Flow: Authentication is configured on ServiceControl. ServicePulse retrieves these settings from ServiceControl at startup to handle the sign-in flow automatically.
  3. Overview of Azure Storage Queues Transport

    Azure Storage Queues is a highly reliable, inexpensive queuing service hosted on Azure, suitable for large cloud or hybrid networks. It supports messages up to 64 KB and total storage account capacities up to 200 TB. It uses a Peek-Lock mechanism to emulate local transactions. Key constraints include latency due to remoteness and the requirement for HTTP-based communication.
  4. Overview of the NServiceBus Retail Demo solution

    The NServiceBus Quickstart solution mimics a retail system to demonstrate asynchronous messaging patterns. It consists of five projects:

    • ClientUI: A web application that serves as the system entry point. It sends a PlaceOrder command to the Sales endpoint.
    • Sales: A console application that processes the PlaceOrder command and publishes an OrderPlaced event.
    • Billing: A console application that subscribes to and processes the OrderPlaced event.
    • Messages: A shared assembly containing the class definitions for all messages used across endpoints.
    • PlatformLauncher: A project demonstrating the Particular Service Platform (initially commented out).

    This architecture demonstrates the publish-subscribe pattern, allowing the Billing component to remain decoupled from the Sales component.

  5. Overview of NServiceBus Transport Transaction Modes

    NServiceBus provides four transaction modes to manage the consistency between receiving messages, updating user data, and sending outgoing messages. The choice of mode involves a trade-off between consistency, reliability, and performance.

    • Transaction scope (Distributed transaction): Strongest guarantees; uses distributed transactions across transport and database.
    • Sends atomic with Receive: Outgoing messages are committed or rolled back atomically with the receive operation, preventing 'ghost messages'.
    • Receive Only: Guarantees the message is not lost from the queue until successfully processed, but does not guarantee atomicity for outgoing messages.
    • Unreliable (Transactions Disabled): No transactional guarantees; used for maximum performance.
  6. Overview of NServiceBus operational tasks

    Operational management for NServiceBus endpoints typically involves five primary categories: data migrations, upgrading endpoints, deployments, diagnostics, and scripting activities (which utilize low-level/native APIs to facilitate the other operational tasks).
  7. Overview of NServiceBus Client-side Callbacks

    Callbacks allow developers to use messaging behind a synchronous API. This is primarily used when introducing messaging to existing synchronous web or WCF applications to allow a gradual transition.

    Critical Constraints:

    • Do not call callback APIs from inside a Handle method in an IHandleMessages<T> class to avoid deadlocks.
    • Data Loss Risk: Callbacks are held in memory and do not survive process restarts (e.g., crashes or IIS recycles). Use callbacks only when the returned data is not business-critical. For fault-tolerant requirements, use request/response with a message handler or Sagas.
    • Response Limit: If a server returns multiple responses, only the first response invokes the callback to prevent memory leaks.
  8. Overview of ServiceControl architecture

    ServiceControl is a background process that collects and stores data from NServiceBus endpoints and makes it available via an HTTP API to ServicePulse. It consists of three primary instance types: Error, Audit, and Monitoring. Note that the ServiceControl HTTP API is designed exclusively for ServicePulse and is not supported for other purposes.
  9. Overview of NServiceBus Messaging Bridge

    The NServiceBus Messaging Bridge allows messages to be forwarded between endpoints that are running on different transports. This enables cross-transport communication without requiring the endpoints themselves to be aware of the different transport infrastructures. If a transport for a specific endpoint is changed, only the bridge configuration needs to be updated; the other endpoints remain unchanged.
  10. Overview of NServiceBus Gateway

    The NServiceBus Gateway provides durable fire-and-forget messaging across physically separated sites (distinct physical locations). It is intended for 'logically different sites'—where sites have different responsibilities or behaviors—and requires the use of explicit messages for cross-site communication.

    Key characteristics:

    • Supports automatic de-duplication and retries.
    • Does NOT support the publish-subscribe pattern.
    • Should NOT be used as a disaster recovery mechanism for exact replicas of the same application.
    • Useful when VPNs are unavailable due to security, bandwidth, or latency constraints.
    • Features include SSL transport encryption, Databus for large payloads, and HTTP/HTTPS channel implementations.
  11. Overview of NServiceBus DataBus (Claim Check)

    The DataBus feature implements the Claim Check pattern to overcome message size limitations imposed by underlying transports. Instead of serializing large payloads (blobs) directly into the message, the DataBus stores the payload in a separate accessible location and places a reference to that location within the message. If the storage location is unavailable during sending or receiving, the operation will fail, triggering standard NServiceBus retry behavior.