This project was made as part of an assignment on the 3rd year subject 'Network and distributed programming' at the Faculty of Electrical Engineering in Banja Luka. The project is made as a desktop application using JavaFX, designed as a modular monolith.
Create a system that simulates the work of an online library. The library uses a GUI application with options to work with members (create, read, update, delete), review of all and confirmation or rejection of book reservations submitted by members, working with books (CRUD = create, read, update and delete). Apart from the app for The library, the system also has GUI applications for members and book suppliers.
The member application is used by library users. After starting the application, the application form opens to the system by entering a username and password. In addition, it is possible to open another form for registration. During registration, personal data of the member is entered, such as name and surname, address, e-mail, username and password (2 times for verification). Registration and login to the system is done by calling corresponding RESTful library endpoints. After a member submits a registration request, the account will not be activated automatically, but the librarian must confirm the registration request. When the user has an active account, the account can be used to log into the system and then has options to view all books (tabular), search and download books. In each row, in addition to the basic information, there is also a "Details" button, which opens a pop-up window to the user showing the title of the book, the title page of the book and the first 100 lines text file of the book. The user chooses books by selecting the row in which the book is located and can select multiple lines at once. The selected books are packed in a ZIP archive and sent to the user's e-mail via a RESTful library endpoint for sending mail. The content of the mail contains information about all books that the user asked for. Library members can communicate with each other and exchange impressions about books via a chat application. Messages are sent over a secure socket.
Working with members in the library application provides a tabular view of all member accounts with options for approval or rejection of requests, deletion and blocking. Member accounts are stored in the XML file users.xml at server side. The library application has CRUD options for working with books stored in a Redis database on the server side. For all listed operations for the GUI application of the library, LibraryServer is contacted via a REST API. Members can write a proposal for acquiring new books that is sent to librarians and registered members as a multicast message. Librarians may review said suggestions and send information via a multicast message to all users as to whether the book will be purchased.
In the main library GUI application, there is an option to order new books from suppliers. Suppliers communicate with the library using a classic socket communication. Each vendor has its own GUI application, where one can enter information about the books each supplier offers. Books are stored on the server side. For each book, the following data are kept as a minimum: title of the book, name of the author, date of publication, language in which it is written, the book title and the text file of the book content. For all listed GUI operations of the supplier's application, contact should be made via the SupplierServer using classic socket communication. In addition, when starting the supplier application, SupplierServer from the links.txt text file in which a list of links to books is located according to the principle of one line - one link, loads link by link, should download books from the page
Project Gutenberg https://www.gutenberg.org/ and fills in basic book data by parsing said downloaded content. Example of one link https://www.gutenberg.org/cache/epub/24022/pg24022.txt. Link to the book cover: https://www.gutenberg.org/cache/epub/24022/pg24022.cover.medium.jpg. Links to the front page of the book are not saved, but are formed based on the read link of the book. Downloaded books are visible on the supplier's GUI application. The librarian can see a list of all available books of a specific supplier, which can be ordered by selecting the appropriate option and entering the quantity. After sending of book requests to the supplier, there is an option on the supplier's side to pick up and process the order. Orders are picked up by library shipping time with a MQ (oldest first). After the supplier reviews the order, he can reject or approve it. In case of approval of the order, in addition to sending the order to the library, the supplier also sends an invoice for the order to its book keeping service. The invoice consists of a list of books, processing date and price. The price is formed according to the request and generated randomly. Supplier and the book keeping service should communicate through a RMI application. All receipts are stored in serialized form at side of the RMI server. The serialization method can be chosen at will. For each invoice, the supplier must receive information about the amount of VAT he will have to pay, which is 17% of the price on the invoice.
Consider that a system can only have one running application for library work, multiple member applications and multiple supplier applications. Use Loggers for handling exceptions and properties files for all necessary configurations, including file paths.