Skip to content

Instantly share code, notes, and snippets.

@fjodorver
Last active May 25, 2017 12:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fjodorver/b5dcfe291bebaea8f8f76fe31220177d to your computer and use it in GitHub Desktop.
Save fjodorver/b5dcfe291bebaea8f8f76fe31220177d to your computer and use it in GitHub Desktop.
GSoC final evolution 2016 eclipse flux

Implement file system support in Eclipse Flux

Abstract

Add support of filesystem based synchronization in Eclipse Flux

Introduction

Eclipse Flux[1] is an experimental platform created in order to provide integration between web-based cloud applications and desktop based IDE (Eclipse). Platform is based on event driven architecture, and this approach gives a lot of flexibility. It looks like this approach can be applied for whole Eclipse ecosystem, giving ability to create and use cloud based services, such as code validation, suggestion, etc. Cloud services can be constructed using this technology in language/environment agnostic way.

Implementation

We have integrated flux-file-watcher[2] library into Eclipse flux plugin. This library uses Java Nio for file system events observation, so it can provide ability to keep in sync bunch of workspaces and also gives access to resources outside Eclipse workbench.

In order to decouple flux-file-watcher code from Eclipse flux plugin, especially from Eclipse project resource API, adapter has been created. It redirects calls from Eclipse project resource API to flux-file-watcher. Obsolete code required for interaction with flux was removed from flux-file-watcher library, because it can interact with flux core directly. Code and logic duplication was removed, so we are using the same code for constructing, sending and receiving messages everywhere.

Some bugs were fixed during getting all things working and a lot of code has been refactored. For example, handling different timestamp implementation in JVM, inotify events handling, etc.

To sum up, we had implemented mechanism, which can handle file system based resource changes. It gives ability to work on filesystem based projects, not only Eclipse ones.

Results

I had prepared pull request with all my changes[3]. eclipse-archived/flux#22

What to do next?

It would be nice to have UUID based mechanism that detects changes among synced flux clients. Currently, timestamp is used, which is very raw solution. I have a plan to continue working on this after Google Summer of Code.

Links

  1. http://www.eclipse.org/flux/
  2. https://github.com/Serli/flux-file-watcher
  3. eclipse-archived/flux#22
  4. https://bugs.eclipse.org/bugs/show_bug.cgi?id=443533
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment