Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
105 changes: 56 additions & 49 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,73 +1,80 @@
# indy-archive-service project
# Indy Archive Service

This project uses Quarkus, the Supersonic Subatomic Java Framework.
Archive service for Indy artifact repository manager - caches build dependencies as local archives to accelerate similar future builds.

If you want to learn more about Quarkus, please visit its website: https://quarkus.io/ .
## Overview

## Running the application in dev mode
The Indy Archive Service cooperates with the sidecar that enhances build performance by creating local archives of build dependencies during the build process. These archives serve as cached dependency sets that can significantly accelerate subsequent builds with similar dependency requirements.

You can run your application in dev mode that enables live coding using:
```shell script
./mvnw compile quarkus:dev
```
Unlike traditional artifact repository archiving, this service focuses on build-time optimization rather than long-term storage management. It works in conjunction with the Indy Sidecar framework to provide intelligent dependency caching and retrieval mechanisms.

> **_NOTE:_** Quarkus now ships with a Dev UI, which is available in dev mode only at http://localhost:8080/q/dev/.
## Key Problems Solved

## Packaging and running the application
### Build Performance Optimization

The application can be packaged using:
```shell script
./mvnw package
```
It produces the `quarkus-run.jar` file in the `target/quarkus-app/` directory.
Be aware that it’s not an _über-jar_ as the dependencies are copied into the `target/quarkus-app/lib/` directory.
Issue: Builds spend significant time downloading dependencies from remote repositories

If you want to build an _über-jar_, execute the following command:
```shell script
./mvnw package -Dquarkus.package.type=uber-jar
```
Solution: Cache dependency sets locally as archives for rapid retrieval in similar builds

The application is now runnable using `java -jar target/quarkus-app/quarkus-run.jar`.
### Network Dependency Reduction

## Creating a native executable
Issue: Builds are vulnerable to network issues and remote repository outages

You can create a native executable using:
```shell script
./mvnw package -Pnative
```
Solution: Local archive caches reduce dependency on external network connectivity

Or, if you don't have GraalVM installed, you can run the native executable build in a container using:
```shell script
./mvnw package -Pnative -Dquarkus.native.container-build=true
```
### Bandwidth Optimization

Issue: Repeated downloads of the same dependencies consume network bandwidth

Solution: Single download, multiple reuse through archive caching

## Features

### Dependency Archiving

You can then execute your native executable with: `./target/indy-archive-service-1.0.0-SNAPSHOT-runner`
Build-Time Archiving: Automatically creates dependency archives during successful builds

If you want to learn more about building native executables, please consult https://quarkus.io/guides/maven-tooling.html.
Smart Packaging: Packages all resolved dependencies into optimized archive formats

## Related guides
### Archive Management

- Infinispan Client ([guide](https://quarkus.io/guides/infinispan-client)): Connect to the Infinispan data grid for distributed caching
- REST Client ([guide](https://quarkus.io/guides/rest-client)): Call REST services
- RESTEasy Mutiny ([guide](https://quarkus.io/guides/getting-started-reactive#mutiny)): Mutiny support for RESTEasy server
- YAML Configuration ([guide](https://quarkus.io/guides/config#yaml)): Use YAML to configure your Quarkus application
- RESTEasy JAX-RS ([guide](https://quarkus.io/guides/rest-json)): REST endpoint framework implementing JAX-RS and more
- SmallRye Health ([guide](https://quarkus.io/guides/microprofile-health)): Monitor service health
- Reactive PostgreSQL client ([guide](https://quarkus.io/guides/reactive-sql-clients)): Connect to the PostgreSQL database using the reactive pattern
- Cache ([guide](https://quarkus.io/guides/cache)): Enable application data caching in CDI beans
Archive Indexing: Maintains searchable index of available dependency archives

## Provided examples
Archive Contents Validation: Validates archive contents integrity and validity

### YAML Config example
Storage Optimization: Efficiently stores archives with compression and deduplication

This Supersonic example displays mach speed in your favourite unit, depending on the specified Quarkus configuration.
## Sidecar / Archive Integration Architecture Overview

[Related guide section...](https://quarkus.io/guides/config-reference#configuration-examples)
Build Process ◄──▶ Indy Sidecar ◄──▶ Indy / Archive Service (LFS)

## Integration Workflow

Build Initiation: Build process sends dependency requirements to Indy Sidecar

Routing Decision: Sidecar routes request based on archive availability

Archive Path: If suitable archive content exists → Archive Service provides cached dependencies

Traditional Path: If no archive content exists → Indy Core resolves dependencies traditionally

## Build & Deploy

### dev mode

```shell script
./mvnw compile quarkus:dev
```

### native executable

```shell script
./mvnw package -Pnative -Dquarkus.native.container-build=true
```

The Quarkus configuration location is `src/main/resources/application.yml`.
## Related Projects

### RESTEasy JAX-RS example
[Indy](https://github.com/Commonjava/indy)

REST is easy peasy with this Hello World RESTEasy resource.
[Indy Sidecar](https://github.com/Commonjava/indy-sidecar)

[Related guide section...](https://quarkus.io/guides/getting-started#the-jax-rs-resources)