Table of content



The Gate entity within the microservice architecture

Entity-Relationship-Model of <AirportService>

Entity Name: Gate

Data Schema: AirportLogistics

Master Service: AirportService


Dataflow of entity of Gate

Microservices

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

Entity Properties

Property NameDatatypeData EntityReference Entity
GateNameSTRINGGate
PrimaryKeyLONGGate
ServerReplicationVersionLONGGate
TerminalLONGGateTerminal

Service Interfaces

Relative mapping URLRequest MethodMethod NameMicroserviceInvolved Entities
/gateGETfindAllGate()AirportServiceGate
/flight/arrivalgate/{id}GETfindAllFlightOfArrivalGate(id)AirportServiceGate Flight
/gate/{id}GETfindGateById(id)AirportServiceGate
/gatePOSTinsertGate(gate)AirportServiceGate
/flight/departuregate/{id}GETfindAllFlightOfDepartureGate(id)AirportServiceGate Flight
/gate/terminal/{id}GETfindAllGateOfTerminal(id)AirportServiceTerminal Gate
/gate/{id}PUTupdateGateById(gate)AirportServiceGate
/gate/{id}DELETEdeleteGateById(id)AirportServiceGate

Distributed transaction of <Gate>

Pseudo code snippet

final Gate gate = (Gate) this.callMicroservice(ServiceNames.AIRPORT_SERVICE + "/gate/" + id, Gate.class);
if (gate != null) {
    final Terminal terminal1 = (Terminal) this.callMicroservice(ServiceNames.AIRPORT_SERVICE + "/terminal/" + gate.getTerminal().getId(), Terminal.class);
    if (terminal1 != null) {
        final Airport airport2 = (Airport) this.callMicroservice(ServiceNames.AIRPORT_SERVICE + "/airport/" + terminal1.getAirport().getId(), Airport.class);
        if (airport2 != null) {
            final City city3 = (City) this.callMicroservice(ServiceNames.COUNTRY_SERVICE + "/city/" + airport2.getCity().getId(), City.class);
            if (city3 != null) {
                final Country country4 = (Country) this.callMicroservice(ServiceNames.COUNTRY_SERVICE + "/country/" + city3.getCountry().getId(), Country.class);
                if (country4 != null) {
                }
            }
        }
    }
}
return gate;


Table of content