Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 451383

Summary: [server] Orion server should have a file change notification service
Product: [ECD] Orion Reporter: Anthony Hunter <ahunter.eclipse>
Component: ServerAssignee: Anthony Hunter <ahunter.eclipse>
Status: RESOLVED INVALID QA Contact:
Severity: enhancement    
Priority: P3    
Version: unspecified   
Target Milestone: 8.0   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Anthony Hunter CLA 2014-11-13 13:08:36 EST
Currently the Orion server has an event service that would allow you to take advantage of an MQTT server to publish change events. A client does not want to use an external messaging server for some change events however and would like the server will notify an interested listener on create, update and delete events for both files and directories in the serverworkspace.
Comment 1 Anthony Hunter CLA 2014-11-13 13:26:12 EST
I have added an implementation for a IFileChangeNotificationService

I took advantage of the apache commons io file monitoring feature but upon further review this will not work. If we have two HA servers running on a common server workspace the two servers will each send duplicate events on the other servers file changes.

We want each server to send the events based on their own actions independent of each other.

I pushed anyway to branch ah-Bug451383 to at least let the client review the API:
http://git.eclipse.org/c/orion/org.eclipse.orion.server.git/commit/?h=ah-Bug451383&id=c64c627de10d5ae7d63ce7f27281f2bab49cedc8
Comment 2 Anthony Hunter CLA 2014-11-25 15:01:14 EST
(In reply to Anthony Hunter from comment #1)
> I have added an implementation for a IFileChangeNotificationService
> 
> I pushed anyway to branch ah-Bug451383 to at least let the client review the
> API:
> http://git.eclipse.org/c/orion/org.eclipse.orion.server.git/commit/?h=ah-
> Bug451383&id=c64c627de10d5ae7d63ce7f27281f2bab49cedc8

The only requested change to the API is that the client be notified of the path of the change as well as the project that contains the change.

i.e.
public void fileCreated(IFileStore file, ProjectInfo projectInfo);

This is fixed in commit:
http://git.eclipse.org/c/orion/org.eclipse.orion.server.git/commit/?id=8d59fae89bd5f0e9b65b9668ce21b37a72f738ea

The changes are now in master.
Comment 3 Anthony Hunter CLA 2014-11-26 11:15:29 EST
The monitor interval was changed from the default ten seconds to one second with commit:
http://git.eclipse.org/c/orion/org.eclipse.orion.server.git/commit/?id=f8ded2bfbda49832743a2bc78e541fbac47b2d9e
Comment 4 Anthony Hunter CLA 2014-12-09 15:12:54 EST
(In reply to Anthony Hunter from comment #3)
> The monitor interval was changed from the default ten seconds to one second

Testing of the IFileChangeNotificationService introduced revealed that the apache commons io file monitoring feature will not work.

IFileChangeNotificationService is removed with the commits in Bug 454643.