Giter Site home page Giter Site logo

wejick / gojek-commons Goto Github PK

View Code? Open in Web Editor NEW

This project forked from gojekfarm/gojek-commons

0.0 2.0 0.0 1.13 MB

Dropwizard based micro-service development framework

License: Apache License 2.0

Java 12.89% FreeMarker 0.15% HTML 0.15% JavaScript 86.80%

gojek-commons's Introduction

GoJek Commons Build Status

GoJek Commons is a collection of useful abstractions aimed at making micro-service development faster and easier to manage.

Introduction

From our experience, we have seen that most micro-service development has similar system requirements and they all end up with,

  • a data store
  • a centralized cache store
  • a queuing system
  • event processing
  • scheduled job processing
  • application/business metrics for monitoring & alerting
  • input validations and error handling
  • health checks

We end up writing boiler plate code in every service making the development slower and bulkier codebase. GoJek Commons was created to abstract out most of these dependencies and keep the service smaller and simpler.

Components

GoJek Commons is built on top of Dropwizard Framework for its out-of-the-box support for service hygiene (configuration, metrics, logging etc..). The following are the components used,

Getting Started

Setting Up Maven

   <dependencies>
     <dependency>
       <groupId>com.gojek</groupId>
       <artifactId>gojek-commons-application</artifactId>
       <version>2.0.1</version>
     </dependency>
   </dependencies>
   
   <repositories>
     <repository>
       <id>jcenter</id>
       <url>https://jcenter.bintray.com</url>
       <snapshots>
         <enabled>false</enabled>
       </snapshots>
     </repository>
   </repositories>

Base Application

gojek-commons-application allows you to create a basic application with out-of-the-box support for,

  • Exception mapper for WebApplicationException that transforms the exception into a json response
  • Localization of error messsages
  • Useful filters like RequestTrackingFilter, CorsFilter etc.
  • Swagger integration and many more

Jpa Support

gojek-commons-jpa exposes a JpaBundle with,

  • ActiveJPA support
  • Database Health check
  • Connection pool metrics
  • Database migrations using Flyway

Amqp Support

gojek-commons-jpa exposes a AmqpBundle with,

  • Rabbitmq as message broker
  • Amqp Health check
  • Connection pool metrics
  • Support for retrying failed messages before dead lettering

Cache Support

gojek-commons-cache exposes a AmqpBundle with,

  • Redis as cache server
  • Redis Health check
  • Connection pool metrics
  • Utiities like AtomicExecutor that uses redis locks for atomic operations in a cluster

Job Support

gojek-commons-job exposes a JobBundle with,

  • Quartz scheduler
  • Job registration & scheduling using configuration
  • Job execution metrics

Guice Support

gojek-commons-guice exposes a GuiceBundle & GuiceJpaBundle with,

  • Dependency injection support
  • Jpa integration

Support

Create an issue explaining your issue as detail as possible.

License

gojek-commons is offered under Apache License, Version 2.0

gojek-commons's People

Contributors

ganeshs avatar

Watchers

Gian Giovani avatar James Cloos avatar

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.