-
Notifications
You must be signed in to change notification settings - Fork 55
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
feat(application): servers don't have access on AdHocModule anymore #404
Conversation
* Major refactoring of operating system interface hierarchy with a clear definition of which modules are available via additional interfaces. * An OperatingSystem itself is not "owner" of a module anymore (but the implementing simulation unit is). Instead an specific OperatingSystem defines which modules it provides, by defining additional interfaces `CommunicativeCell`, `Perceptive`, `Navigable` and so on. * `AbstractSimulationUnit` still implements and provides functionality a specific unit not necessarily needs, e.g., the `AbstractSimulationUnit` provides an `AdhocModule`, even if the implementing `ServerSimulationUnit` does not need such. Still, a server application can not access the `AdhocModule` anymore due to the clear definition of the `OperatingSystem` interfaces. * Moved `navigation` package inside `simulation` package alongside `perception` and `communication`.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a really valuable refactoring. However, I think we should at least discuss the naming scheme of the added interfaces.
.../src/main/java/org/eclipse/mosaic/fed/application/app/api/os/modules/AdHocCommunicative.java
Show resolved
Hide resolved
...n/src/main/java/org/eclipse/mosaic/fed/application/app/api/os/modules/CellCommunicative.java
Show resolved
Hide resolved
...plication/src/main/java/org/eclipse/mosaic/fed/application/app/api/os/modules/Locatable.java
Show resolved
Hide resolved
...plication/src/main/java/org/eclipse/mosaic/fed/application/app/api/os/modules/Navigable.java
Show resolved
Hide resolved
...lication/src/main/java/org/eclipse/mosaic/fed/application/app/api/os/modules/Perceptive.java
Show resolved
Hide resolved
...ication/src/main/java/org/eclipse/mosaic/fed/application/app/etsi/AbstractCamSendingApp.java
Outdated
Show resolved
Hide resolved
...plication/src/test/java/org/eclipse/mosaic/fed/application/app/etsi/EtsiApplicationTest.java
Show resolved
Hide resolved
...java/org/eclipse/mosaic/fed/application/ambassador/simulation/communication/AdHocModule.java
Outdated
Show resolved
Hide resolved
.../java/org/eclipse/mosaic/fed/application/ambassador/simulation/communication/CellModule.java
Outdated
Show resolved
Hide resolved
...src/main/java/org/eclipse/mosaic/fed/application/app/api/os/RoadSideUnitOperatingSystem.java
Show resolved
Hide resolved
In my initial suggestion for naming interfaces to declare functionality for the OperatingSystem I used adjectives, as it felt very suitable here and also complies with this suggestion here: https://www.baeldung.com/java-interface-naming-conventions (use adjectives for Interfaces as capabilities) Googles style does not really care if Interfaces should be adjectives or nouns (allows both). Therefore we just can/should decide which we use, but it should be consistent within the package (no mix of adjectives/nouns).
|
I agree with the general naming schema of using adjectives for the description of interfaces. However, in this case it is not really about adding "attributes" to an object but rather enabling the access to additional capabilities. Thinking about this just now, this logic really only applies to the Further suggestions:
@rprotzmann should definitely comment on this issue |
Description
CommunicativeCell
,Perceptive
,Navigable
and so on.AbstractSimulationUnit
still implements and provides functionality a specific unit not necessarily needs, e.g., theAbstractSimulationUnit
provides anAdhocModule
, even if the implementingServerSimulationUnit
does not need such. Still, a server application can not access theAdhocModule
anymore due to the clear definition of theOperatingSystem
interfaces.navigation
package insidesimulation
package alongsideperception
andcommunication
.Issue(s) related to this PR
Affected parts of the online documentation
Changes in the documentation required?
No, Names of OperatingSystems are kept
Definition of Done
Prerequisites
Required
type(scope): description
(in the style of Conventional Commits)enhancement
, orbugfix
)origin/main
has been merged into your Fork.Requested (can be enforced by maintainers)
Special notes to reviewer