# neuecc/magiconion

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/neuecc-magiconion).**

_How this analysis was created: the description and tags below were written by an AI model that read this project's README and public documentation pages; stars, license and language come straight from the GitHub API. The model does not read the source code._

4,408 stars · 457 forks · C# · MIT

## Links

- GitHub: https://github.com/neuecc/MagicOnion
- Homepage: https://cysharp.github.io/MagicOnion/
- awesome-repositories: https://awesome-repositories.com/repository/neuecc-magiconion.md

## Description

MagicOnion is a remote procedure call framework for the .NET platform and Unity. It functions as a binary API protocol and real-time communication engine that uses shared interfaces to provide type-safe communication between clients and servers.

The framework distinguishes itself through its compatibility with ahead-of-time compilation environments, utilizing source generators for client proxies and serialization to support mobile and console platforms including those using IL2CPP. It provides a specialized middleware layer for Unity that handles engine-specific data types and ensures runtime compatibility.

The project covers a broad range of networking capabilities, including bidirectional data streaming, unary request-response cycles, and server-to-client push messaging. It includes built-in support for security through TLS encryption and JWT authentication, as well as stateful per-client session management and interceptor-based request filtering.

Diagnostic tools are available for monitoring communication status, tracking server performance metrics, and propagating server-side stack traces to clients for debugging.

## Tags

### Networking & Communication

- [Remote Procedure Call Frameworks](https://awesome-repositories.com/f/networking-communication/remote-procedure-call-frameworks.md) — Provides a high-performance binary RPC framework for invoking methods on remote services as if they were local. ([source](https://cysharp.github.io/MagicOnion/quickstart))
- [Remote Procedure Calls](https://awesome-repositories.com/f/networking-communication/remote-procedure-calls.md) — Implements a remote procedure call framework for executing functions on remote servers as if they were local.
- [Binary Communication Protocols](https://awesome-repositories.com/f/networking-communication/binary-communication-protocols.md) — Implements a high-performance binary transport protocol for efficient distributed system communication.
- [Server-Side Session State](https://awesome-repositories.com/f/networking-communication/client-state-management/server-side-session-state.md) — Maintains dedicated server-side service instances for each connection to preserve state across method calls. ([source](https://cysharp.github.io/MagicOnion/streaminghub/fundamentals))
- [Server-to-Client Event Emissions](https://awesome-repositories.com/f/networking-communication/communication-protocols-architectures/communication-paradigms/server-to-client-event-emissions.md) — Allows servers to push asynchronous messages to connected clients via a persistent connection to enable live updates. ([source](https://cysharp.github.io/MagicOnion/streaminghub/fundamentals))
- [Binary Serialization](https://awesome-repositories.com/f/networking-communication/data-compression/json-field-compression/binary-serialization.md) — Uses compact binary representations for efficient network transmission of complex objects.
- [Realtime Communication Protocols](https://awesome-repositories.com/f/networking-communication/realtime-communication-protocols.md) — Establishes persistent, bidirectional data exchange for broadcasting and state synchronization between server and clients.
- [Remote Method Invocation](https://awesome-repositories.com/f/networking-communication/remote-method-invocation.md) — Establishes communication channels to trigger functions on a remote device as if they were local asynchronous calls. ([source](https://cysharp.github.io/MagicOnion/quickstart-unity))
- [RPC Clients](https://awesome-repositories.com/f/networking-communication/rpc-clients.md) — Provides a client-side proxy for executing remote methods on a server across various .NET platforms. ([source](https://cysharp.github.io/MagicOnion/supported-platforms))
- [RPC Frameworks](https://awesome-repositories.com/f/networking-communication/rpc-frameworks.md) — Functions as a high-performance RPC framework for executing remote procedures across .NET network nodes.
- [RPC Servers](https://awesome-repositories.com/f/networking-communication/rpc-servers.md) — Hosts a remote procedure call service to process incoming requests from connected clients. ([source](https://cysharp.github.io/MagicOnion/supported-platforms))
- [RPC Service Implementations](https://awesome-repositories.com/f/networking-communication/rpc-service-implementations.md) — Implements business logic by inheriting from base classes and fulfilling shared interfaces to handle remote requests. ([source](https://cysharp.github.io/MagicOnion/quickstart-unity))
- [Schema-Driven RPC Implementations](https://awesome-repositories.com/f/networking-communication/schema-driven-rpc-implementations.md) — Implements remote procedure call services using shared interfaces as the formal protocol schema. ([source](https://cdn.jsdelivr.net/gh/neuecc/magiconion@main/README.md))
- [Bidirectional RPC Streaming](https://awesome-repositories.com/f/networking-communication/stream-multiplexers/bidirectional-stream-establishment/bidirectional-rpc-streaming.md) — Establishes continuous bidirectional connections to send and receive messages asynchronously. ([source](https://cysharp.github.io/MagicOnion/fundamentals/unary-or-streaminghub))
- [Broadcast Messaging](https://awesome-repositories.com/f/networking-communication/communication-platforms-services/messaging-notification-systems/messaging-services/message-broker-infrastructure/publish-subscribe-messaging/client-to-client-messaging/targeted-websocket-messaging/broadcast-messaging.md) — Enables sending single messages to groups of connected clients simultaneously to synchronize data. ([source](https://cysharp.github.io/MagicOnion/streaminghub/fundamentals))
- [Real-time Notification Broadcasters](https://awesome-repositories.com/f/networking-communication/communication-platforms-services/messaging-notification-systems/real-time-notification-broadcasters.md) — Pushes real-time alerts and asynchronous updates to users via persistent websocket connections. ([source](https://cysharp.github.io/MagicOnion/features))
- [Cross-Platform Networking](https://awesome-repositories.com/f/networking-communication/cross-platform-networking.md) — Provides a unified, portable communication layer for various .NET platforms.
- [Session State Persistence](https://awesome-repositories.com/f/networking-communication/persistent-tcp-connections/session-state-persistence.md) — Preserves a service instance and its associated state across multiple method calls during a persistent connection. ([source](https://cysharp.github.io/MagicOnion/fundamentals/lifecycle))
- [Real-Time State Broadcasting](https://awesome-repositories.com/f/networking-communication/real-time-state-broadcasting.md) — Streams internal application state changes to multiple external clients via persistent network connections. ([source](https://cysharp.github.io/MagicOnion/ja/))
- [Service Meshes](https://awesome-repositories.com/f/networking-communication/service-meshes.md) — Provides an infrastructure layer to manage service-to-service communication, security, and policy enforcement.

### Data & Databases

- [Complex Data Serialization](https://awesome-repositories.com/f/data-databases/complex-data-serialization.md) — Converts complex objects into a compact binary format for efficient network transmission. ([source](https://cysharp.github.io/MagicOnion/ko/))
- [Complex Data Type Exchange](https://awesome-repositories.com/f/data-databases/data-exchange-protocols/runtime-data-exchange/complex-data-type-exchange.md) — Exchanges high-level objects and native data types, such as Unity vectors, across different execution environments. ([source](https://cysharp.github.io/MagicOnion/installation/unity))

### Development Tools & Productivity

- [AOT-Compatible Networking Clients](https://awesome-repositories.com/f/development-tools-productivity/native-compilation/native-aot-compilation/aot-compatible-networking-clients.md) — Provides networking clients specifically designed to operate without dynamic reflection in AOT environments.

### Game Development

- [Unity Networking Integrations](https://awesome-repositories.com/f/game-development/unity-networking-integrations.md) — Provides a specialized communication layer for Unity with support for AOT compilation and engine-specific data types.

### Programming Languages & Runtimes

- [Ahead-Of-Time Compilation](https://awesome-repositories.com/f/programming-languages-runtimes/ahead-of-time-compilation.md) — Ensures the communication layer is compatible with ahead-of-time compilation for mobile and desktop platforms. ([source](https://cysharp.github.io/MagicOnion/installation/unity))

### Software Engineering & Architecture

- [Fullstack Type Sharing](https://awesome-repositories.com/f/software-engineering-architecture/fullstack-type-sharing.md) — Shares type definitions between client and server to ensure end-to-end type safety. ([source](https://cysharp.github.io/MagicOnion/quickstart-unity))
- [Interface Contracts](https://awesome-repositories.com/f/software-engineering-architecture/interface-contracts.md) — Uses shared interface contracts to ensure consistent type-safe communication across application boundaries.
- [Request-Response Exchanges](https://awesome-repositories.com/f/software-engineering-architecture/request-response-exchanges.md) — Implements synchronous remote procedure calls that treat each request as a single transaction over a network connection. ([source](https://cysharp.github.io/MagicOnion/unary/fundamentals))
- [Shared API Contract Libraries](https://awesome-repositories.com/f/software-engineering-architecture/shared-library-integrations/shared-api-contract-libraries.md) — Utilizes a shared library of interfaces and data types to maintain consistent communication contracts. ([source](https://cysharp.github.io/MagicOnion/fundamentals/project-structure))
- [AOT Proxy Generators](https://awesome-repositories.com/f/software-engineering-architecture/typescript-type-definitions/generated-client-proxies/aot-proxy-generators.md) — Produces client-side proxy code during compilation to remove runtime reflection and support AOT platforms.
- [Unary RPC Execution](https://awesome-repositories.com/f/software-engineering-architecture/unary-rpc-execution.md) — Implements standard request-response remote procedure call patterns for simple interactions. ([source](https://cysharp.github.io/MagicOnion/fundamentals/unary-or-streaminghub))
- [Request Interceptors](https://awesome-repositories.com/f/software-engineering-architecture/request-interceptors.md) — Provides a request interceptor pipeline to handle cross-cutting concerns like authentication and global exceptions.
- [Stateful Service Instances](https://awesome-repositories.com/f/software-engineering-architecture/stateful-service-instances.md) — Maintains dedicated server-side service instances for each connection to preserve user state across multiple calls.

### Web Development

- [Type-Safe Client Generators](https://awesome-repositories.com/f/web-development/api-client-generators/type-safe-client-generators.md) — Generates type-safe client proxy code during compilation to ensure consistency between server interfaces and client calls. ([source](https://cysharp.github.io/MagicOnion/source-generator/client))
- [Interface-Based Definitions](https://awesome-repositories.com/f/web-development/api-endpoint-definitions/single-class-endpoint-definitions/class-based-rpc-definitions/interface-based-definitions.md) — Uses shared interfaces to define service contracts and generate transparent client proxies for type-safe communication. ([source](https://cysharp.github.io/MagicOnion/features))
- [AOT-Compatible Unity Serializers](https://awesome-repositories.com/f/web-development/cross-platform-development/game-development-frameworks/unity-game-development-toolkits/unity-serialization-libraries/aot-compatible-unity-serializers.md) — Provides a communication layer with AOT-compatible serialization for Unity native data types.
- [Real-Time Communication](https://awesome-repositories.com/f/web-development/real-time-communication.md) — Implements persistent, bidirectional data streaming between clients and servers for live updates and interactive messaging. ([source](https://cysharp.github.io/MagicOnion/ko/))
- [Real-Time Data Streaming](https://awesome-repositories.com/f/web-development/real-time-data-streaming.md) — Provides utilities for pushing live server-side data updates to connected clients via bidirectional streams. ([source](https://cdn.jsdelivr.net/gh/neuecc/magiconion@main/README.md))
- [Bidirectional Streams](https://awesome-repositories.com/f/web-development/real-time-data-streaming/bidirectional-streams.md) — Implements full-duplex message exchange patterns for simultaneous client-to-server and server-to-client streaming.
- [Message Ordering](https://awesome-repositories.com/f/web-development/websockets/message-ordering.md) — Guarantees the sequential processing of remote method calls arriving from a single connection.

### Artificial Intelligence & ML

- [Request and Response Interception](https://awesome-repositories.com/f/artificial-intelligence-ml/grpc-call-interception/request-and-response-interception.md) — Executes custom logic pipelines before and after service method calls to handle global processing and exceptions. ([source](https://cysharp.github.io/MagicOnion/filter/fundamentals))

### Security & Cryptography

- [Bearer Token Attachments](https://awesome-repositories.com/f/security-cryptography/bearer-token-attachments.md) — Adds security tokens and custom metadata to client request headers to authenticate identity. ([source](https://cysharp.github.io/MagicOnion/fundamentals/authentication))
- [Role-Based Access Control](https://awesome-repositories.com/f/security-cryptography/governance-policy-frameworks/compliance-governance/security-and-compliance/security-and-threat-mitigations/system-access-restrictions/role-based-access-control.md) — Restricts access to specific classes or methods based on assigned user roles. ([source](https://cysharp.github.io/MagicOnion/fundamentals/authentication))
- [JWT Authentication](https://awesome-repositories.com/f/security-cryptography/jwt-authentication.md) — Validates signed JSON Web Tokens in request headers to identify users via the web context. ([source](https://cysharp.github.io/MagicOnion/fundamentals/authentication))
- [Request Filter Integrations](https://awesome-repositories.com/f/security-cryptography/request-authentication/request-filter-integrations.md) — Inspects request headers using custom filters to implement security checks and API key validation. ([source](https://cysharp.github.io/MagicOnion/fundamentals/authentication))
- [Secure Network Communication](https://awesome-repositories.com/f/security-cryptography/secure-network-communication.md) — Secures network services using TLS encryption, JWT authentication, and role-based access control.
- [TLS Traffic Encryption](https://awesome-repositories.com/f/security-cryptography/tls-traffic-encryption.md) — Encrypts communication channels between clients and servers using SSL/TLS encryption. ([source](https://cysharp.github.io/MagicOnion/fundamentals/https))

### System Administration & Monitoring

- [Sequential Request Processing](https://awesome-repositories.com/f/system-administration-monitoring/background-job-queues/offline-request-queues/optimistic-offline-queues/redux-action-queues/sequential-request-processing.md) — Processes method calls from a single client in the exact order they were sent to prevent race conditions. ([source](https://cysharp.github.io/MagicOnion/streaminghub/fundamentals))
- [Server Metrics](https://awesome-repositories.com/f/system-administration-monitoring/monitoring-and-observability/observability-platforms/metric-performance-monitors/server-metrics.md) — Exposes real-time server health metrics including connection counts, method durations, and exception rates. ([source](https://cysharp.github.io/MagicOnion/fundamentals/metrics))

### Part of an Awesome List

- [Application Frameworks](https://awesome-repositories.com/f/awesome-lists/devtools/application-frameworks.md) — gRPC-based streaming RPC framework.
- [Dotnet Frameworks](https://awesome-repositories.com/f/awesome-lists/devtools/dotnet-frameworks.md) — Streaming framework for .NET and Unity.
- [Networking Libraries](https://awesome-repositories.com/f/awesome-lists/devtools/networking-libraries.md) — gRPC-based RPC framework.
