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

Migrate cling to jupnp #2541

Merged
merged 8 commits into from
Jan 15, 2024
Merged

Migrate cling to jupnp #2541

merged 8 commits into from
Jan 15, 2024

Conversation

tesshucom
Copy link
Owner

@tesshucom tesshucom commented Jan 15, 2024

Overview

Cling, the library used for UPnP, will be migrated to Jupnp. Cling is already EOL. Jupnp is a derivative of Cling and is currently undergoing maintenance.

This will have the following impact on product configuration:

  • The number of CVE suppression settings will be 0. In short, it's Perfect.
  • Cling related libraries will be removed from the local Repository
    • Like many Java Projects, the required libraries are obtained from Maven Central. However, in a Java Project, a static library may be maintained locally in the Project if it is absolutely necessary during a transition period of the library. In Jpsonic, Cling was managed in a local Repository.
    • As a result, only one library is managed by the local Repository. This library is also scheduled to be removed due to modernization.

Details

Library changes and associated refactorings.

  • Migrate cling to jupnp
  • Remove cling and cling related libs from local repository
  • Refactoring : Change upnp entity package
  • Refactoring: Change package of some upnp classes
  • Add UpnpServiceFactory
  • Remove unnecessary suppression

Unlike previous implementations, accepting UPnP queries will use a Java standard simple http server rather than a socket implementation. Along with this, tuning using some parameters is possible. Links for their default values and detailed information have been added as comments to production.yml.

  • Add UPnP-params to Dockerfile

Unlike previous implementations, Classes provided as standard by the library are not used for thread pool and thread factory. It has been replaced to using Spring's thread management mechanism via an adapter. The use of default implementation was be avoided in order to meet requirements such as shutsown being linked to the application lifecycle and shutdown flow, ensuring logging of UncaughtExceptions, and not accessing the SecurityManager.

  • Add UpnpServiceConfigurationAdapter

 - Add com.tesshu.jpsonic.service.upnp.transport
 - Add new server/client implementation
 - Enable to change startup arguments of HTTP server for UPnP
 - Comment out non-essential items in production.synology.yml to make
   configuration easier to understand.
 - Since Spring's Service class has become bloated, UPnP instantiation
   will be moved to a factory class.
 - JUPnP's thread factory will be overridden
@tesshucom tesshucom added type: enhancement A general enhancement type: dependency-upgrade A dependency upgrade in: UPnP Issues in UPnP in: docker Issues in the test module. type: maintenance Refactorings not related to logic, etc. labels Jan 15, 2024
@tesshucom tesshucom added this to the jpsonic 114.0.0 milestone Jan 15, 2024
@tesshucom tesshucom self-assigned this Jan 15, 2024
@tesshucom tesshucom linked an issue Jan 15, 2024 that may be closed by this pull request
2 tasks
@tesshucom tesshucom mentioned this pull request Jan 15, 2024
8 tasks
@tesshucom tesshucom added the type: breaking changes Relevant announcement required upon release. label Jan 15, 2024
@tesshucom
Copy link
Owner Author

tesshucom commented Jan 15, 2024

Since production.yml has been changed, an announcement is required at the time of release. It is backward compatible, so you can continue to use previous versions of yml as is. (Comments have been added to make configuration easier.)

@tesshucom tesshucom merged commit 45094ae into develop Jan 15, 2024
3 checks passed
@tesshucom tesshucom deleted the feature/migrate-cling-to-jupnp branch January 15, 2024 23:39
@tesshucom tesshucom linked an issue Jan 17, 2024 that may be closed by this pull request
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: docker Issues in the test module. in: UPnP Issues in UPnP type: breaking changes Relevant announcement required upon release. type: dependency-upgrade A dependency upgrade type: enhancement A general enhancement type: maintenance Refactorings not related to logic, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

UPnP migration verification Agenda for v114
1 participant