Refactoring Week 12/2021 #10
Replies: 0 comments 53 replies
-
I'd like to rethink the way we order and load extensions, see eclipse-edc/Connector#121 |
Beta Was this translation helpful? Give feedback.
-
I'd like the rework the Dominik Pinsel [email protected], Daimler TSS GmbH, legal info/Impressum |
Beta Was this translation helpful? Give feedback.
-
I'd like to remove sample code. We are adding a lot of sample code every week, I assume large parts of this sample code is not needed anymore and should be removed. Dominik Pinsel [email protected], Daimler TSS GmbH, legal info/Impressum |
Beta Was this translation helpful? Give feedback.
-
@MoritzKeppler showed in issue #92 how the folder structure can be improved. I still think this is a good idea and we should do it. Maybe we can use the refactoring week for this. Dominik Pinsel [email protected], Daimler TSS GmbH, legal info/Impressum |
Beta Was this translation helpful? Give feedback.
-
Combine all memory store extensions into one. We have several extensions that implement some kind of memory store functionality. Maybe we can combine them all into one extension and make the service registration configurable. Like this we don't get some kind of new memory store extension, every time a new kind of data needs to be stored. Also they are probably used in combination anyway. Dominik Pinsel [email protected], Daimler TSS GmbH, legal info/Impressum |
Beta Was this translation helpful? Give feedback.
-
I would like to discuss if a service extension is meaningful if it doesn't implement any service interface specified in any SPI module. An example would be catalog-service. |
Beta Was this translation helpful? Give feedback.
-
Maybe we can also talk about how to implement the builder pattern. I like it when the object is created in the |
Beta Was this translation helpful? Give feedback.
-
One further topic: the agreement on naming. We again have both terms in the code, |
Beta Was this translation helpful? Give feedback.
-
Proposal: abstract
|
Beta Was this translation helpful? Give feedback.
-
To prepare the tpopics for our discussion please provide a summary with the following structure:
|
Beta Was this translation helpful? Give feedback.
-
This is not really a code refactoring, but maybe it's still something we could do next week. |
Beta Was this translation helpful? Give feedback.
-
Proposal: Introduction of lombokDescriptionLombok is a java library to reduce the amount of boilerplate needed to be written. Impact / ScopeWill basically affect all POJOs and value containers across all modules if used consequently. BenefitAvoids boilerplate that take the focus off the important stuff. RiskImproper usage might lead to side effects (e.g. improper hashcode/equals code generation) Denis Neuling [email protected], Daimler TSS GmbH, legal info/Impressum |
Beta Was this translation helpful? Give feedback.
-
Proposal: Replace checkstyle by spotlessNote: Issue 378 has been created. DescriptionWhile checkstyle is doing good in verifying contributions stick to our code style guide, it is not able to actually apply those. Impact / Scope
BenefitGives developers a tool to automatically verify and reformat code, which will boosts productivity due to manual code style alignment avoidance. Risk
Denis Neuling [email protected], Daimler TSS GmbH, legal info/Impressum |
Beta Was this translation helpful? Give feedback.
-
Proposal: substitute EasyMock with Mockito (see #220)DescriptionEasyMock is pretty annoying to use for these three reasons:
Replacing it with Mockito would resolve all of these 3 issues ScopePretty much all the test classes of all the extensions BenefitTests will be more concise and elegant RiskSince the people here are used to EasyMock, even if the api are pretty much the same the transition could be still painful. |
Beta Was this translation helpful? Give feedback.
-
Description |
Beta Was this translation helpful? Give feedback.
-
Proposal: give extension a nameDescriptionAt the moment every Scopethe BenefitLess code, the service init/start/shutdown logging phase will be handled in a single place, no need to remember to add logs on the service extensions. RiskNone |
Beta Was this translation helpful? Give feedback.
-
Proposal: add CommandQueue to TransferProcessManagerThere's a discussion goin' on here: #330 |
Beta Was this translation helpful? Give feedback.
-
Here are @paullatzelsperger and my proposals. One thing to note is we included a discussion on establishing a framework for refactoring. That section is independent of our specific proposals that follow. We think it is important to have a staged process to the refactoring where smaller changes precede more extensive changes that will have to be introduced sequentially. Regarding our specific proposals, our focus is on not just technology changes but also documentation and samples. We believe we need to focus much of the effort on things that drive tangible end-user benefit. Also, looking at the proposals above, we think many of them will fit well into this approach. Establishing a FrameworkWe believe the goal of refactoring week should be to improve the quality of the software we are delivering to our users. This can be broken down into four key areas:
This work should also be organized and structured so that changes can be efficiently and safely introduced into the project. Our proposal would be to front-load and parallelize tasks that can be completed in isolation and without disrupting the work of others. Other tasks (e.g. module restructuring) should be done at the end when other work has been completed. Our proposals1. Left Operand Constraint limitations in the InfoModel library.Category: Critical Milestone 1 issue Description The InfoModel library defines left operands using a Java enum. This means that when the EDC uses IDS, the only policy constraints that can be expressed are the 17 that are defined in the enum. This is a critical limitation as it is not IDS compliant and restricts the ability of end-users to define anything but rudimentary usage policies. Proposed Solution A fix from the InfoModel team will likely take some time. Given the severity of the issue, our proposal is to temporarily fork the InfoModel library by creating a copy in the EDC repo and using it. The copy will keep the existing InfoModel package names and structure to facilitate migration back to the InfoModel library once the issue has been fixed. The left operand enum will be converted to a type that takes a String. Impact This change will have minimal impact on the EDC codebase. Changes will be confined to IDS module dependencies and two transformer classes (ExpressionToIdsLeftOperandTransformer and IdsLeftOperandToExpressionTransformer). This change can be done in parallel to other tasks. 2. Samples CleanupCategory: Documentation Description The samples do not demonstrate new features delivered in Milestone 1. Proposed Solution Perform the following tasks: A. Verify all samples work Impact Geat end-user value helps drive adoption of the EDC. Does not impact core code. 3. Control API DocumentationCategory: Documentation Description The Control API should have Swagger/OpenAPI documentation. End users have Proposed Solution and Impact Add annotations to the Control API endpoints. No code impact. 4. Policy DocumentationCategory: Documentation Description Document what Policies are:
Proposed Solution and Impact Have someone that has not worked on the policy subsystem learn and document it. No code impact. This will benefit end-users who will need this information soon. 5. DataLoader DocumentationCategory: Documentation Description Explain how the Dataloader is used and how it can be extended. Discuss how *.json files are imported and how the DataLoader can be used to implement a "data loading server." Proposed Solution and Impact Have someone that has not worked on the loader subsystem learn and document it. No code impact. This will benefit end-users who will need this information soon. 6. Remove extension phases and standardize usage of provides/requiresCategory: Technical Debt Description Primordial and Default extensions are a relic from before extension dependency loading was introduced. This mechanism can be replaced by loading extensions. We also need to standardize on what level of granularity requires and provides should use. Proposed Solution We propose to:
Impact This will touch all extensions and will therefore have a significant impact on the codebase. This refactoring should be done at the end of the week. This change would mostly benefit developers extending the EDC and has limited value beyond that. 7. Integration Test StabilityCategory: Testing and delivery pipeline improvements Description We're all aware of the problems with the integration tests. Proposed Solution Fix them. Impact This will likely impact the rate of other check-ins. Therefore, this work should be done towards the end. 8. Introduce a Foundation ModuleCategory: Technical Debt Description When implementing the contract negotiation subsystem, multiple services needed to be copied from the transfer process module. These services should be consolidated into a third foundation module that the others depend on. Impact This will clean up code duplication and needs to be done at some point before new work begins on the CNM. 9. Split up core SPINote this is related to 10 but should be done first Category: Technical Debt, Project Direction Description The EDC project is growing to encompass more services than just the connector. At some point, we will likely need to break the codebase into separate repositories for individual services. Proposed Solution The SPI should reflect this division:
Impact This will require module reshuffling but has relatively low risk. The existing SPI module can be used as a BOM to make it easy to deploy all services in a single runtime. This refactoring should be done towards the end of the cycle. 10. Restructure the Project Module LayoutCategory: Technical Debt, Project Direction Description We should arrive at a specific module layout but it should also include the distinction between:
Proposed Solution Combine the proposal in #92 with a division along the 4 categories outlined above. Impact This will require module reshuffling but has relatively low risk. This should be done at the very end of the cycle, and after 8 & 9. 11. Added Bonus: Remove Old IDS and Sample ModulesCategory: Technical Debt Description There are old IDS and sample policy modules including a Proposed Solution Delete them Impact This may impact some Catena-X teams, e.g. the group working on the PRS prototype. We would need to liaise with them. |
Beta Was this translation helpful? Give feedback.
-
Proposal: Decouple read and write in Data Flow ControllerDescriptionIn todays implemenetation, a DataFlowController implementation consists of a pair reader/writer:
Let's imagine we have two DataFlowController already implemented in the code base:
Then we wont have the possibility to transfer from Azure blob storage to another Azure blob storage without coding a new DataFlowController. The idea would be to have a catalog of readers/writers and offer the possibility to compose the DataFlowController. Impact / ScopeShould be null BenefitEach reader/writer has to be implemented only once, and then one can define a new DataFlowController by simply combining a reader and a writer. RiskNot really a risk, but implementation must be generic enough to be also compliant with stream data transfer, as in this case the data transfer does not consist of a simple read/write. |
Beta Was this translation helpful? Give feedback.
-
As discussed yesterday here a list of things I currently know of, where the EDC behaves differently than other non EDC connectors: IDS-Multipart
Information Model
|
Beta Was this translation helpful? Give feedback.
-
We'd like to have one week beginning of december focussing on housekeeping, core architecture discussions and refactoring.
Add whatever you think we should take care of to this discussion and let's find out what needs to get improved first.
Moritz Keppler [email protected], Daimler TSS GmbH, legal info/Impressum
Beta Was this translation helpful? Give feedback.
All reactions