📄️ Middleware
Middleware provides a powerful way to intercept and process network data as it flows through NetRay. You can use it for logging, validation, rate limiting, data transformation, or even blocking events/requests based on custom logic.
📄️ Type Checking
NetRay includes an optional, built-in type checking system to help ensure the integrity of data sent over the network. By defining the expected structure and types for your events and requests, NetRay can automatically validate incoming payloads, catching potential errors early.
📄️ Circuit Breakers
The Circuit Breaker pattern is a crucial technique for building resilient networked systems. It prevents an application from repeatedly trying to execute an operation that's likely to fail, especially due to downstream service unavailability or errors. NetRay integrates Circuit Breakers to automatically manage the health of event/request endpoints.
📄️ Event Priorities
NetRay allows you to assign priorities to events (RegisterEvent), influencing the order in which they are processed on the receiving client. This helps ensure that critical updates are handled promptly, even under high network load, while less important events (like background logging) can be deferred slightly.
📄️ Optimizations (Batching & Compression)
NetRay incorporates automatic optimizations to improve network efficiency, primarily managed by the internal DynamicSender module.