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

Remove outdated Crypto logic and improve ETL configuration #138

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

TDeSain
Copy link
Contributor

@TDeSain TDeSain commented Mar 3, 2025

Description

This pull request introduces several significant changes to improve the application's maintainability, performance, and configurations:

  • Crypto Removal:

    • Removed Crypto-based locking logic from query and querySync endpoints.
    • Simplified PicSureService.java to process queries without key validation.
    • Updated AbstractProcessor and configurations by eliminating unused Crypto-related code.
  • ETL Enhancements:

    • Increased cache size for improved performance.
    • Refactored CSVLoader to utilize Spring Boot features like ApplicationRunner.
    • Introduced configurable properties (rollupEnabled, hpdsDirectory) for better maintainability.
    • Changed default hpdsDirectory to an absolute path (/opt/local/hpds/).
    • Optimized ETL logic and improved CSV parsing buffer size.
  • Dockerfile Update:

    • Upgraded base image to OpenJDK 21.
    • Removed unused dependencies and simplified build stages for Docker.
  • General Improvements:

    • Added Jakarta Annotation API dependency to ensure compatibility with Jakarta EE specifications.
    • Refactored directory properties for consistency and robustness.

Checklist

  • Code changes have been reviewed and tested.
  • Related documentation has been updated where necessary.

TDeSain added 9 commits March 2, 2025 14:06
- Added performance benchmarking tests for encryption (AES).
- Modularized encryption logic with togglable `encryption.enabled`.
- Refactored CSVLoader for Spring Boot compatibility.
- Added configuration options via `application.properties`.
- Improved logging and error handling across components.
This commit adds the Jakarta Annotation API dependency (version 2.1.1)
to `common/pom.xml`. This ensures support for annotations provided
by the Jakarta EE ecosystem.
- Switch to single-stage build using openjdk:11-jre-slim.
- Remove multi-stage Maven build and related dependencies.
- Add required JARs and scripts directly.
- Simplify ENTRYPOINT for cleaner execution.
- Upgrade Docker base image to OpenJDK 21 and adjust labels.
- Remove `UpdateClinicalVariableCounts` dependency from Dockerfile.
- Update CSVLoader to reference `allConcepts.csv` instead of `FHS_allConcepts.csv`.
Change default hpdsDirectory from "./" to "/opt/local/hpds/".
Provides a more robust default configuration for the application.
Still allows overriding via application.properties if needed.
- Updated cache size from 16 to 2048 in LoadingStore.
- Refactored CSVLoader to use ApplicationRunner and @value properties.
- Replaced NO_ROLLUP flag with configurable rollupEnabled property.
- Simplified and optimized ETL loading and processing logic.
- Adjusted buffer size for CSV parsing to improve performance.
- Updated application properties to streamline configuration setup.
Changed the `etl.hpds.directory` property to use the absolute path
`/opt/local/hpds` instead of `./` to avoid relative path issues.
Add a trailing slash to `etl.hpds.directory` for consistency.
AbstractProcessor
- Eliminated Crypto key checks in `query` and `querySync` endpoints.
- Switched hpdsDataDirectory to use Field injection instead of Method Parameter injection.

PicSureService.java
- Simplified logic by directly processing queries without key validation.

Configurations
- Added application-local-dev.properties for local configurations.
- Refactored `AbstractProcessor` to remove unused Crypto-related code.
@TDeSain TDeSain self-assigned this Mar 3, 2025
@TDeSain TDeSain added the enhancement New feature or request label Mar 3, 2025
TDeSain added 3 commits March 2, 2025 20:53
Replace `CSVLoader` with `CSVLoaderNewSearch` in test setup.
The dumpStats() method call was removed to clean up the code.
It was not serving any functional purpose in the current context.
Split CSVLoaderService into its own file for better modularity
and maintainability. Removed the duplicate implementation
from CSVLoaderNewSearch.
@TDeSain TDeSain force-pushed the encryption-optional branch from 5cf238a to 805d2e0 Compare March 3, 2025 03:20
Cleaned up unused imports in CSVLoaderService and CSVLoaderNewSearch
to improve code readability and maintainability.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant