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

Bump guava from 27.1-jre to 29.0-jre in /examples/org.eclipse.glsp.example.workflow #120

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Aug 3, 2021

Bumps guava from 27.1-jre to 29.0-jre.

Release notes

Sourced from guava's releases.

29.0

Maven

<dependency>
  <groupId>com.google.guava</groupId>
  <artifactId>guava</artifactId>
  <version>29.0-jre</version>
  <!-- or, for Android: -->
  <version>29.0-android</version>
</dependency>

Javadoc

JDiff

Changelog

  • Guava types can no longer be sent over GWT-RPC. To temporarily reenable support, set the guava.gwt.emergency_reenable_rpc system property to true. (5214a10b1e)
    • This is the only breaking change in this release, and it affects only users of the guava-gwt artifact, not people who use only the guava artifact. This release contains no changes that break binary compatibility for any users.
  • API documentation for Guava classes is now easier to reach. For example, for ImmutableList, visit guava.dev/ImmutableList. Also, more easily access the index at guava.dev/api.
  • collect: Annotated FluentIterable.from(FluentIterable) with @DoNotCall. (b1c77b7df3)
  • collect: Made ceiling, floor, headSet(E, boolean), and tailSet(E, boolean) methods available in the GWT-emulated ImmutableSortedSet. (7e0fe90ca8, 5f2fbf27b2)
  • graph: Made it possible to set a stable incident edge order by calling the newly added method [Value]Graph.Builder.incidentEdgeOrder(ElementOrder.stable()). (70164025a8)
  • graph: Added incidentEdgeOrder() to the [Value]Graph interfaces. (cde576ec00)
  • util.concurrent: Added Duration-based default methods to ListeningScheduledExecutorService. (931e83f969)
  • util.concurrent: Added immediateVoidFuture. (9f3bae5853)
  • util.concurrent: Removed @Beta from Service and related classes. (dc46627fea)
  • util.concurrent: Deprecated the 1-arg overload of ServiceManager.addListener. (86e3620125)
  • util.concurrent: Changed the return type of ServiceManager.servicesByState() to ImmutableSetMultimap (but also retained a method with the old signature for binary compatibility). (31999ae6f5)
  • util.concurrent: Made it safe to load the AbstractFuture class from a ForkJoinPool thread under a security manager. (6e0c5b5d50)

28.2

Maven

<dependency>
  <groupId>com.google.guava</groupId>
  <artifactId>guava</artifactId>
  <version>28.2-jre</version>
  <!-- or, for Android: -->
  <version>28.2-android</version>
</tr></table> 

... (truncated)

Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
  • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
  • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
  • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

You can disable automated security fix PRs for this repo from the Security Alerts page.

Bumps [guava](https://github.com/google/guava) from 27.1-jre to 29.0-jre.
- [Release notes](https://github.com/google/guava/releases)
- [Commits](https://github.com/google/guava/commits)

---
updated-dependencies:
- dependency-name: com.google.guava:guava
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot added the dependencies Pull requests that update a dependency file label Aug 3, 2021
@tortmayr
Copy link
Contributor

tortmayr commented Aug 3, 2021

Closed in favor of #122

@tortmayr tortmayr closed this Aug 3, 2021
@dependabot @github
Copy link
Contributor Author

dependabot bot commented on behalf of github Aug 3, 2021

OK, I won't notify you again about this release, but will get in touch when a new version is available. If you'd rather skip all updates until the next major or minor version, let me know by commenting @dependabot ignore this major version or @dependabot ignore this minor version.

If you change your mind, just re-open this PR and I'll resolve any conflicts on it.

@dependabot dependabot bot deleted the dependabot/maven/examples/org.eclipse.glsp.example.workflow/com.google.guava-guava-29.0-jre branch August 3, 2021 19:23
tortmayr added a commit that referenced this pull request Sep 4, 2021
#150 Rework DI architecture
No longer use one global injector per application connection. Instead use a global server injector and dedicated child injectors for each client session. This removes a couple of flaws/downside we had with the current approach. To achieve this the `GLSPModule` has been split into two separate modules. The `ServerModule` provides the bindings for base infrastructure & networking (used for creating the server injector) while `DiagramModules` provide language & session specific bindings (used for creating the session specific child injectors).

The main benefits are the following:
- Each session now uses its own `ActionDispatcher` this means action messages intended for different client sessions can now be handled in parallel. Previously they were processed one after the other essentially creating a bottleneck.
- One `GLSPServer` can now handler multiple different diagram implementations. The diagram language specific bindings are provided with a `DiagramModule`. When creating a new client session injector the corresponding `DiagramModule` is identified via the given diagram type.  This can for instance be used in UML-GLSP to provide all different diagram types (class,package,state machine etc.) with one server.
- Apart from the initial "process" method it is no longer necessary to keep track of the diagramid/client session id. Each session has its own instances of action handlers, operation handlers, model state, diagram configuration etc. and the clientId no longer needs to be passed as method argument. In addition, provider classes with the purpose of mapping a class instance to the correct digramId like `ModelStateProvider` or the `DiagramConfigurationRegistry` are now obsolete and have been removed.

Note that this PR only provides the DI architecture rework. Existing API whose functionality does not break after the rework as not been touched yet even tough there a various aspects of  the existing API that can now be simplified/improved. For instance, with the new approach the Action/Operation Handler API can be simplified. It is no longer necessary to pass the model state argument as part of the interface methods (see also #120). I have identified some major aspects of the API that can be improved (corresponding issues will be created after this PR is merged).

#141 Refactor `ClientSessionListener` API
- Extract listener methods for server connection from `ClientSessionListener` interface into own `ServerConnectionListener` interface. Server connection listeners are handled directly by the `GLSPServer`.
- It is now possible to define a set of clientIds for which a listener should be registered when adding a new `ClientSessionListener` to the 'ClientSessionManager`.
- The  `DefaultGLSPClientSessionManager` now autodisposes all `ClientSessionListeners` for the corresponding clientSesionId when a session is disposed.
-  Improved null-checks: The client session manager now checks for disposed listeners (i.e. null values in the map) and removes them before notifying (i.e invoking a listener method) them.

Miscellaneous
- Reduce public API exposure. Interface implementations that typically are not expected to be customized by implementing projects haven been moved to the `internal` API.
- Improve documentation. Add javadoc for all newly added interfaces and relevant public classes. Also improve documentation of some existing components.
- Merge `GLSPServerStatusAction` and `ServerStatusAction`
- Introduced 'ModuleUtil' class with provides the functionality to mixin modules similar to how it is done in Xtext.
- Remove uncessary  `.gitkeep` file.
- Rename `DefaultGLSPServerLauncher` to `SocketGLSPServerLauncher`
- Rename `ClientOptions` to `ClientOptionsUtil` to conform to the standard naming scheme for util classes
tortmayr added a commit that referenced this pull request Sep 4, 2021
#150 Rework DI architecture
No longer use one global injector per application connection. Instead use a global server injector and dedicated child injectors for each client session. This removes a couple of flaws/downsides we had with the current approach. To achieve this the `GLSPModule` has been split into two separate modules. The `ServerModule` provides the bindings for base infrastructure & networking (used for creating the server injector) while `DiagramModules` provide language & session specific bindings (used for creating the session specific child injectors).

The main benefits are the following:
- Each session now uses its own `ActionDispatcher` this means action messages intended for different client sessions can now be handled in parallel. Previously they were processed one after the other essentially creating a bottleneck.
- One `GLSPServer` can now handler multiple different diagram implementations. The diagram language specific bindings are provided with a `DiagramModule`. When creating a new client session injector the corresponding `DiagramModule` is identified via the given diagram type.  This can for instance be used in UML-GLSP to provide all different diagram types (class,package,state machine etc.) with one server.
- Apart from the initial "process" method it is no longer necessary to keep track of the diagramid/client session id. Each session has its own instances of action handlers, operation handlers, model state, diagram configuration etc. and the clientId no longer needs to be passed as method argument. In addition, provider classes with the purpose of mapping a class instance to the correct digramId like `ModelStateProvider` or the `DiagramConfigurationRegistry` are now obsolete and have been removed.
- It is now possible to create stateful action/operation handlers. Previously handlers had to be stateless because they were reused for all client sessions. Now  each session has its own set own set of handlers .

Note that this PR only provides the DI architecture rework. Existing API whose functionality does not break after the rework as not been touched yet even tough there a various aspects of  the existing API that can now be simplified/improved. For instance, with the new approach the Action/Operation Handler API can be simplified. It is no longer necessary to pass the model state argument as part of the interface methods (see also #120). I have identified some major aspects of the API that can be improved (corresponding issues will be created after this PR is merged).

#141 Refactor `ClientSessionListener` API
- Extract listener methods for server connection from `ClientSessionListener` interface into own `ServerConnectionListener` interface. Server connection listeners are handled directly by the `GLSPServer`.
- It is now possible to define a set of clientIds for which a listener should be registered when adding a new `ClientSessionListener` to the 'ClientSessionManager`.
- The  `DefaultGLSPClientSessionManager` now autodisposes all `ClientSessionListeners` for the corresponding clientSessionId when a session is disposed.
-  Improved null-checks: The client session manager now checks for disposed listeners (i.e. null values in the map) and removes them before notifying (i.e invoking a listener method) them.

Miscellaneous
- Reduce public API exposure. Interface implementations that typically are not expected to be customized by implementing projects haven been moved to the `internal` API.
- Improve documentation. Add javadoc for all newly added interfaces and relevant public classes. Also improve documentation of some existing components.
- Merge `GLSPServerStatusAction` and `ServerStatusAction`
- Introduce `ModuleUtil`  class with provides the functionality to mixin modules similar to how it is done in Xtext.
- Remove uncessary  `.gitkeep` file.
- Rename `DefaultGLSPServerLauncher` to `SocketGLSPServerLauncher`
- Rename `ClientOptions` to `ClientOptionsUtil` to conform to the standard naming scheme for util classes
tortmayr added a commit that referenced this pull request Sep 4, 2021
#150 Rework DI architecture
No longer use one global injector per application connection. Instead use a global server injector and dedicated child injectors for each client session. This removes a couple of flaws/downsides we had with the current approach. To achieve this the `GLSPModule` has been split into two separate modules. The `ServerModule` provides the bindings for base infrastructure & networking (used for creating the server injector) while `DiagramModules` provide language & session specific bindings (used for creating the session specific child injectors).

The main benefits are the following:
- Each session now uses its own `ActionDispatcher` this means action messages intended for different client sessions can now be handled in parallel. Previously they were processed one after the other essentially creating a bottleneck.
- One `GLSPServer` can now handler multiple different diagram implementations. The diagram language specific bindings are provided with a `DiagramModule`. When creating a new client session injector the corresponding `DiagramModule` is identified via the given diagram type.  This can for instance be used in UML-GLSP to provide all different diagram types (class,package,state machine etc.) with one server.
- Apart from the initial "process" method it is no longer necessary to keep track of the diagramid/client session id. Each session has its own instances of action handlers, operation handlers, model state, diagram configuration etc. and the clientId no longer needs to be passed as method argument. In addition, provider classes with the purpose of mapping a class instance to the correct digramId like `ModelStateProvider` or the `DiagramConfigurationRegistry` are now obsolete and have been removed.
- It is now possible to create stateful action/operation handlers. Previously handlers had to be stateless because they were reused for all client sessions. Now  each session has its own set own set of handlers .

Note that this PR only provides the DI architecture rework. Existing API whose functionality does not break after the rework as not been touched yet even tough there a various aspects of  the existing API that can now be simplified/improved. For instance, with the new approach the Action/Operation Handler API can be simplified. It is no longer necessary to pass the model state argument as part of the interface methods (see also #120). I have identified some major aspects of the API that can be improved (corresponding issues will be created after this PR is merged).

#141 Refactor `ClientSessionListener` API
- Extract listener methods for server connection from `ClientSessionListener` interface into own `ServerConnectionListener` interface. Server connection listeners are handled directly by the `GLSPServer`.
- It is now possible to define a set of clientIds for which a listener should be registered when adding a new `ClientSessionListener` to the 'ClientSessionManager`.
- The  `DefaultGLSPClientSessionManager` now autodisposes all `ClientSessionListeners` for the corresponding clientSessionId when a session is disposed.
-  Improved null-checks: The client session manager now checks for disposed listeners (i.e. null values in the map) and removes them before notifying (i.e invoking a listener method) them.

Miscellaneous
- Reduce public API exposure. Interface implementations that typically are not expected to be customized by implementing projects haven been moved to the `internal` API.
- Improve documentation. Add javadoc for all newly added interfaces and relevant public classes. Also improve documentation of some existing components.
- Merge `GLSPServerStatusAction` and `ServerStatusAction`
- Introduce `ModuleUtil`  class with provides the functionality to mixin modules similar to how it is done in Xtext.
- Remove uncessary  `.gitkeep` file.
- Rename `DefaultGLSPServerLauncher` to `SocketGLSPServerLauncher`
- Rename `ClientOptions` to `ClientOptionsUtil` to conform to the standard naming scheme for util classes

Fixes eclipse-glsp/glsp/issues/150
Fixes eclipse-glsp/glsp/issues/141
tortmayr added a commit that referenced this pull request Sep 5, 2021
#150 Rework DI architecture
No longer use one global injector per application connection. Instead use a global server injector and dedicated child injectors for each client session. This removes a couple of flaws/downsides we had with the current approach. To achieve this the `GLSPModule` has been split into two separate modules. The `ServerModule` provides the bindings for base infrastructure & networking (used for creating the server injector) while `DiagramModules` provide language & session specific bindings (used for creating the session specific child injectors).

The main benefits are the following:
- Each session now uses its own `ActionDispatcher` this means action messages intended for different client sessions can now be handled in parallel. Previously they were processed one after the other essentially creating a bottleneck.
- One `GLSPServer` can now handler multiple different diagram implementations. The diagram language specific bindings are provided with a `DiagramModule`. When creating a new client session injector the corresponding `DiagramModule` is identified via the given diagram type.  This can for instance be used in UML-GLSP to provide all different diagram types (class,package,state machine etc.) with one server.
- Apart from the initial "process" method it is no longer necessary to keep track of the diagramid/client session id. Each session has its own instances of action handlers, operation handlers, model state, diagram configuration etc. and the clientId no longer needs to be passed as method argument. In addition, provider classes with the purpose of mapping a class instance to the correct digramId like `ModelStateProvider` or the `DiagramConfigurationRegistry` are now obsolete and have been removed.
- It is now possible to create stateful action/operation handlers. Previously handlers had to be stateless because they were reused for all client sessions. Now  each session has its own set own set of handlers .

Note that this PR only provides the DI architecture rework. Existing API whose functionality does not break after the rework as not been touched yet even tough there a various aspects of  the existing API that can now be simplified/improved. For instance, with the new approach the Action/Operation Handler API can be simplified. It is no longer necessary to pass the model state argument as part of the interface methods (see also #120). I have identified some major aspects of the API that can be improved (corresponding issues will be created after this PR is merged).

#141 Refactor `ClientSessionListener` API
- Extract listener methods for server connection from `ClientSessionListener` interface into own `ServerConnectionListener` interface. Server connection listeners are handled directly by the `GLSPServer`.
- It is now possible to define a set of clientIds for which a listener should be registered when adding a new `ClientSessionListener` to the 'ClientSessionManager`.
- The  `DefaultGLSPClientSessionManager` now autodisposes all `ClientSessionListeners` for the corresponding clientSessionId when a session is disposed.
-  Improved null-checks: The client session manager now checks for disposed listeners (i.e. null values in the map) and removes them before notifying (i.e invoking a listener method) them.

Miscellaneous
- Reduce public API exposure. Interface implementations that typically are not expected to be customized by implementing projects haven been moved to the `internal` API.
- Improve documentation. Add javadoc for all newly added interfaces and relevant public classes. Also improve documentation of some existing components.
- Merge `GLSPServerStatusAction` and `ServerStatusAction`
- Introduce `ModuleUtil`  class with provides the functionality to mixin modules similar to how it is done in Xtext.
- Remove uncessary  `.gitkeep` file.
- Rename `DefaultGLSPServerLauncher` to `SocketGLSPServerLauncher`
- Rename `ClientOptions` to `ClientOptionsUtil` to conform to the standard naming scheme for util classes

Fixes eclipse-glsp/glsp/issues/150
Fixes eclipse-glsp/glsp/issues/141
tortmayr added a commit that referenced this pull request Sep 8, 2021
#150 Rework DI architecture
No longer use one global injector per application connection. Instead use a global server injector and dedicated child injectors for each client session. This removes a couple of flaws/downsides we had with the current approach. To achieve this the `GLSPModule` has been split into two separate modules. The `ServerModule` provides the bindings for base infrastructure & networking (used for creating the server injector) while `DiagramModules` provide language & session specific bindings (used for creating the session specific child injectors).

The main benefits are the following:
- Each session now uses its own `ActionDispatcher` this means action messages intended for different client sessions can now be handled in parallel. Previously they were processed one after the other essentially creating a bottleneck.
- One `GLSPServer` can now handler multiple different diagram implementations. The diagram language specific bindings are provided with a `DiagramModule`. When creating a new client session injector the corresponding `DiagramModule` is identified via the given diagram type.  This can for instance be used in UML-GLSP to provide all different diagram types (class,package,state machine etc.) with one server.
- Apart from the initial "process" method it is no longer necessary to keep track of the diagramid/client session id. Each session has its own instances of action handlers, operation handlers, model state, diagram configuration etc. and the clientId no longer needs to be passed as method argument. In addition, provider classes with the purpose of mapping a class instance to the correct digramId like `ModelStateProvider` or the `DiagramConfigurationRegistry` are now obsolete and have been removed.
- It is now possible to create stateful action/operation handlers. Previously handlers had to be stateless because they were reused for all client sessions. Now  each session has its own set own set of handlers .
- Use the new approach of injecting optionals (provided by Guice 5) instead of binding NullImpls.

Note that this PR only provides the DI architecture rework. Existing API whose functionality does not break after the rework as not been touched yet even tough there a various aspects of  the existing API that can now be simplified/improved. For instance, with the new approach the Action/Operation Handler API can be simplified. It is no longer necessary to pass the model state argument as part of the interface methods (see also #120). I have identified some major aspects of the API that can be improved (corresponding issues will be created after this PR is merged).

#141 Refactor `ClientSessionListener` API
- Extract listener methods for server connection from `ClientSessionListener` interface into own `ServerConnectionListener` interface. Server connection listeners are handled directly by the `GLSPServer`.
- It is now possible to define a set of clientIds for which a listener should be registered when adding a new `ClientSessionListener` to the 'ClientSessionManager`.
- The  `DefaultGLSPClientSessionManager` now autodisposes all `ClientSessionListeners` for the corresponding clientSessionId when a session is disposed.
-  Improved null-checks: The client session manager now checks for disposed listeners (i.e. null values in the map) and removes them before notifying (i.e invoking a listener method) them.

Miscellaneous
- Reduce public API exposure. Interface implementations that typically are not expected to be customized by implementing projects haven been moved to the `internal` API.
- Improve documentation. Add javadoc for all newly added interfaces and relevant public classes. Also improve documentation of some existing components.
- Merge `GLSPServerStatusAction` and `ServerStatusAction`
- Introduce `ModuleUtil`  class with provides the functionality to mixin modules similar to how it is done in Xtext.
- Remove uncessary  `.gitkeep` file.
- Rename `DefaultGLSPServerLauncher` to `SocketGLSPServerLauncher`
- Rename `ClientOptions` to `ClientOptionsUtil` to conform to the standard naming scheme for util classes
- Follow Guice best practices and document all public bindings of a module

Fixes eclipse-glsp/glsp/issues/150
Fixes eclipse-glsp/glsp/issues/141
tortmayr added a commit that referenced this pull request Sep 8, 2021
#150 Rework DI architecture
No longer use one global injector per application connection. Instead use a global server injector and dedicated child injectors for each client session. This removes a couple of flaws/downsides we had with the current approach. To achieve this the `GLSPModule` has been split into two separate modules. The `ServerModule` provides the bindings for base infrastructure & networking (used for creating the server injector) while `DiagramModules` provide language & session specific bindings (used for creating the session specific child injectors).

The main benefits are the following:
- Each session now uses its own `ActionDispatcher` this means action messages intended for different client sessions can now be handled in parallel. Previously they were processed one after the other essentially creating a bottleneck.
- One `GLSPServer` can now handler multiple different diagram implementations. The diagram language specific bindings are provided with a `DiagramModule`. When creating a new client session injector the corresponding `DiagramModule` is identified via the given diagram type.  This can for instance be used in UML-GLSP to provide all different diagram types (class,package,state machine etc.) with one server.
- Apart from the initial "process" method it is no longer necessary to keep track of the diagramid/client session id. Each session has its own instances of action handlers, operation handlers, model state, diagram configuration etc. and the clientId no longer needs to be passed as method argument. In addition, provider classes with the purpose of mapping a class instance to the correct digramId like `ModelStateProvider` or the `DiagramConfigurationRegistry` are now obsolete and have been removed.
- It is now possible to create stateful action/operation handlers. Previously handlers had to be stateless because they were reused for all client sessions. Now  each session has its own set own set of handlers .
- Use the new approach of injecting optionals (provided by Guice 5) instead of binding NullImpls.

Note that this PR only provides the DI architecture rework. Existing API whose functionality does not break after the rework as not been touched yet even tough there a various aspects of  the existing API that can now be simplified/improved. For instance, with the new approach the Action/Operation Handler API can be simplified. It is no longer necessary to pass the model state argument as part of the interface methods (see also #120). I have identified some major aspects of the API that can be improved (corresponding issues will be created after this PR is merged).

#141 Refactor `ClientSessionListener` API
- Extract listener methods for server connection from `ClientSessionListener` interface into own `ServerConnectionListener` interface. Server connection listeners are handled directly by the `GLSPServer`.
- It is now possible to define a set of clientIds for which a listener should be registered when adding a new `ClientSessionListener` to the 'ClientSessionManager`.
- The  `DefaultGLSPClientSessionManager` now autodisposes all `ClientSessionListeners` for the corresponding clientSessionId when a session is disposed.
-  Improved null-checks: The client session manager now checks for disposed listeners (i.e. null values in the map) and removes them before notifying (i.e invoking a listener method) them.

Miscellaneous
- Reduce public API exposure. Interface implementations that typically are not expected to be customized by implementing projects haven been moved to the `internal` API.
- Improve documentation. Add javadoc for all newly added interfaces and relevant public classes. Also improve documentation of some existing components.
- Merge `GLSPServerStatusAction` and `ServerStatusAction`
- Introduce `ModuleUtil`  class with provides the functionality to mixin modules similar to how it is done in Xtext.
- Remove uncessary  `.gitkeep` file.
- Rename `DefaultGLSPServerLauncher` to `SocketGLSPServerLauncher`
- Rename `ClientOptions` to `ClientOptionsUtil` to conform to the standard naming scheme for util classes
- Follow Guice best practices and document all public bindings of a module

Fixes eclipse-glsp/glsp/issues/150
Fixes eclipse-glsp/glsp/issues/141
tortmayr added a commit that referenced this pull request Sep 8, 2021
#150 Rework DI architecture
No longer use one global injector per application connection. Instead use a global server injector and dedicated child injectors for each client session. This removes a couple of flaws/downsides we had with the current approach. To achieve this the `GLSPModule` has been split into two separate modules. The `ServerModule` provides the bindings for base infrastructure & networking (used for creating the server injector) while `DiagramModules` provide language & session specific bindings (used for creating the session specific child injectors).

The main benefits are the following:
- Each session now uses its own `ActionDispatcher` this means action messages intended for different client sessions can now be handled in parallel. Previously they were processed one after the other essentially creating a bottleneck.
- One `GLSPServer` can now handler multiple different diagram implementations. The diagram language specific bindings are provided with a `DiagramModule`. When creating a new client session injector the corresponding `DiagramModule` is identified via the given diagram type.  This can for instance be used in UML-GLSP to provide all different diagram types (class,package,state machine etc.) with one server.
- Apart from the initial "process" method it is no longer necessary to keep track of the diagramid/client session id. Each session has its own instances of action handlers, operation handlers, model state, diagram configuration etc. and the clientId no longer needs to be passed as method argument. In addition, provider classes with the purpose of mapping a class instance to the correct digramId like `ModelStateProvider` or the `DiagramConfigurationRegistry` are now obsolete and have been removed.
- It is now possible to create stateful action/operation handlers. Previously handlers had to be stateless because they were reused for all client sessions. Now  each session has its own set own set of handlers .
- Use the new approach of injecting optionals (provided by Guice 5) instead of binding NullImpls.

Note that this PR only provides the DI architecture rework. Existing API whose functionality does not break after the rework as not been touched yet even tough there a various aspects of  the existing API that can now be simplified/improved. For instance, with the new approach the Action/Operation Handler API can be simplified. It is no longer necessary to pass the model state argument as part of the interface methods (see also #120). I have identified some major aspects of the API that can be improved (corresponding issues will be created after this PR is merged).

#141 Refactor `ClientSessionListener` API
- Extract listener methods for server connection from `ClientSessionListener` interface into own `ServerConnectionListener` interface. Server connection listeners are handled directly by the `GLSPServer`.
- It is now possible to define a set of clientIds for which a listener should be registered when adding a new `ClientSessionListener` to the 'ClientSessionManager`.
- The  `DefaultGLSPClientSessionManager` now autodisposes all `ClientSessionListeners` for the corresponding clientSessionId when a session is disposed.
-  Improved null-checks: The client session manager now checks for disposed listeners (i.e. null values in the map) and removes them before notifying (i.e invoking a listener method) them.

Miscellaneous
- Reduce public API exposure. Interface implementations that typically are not expected to be customized by implementing projects haven been moved to the `internal` API.
- Improve documentation. Add javadoc for all newly added interfaces and relevant public classes. Also improve documentation of some existing components.
- Merge `GLSPServerStatusAction` and `ServerStatusAction`
- Introduce `ModuleUtil`  class with provides the functionality to mixin modules similar to how it is done in Xtext.
- Remove uncessary  `.gitkeep` file.
- Rename `DefaultGLSPServerLauncher` to `SocketGLSPServerLauncher`
- Rename `ClientOptions` to `ClientOptionsUtil` to conform to the standard naming scheme for util classes
- Follow Guice best practices and document all public bindings of a module

Fixes eclipse-glsp/glsp/issues/150
Fixes eclipse-glsp/glsp/issues/141
tortmayr added a commit that referenced this pull request Sep 16, 2021
#150 Rework DI architecture
No longer use one global injector per application connection. Instead use a global server injector and dedicated child injectors for each client session. This removes a couple of flaws/downsides we had with the current approach. To achieve this the `GLSPModule` has been split into two separate modules. The `ServerModule` provides the bindings for base infrastructure & networking (used for creating the server injector) while `DiagramModules` provide language & session specific bindings (used for creating the session specific child injectors).

The main benefits are the following:
- Each session now uses its own `ActionDispatcher` this means action messages intended for different client sessions can now be handled in parallel. Previously they were processed one after the other essentially creating a bottleneck.
- One `GLSPServer` can now handler multiple different diagram implementations. The diagram language specific bindings are provided with a `DiagramModule`. When creating a new client session injector the corresponding `DiagramModule` is identified via the given diagram type.  This can for instance be used in UML-GLSP to provide all different diagram types (class,package,state machine etc.) with one server.
- Apart from the initial "process" method it is no longer necessary to keep track of the diagramid/client session id. Each session has its own instances of action handlers, operation handlers, model state, diagram configuration etc. and the clientId no longer needs to be passed as method argument. In addition, provider classes with the purpose of mapping a class instance to the correct digramId like `ModelStateProvider` or the `DiagramConfigurationRegistry` are now obsolete and have been removed.
- It is now possible to create stateful action/operation handlers. Previously handlers had to be stateless because they were reused for all client sessions. Now  each session has its own set own set of handlers .
- Use the new approach of injecting optionals (provided by Guice 5) instead of binding NullImpls.

Note that this PR only provides the DI architecture rework. Existing API whose functionality does not break after the rework as not been touched yet even tough there a various aspects of  the existing API that can now be simplified/improved. For instance, with the new approach the Action/Operation Handler API can be simplified. It is no longer necessary to pass the model state argument as part of the interface methods (see also #120). I have identified some major aspects of the API that can be improved (corresponding issues will be created after this PR is merged).

#141 Refactor `ClientSessionListener` API
- Extract listener methods for server connection from `ClientSessionListener` interface into own `ServerConnectionListener` interface. Server connection listeners are handled directly by the `GLSPServer`.
- It is now possible to define a set of clientIds for which a listener should be registered when adding a new `ClientSessionListener` to the 'ClientSessionManager`.
- The  `DefaultGLSPClientSessionManager` now autodisposes all `ClientSessionListeners` for the corresponding clientSessionId when a session is disposed.
-  Improved null-checks: The client session manager now checks for disposed listeners (i.e. null values in the map) and removes them before notifying (i.e invoking a listener method) them.

Miscellaneous
- Reduce public API exposure. Interface implementations that typically are not expected to be customized by implementing projects haven been moved to the `internal` API.
- Improve documentation. Add javadoc for all newly added interfaces and relevant public classes. Also improve documentation of some existing components.
- Merge `GLSPServerStatusAction` and `ServerStatusAction`
- Introduce `ModuleUtil`  class with provides the functionality to mixin modules similar to how it is done in Xtext.
- Remove uncessary  `.gitkeep` file.
- Rename `DefaultGLSPServerLauncher` to `SocketGLSPServerLauncher`
- Rename `ClientOptions` to `ClientOptionsUtil` to conform to the standard naming scheme for util classes
- Follow Guice best practices and document all public bindings of a module

Fixes eclipse-glsp/glsp/issues/150
Fixes eclipse-glsp/glsp/issues/141
tortmayr added a commit that referenced this pull request Oct 5, 2021
* [WIP] #150 #141 Rework dependency injection architecture

#150 Rework DI architecture
No longer use one global injector per application connection. Instead use a global server injector and dedicated child injectors for each client session. This removes a couple of flaws/downsides we had with the current approach. To achieve this the `GLSPModule` has been split into two separate modules. The `ServerModule` provides the bindings for base infrastructure & networking (used for creating the server injector) while `DiagramModules` provide language & session specific bindings (used for creating the session specific child injectors).

The main benefits are the following:
- Each session now uses its own `ActionDispatcher` this means action messages intended for different client sessions can now be handled in parallel. Previously they were processed one after the other essentially creating a bottleneck.
- One `GLSPServer` can now handler multiple different diagram implementations. The diagram language specific bindings are provided with a `DiagramModule`. When creating a new client session injector the corresponding `DiagramModule` is identified via the given diagram type.  This can for instance be used in UML-GLSP to provide all different diagram types (class,package,state machine etc.) with one server.
- Apart from the initial "process" method it is no longer necessary to keep track of the diagramid/client session id. Each session has its own instances of action handlers, operation handlers, model state, diagram configuration etc. and the clientId no longer needs to be passed as method argument. In addition, provider classes with the purpose of mapping a class instance to the correct digramId like `ModelStateProvider` or the `DiagramConfigurationRegistry` are now obsolete and have been removed.
- It is now possible to create stateful action/operation handlers. Previously handlers had to be stateless because they were reused for all client sessions. Now  each session has its own set own set of handlers .
- Use the new approach of injecting optionals (provided by Guice 5) instead of binding NullImpls.

Note that this PR only provides the DI architecture rework. Existing API whose functionality does not break after the rework as not been touched yet even tough there a various aspects of  the existing API that can now be simplified/improved. For instance, with the new approach the Action/Operation Handler API can be simplified. It is no longer necessary to pass the model state argument as part of the interface methods (see also #120). I have identified some major aspects of the API that can be improved (corresponding issues will be created after this PR is merged).

#141 Refactor `ClientSessionListener` API
- Extract listener methods for server connection from `ClientSessionListener` interface into own `ServerConnectionListener` interface. Server connection listeners are handled directly by the `GLSPServer`.
- It is now possible to define a set of clientIds for which a listener should be registered when adding a new `ClientSessionListener` to the 'ClientSessionManager`.
- The  `DefaultGLSPClientSessionManager` now autodisposes all `ClientSessionListeners` for the corresponding clientSessionId when a session is disposed.
-  Improved null-checks: The client session manager now checks for disposed listeners (i.e. null values in the map) and removes them before notifying (i.e invoking a listener method) them.

Miscellaneous
- Reduce public API exposure. Interface implementations that typically are not expected to be customized by implementing projects haven been moved to the `internal` API.
- Improve documentation. Add javadoc for all newly added interfaces and relevant public classes. Also improve documentation of some existing components.
- Merge `GLSPServerStatusAction` and `ServerStatusAction`
- Introduce `ModuleUtil`  class with provides the functionality to mixin modules similar to how it is done in Xtext.
- Remove uncessary  `.gitkeep` file.
- Rename `DefaultGLSPServerLauncher` to `SocketGLSPServerLauncher`
- Rename `ClientOptions` to `ClientOptionsUtil` to conform to the standard naming scheme for util classes
- Follow Guice best practices and document all public bindings of a module

Fixes eclipse-glsp/glsp/issues/150
Fixes eclipse-glsp/glsp/issues/141

* Remove clientId argument where obsolete

* Address review feedback

Co-authored-by: Philip Langer <planger@eclipsesource.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant