Reorganize and remove dependencies, part 1 #4301
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
This PR audits dependencies, removes a number of them, reorganizes some others, and zaps what it can to make the backsplash jar in particular and jars in general smaller.
Why is it good:
A lot of dependencies are no longer a part of projects that don't need them. This is good for CLEANLINESS. For example, anything depending on
awsSdk
was a waste, since nothing actually used it.Also, smaller jar sizes are good because we pay for storage and because they shoud... start faster? Seems like maybe that's not true. Because they take less time to assemble! For developer productivity! I'm looking for the wins I can find, since I couldn't make backsplash small enough for lambda and have other things to do than die on this hill (though I am obviously more than happy if this is the particular hill I die on eventually).
Checklist
Demo
Backsplash size before: ~252mb
Backsplash size now: 182mb
Batch size before: ~299mb
Batch size now: 237mb
Notes
The bulk of the improvements for backsplash and batch came from removing the general purpose
awsSdk
dependency, which wasn't needed and was huge. Other big improvements were getting akka out ofcommon
andzap
-ing things in the backsplash assembly shade rules.Testing Instructions
docker-compose run --rm --entrypoint bash --service-ports api-server
docker-compose run --rm --entrypoint bash --service-ports backsplash
docker-compose run --rm --entrypoint bash --service-ports tile-server
java -jar app-backend/api/target/scala-2.11/api-assembly.jar
java -jar app-backend/tile/target/scala-2.11/tile-assembly.jar
java -jar app-backend/backsplash/target/sscala-2.11/backsplash-assembly.jar
Closes azavea/raster-foundry-platform#533