Skip to content
bitzorcas
EN

Concept

Realtime

Planned realtime communication — IChatRealtimeAdapter port with Null default, SignalR/WebSocket adapter roadmap for live chat and notifications.

Last updated

BitzOrcas defines the IChatRealtimeAdapter port for realtime communication but uses NullChatRealtimeAdapter (no-op) as the default. Realtime features are not yet implemented.

Current state

public interface IChatRealtimeAdapter
{
Task MessageCreatedAsync(ChatMessage message, CancellationToken ct);
Task MessageEditedAsync(ChatMessage message, CancellationToken ct);
Task MemberJoinedAsync(ChatMember member, CancellationToken ct);
}
// Default: no-op
public class NullChatRealtimeAdapter : IChatRealtimeAdapter
{
public Task MessageCreatedAsync(...) => Task.CompletedTask;
public Task MessageEditedAsync(...) => Task.CompletedTask;
public Task MemberJoinedAsync(...) => Task.CompletedTask;
}

Messages are persisted and queryable via API — they’re just not pushed in realtime.

Planned implementations

TechnologyUse case
SignalRLive chat message push, typing indicators
Server-Sent EventsNotification inbox updates
WebSocketCustom realtime features

Architecture (planned)

ChatService
IChatRealtimeAdapter
├── SignalR ChatHub (planned)
├── SSE NotificationStream (planned)
└── WebSocket CustomChannel (planned)

Integration considerations

  • Realtime adapters will need connection management and tenant isolation
  • Authentication tokens must be validated for WebSocket/SSE connections
  • Backpressure handling for high-volume channels
  • Fallback to polling for environments without WebSocket support

See also