Bug 839100 - RFE: Topic Changed Notification queue
Summary: RFE: Topic Changed Notification queue
Keywords:
Status: NEW
Alias: None
Product: PressGang CCMS
Classification: Community
Component: Web-UI
Version: 1.x
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Nobody
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 839120
TreeView+ depends on / blocked
 
Reported: 2012-07-10 23:14 UTC by Joshua Wulf
Modified: 2023-02-21 23:19 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description Joshua Wulf 2012-07-10 23:14:38 UTC
Requesting a queue that provides notification of change events to topics.

Maybe a set of generic queues for different events like "changed", "published"; more sophisticated would be the ability to subscribe to a queue and inform the server what the consumer is interested in: I'm interested in changes to these topics and this content spec.

To be used to dynamically render a book in the browser and update it when changes are made to the topics in the book, during writing.

Comment 1 Joshua Wulf 2012-07-11 02:48:38 UTC
This would be really good:

"I'm interested in content spec ID X"

So the queue that I get informs me when the content spec changes, or any of the topics in the spec change.

Comment 2 Matthew Casperson 2012-12-03 21:37:51 UTC
You can almost do this now.

http://skynet.usersys.redhat.com:8080/TopicIndex/seam/resource/rest/1/topics/get/atom/query will return an atom feed against a standard query. 

So http://skynet.usersys.redhat.com:8080/TopicIndex/seam/resource/rest/1/topics/get/atom/query;topicEditedInLastDays=7;topicIncludedInSpec=10074 will return topics that belong to csp 10074 edited in the last 7 days.

Comment 3 Matthew Casperson 2013-03-06 21:13:19 UTC
Use the report at http://skynet.usersys.redhat.com:8080/birt/frameset?__report=General/Table_Topic_Revisions.rptdesign

This report shows you topics changed within a Content Spec, optionally over a specific time period.

Comment 4 Joshua Wulf 2013-04-13 14:01:43 UTC
On the Death Star I'm using streams to do this. It's kind of a poor man's pub-sub messaging system, inspired by my work on MRG.

Each Content Spec checked out on the Death Star has a stream subscribed:
https://github.com/jwulf/node-deathstar/blob/master/lib/livePatch.js#L27

Whenever a book is built, it is scanned and a map is made of the topics in the Content Spec.
https://github.com/jwulf/node-deathstar/blob/master/lib/livePatch.js#L71

Each topic gets a list of Content Specs that include it.

When a topic is saved via the Death Star, the 'Star looks up the Content Specs that include that topic, 
https://github.com/jwulf/node-deathstar/blob/master/lib/livePatch.js#L71

Then (a) updates the built HTML of dependent books on the 'Star, and (b) sends a websocket notification to the books that use this topic via their livePatch streams.
https://github.com/jwulf/node-deathstar/blob/master/lib/livePatch.js#L162

When a book is opened in a browser, it subscribes to its notification stream on the 'Star. The web socket between the book and the 'Star is hooked up to the livePatch stream for the book on the 'Star.

https://github.com/jwulf/node-deathstar/blob/master/routes/sockethandler.js#L26
https://github.com/jwulf/publican-deathstar/blob/master/en-US/scripts/deathstar.js#L32

That's the patch stream for patching books live in the browser, no rebuilding, no reloading needed.


Note You need to log in before you can comment on or make changes to this bug.