IceRPC Documentation

website·Indexed 32 days ago

https://docs.icerpc.dev

Documentation for IceRPC, including the Slice language reference, encoding rules, and transport protocols. It covers Slice grammar, type systems (primitive, sequence, struct, enum, and dictionary), interface and operation definitions, and integration with Protobuf.

Tokens
50.7K
Snippets
233
Records
354
Agent score
62%

What's inside IceRPC

  1. Overview of IceRPC features

    IceRPC is a modular RPC framework built for QUIC, currently available for C# / .NET. It provides several core capabilities for building network services:

    • Invocation Pipeline: Allows customization of client-side processing by composing interceptors.
    • Dispatch Pipeline: Enables the composition of middleware and services for custom server-side request handling.
    • Path-based Routing: Routes requests to specific services based on the request path.
    • Slice: A modern IDL (Interface Definition Language) and serialization format developed specifically for IceRPC.
    • Protobuf Support: Ability to call and implement Protobuf services.
    • Dependency Injection: Integration with DI containers for C# applications.
    • TLS Security: Built-in support for securing communications via TLS.
  2. Overview of IceRPC framework

    IceRPC is a modular RPC (Remote Procedure Call) framework designed to leverage QUIC's multiplexed transport. It maps each RPC request/response pair to a bidirectional QUIC stream, allowing multiple parallel requests within a single connection without interference. It uses a dedicated application protocol (icerpc) as a thin layer over QUIC to manage connection settings, transmission, and shutdown.
  3. Overview of Slice IDL

    Slice is an Interface Definition Language (IDL) used to model and describe network APIs. It allows developers to define service interfaces and data types in a concise manner, which can then be compiled into source code for various programming languages. While developed in tandem with IceRPC, Slice is a separate framework and can be used with any RPC framework or independently.
  4. Overview of Dependency Injection in IceRPC for C#

    IceRPC for C# is designed to be DI-friendly and DI container agnostic, meaning DI is an optional feature and not a requirement for using the library. While it remains agnostic, it provides explicit support for Microsoft's DI container via dedicated extension methods and implementations.
  5. Overview of IceRPC and Protobuf integration for C#

    IceRPC provides an integration that allows developers to implement and call Protobuf services using IceRPC. It supports proto2, proto3, and Protobuf editions. The integration provides a specific client-side and server-side mapping for Protobuf services to C# and does not modify the standard mapping for user-defined types like messages and enums, which are handled by the standard protoc C# generator.
  6. Map IceRPC calls to multiplexed streams

    IceRPC leverages QUIC and multiplexed transport by creating a dedicated stream for every RPC. The stream type depends on the RPC nature: a bidirectional stream is used for two-way RPCs (request and response), and a unidirectional stream is used for one-way RPCs (request only). Requests flow from the stream creator to the stream acceptor, while responses flow from the acceptor back to the creator.
  7. Verify platform support for IceRPC for C# 0.5

    ZeroC officially supports IceRPC for C# 0.5 on the following platforms, all requiring .NET 10.0:

    • Windows: Windows 11 (25H2) and Windows Server 2025 on x64 architecture.
    • Linux: Debian 13, Red Hat Enterprise Linux 10, and Ubuntu 24.04 on x64 and Arm64 architectures.
    • macOS: macOS 26 (Tahoe) on Arm64 architecture.

    For other platforms, ZeroC provides support on a best-effort basis for all .NET 10.0 supported platforms without a guarantee.

  8. Understand IceRPC Protobuf service mapping to C#

    The protoc-gen-icerpc-csharp code generator maps a Protobuf service named Name to three primary C# entities:

    1. IName: A client-side API interface.
    2. NameClient: A record struct that implements IName to send requests via IceRPC.
    3. INameService: A server-side helper interface used to implement the service logic.

    All generated identifiers are converted to PascalCase to adhere to C# naming conventions.

  9. Understand the IceRPC Invocation Pipeline

    In IceRPC, an 'invocation' is the process of sending an outgoing request and receiving an incoming response. This is typically done over client connections, but because client and server connections share the same capabilities, invocations can also be made from the server-side to the client-side of a connection.
  10. Understand IceRPC protocol interoperability and limitations

    IceRPC implements the ice protocol (version 1.0) to be compatible with ZeroC Ice applications. However, IceRPC does not support the following features found in the full Ice implementation: batch requests, protocol frame compression, and datagram transports (UDP).
  11. Understand the IceRPC protocol and streaming support

    IceRPC introduces a new protocol named icerpc designed to run over multiplexed transports such as QUIC. A primary feature of this protocol is native streaming support, allowing developers to send streams of bytes or Slice-defined types within requests or responses with minimal overhead.