A simple client/server queue manager.
Server side: ASP.NET Core 2.1 Rest API Server
Client side: Angular
- Missing logging
- If server goes down unexpectedly, queue is lost. Using a DB instead of json file is preferred.
- Authentication is missing, anybody can mess up the queue.
- There is no delay between jobs. One job finishes, the second starts immidiately.
- Job duration is in seconds and there is no duration less than 1 second. [Minimum job duration is 1s. Job duration is an integer]
- Server is rock solid. Unexpected crash, power loss, loss of connectivity cannot happen.
- Printer is ideal. Materials are unlimited and so on. In other words, there is nothing that can interrupt printing proccess except "Cancel" function of API.
- Duration time is estimated perfrectly. There is no difference between duration entered in the UI and the actual printing time.
- No parallel users adding to queue. In case of parallel users, the table will need a different refresh method or a fixed low polling delay.
- Current refreshTimer (UI Table refresh) is set to the activeJob duration +1 second. In other words, after each job estimated to complete +1 second, the table will refresh. The idea behind this: The only thing that can change without the user intervention is "active job removed by the server". And this can be predicted by the endTime of the job. I added one more second just to be sure the table will be refreshed "after" the server. With the assumptions [1] and [2] it should be OK for most cases.
Clone the whole solution from git
git clone https://github.com/ratiner/StPrintQueue.git
The solution is divided into 3 folders:
- StPrintQueue: Web Manager powered by Angular Cli.
- StPrintQueue.Api: REST Api Server, powered by ASP.NET Core 2.1
- StPrintQueue.Db: Dependency of REST Api Server.
NodeJS Angular CLI ASP.NET Core 2.1 Visual Studio 2017 (optional)
After cloning the whole repository,
- Build and run the REST API project opening solution file in visual studio and running the Rest API project (F5)
StPrintQueue.sln
- Step into the angular project
cd StPrintQueue/StPrintQueue
- Install all node dependencies
npm install
- Run angular cli project
npm start
Open a browser window at http://localhost:4200
Basically it is not part of the assignment. But a helpful README.md should have this section
- Roman Ratiner - Initial work