Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

watchers: use singleton server #8546

Merged
merged 1 commit into from Oct 19, 2020
Merged

Commits on Oct 15, 2020

  1. watchers: use singleton server

    Theia spawns as many nsfw servers as there are clients, maybe more.
    
    This commit replaces this behaviour by centralizing everything into the
    same service process in order to optimize resources (watch handles are a
    limited resource on a given Linux host).
    
    Some notes on the current design:
    
    - Everytime someone requests to watch an `(uri, options)` couple we will
    re-use the same watch handle (and actual nsfw instance). This allows for
    resource allocation optimizations.
    - Since a given service can only serve a single client, I added an event
    dispatcher named `FileSystemWatcherServiceDispatcher`. You must register
    yourself with some unique id you will use to make requests.
    - The new `.watchUriChanges` function now takes a `clientId` so that
    when events are sent to the dispatcher it then gets routed back to your
    own client.
    - Added a `--nsfw-watcher-verbose` backend argument to enable verbose
    logging for the watcher server.
    
    Signed-off-by: Paul Maréchal <paul.marechal@ericsson.com>
    paul-marechal committed Oct 15, 2020
    Configuration menu
    Copy the full SHA
    495f303 View commit details
    Browse the repository at this point in the history