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!
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.
I don't know the precise answer, but I do know how to get that.
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.
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...
Hi Everyone! My name is Mina and I am on Atlassian’s Ecosystems Marketing team. Our team is focused on our technology partnerships and marketplace apps. One of Atlassian’s partners is Slack, who ...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events