Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How does Synchrony know about changes in the editor?

Claudio Kirchhoff November 27, 2016

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

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

1 vote
Aron Gombas _Midori_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 27, 2016

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

0 votes
Claudio Kirchhoff November 27, 2016

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

Aron Gombas _Midori_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 27, 2016

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.

 

 

Claudio Kirchhoff November 28, 2016

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

TAGS
AUG Leaders

Atlassian Community Events