Software Integration — First Mandatory Assignment
A library management system exposing the same underlying library data through four different API technologies:
- REST
- SOAP
- GraphQL
- gRPC
The project is developed as part of the Software Integration course and demonstrates how different API paradigms can expose and manipulate the same domain model.
- Project Overview
- Architecture
- Domain Model
- APIs
- Repository Structure
- Prerequisites
- Getting Started
- Database
- API Testing
- Error Handling
- gRPC Book Notifications
- Design Considerations
- Assignment Requirements Checklist
- Presentation
- Team
The goal of this project is to implement a library system using four different API technologies.
All four APIs operate on the same underlying library data and provide access to books, authors, and publishing companies.
The project demonstrates the differences between:
| API | Purpose |
|---|---|
| REST | Resource-oriented HTTP API |
| SOAP | Contract-based XML web service |
| GraphQL | Query and mutation API |
| gRPC | High-performance RPC API with streaming |
The APIs share the same domain and database so that their capabilities and trade-offs can be compared directly.
The project follows a shared-domain architecture where the four APIs expose different interfaces over the same underlying application/data layer.
┌─────────────────┐
│ Client │
└────────┬────────┘
│
┌───────────────────┼───────────────────┐
│ │ │
▼ ▼ ▼
┌───────────┐ ┌───────────┐ ┌───────────┐
│ REST API │ │ SOAP API │ │ GraphQL │
└─────┬─────┘ └─────┬─────┘ │ API │
│ │ └─────┬─────┘
│ │ │
└───────────────────┼───────────────────┘
│
▼
┌─────────────────┐
│ Application / │
│ Domain Layer │
└────────┬────────┘
│
▼
┌─────────────────┐
│ Database │
└─────────────────┘
┌─────────────────┐
│ gRPC API │
└────────┬────────┘
│
▼
┌─────────────────┐
│ Application / │
│ Domain Layer │
└─────────────────┘
The exact implementation and project structure may vary depending on the technologies used.
The library consists of three primary entities:
| Field | Type | Description |
|---|---|---|
id |
Integer | Unique book identifier |
title |
String | Book title |
authorId |
Integer | Reference to an author |
publishingCompanyId |
Integer | Reference to a publishing company |
publishingYear |
Integer | Publication year, minimum 1900 |
| Field | Type | Description |
|---|---|---|
id |
Integer | Unique author identifier |
name |
String | Author's first name |
surname |
String | Author's surname |
| Field | Type | Description |
|---|---|---|
id |
Integer | Unique publishing company identifier |
name |
String | Publishing company name |
Author
│
│ 1:N
▼
Book
▲
│ N:1
│
Publishing Company
A book must reference an existing author and publishing company.
The REST API exposes the library as HTTP resources.
| Method | Endpoint | Description |
|---|---|---|
POST |
/books |
Create a book |
GET |
/books/{id} |
Get a book by ID |
GET |
/books |
List books with pagination |
PUT/PATCH |
/books/{id} |
Update a book |
DELETE |
/books/{id} |
Delete a book |
Book listing supports pagination using:
GET /books?limit=20&offset=0
| Method | Endpoint | Description |
|---|---|---|
POST |
/authors |
Create an author |
GET |
/authors/{id} |
Get an author by ID |
GET |
/authors |
List all authors |
PUT/PATCH |
/authors/{id} |
Update an author |
DELETE |
/authors/{id} |
Delete an author |
| Method | Endpoint | Description |
|---|---|---|
POST |
/publishers |
Create a publisher |
GET |
/publishers/{id} |
Get a publisher by ID |
GET |
/publishers |
List all publishers |
PUT/PATCH |
/publishers/{id} |
Update a publisher |
DELETE |
/publishers/{id} |
Delete a publisher |
The SOAP API exposes the library through an HTTP SOAP endpoint.
The service defines XML Schema (XSD) complex types for:
BookAuthorPublishingCompany
Book
├── id: integer
├── title: string
├── authorId: integer
├── publishingCompanyId: integer
└── publishingYear: integer >= 1900
Author
├── id: integer
├── name: string
└── surname: string
PublishingCompany
├── id: integer
└── name: string
| Operation | Input | Output |
|---|---|---|
CreateBook |
title, authorId, publishingCompanyId, publishingYear | Generated ID |
GetBookById |
id | Book |
UpdateBook |
id + book fields | Success acknowledgement |
DeleteBook |
id | Success acknowledgement |
| Operation | Input | Output |
|---|---|---|
CreateAuthor |
name, surname | Generated ID |
GetAuthorById |
id | Author |
ListAuthors |
None | Array of Author |
UpdateAuthor |
id + author fields | Success acknowledgement |
DeleteAuthor |
id | Success acknowledgement |
| Operation | Input | Output |
|---|---|---|
CreatePublishingCompany |
name | Generated ID |
GetPublishingCompanyById |
id | PublishingCompany |
ListPublishingCompanies |
None | Array of PublishingCompany |
UpdatePublishingCompany |
id + name | Success acknowledgement |
DeletePublishingCompany |
id | Success acknowledgement |
The SOAP API uses the following faults:
Returned when the requested entity does not exist.
Returned when:
- Required fields are missing
- Field values are invalid
- A referenced author does not exist
- A referenced publishing company does not exist
publishingYearis less than1900
Returned when attempting to delete an entity that is referenced by another entity.
For example, an author cannot be deleted while one or more books reference that author.
The GraphQL API is exposed through:
POST /graphql
The API defines the following main types:
BookAuthorPublisher
query {
book(id: 1) {
id
title
authorId
publishingCompanyId
publishingYear
}
}query {
authors {
id
name
surname
}
}query {
publishers {
id
name
}
}The GraphQL API supports:
- Create book
- Update book by ID
- Delete book
- Create author
- Update author by ID
- Delete author
- Create publisher
- Update publisher by ID
- Delete publisher
Example mutation:
mutation {
createBook(
title: "Example Book"
authorId: 1
publisherId: 1
publishingYear: 2024
) {
id
}
}The exact GraphQL schema and field naming conventions are defined in the implementation.
The gRPC API exposes a service defined using Protocol Buffers.
The service provides three RPC methods.
Unary RPC:
GetBookById(GetBookByIdRequest) returns (Book)
Input:
- Book ID
Returns:
- Book
Unary RPC:
CreateBook(CreateBookRequest) returns (CreateBookResponse)
Input:
- Book name/title
- Author ID
- Publisher ID
- Publication year
Returns:
- Generated book ID
Server-streaming RPC:
WatchBooks(WatchBooksRequest) returns (stream Book)
Clients can subscribe to the WatchBooks stream.
Whenever another client creates a new book, subscribed clients receive the newly created book through the stream.
Conceptually:
Client A gRPC Server
│ │
│──── WatchBooks ─────────────────>│
│ │
│ │
Client B │
│──── CreateBook ─────────────────>│
│ │
│ │
│<──── New Book ───────────────────│
│ │
This demonstrates server-side streaming and real-time event delivery using gRPC.
The repository is organized into separate components for each API.
.
├── README.md
│
├── rest/
│ └── ...
│
├── soap/
│ └── ...
│
├── graphql/
│ └── ...
│
├── grpc/
│ └── ...
│
├── database/
│ ├── schema.sql
│ └── seed.sql
│
├── tests/
│ └── ...
│
└── postman/
├── collection.json
└── environment.json
Update this section to match the actual repository structure.
Before running the project, install the required development tools.
Depending on the implementation, this may include:
- [Runtime / SDK]
- [Package manager]
- SQLite
- Docker (if applicable)
- Postman, Insomnia, or another API testing tool
- Protocol Buffers /
protocfor gRPC development
Replace this section with the exact versions and tools required by the project.
Example:
Runtime: .NET 8
Database: SQLite
API testing: Postman
git clone <repository-url>
cd <repository-directory>Copy the example environment/configuration file if applicable:
cp .env.example .envConfigure the database connection and other required settings.
If the project uses the supplied SQLite database, place it in the appropriate location.
If the database has been migrated to another DBMS, run the provided database scripts:
# Example
database/schema.sql
database/seed.sqlStart each API according to the instructions in its respective directory.
Example:
cd rest
# start REST APIcd soap
# start SOAP APIcd graphql
# start GraphQL APIcd grpc
# start gRPC APIReplace the commands above with the actual commands used by the project.
The APIs use a shared library database containing:
- Books
- Authors
- Publishing Companies
The original assignment provides a SQLite database.
If the project uses a different DBMS, the required migration/database scripts are included in:
/database
The database maintains the following important constraints:
- Every book must reference an existing author.
- Every book must reference an existing publishing company.
- Publishing years must be
>= 1900. - Authors cannot be deleted while referenced by books.
- Publishing companies cannot be deleted while referenced by books.
API testing material is included in the repository.
The preferred testing tool for this project is:
[Postman / Insomnia / Thunder Client]
Update this to the actual tool used.
Testing collections/environments can be found in:
/postman
The test material covers all four APIs:
- REST
- SOAP
- GraphQL
- gRPC
At minimum, the testing demonstrates:
- Creating entities
- Retrieving entities
- Updating entities
- Deleting entities
- Validation failures
- Not-found scenarios
- Conflict scenarios where applicable
- REST pagination
- GraphQL queries and mutations
- gRPC streaming through
WatchBooks
The APIs validate input and maintain the integrity of relationships between entities.
Common error scenarios include:
The requested entity ID does not exist.
Example:
GET /books/999999
Expected result: a not-found response.
Examples:
- Missing required fields
- Invalid IDs
- Invalid publishing year
- Non-existing author
- Non-existing publishing company
An author or publishing company cannot be deleted if books still reference it.
Example:
DELETE /authors/1
If books reference author 1, the operation must fail with a conflict.
This project intentionally implements the same library domain using four different API styles.
- Simple and widely understood
- Works naturally with HTTP
- Easy to test and integrate
- Good browser/tooling support
- Resource-oriented architecture
- Clients may receive more or less data than required
- Multiple requests may be necessary for related data
- API versioning can become challenging
- Strong contracts through WSDL/XSD
- Built-in standards for structured messaging and faults
- Suitable for enterprise integrations
- Strongly typed XML contracts
- Verbose XML messages
- More complex than REST for simple APIs
- More difficult to consume from modern frontend applications
- Higher implementation overhead
- Clients can request exactly the fields they need
- Flexible querying
- Multiple related resources can be retrieved in a single request
- Strongly typed schema
- More complex server implementation
- Caching is less straightforward than traditional HTTP caching
- Poorly designed queries can be expensive
- Requires additional consideration for authorization and query complexity
- High performance
- Efficient binary serialization using Protocol Buffers
- Strongly typed contracts
- Built-in streaming support
- Well suited for service-to-service communication
- Less convenient for browser-based clients
- Requires generated client/server code
- Less human-readable than REST/JSON
- Additional infrastructure/tooling is required
- Books — Create
- Books — Get by ID
- Books — List with pagination
- Books — Update
- Books — Delete
- Authors — Create
- Authors — Get by ID
- Authors — List all
- Authors — Update
- Authors — Delete
- Publishers — Create
- Publishers — Get by ID
- Publishers — List all
- Publishers — Update
- Publishers — Delete
- Book XSD type
- Author XSD type
- PublishingCompany XSD type
- CreateBook
- GetBookById
- UpdateBook
- DeleteBook
- CreateAuthor
- GetAuthorById
- ListAuthors
- UpdateAuthor
- DeleteAuthor
- CreatePublishingCompany
- GetPublishingCompanyById
- ListPublishingCompanies
- UpdatePublishingCompany
- DeletePublishingCompany
- NotFoundFault
- ValidationFault
- ConflictFault
-
/graphqlPOST endpoint - Book type
- Author type
- Publisher type
- Get book by ID
- List authors
- List publishers
- Create book
- Update book
- Delete book
- Create author
- Update author
- Delete author
- Create publisher
- Update publisher
- Delete publisher
-
GetBookById -
CreateBook -
WatchBooks - Server streaming implemented
- Subscribers receive newly created books
- Protocol Buffer definitions included
- Source code for all four APIs
- Database / migration script
- API testing collections
- API testing environments
- README documentation
- Final ZIP package
The project will be presented on 22 October 2026.
The presentation must demonstrate:
- All four APIs using an API testing tool.
- The implementation and architecture.
- The relevant source code.
- Advantages and disadvantages of each API approach for this library scenario.
The presentation is limited to 12 minutes per group, and every group member must present part of the project.
The presentation should be based on the delivered project. No additional presentation media is required.
| Name | Responsibility |
|---|---|
| Student 1 | |
| Student 2 | |
| Student 3 | |
| Student 4 | |
| Student 5 |
The final submission consists of one ZIP file containing:
Project/
├── REST API source code
├── SOAP API source code
├── GraphQL API source code
├── gRPC API source code
├── Database / migration scripts
├── API testing collections
├── API testing environments
└── README.md
Submission deadline: 21 October 2026 at 23:59.
This project was developed as part of the Software Integration course and is intended for educational purposes.