Coder Social home page Coder Social logo

pragmabrewery's Introduction

content-added2

content-added1

Running the Project

  1. Prerequisite: Have Gradle and Java 8 Installed.
  2. Build the project c:\pragmabrewery>gradle build
  3. Run the server c:\pragmabrewery>gradle bootrun
  4. Access the page: http://localhost:8080/
  5. Access Unit Tests: http://localhost:8080/UnitTests.html

What were the questions you would ask and your own answers/assumptions?

Question: How does the complete solution look like ? How do all the parts fit ?

Answer: The System Architecture is as follows:

pragmabrewery

Using RasberryPI, connected to temperature sensors ( https://github.com/ControlEverythingCommunity/MCP9805 ), will notify the central server with the "beer name" , "temperature", and the "status". i.e. Each Sensor(PI and Sensor Device) is configured to have the minimum and maximum temperature. If the temperature falls out of this range,then the sensor will notify the central server, of the "beer container", "temperature", and the "status".

The Central Server (Java / SpringBoot Services) will contain two REST services

  1. A service that accepts, the {"beer", "temperature" and "status"} from the sensors.
  2. A service that will return the full list of beer categories and their statuses.

A Mobile/Tablet Device on the Truck will poll every 5 seconds to fetch the beer temperature and status data from the central server.

What are the highlights of your logic?

The java code written is for the central server. Even though the sensors, will notify this service of the "beer", "temperature" and "status", I have written an extra validation class "BeerStatusValidator". This is a singleton class, which will contain the beer temperature rules logic. Ideally these rules can be retrieved from a configurable store, like database or properties file.

Code Writing Style

  • Unit testable Front-end and Back-end code
  • Code follows 'Separation of concerns' style. Relevant classes are placed in its ideal packages.
  • The front end pages are decoupled from the backend services, following a REST architecture.

What could have been done in a better way? What would you do in version 2.0?

  • A more 'eye catching' user interface with sound enabled for clearer notifications when temperature changes.
  • The central backend server will store historical information (i.e. with time info) of the temperature captured from each device.

pragmabrewery's People

Contributors

byorn avatar

Watchers

 avatar  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.