Skip to content

ricardoespsanto/gupgop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gupgop - A blockchain API

This application serves as a simplistic facade over other block explorers such as Blockchain's API.

A particular aspect of this application is that it strives to return an empty answer when one was not, for whatever reason, possible to be extracted. This can became handy if we're using a block explorer through a minimal system and wish to present always updated values or use cached ones when not possible.

Tech stack

Below is a short summary of the tech involved in this application:

Framework

Gupgop is a Spring boot application, that was scaffolded with Spring initializr.

Base language

This application was developed in Java 8 but should be migrated to Java 9 as soon as possible even if no code change is done as this would improve memory consumption.

Given some of the more practical aspects of developing an application nowadays, some code generation tools have been used. In particular - Lombok. As this may not be to everyone's taste, (is lombok a hack ?) an alternative can be used instead.

Build tool

It uses gradle as a building tool.

Others

It depends on a few other spring cloud pieces of machinery to provide additional behaviour and hardening it for production environments.

Circuit breaker

Hystrix is used as a circuit breaker (the implementation packaged by spring as the original Hystrix was developed by Netflix OSS)

Health

It provides a few health endpoints through spring boot's actuator

Documentation

The application's source code is naturally documented with Javadoc but also relies on Swagger to provide a live documentation of its API. This was implemented under the hood with Springfox

Current status

The application is production ready event though, as with all software, there's more work to be done.

Known issues

The target API (Blockchain's API) supports multiple addresses as parameters to the endpoint but due to the natural nature of Spring's URL encoding that behaviour is lost. This is an easy fix given the right configuration.

Future enhancements

  • We need to include a build pipeline code. Perhaps Spring cloud pipeline's? ... Concourse is a personal favorite .. wink wink.
  • Containerisation, obviously.
  • We should think about hosting this in a cloud... AWS cloudformation code
  • Perhaps convert the API into an AWS gateway and have the executing logic converted into a serverless component like AWS Lambda
  • Use Kotlin as a replacement for the code generation mechanism (lombok)
  • Track code quality and documentation and test coverage with a static code analysis tool that publishes to sonarqube

Contributions

Please don't... this is a short lived project with a limited usage. It is not intended to be representative of any future work.