[ 
https://issues.apache.org/jira/browse/ISIS-2102?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16786508#comment-16786508
 ] 

Jörg Rade commented on ISIS-2102:
---------------------------------

 Hi Andi,
thanks for the links. IIUC the (JS) client could  use EventSource 
(https://www.html5rocks.com/en/tutorials/eventsource/basics/).
Actually I've been contemplating about something like this for some time ;- 
(https://www.javaworld.com/article/2076063/pushlets--send-events-from-servlets-to-dhtml-client-browsers.html,
 https://github.com/joerg-rade/roViz, #Next.last)

Restricting this new feature to ViewModels would require to wrapp every 
DomainObject, right?
Although VM's are beneficial for isolating the DomainObjects, are there other 
reasons for this restriction?

My use case is as follows: 
* the client issues XmlHttpRequests (XHR) against the Rest API
* sends a subscription request to the server e.g. server.subscribe(String oid)
* receives update notifications when the object identified by oid changes
* the client decides to issue another XHR to update it's copy of the object

There is one drawback though - the server won't be stateless anymore.
A workaround could be: client keeps a list of it's subscriptions and renews 
them once it detects a failure in communication.
I'm not quite sure how this would affect horizontal scaling on the server side.

Could such a scenario be supported by the current design?

-j

> Support for Server Sent Events (SSE)
> ------------------------------------
>
>                 Key: ISIS-2102
>                 URL: https://issues.apache.org/jira/browse/ISIS-2102
>             Project: Isis
>          Issue Type: New Feature
>          Components: Core: Viewer: Wicket
>            Reporter: Andi Huber
>            Assignee: Andi Huber
>            Priority: Major
>             Fix For: 2.0.0-M3
>
>
> We allow a ViewModel to subscribe to a server-side EventStream in order to 
> receive updates, until the EventStream gets closed.
> Use-case: Allows for Background-Tasks to fire UI-Events that update a 
> client-side progress-bar.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to