Engineering guides / Realtime communication and P2P engineering
By Arte Soft engineering · 24 October 2026
P2P chat app development: direct transport does not replace message delivery
Direct connections can carry chat data, but a messaging product still has to reach people who are offline or behind restrictive networks. Decide what P2P is responsible for before making it the entire product architecture.
Separate a live channel from a durable inbox
A data channel connects active peers; it does not by itself provide a mailbox for an unavailable recipient. Decide whether messages wait on a server, remain queued on the sender or use another delivery service. Specify what “sent,” “delivered” and “read” mean. These states should reflect evidence rather than optimism, especially when the sender closes the app immediately after pressing send.
Define identity independently from transport
Users need to know whom they are talking to before trusting a direct connection. Plan account or device identity, contact discovery and device changes. Authentication belongs in signaling and application messages, not just in an IP address. If messages are encrypted end to end, key verification, recovery and multi-device support become explicit product work rather than an automatic consequence of using WebRTC.
Design attachments as resumable work
A large file transfer can outlast a stable connection. Agree on chunking, integrity checking, resume behavior and local storage limits. Show progress and cancellation, and define whether an interrupted transfer can continue through relay or server storage. A file picker and a data channel demo are not enough to establish that users can exchange media reliably between mobile networks.
Keep fallback visible in the architecture
Some peer combinations will require relay, and mobile operating systems limit background execution. Test the states in which direct transport is attempted and when another delivery route is used. Do not present a measured connection result from one device group as a universal percentage. Record the population and conditions behind any direct-versus-relayed figure you later use in a business case.
Accept against user-visible outcomes
Test delayed delivery, duplicate submissions, reconnects, device restart and an attachment interrupted near completion. Check ordering and the handling of withdrawn or deleted messages where supported. Acceptance should include both participants and show whether state converges after disconnection. Logs need enough identifiers for diagnosis without casually collecting conversation content or exposing sensitive network details to unrelated parties.
Messaging delivery examples
- Send while the recipient is offline, close the sender and state exactly which component remains responsible for eventual delivery.
- Interrupt a large attachment, reconnect on another network and verify integrity before displaying completion to both participants.
- Compare message state after a duplicate send and a device restart, including whether ordering and read indicators still reflect the defined product contract.
Frame research and production separately
Arte Soft’s Wonek work is communication engineering R&D; it should not be confused with the separately published Wonek Video Studio product. GPT Realtime Assistant provides a published realtime application reference, but your chat product requires its own delivery guarantees. A feasibility engagement should leave you with a transport strategy, fallback rules and an explicit list of messaging features that still require durable backend behavior before launch.
Relevant Arte Soft work
Wonek — communication engineering R&D, not a shipped or audited messaging product is our own product or engineering project. It provides context for the work we discuss here; it is not a claim of identical results for every client deployment.
Sources and further reading
Need help with P2P messaging feasibility?
Send the current app, system or brief, the behaviour you need and your constraints. We can agree a discovery, implementation or repair scope with concrete acceptance criteria.
Discuss this with Arte Soft