Table of content



The City entity within the microservice architecture

Entity-Relationship-Model of <CountryService>

Entity Name: City

Data Schema: AirportLogistics

Master Service: CountryService


Dataflow of entity of City

Microservices

3.1 AirplaneService3.2 AirportService3.3 CargoService3.4 CountryService3.5 EmployeeService3.6 LuggageService
3.7 PassengerBookingService

Entity Properties

Property NameDatatypeData EntityReference Entity
CityNameSTRINGCity
CountryLONGCityCountry
PrimaryKeyLONGCity
ServerReplicationVersionLONGCity

Service Interfaces

Relative mapping URLRequest MethodMethod NameMicroserviceInvolved Entities
/city/{id}DELETEdeleteCityById(id)CountryServiceCity
/airport/city/{id}GETfindAllAirportOfCity(id)AirportServiceCity Airport
/cityPOSTinsertCity(city)CountryServiceCity
/city/country/{id}GETfindAllCityOfCountry(id)CountryServiceCountry City
/city/{id}PUTupdateCityById(city)CountryServiceCity
/city/{id}GETfindCityById(id)CountryServiceCity
/cityGETfindAllCity()CountryServiceCity

Distributed transaction of <City>

Pseudo code snippet

final City city = (City) this.callMicroservice(ServiceNames.COUNTRY_SERVICE + "/city/" + id, City.class);
if (city != null) {
    final Country country1 = (Country) this.callMicroservice(ServiceNames.COUNTRY_SERVICE + "/country/" + city.getCountry().getId(), Country.class);
    if (country1 != null) {
    }
}
return city;


Table of content