Git Product home page Git Product logo

simple-compression-service's Introduction

Simple Compression Service (a.k.a Amassa!)

Build Status codecov

This project is a compressor/decompressor system made with two microservices, a frontend and a reverse proxy. The compression/decompression system uses Huffman algorithm and it is written in C programing language. As the main project lanaguage is Go, was used CGO to make possible go code call the C API. For file storage this project uses pCloud and a link of the pushed file is send by email to the client.

Screenshot

alt text alt text alt text alt text

Service Architecture

alt text

Reverse proxy

The reverse proxy was made using NGINX server on Docker. It is placed at src/apps/reverseproxy with the .conf file and Dockerfile.

Frontend

The frontend is a golang server that serves HTML using templates. It is placed at src/apps/frontend with it source file, Dockerfile and tests.

Backend

The backend nowadyas is made by two microservices, one to handle frontend requests called inputhandler, and other service worker to compress and decompress files called compressor.

inputhandler

It is placed at src/apps/reverseproxy. It provides a REST API used by the frontend to make compression or decompression for given files. It get the requests from frontend, process the request payload and sends to compressor service by publishing a message into a queue topic using Redis.

compressor

It is placed at src/apps/compressor. It reads messages from a queue on a Redis in order to process files given commands: compress or decompress.

Running (~10 minutes)

First of all, clone this repo:

$ git clone https://github.com/ABuarque/simple-compression-service.git # using HTTPS

Go to the cloned directory and create a .env file on the root filling these values:

[email protected]
PASSWORD=yourpassword
[email protected]
PCLOUD_PASSWORD=yourpcloudpassword

Put all containers up:

$ docker-compose up -d

If everything is ok, all containers should be up:

alt text

Open up any brower and go to http://localhost:8080/home and enjoy!

If you get email authentication issue, with Gmail for example, it might be happen due to the "allow less security apps" option is disable for your account.

Acknowledgments

simple-compression-service's People

Contributors

abuarque avatar aguedafrazao avatar

Stargazers

 avatar

Watchers

 avatar  avatar

simple-compression-service's Issues

Libs without version!

Add version to all libs created for this projects, it will make bug finding and fixing faster.

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.