Alumno | Legajo | |
---|---|---|
Abancens, Alberto | 62581 | aabancens@itba.edu.ar |
Arnaude, Juan Segundo | 62184 | jarnaude@itba.edu.ar |
Canevaro, Bautista | 62179 | bcanevaro@itba.edu.ar |
Wodtke, Matías | 62098 | mwodtke@itba.edu.ar |
- 1. Prerequisites
- 2. Compiling
- 3. Executing Project
In order to properly run both server and client applications, it is compulsory to have installed:
- Maven
- Java 19
To compile the project and get all executables, cd
into the root of the project, and run the following command:
mvn clean package
This will create two .tar.gz
files, that contain all the files necessary to run the clients and the server. They are located at:
- Client:
./client/target/tpe1-g10-client-2024.1Q-bin.tar.gz
- Server:
./server/target/tpe1-g10-server-2024.1Q-bin.tar.gz
Unzip both files created previously by running:
tar -xf <file.tar.gz>
Then, give all executables permission to be executed:
chmod u+x ./tpe1-g10-client-2024.1Q/*Client.sh ./tpe1-g10-server-2024.1Q/server.sh
Must be running for the clients to work. Once it's stopped, all stored data is lost.
cd tpe1-g10-server-2024.1Q
sh server.sh
🚨 The current working directory must be
./tpe1-g10-client-2024.1Q
.
Three operations are supported:
Adds a sector using the name given "sectorName" if it doesn't already exist.
sh adminClient.sh -DserverAddress=XX.XX.XX.XX:YYYY -Daction=addSector -Dsector=sectorName
Adds counters to a sector, if the sector exists.
sh adminClient.sh -DserverAddress=XX.XX.XX.XX:YYYY -Daction=addCounters -Dsector=sectorName -Dcounters=countersAmount
Loads passengers by using data given in a csv file, this file (manifest.csv) must contain the following fields separated by a ;
.
- Booking
- Flight
- Airline
See below an example:
booking;flight;airline
ABC123;AC987;AirCanada
XYZ234;AA123;AmericanAirlines
sh adminClient.sh -DserverAddress=XX.XX.XX.XX:YYYY -Daction=manifest -DinPath=../manifest.csv
🚨 The current working directory must be
./tpe1-g10-client-2024.1Q
.
Six operations are supported:
Lists all current sectors and their counter ranges.
sh counterClient.sh -DserverAddress=XX.XX.XX.XX:YYYY -Daction=listSectors
Lists given counter range giving the flights assigned to them or no information if they are free.
sh counterClient.sh -DserverAddress=XX.XX.XX.XX:YYYY -Daction=listCounters -DcounterFrom=fromVal -DcounterTo=toVal
Assigns counters to the given flights or leaves them pending if there are no available counters.
sh counterClient.sh -DserverAddress=XX.XX.XX.XX:YYYY -Daction=assignCounters -Dsector=sectorName -Dflights=flightCode1|flightCode2|... -Dairline=airlineName -DcounterCount=counterCount
Frees all assigned counters starting from fromVal
.
sh counterClient.sh -DserverAddress=XX.XX.XX.XX:YYYY -Daction=freeCounters -Dsector=sectorName -DcounterFrom=fromVal -Dairline=airlineName
Checks in a passenger for each counter starting from fromVal
.
sh counterClient.sh -DserverAddress=XX.XX.XX.XX:YYYY -Daction=checkinCounters -Dsector=sectorName -DcounterFrom=fromVal -Dairline=airlineName
Lists all flights from sectorName
pending to be assigned to a counter.
sh counterClient.sh -DserverAddress=XX.XX.XX.XX:YYYY -Daction=listPendingAssignments -Dsector=sectorName
🚨 The current working directory must be
./tpe1-g10-client-2024.1Q
.
Three operations are supported:
Prints passenger check-in status given his bookingCode
.
sh passengerClient.sh -DserverAddress=XX.XX.XX.XX:YYYY -Daction=passengerStatus -Dbooking=bookingCode
Enter counter range queue.
sh passengerClient.sh -DserverAddress=XX.XX.XX.XX:YYYY -Daction=passengerCheckin -Dbooking=flightCode -Dsector=sectorName -Dcounter=counterNumber
Print passenger's check-in status given his bookingCode
.
sh passengerClient.sh -DserverAddress=XX.XX.XX.XX:YYYY -Daction=passengerStatus -Dbooking=bookingCode
🚨 The current working directory must be
./tpe1-g10-client-2024.1Q
.
Two operations are supported:
Register an airline to be notified of the events related to it.
sh eventsClient.sh -DserverAddress=XX.XX.XX.XX:YYYY -Daction=register -Dairline=airlineName
Cancel an airline registration to be notified of the events related to it.
sh eventsClient.sh -DserverAddress=XX.XX.XX.XX:YYYY -Daction=unregister -Dairline=airlineName
🚨 The current working directory must be
./tpe1-g10-client-2024.1Q
.
Two operations are supported:
Print counters' current status filtering by sector given sectorName
or simply prints all of them if not given.
sh queryClient.sh -DserverAddress=XX.XX.XX.XX:YYYY -Daction=queryCounters -DoutPath=../query1.txt -Dsector=sectorName
sh queryClient.sh -DserverAddress=XX.XX.XX.XX:YYYY -Daction=queryCounters -DoutPath=../query1.txt
Print completed check-in filtering by sector and airline, if given.
sh queryClient.sh -DserverAddress=XX.XX.XX.XX:YYYY -Daction=checkins -DoutPath=../query2.txt
sh queryClient.sh -DserverAddress=XX.XX.XX.XX:YYYY -Daction=checkins -DoutPath=../query2.txt -Dsector=sectorName
sh queryClient.sh -DserverAddress=XX.XX.XX.XX:YYYY -Daction=checkins -DoutPath=../query2.txt -Dairline=airlineName
sh queryClient.sh -DserverAddress=XX.XX.XX.XX:YYYY -Daction=checkins -DoutPath=../query2.txt -Dsector=sectorName -Dairline=airlineName