Giter Site home page Giter Site logo

counterapp's Introduction

Problem :

To develop a Token management system The Use case is to design Java based application for an Application submission Center. Applicant must visit one of the 1st set of counters for Document verification, where the token Number will be assigned, and same token number will be used for further process.

Please consider the following requirements:

  • Multiple token generation counter (1st set of counters).
  • Token will be assigned to multiple service counter (2nd set of counters)
  • Token can be categorized to NORMAL, PREMIUM
  • Dedicated counters to serve PREMIUM Token.
  • If someone can come up with of event sinks using Kafka, that is definitely a plus.

Note: Concurrency, transaction, Queue are the gist of the problem solution.

The application is developed using Springboot Moicroservices and Kafka as a message queue. Thymeleaf is used for a basic UI.

Prerequisite:

  • Java 8
  • A running kafka at localhost:9092 (If different address, Please update in application.properties)
  • A topic named registration should be created before the application is tested.
  • Build the application using mvn clean package from the root directory
  • Run the application using command java -jar target/<generated_jar> for example If you use default then java -jar target/counterapp-0.0.1-SNAPSHOT.jar
  • The application starts and pushes some messages in queue (USed for testing) you can comment in CounterAppApplication.java
  • Access the server using http://localhost:8080
  • Click on the button for New Registration
  • Enter the name, Registration counter and a flag for priority or not
  • On clicking submit you can see the message had been pushed to Kafka and consumed and directed to appropriate counter for processing
  • The processing server is implemented using ExecutorService (RegistrationProcessor).
  • Two ExecutorService (1 for normal and 1 for priority) has been created.
  • For testing NormalProcessing counter has a wait of 3 seconds and priority processing counter has a wait time of 1 seconds.

Pending Tasks:

  • Writing testcases (No time for that at this moment)
  • Using Maven shade plugin for creating a standalone fat jar which can be deployed independantly (You can do this easily)

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.