You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@james.apache.org by GitBox <gi...@apache.org> on 2021/01/26 16:35:31 UTC

[GitHub] [james-project] chibenwa commented on a change in pull request #287: [ADR] JMAP PUSH over WebSockets

chibenwa commented on a change in pull request #287:
URL: https://github.com/apache/james-project/pull/287#discussion_r564655747



##########
File path: src/adr/0047-jmap-push-over-websockets.md
##########
@@ -0,0 +1,71 @@
+# 47. JMAP PUSH over WebSockets
+
+Date: 2021-01-26
+
+## Status
+
+Accepted (lazy consensus).
+
+Relates to [45. Support JMAP Push with Mailbox/changes implementation](0045-support-jmap-push-with-mailbox-changes-implementation.md)
+
+Requires [46. Generalize EventBus](0046-generalize-event-bus.md)
+
+## Context
+
+JMAP Push notifications allow clients to efficiently update (almost) instantly to stay in sync with data changes on the server. 
+
+In order to support this, we need to have the server emit newests state changes to the client over a PUSH channel.
+
+## Decision
+
+We will implement [RFC-8887 - A JSON Meta Application Protocol (JMAP) Subprotocol for WebSocket](https://tools.ietf.org/html/rfc8887) 
+as a transport mechanism for PUSH notifications.
+
+We will [generalize EventBus](0046-generalize-event-bus.md) in order to achieve an out-of-the box Publish-Subscribe 
+system for JMAP related events, that do not fit in the mailbox API.
+
+We will implement listeners registered on the JMAP event bus for WebSocket clients in order to carry over state changes
+to the client.
+
+## Consequences
+
+We expect clients using the PUSH to lead to a drastic performance enhancement, as less data needs to be transmitted upon
+resynchronisation.
+
+As mentioned in RFC-8887 the usage of webSockets allows other performance optimizations:
+ - Requests can easily be compressed, which is not doable over HTTP for most available implementation (HTTP request 
+compression is not ubiquitous).
+ - WebSockets being connected, authentication can be performed once, when establishing the connection. This can allow to
+reduce the load, if needed, on authentication systems. It might ease the use for instance of custom OpenId connect 
+providers.
+
+People deploying JMAP need to be aware that load-balancing webSockets requires session stickiness.

Review comment:
       There is a ping/pong mechanism to keep the connection alive.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org