MODULE 05 · LESSON 5.1
Design a chat client that cannot access Orleans directly
Connect an Android app to agents without joining their Orleans cluster.
Lesson 21 of 86 · FabrCore 2.0
Overview
The mobile app talks HTTPS/WSS to FabrCore Host. The Host reaches the private cluster. This removes Orleans membership, storage credentials and silo ports from the client's deployment. Build OperationsDesk.ChatClient as a .NET MAUI app targeting Android; keep its connection service independent of the UI.
The phone is outside the cluster
The MAUI application knows the public HTTPS/WSS address and its authenticated account. It does not join Orleans, read membership tables or hold storage connection strings. The Host translates external requests into private runtime operations. This separation allows a second frontend to use the same agents without sharing server deployment details.
Keep networking out of the page
Build a connection service that can be tested independently of Android controls. The page/view model consumes application messages and connection state from that service. On an emulator, localhost is the emulator itself, not your development PC. Configure a device-reachable endpoint and appropriate HTTPS trust instead of copying a workstation loopback URL into the phone.
Create the remote client project
Download the Operations Desk source. The README lists project setup, package prerequisites and local ports.
- Install the MAUI Android workload and create a MAUI project. Add the matching FabrCore.Client.WebSocket package; keep host/provider packages out of the mobile project.
- Choose a reachable HostUri. On an Android emulator, localhost refers to the emulator, not your workstation; use the emulator's host bridge or a trusted development endpoint.
- Provision an authorized assistant through trusted application/HTTP code. The mobile app connects to that instance rather than creating arbitrary agents through WebSocket.
dotnet workload install maui
dotnet new maui -n OperationsDesk.ChatClient
dotnet add OperationsDesk.ChatClient package FabrCore.Client.WebSocket --version 2.0.0
# Build in a MAUI-capable development environment with the Android SDK installed.
dotnet build OperationsDesk.ChatClient -f net10.0-android
Verify the deployment boundary
- Create the MAUI project and identify the service that owns the Host URL. The UI should depend on that service rather than Orleans grain references.
- From the emulator/device, verify reachability of your intended Host endpoint before implementing chat. A workstation browser reaching localhost does not establish mobile reachability.
- Inspect the client configuration and dependencies. No cluster membership ports, SQL credentials or Cloud Server administration key should be required to send a user chat message.
The goal here is a reachable, independently deployable client boundary. Authentication and the ticket handshake are configured in the next lesson.
If the result is different
Verify Android network permission, DNS and certificate trust before diagnosing agent code. Package target compatibility and device behavior require an Android build/device test.
Go deeper
Explore the related documentation.