Project

General

Profile

Feature #11362

create separate jars and dependency folder for FWD client

Added by Constantin Asofiei 6 months ago. Updated 19 days ago.

Status:
WIP
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
Due date:
% Done:

0%

billable:
No
vendor_id:
GCD
case_num:
version_reported:
version_resolved:
reviewer:
production:
No
env_name:
topics:

Related issues

Related to User Interface - Bug #11326: Reduce memory consumption of FWD clients Test
Related to Runtime Infrastructure - Feature #5776: reduce memory requirements for the FWD client Test
Related to Runtime Infrastructure - Feature #2158: create a minimal jar file suitable for making a remote connection to a P2J server, processing our data types and handling appserver calls New
Related to Runtime Infrastructure - Feature #3226: change p2j to fwd in names, filenames, paths, environment variables et al WIP
Related to Build and Source Control - Feature #11367: create separate jars and dependency folder for FWD server New

History

#1 Updated by Constantin Asofiei 6 months ago

In FWD, we currently don't have a clean way to separate the dependencies for FWD client and also p2j.jar. This task is meant for two things, in build.gradle:
  • create a build/lib.client folder where only the dependencies mandatory for FWD client are copied
  • create a separate p2jclient.jar with only the FWD code required by the FWD client.

This way, we reduce the footprint required for loading the jars for the FWD client.

#2 Updated by Constantin Asofiei 6 months ago

  • Related to Bug #11326: Reduce memory consumption of FWD clients added

#3 Updated by Constantin Asofiei 6 months ago

  • Related to Feature #5776: reduce memory requirements for the FWD client added

#4 Updated by Greg Shah 6 months ago

  • Related to Feature #2158: create a minimal jar file suitable for making a remote connection to a P2J server, processing our data types and handling appserver calls added

#5 Updated by Greg Shah 6 months ago

  • Related to Feature #3226: change p2j to fwd in names, filenames, paths, environment variables et al added

#6 Updated by Greg Shah 6 months ago

Let's call it fwd-client.jar and we should also discuss if we should add version numbering into the jar name.

I think we should do this same thing for the server and for our appserver client (see #2158).

#7 Updated by Greg Shah 6 months ago

  • Related to Feature #11367: create separate jars and dependency folder for FWD server added

#8 Updated by Teodor Gorghe 3 months ago

The separate dependency folder was already one in #11326.
The only part left (which is the most time consuming) is to create the lightweight fwd-client.jar.

#9 Updated by Teodor Gorghe about 2 months ago

  • Status changed from New to WIP
  • reviewer Constantin Asofiei added
Created task branch 11362a and committed revision 16723:
  • Aligned dependency versions across all distribution configurations.

#10 Updated by Teodor Gorghe about 2 months ago

  • Status changed from WIP to Review

Constantin, please review the changes.

#11 Updated by Teodor Gorghe 22 days ago

  • reviewer Roger Borrello added

Roger, can you take a look into the changes?

#12 Updated by Constantin Asofiei 22 days ago

  • % Done changed from 0 to 100
  • Assignee set to Teodor Gorghe

#13 Updated by Constantin Asofiei 20 days ago

Teodor, I assume compared to trunk the build/lib stays 'the same' and nothing gets changed there in respect to jar versions, right?

Only the dist/ library folders are fixed.

#14 Updated by Teodor Gorghe 20 days ago

build/lib is actually fwdAllRuntime, which are the versions which are merged from all together, and included in the p2j.jar manifest (for each dependency, the newer version wins).

So, w/o #11362, the build/lib versions are the same, the one that gets changed are the distribution jars (server, convert, client, etc.) convert lib is actually build/lib and the plan is to use server. 11678a switches the libs from convert to server for base FWD docker images.

#15 Updated by Constantin Asofiei 20 days ago

With 11362a, some jar versions have been changed in build/lib:

$ diff -r build.trunk.16765/lib/ build.11362a/lib
Only in build.11362a/lib: jackson-annotations-2.18.3.jar
Only in build.11362a/lib: jackson-annotations-2.18.3-sources.jar
Only in build.trunk.16765/lib/: jackson-annotations-2.21.jar
Only in build.trunk.16765/lib/: jackson-annotations-2.21-sources.jar
Only in build.trunk.16765/lib/: jcl-over-slf4j-2.0.17.jar
Only in build.11362a/lib: jcl-over-slf4j-2.0.18.jar
Only in build.trunk.16765/lib/: jul-to-slf4j-2.0.17.jar
Only in build.11362a/lib: jul-to-slf4j-2.0.18.jar
Only in build.trunk.16765/lib/: netty-codec-dns-4.1.107.Final.jar
Only in build.11362a/lib: netty-codec-dns-4.1.129.Final.jar
Only in build.trunk.16765/lib/: netty-resolver-dns-4.1.107.Final.jar
Only in build.11362a/lib: netty-resolver-dns-4.1.129.Final.jar

Is this expected and by intent?

#16 Updated by Teodor Gorghe 20 days ago

I have pinned these versions for the following reason (they are expected, I have forgot about transitive dependencies):
  • jackson annotations was pinned to version 2.18.3 because we use the core, databind, dataformat, dependencies on version 2.18.3. The version 2.21 came from the chain of webauthn4j-core -> tools.jackson:jackson-bom:3.1.4.
  • slf4j-api expected version is 2.0.18. Bumped up the jcl-over-slf4j and jul-to-slf4j from 2.0.17 to 2.0.18 to use the same slf4j version.
  • same stuff was also done for netty, updated codec-dns and resolver-dns to 4.1.129.Final.

#17 Updated by Constantin Asofiei 20 days ago

  • Status changed from Review to Internal Test

Thanks, do some testing and lets get this merged (although the versions changed are not major, just minor, should be ok, right)?

#18 Updated by Teodor Gorghe 20 days ago

Committed revision 16724 on task branch 11362a:
  • Fixed jackson-annotations dependency. Webauthn4j requires jackson 3.

I have smoke tested about everything. I saw a regression on Webauthn4j, which is used for passkey authentication, which has been fixed in the last commit.

#19 Updated by Roger Borrello 19 days ago

Teodor Gorghe wrote:

Roger, can you take a look into the changes?

Checking out the branch...

#20 Updated by Roger Borrello 19 days ago

Roger Borrello wrote:

Teodor Gorghe wrote:

Roger, can you take a look into the changes?

Checking out the branch...

At the level I was looking, I don't see a difference. I was verifying the docker_build.sh script wouldn't have any issues creating the FWD Docker images, and it is fine. The below output shows all the dist files are found:

rsync -av /home/rfb/projects/fwd/11362a/dist/fwd_deploy-admin_4.0.0_p2j_11362a_16767_20260924.zip /home/rfb/projects/fwd/11362a/dist/fwd_deploy-client_4.0.0_p2j_11362a_16767_20260924.zip /home/rfb/projects/fwd/11362a/dist/fwd_deploy-convert_4.0.0_p2j_11362a_16767_20260924.zip /home/rfb/projects/fwd/11362a/dist/fwd_deploy-docs_4.0.0_p2j_11362a_16767_20260924.zip /home/rfb/projects/fwd/11362a/dist/fwd_deploy-native_4.0.0_p2j_11362a_16767_20260924.zip /home/rfb/projects/fwd/11362a/dist/fwd_deploy-server_4.0.0_p2j_11362a_16767_20260924.zip /home/rfb/projects/fwd/11362a/dist/fwd_deploy-spawner_4.0.0_p2j_11362a_16767_20260924.zip /home/rfb/projects/fwd/trunk_dev/tools/docker/context/p2j/dist 

#21 Updated by Teodor Gorghe 19 days ago

Difference which is on the convert dist:

Only in build.trunk.16765/lib/: jcl-over-slf4j-2.0.17.jar
Only in build.11362a/lib: jcl-over-slf4j-2.0.18.jar
Only in build.trunk.16765/lib/: jul-to-slf4j-2.0.17.jar
Only in build.11362a/lib: jul-to-slf4j-2.0.18.jar
Only in build.trunk.16765/lib/: netty-codec-dns-4.1.107.Final.jar
Only in build.11362a/lib: netty-codec-dns-4.1.129.Final.jar
Only in build.trunk.16765/lib/: netty-resolver-dns-4.1.107.Final.jar
Only in build.11362a/lib: netty-resolver-dns-4.1.129.Final.jar

On the server and client libs, all dependencies now matches with the version declared in the manifest file of p2j.jar.

Constantin, can this be merged to trunk?

#22 Updated by Constantin Asofiei 19 days ago

Teodor Gorghe wrote:

Difference which is on the convert dist:
[...]

On the server and client libs, all dependencies now matches with the version declared in the manifest file of p2j.jar.

Are you saying that we still have differences between jar versions, in i.e. server vs convert or client vs convert?

#23 Updated by Teodor Gorghe 19 days ago

No, there is no difference of jars version between server/client/convert. What I have meant is that this branch addresses the current trunk jar version differences between each distribution, and brings them to the same jar version for each distribution.

#24 Updated by Constantin Asofiei 19 days ago

  • Status changed from Internal Test to Merge Pending

Teodor Gorghe wrote:

No, there is no difference of jars version between server/client/convert. What I have meant is that this branch addresses the current trunk jar version differences between each distribution, and brings them to the same jar version for each distribution.

Thanks, go ahead and merge now.

#25 Updated by Teodor Gorghe 19 days ago

  • Assignee deleted (Teodor Gorghe)
  • % Done changed from 100 to 0
  • reviewer deleted (Constantin Asofiei, Roger Borrello)

Branch 11362a was merged into trunk as rev. 16767 and archived.

tg@tg:~/gcd/branches/trunk$ ./gradlew checkDistributionAlignment
...
> Task :checkDistributionAlignment
All 375 modules resolve to a single version across fwdConvert, fwdClient, fwdServer and fwdAllRuntime.

Set this task to initial state because of the second bullet of #11362-1 not being implemented yet.

#26 Updated by Teodor Gorghe 19 days ago

  • Status changed from Merge Pending to WIP

Also available in: Atom PDF