This project demonstrates the use of an Enterprise Service Bus (ESB) to integrate multiple web services in a library system. The project includes four web services and an ESB flow using MuleSoft.
- addbook-service/: A SOAP web service built with Node.js to add a book for a student.
- check-availability-service/: A REST web service built with Spring Boot to check the availability of a book.
- library-service/: A REST web service built with Python (Flask) to find other libraries that have a specific book.
- student-list-service/: A REST web service built with Node.js to show the list of books borrowed by a student.
- esb-mule-project/: The MuleSoft project that integrates the above services.
- database/: SQL scripts to set up the required databases.
- Path:
addbook-service/
- Technology: Node.js, SOAP
- Description: Adds a book for a student.
- Endpoint:
http://localhost:3001/UserContentService
- Path:
check-availability-service/
- Technology: Spring Boot, REST
- Description: Checks if a book is available.
- Endpoint:
http://localhost:8080/service/livres/{libelle}
- Path:
library-service/
- Technology: Python (Flask), REST
- Description: Finds other libraries that have a specific book.
- Endpoint:
http://localhost:3000/check_book/{title}
- Path:
student-list-service/
- Technology: Node.js, REST
- Description: Shows the list of books borrowed by a student.
- Endpoint:
http://localhost:5000/books/{cin}
- Path:
esb-mule-project/
- Technology: MuleSoft
- Description: Integrates the above web services to create a workflow for the library system.
- Path:
database/
- Description: Contains SQL scripts to set up the required databases.
- Node.js
- Java (for Spring Boot)
- Python
- MuleSoft Anypoint Studio
- MySQL
-
Clone the repository:
git clone https://github.com/your-username/library-esb-project.git cd library-esb-project
-
Set up the databases:
- Create the databases using the SQL scripts in the
database/
directory.
- Create the databases using the SQL scripts in the
-
Run the Add Book Service:
cd addbook-service npm install node addbook.js
-
Run the Check Availability Service:
cd check-availability-service mvn spring-boot:run
-
Run the Library Service:
cd library-service python library.py
-
Run the Student List Service:
cd student-list-service npm install node student.js
-
Run the MuleSoft ESB Project:
- Open
esb-mule-project
in MuleSoft Anypoint Studio. - Deploy the project.
- Open
-
Requesting a Book:
- A student requests a specific book from the library.
-
Checking Book Availability:
- The library checks the book's status:
- If the book is available, the library processes the loan and provides the student with the list of books they have already borrowed.
- If the book is not available, the library informs the student of the library or location where the book is currently available.
- The library checks the book's status:
The objective of this project is to understand the ESB bus and the communication between web services in a service-oriented architecture, focusing on SOAP and REST web services.
This project is licensed under the MIT License.