Giter Club home page Giter Club logo

plume's Introduction

Plume

Maven Central

Plume is an encapsulation of the best available JVM libraries to get a project up and running quickly.

Key concepts:

  • Plume has few main principles/dependencies: configuration via Config and dependency injection via Guice or Dagger.
  • Plume is the glue made with Config and Guice/Dagger to make popular open source libraries work together: Jersey, QueryDsl, HikariCP, etc.
  • Plume is lightweight and modular.

A concrete example of how Plume works is the Plume Mail module:

  • It provides the Simple Java Mail dependency
  • This module exposes 50 lines of code via the MailerProvider class:
    • In the constructor, it populates the config object from Simple Mail Java using Config
    • The MailerProvider class implements the javax.inject.Provider interface to expose the Simple Mail Java Mailer object.

In this way, it is easy to replace most of the components suggested by Plume. The only "strong" requirement is to provide dependency injection objects using javax.inject.

Plume is maintained by Coreoz and licensed under Apache License 2.0.

Maintenance

In developing Plume, we strive to keep the project and its dependencies as small and lightweight as possible. Making Plume lightweight helps reduce the complexity of the system and the risk of security issues. This means that Plume will help projects have the lowest maintenance and evolution costs.

In addition:

  • Coreoz has been maintaining Plume since 2016 and providing migration guides for each release. This is not going to change anytime soon.
  • Plume sources are published to Maven Central: so they will always be available one way or another.

Demo

Sample projects can be found here: https://github.com/Coreoz/Plume-showcase.

Getting started

The best way to get started is to use a Maven archetype for Plume.

Plume requires at least Java 11.

Dependency injection

If you are not familiar with the dependency injection concept, read the Guice Motivation Guice.

Dependency injection takes a central place in Plume. Indeed, all modules provided by Plume contain injectable objects. To use these injectables objects, the default choice is Guice: it is really easy to use.

If you are already familiar with Guice, you may want to have a look at Dagger which enables to detect dependency injection problems at compile time. To use Dagger the annotation processor should be enabled in your IDE: https://immutables.github.io/apt.html. However, note that Dagger may be more difficult to use than Guice.

In Plume documentation, examples use Guice modules. Most of the time there is a corresponding Dagger module to each Guice module. For example, the corresponding Dagger module for GuiceConfModule is DaggerConfModule.

Plume core modules

General modules

Reference all libraries versions used by Plume. It will help you avoid dependency conflicts in your pom.xml file.

This module is based on the Config library and handles the application configuration.

Enables to build REST web-services with Jersey and expose the documentation with Swagger.

This module can be used with Plume Jersey monitoring to quickly setup application monitoring exposure.

Common services that are often needed in projects or libraries.

Expose a Mailer object from Simple Java Mail through a Config configuration.

Enables to easily execute recurring tasks/jobs through Wisp Scheduler.

Database modules

Basic utilities to pool SQL connections with HikariCP and manage transactions.

Integration with Querydsl for SQL only (no JPA :).

Code generation for Querydsl for SQL only.

Use Flyway to help you make integration tests with a database.

Plume ecosystem

  • Maven archetype for Plume helps to create a project using Jersey/Grizzly, QueryDsl, HikariCP, Flyway. The generated project includes sample unit and integration tests. It also includes some basic configuration for Gitlab and Github CI.
  • Plume Admin and Plume File libraries allow you to quickly create an admin area and upload files, respectively.
  • Plume Dependencies is a Maven BOM project to unify dependencies between Plume, Plume Admin and Plume File libraries.

Other Libraries to use with Plume

If you need an HTTP client in a Plume application, a good choice is to use:

Upgrades

Upgrade from 3.x to 4.x

See upgrade instructions in the release details.

Upgrade from 2.x to 3.x

See upgrade instructions in the release details.

Upgrade from 1.x to 2.x

See upgrade instructions in the release details.

plume's People

Contributors

allansv avatar amanteaux avatar jimetevenard avatar lucas-amiaud avatar spiritoossanki avatar tlair001 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

plume's Issues

Java 9 support

Salut,

J'ai créer le projet avec le jdk 9, il y a pas mal d'erreur.
Ajouter le support jdk9 serait cool !

++

[plume-db & plume-db-querydsl] Provide interfaces for TransactionManager

This will enable to provide an easier way to override the TransactionManager.

The current TransactionManager will be called HikariTransactionManager, whereas the interface will still provide default implementation of executeAndReturn and execute based on the implementation of dataSource.

This will impact TransactionManagerQuerydsl:

  • It will implement TransactionManager instead of extending it
  • It will contain an instance of TransactionManager to delegate the corresponding methods

Provide more health metrics

Il faudrait ajouter des métriques sur :

  • HikariCP
  • Grizzly
  • La JVM : une version plus synthétique que celle fournie aujourd'hui de manière à identifier très rapidement les problèmes de mémoire

Ces métriques doivent pouvoir être récupérées facilement :

  • Soit pour être exposées par l'API de métriques
  • Soit pour être intégrées dans un système externe comme Datadog

Il faudrait repartir de la branche more-metrics : https://github.com/Coreoz/Plume/tree/more-metrics

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.