Skip to content

Chat Framework#81

Draft
jazzz wants to merge 10 commits intomasterfrom
jazzz/chat_framework
Draft

Chat Framework#81
jazzz wants to merge 10 commits intomasterfrom
jazzz/chat_framework

Conversation

@jazzz
Copy link
Contributor

@jazzz jazzz commented Sep 22, 2025

This PR introduces a specification which describes a modular framework for describing Chat protocols.

This provides context on where chat specifications fit in the larger picture, while providing a template for implementation specific specifications. The component model introduced is used to define the boundaries of the other chat protocols and describe how they integrate.

Copy link

@igor-sirotin igor-sirotin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just dust for now, will leave actual comments next part.

jazzz and others added 7 commits February 5, 2026 17:13
Co-authored-by: Igor Sirotin <igor.sirotin.1012@gmail.com>
Co-authored-by: Igor Sirotin <igor.sirotin.1012@gmail.com>
Co-authored-by: Igor Sirotin <igor.sirotin.1012@gmail.com>
Co-authored-by: Igor Sirotin <igor.sirotin.1012@gmail.com>
Co-authored-by: Igor Sirotin <igor.sirotin.1012@gmail.com>
Co-authored-by: Igor Sirotin <igor.sirotin.1012@gmail.com>

A Delivery Service (DS) is the service or method that distributes payloads to clients. A DS accepts payloads with a delivery_address and delivers them to all subscribers of that delivery_address. Protocols use delivery_addresses to establish delivery contracts between senders and recipients. The mapping of delivery_addresses to DS-level concepts is implementation-specific.

#### Requirements
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The DS requirements as stated are quite minimal, that's fine for an abstract framework. However, it may be worth considering whether the following aspects should be mentioned:

  • Rate-limiting
  • Message size constraints
  • Offline message retrieval

Copy link

@igor-sirotin igor-sirotin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I'm happy with it as it is, but left some minor comments where I think it could be improved


Chat protocols specifications can be long and dense documents. To fully describe a chat protocol there are many layers and operations which are required to be documented. This includes payloads, message transport, encryption as well as user level features such as account registration, typing indicators, content formatting.

With the vast amount of information required to maintain compatibility between applications - protocol documentation is either comprehensive which leads to large monolithic specifications or lacking the required details for interop between implementors.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Either <...> or <...>. Which way are we choosing? 😄
The paragraph finishes here, but it sounds like our choice/solution is missing

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a great feedback point.

I was following the paradigm that "Background" describes the problem, "Theory" outlines the proposed solution. Clearly the Problem/Solution relationship is not clear.

I'll rework it in another PR

- A Conversation protocol SHOULD describe bidirectional communication.
- A Conversation protocol ...

## Copyright

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
## Copyright
# Copyright

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is from the Logos-Messaging Specs template. Suggest you push a PR there if we are suggesting a change.

https://raw.githubusercontent.com/logos-messaging/specs/refs/heads/master/template.md


Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/).

## References

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
## References
# References

Comment on lines +26 to +37
The chat protocol is decomposed into 3 distinct phases.

- **Discovery:** How does a Sender learn of other clients.
- **Initialization:** How does a Recipient learn a client wants to communicate with them.
- **Operation:** How do participants exchange content.

and transport details are divided into:

- **Delivery Service:** How are payloads routed and delivered to a client.
- **Framing Strategy:** How are payloads encoded.

Defining these 5 parameters allows for chat protocol implementations to be fully defined, which allows clients from different applications to exchange messages.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What confuses me here is how we juggle with these terms to describe the same thing: components, phases, problem areas, parameters. I'm not sure how would I re-write this. I still get the content, it just feels a bit bumpy while reading.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The lifecycle of a protocol instance is divided into three phases, which are described by a corresponding protocol.
- **Discovery Phase:** Discovery Protocol
- **Initialization Phase:** Initialization Protocol
- **Operation Phase:** Conversation Protocol

Here we say "phases of protocol lifecycle", this makes more sense to me than "phases of protocol".

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Absolutely. Let me think it over.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants