It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How does Synchrony know about changes in the editor?

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!

2 answers

1 vote

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.

Do this:

  1. Open the Confluence editor
  2. Open the Developer Tools view in your browser and switch to the Network tab
  3. Start editing

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...

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published yesterday in Confluence

Confluence CVEs and common questions

Two vulnerabilities have been published for Confluence Server and Data Center recently: March 20, 2019 CVE-2019-3395 / CVE-2019-3396 April 17, 2019 CVE-2019-3398 The goal of this article is...

44 views 0 9
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you