I am currently trying to understand how synchrony enables collaborative editing in confluence. I believe I got the big picture, but there's one specific thing I don't understand yet: Obviously, when I edit a page in the browser, Synchrony needs to be notified whenever I make any change in the editor. How does that work?
I have the Confluence source code available and I'm trying to find the piece of code that does just that, but somehow I haven't been able to track it down. Can someone give me a pointer to what I have to look out for? I reckon there must be some ajax request to the Synchrony server - is that right? Does someone know in which source code file that happens? Thanks in advance for any helpful answers!
Community moderators have prevented the ability to post new answers.
I checked this myself, and figured out that Synchrony's source code is not available in the Confluence source download. The Confluence source zip includes the core application (and maybe some add-on source code), but definitely not everything.
(And yes, the changes are synchronized by sending small AJAX requests from every open editor, merging their results and returning the "deltas" to each client.)
Hi Aron, thanks for answering! The good thing is, it's precisely those small AJAX requests that I'm interested in. However I just haven't been able to recognize them in the code. Or maybe I just looked in the wrong places. If you happen to know in which file(s) the requests are sent, I'd love to hear about it.
Cheers
Claudio
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I don't know the precise answer, but I do know how to get that.
Do this:
This will show all network traffic (requests and responses) between your browser and Confluence (Synchrony). Now you will which URL the requests are sent to, so you can search for that URL throughout the Confluence source.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the hint! It appears, though, the updates are sent using websockets. Yet I still haven't been able to track down the code were these messages are sent and I'm running out of terms to grep for... so if anyone has an idea: I'm still open to suggestions.
I also realize my answer should have been a comment...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.