Giter Site home page Giter Site logo

producer-consumer's Introduction

Producer-Consumer

Opening both angular and Spring boot code:

Running Angular:

  1. Unzip downloaded file.
  2. you must have NodeJS and angular-Cli on your computer.
  3. After unzipping the file, open the project file and press right click on the background of the folder. Open cmd window.
  4. Write npm install in cmd window.
  5. Now, you can open the project by writing ng serve –open in cmd window (port number: 4200).

Running Spring Boot project:

  1. Open Eclipse ide or any other ide.
  2. Import the whole Spring boot folder into ide.
  3. Make sure while running the code that the port number inside (Crossorigin is the same port number of angular project).
  4. How to run Producer consumer simulator:

1- Run Angular Code while Running Spring boot program to be able to receive data from the front end (http://localhost:4200/).

2- As shown the picture this page will appear in the browser which contains simulator interface as shown in fig.1

Snapshots of the UI and a User Guide:

1- for adding the Queue component which is the place that product waits according to predominant waiting time, just click on the place you want to add the queue into then click on Add Queue button (like shown in the figure 1).

2- Adding Machine is the same process as Adding queue. Choose the wanted place then click on Add product button the machine will appear on the screen. 3- To make a connection between queue and machine, you must choose the product according to the wanted flow. If you want the product to go from the machine first then goes to the queue you must click first on the wanted machine then the queue then click on Connect button. The Opposite also accepted (from the queue to the machine ). It is not acceptable to make a connection between the same kind of diagrams like two queues or two machines.

4- To start the simulation after adding all machines ,queues and connections between them ,you must enter the number of products and then press the button of Run.

5-To start up a new simulator from scratch, just click on the clear button and everything on the screen will be deleted. 6- If you want to stop the simulation at any time, just click on the button of Stop. 7- If you want to replay the same simulation, just click on the button of Replay.

Decisions and Assumptions: The user can’t connect 2 machines or 2 queues. A machine can’t have 2 queues destinations. The user should be aware when connecting as the first clicked object (queue or machine) is set to be the start point of the connection and the second clicked object will be the destination (end point). And both are treated differently. A machine can’t be either the first thing in the simulation or the final destination of the simulation. The time of each machine to process product is randomed (5 seconds at max). The rate of products entering the queues is also randomed (3 seconds at max). To start a new simulation means the previous simulation and design will be deleted permanently.

For better UML resolution open the following link:Visual Paradigm Online Shared Diagram (visual-paradigm.com).

Contributers:

producer-consumer's People

Contributors

bassantyasser043 avatar tokaashraf12 avatar

Stargazers

 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.