Giter VIP home page Giter VIP logo

containerized-webapp's Introduction

Containerized WebApp

This is a short Go and Reactjs web app tom find the highest prime number of a given, this structure of this project is inspired by Golang Project Layout

A live version of this app is hosted on here on digital ocean

Design Decisions

I decided to go with a concurrency approach, utilising Golang's concurrency support I was able to break finding the highest prime number into batches of 10, i.e if an input 50 is supplied, the last 10 highest number of 50 that is 40-50 will be calculated for prime numbers if no prime number is found within this range the next 10 highest numbers 30-40 will be calculated and so on.

Using this approach we're taking advantage of Golang's multi-processing ability to solve this problem faster, when the highest prime number of a particular supplied number is found the highest prime number is indexed in redis database for an hour to make future retrievals a lot faster

Running

The app and its dependencies are managed by docker compose to run the app use the command below it uses docker-compose under the hood

$ make run

Visit http://localhost:8080 to view the app

Testing

$ cd __tests__
$ go test

containerized-webapp's People

Contributors

sheghun avatar

Stargazers

 avatar

Watchers

 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.