Partial serialization
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 38/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- java
調査の方向性
まず、AbstractBomGenerator、その実装、および Parser の実装における ObjectMapper の作成とカスタムシリアライザーの登録を追跡します。現在、各 Version でシリアライズとデシリアライズがどのように設定されているかを確認し、続いて public accessor とキャッシュの動作を定義します。部分的な BOM オブジェクトが同じ設定済み mapper を使用でき、ドキュメントのループを繰り返しても冗長な ObjectMapper インスタンスが作成されなければ完了です。
索引モデルが issue の本文から書いたものです。
説明
Currently the AbstractBomGenerator and it's implementations use several custom serializers, which are registered in an always new ObjectMapper.
Handling partial serialization of a BOM is not cleanly possible (e.g. serializing a single vulnerability or a list of components), since the ObjectMapper is not exposed and the AbstractBomGenerator signatures do not match. The only way of achieving this, while serializing exactly as this reference implementation is either using reflection hacks or by full on copy pasting the code.
Additionally, the Jackson ObjectMapper isn't a lightweight object. For a simple parse-modify-writeback loop of a cyclonedx document two separate ObjectMappers are created on every such loop, which is fully unnecessary.
Feature request / proposal:
- Decouple ObjectMapper creation and configuration from AbstractBomGenerator and Parser implementations
- Expose the ObjectMapper in a public accessor
- While at it, memorize/cache the ObjectMapper instance per Version, so that a single instance of an ObjectMapper is used for serialization and deserialization
Benefits of the change:
- enables partial serialization of BOMs and cleanly working directly with document parts.
- reduces / stabilizes memory footprint when (de-)serializing multiple documents
- improves performance when (de-)serializing from the second document onward (when the ObjectMapper has been created)
Context of this request:
I'm currently working on a private project (private for now, currently too raw / alpha) which stores and queries CycloneDX. I'm heavily using Postgres JSONB support, and being able to properly work with partial objects is a requirement for me.
Is there interest in a feature like that? I'll build that for myself anyway, but having it integrated in the core lib would be cleaner for me, and might benefit a few other people, so I gladly can make a PR.
Just wanted to ask before dropping a rather big change out of the blue.
- 主要言語
- Java
- スター
- 122
- フォーク
- 93
- 平均マージ
- 1日 11時間
- マージ済み PR(30日)
- 36
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
CycloneDX/cyclonedx-core-java のほかの issue
-
breaking change
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
CycloneDX/cyclonedx-core-java#917 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
CycloneDX/cyclonedx-core-java#902 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 58/100
CycloneDX/cyclonedx-core-java#848 ·
メンテナーはふだん 1 日以内に返信
-
Additional license names対応中かも @bilak が 244 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 48/100
CycloneDX/cyclonedx-core-java#792 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 48/100
CycloneDX/cyclonedx-core-java#682 ·
メンテナーはふだん 1 日以内に返信
CycloneDX/cyclonedx-core-java の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
checkstyle/checkstyle#22145 ·
メンテナーはふだん 1 日以内に返信
-
rset command throws NPE in ResultsFormat.guessSyntax対応中かも @Ostrzyciel が今日担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
enhancement good first issue help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
objectionary/eo#9593 ·
メンテナーはふだん 1 日以内に返信
-
release bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
OpenLiberty/open-liberty#36124 ·
メンテナーはふだん 1 日以内に返信