In order to demonstrate the use of microservices, we will use a music example: artist, album and song and a consumer app that displays this data to the end user.
The service registry is a central repository of all services. When services launch they should register themselves with service registry. Any consumers that have a service dependency should use the service registry to lookup the service url by service name.
| Name | Type | Description |
|---|---|---|
| Name | String | Service Name |
| Description | string | Description of the service |
| Domain | string | Domain of the service |
| Url | string | Url of the service |
The artist service serves artist details. The artist model is very simple as follows:
| Name | Type | Description |
|---|---|---|
| Id | Guid | Artist Unique identifier |
| Name | String | Artist Name |
The album service serves album details for artists. The album model is very simple as follows:
| Name | Type | Description |
|---|---|---|
| Id | Guid | Album Unique identifier |
| ArtistId | Guid | Artist Unique identifier |
| Name | String | Artist Name |
| Year | int | Album year released |
| AlbumArt | byte[] | Album Cover Art |
The song service serves song details for albums. The song model is very simple as follows:
| Name | Type | Description |
|---|---|---|
| Id | Guid | Song Unique identifier |
| AlbumId | Guid | Album Unique identifier |
| TrackNo | int | Song track number |
| Name | String | Artist Name |