MR RAJA has research collaboration with other scientists located in different cities around the world. Such collaboration involves online meetings among the scientists interested in a specific topic and participation in students/staff presentations. Building around socket programming and your knowledge of python programming, you are tasked to develop a client/server system that makes conversion of time between South Africa and different other cities in the world related to the research collaboration between MR RAJA and his colleagues. The goal is to develop a system that provide MR RAJA services which are similar to Google Calendar but with the possibility of adding many more functionalities in the future. The requirements are as follow •    The server maintains a file of the time differences between South Africa and at least 30 other cities in the World.: e.g. Missouri, Tokyo, Kinshasa, Lubumbashi, Kigali, Yaoundé, Melbourne, Stockholm, Brussels, Paris, Laval, Montreal, Toronto, Quebec, Vancouver, etc. •    The client maintains a file of meetings scheduled in different cities which includes the dates of the meetings, the cities’ names, the topic of the meetings, and the platform to be used. The client process will read the file of meetings and submit time conversion requests to the server. The platform may be Zoom, Meet, and Teams. Each request is read from the file of the meetings and has the format: o    Date, City, Time, Topic, Platform Where the Date is the date in the organizing City and the time is also the time in the organizing city. •    The server’s response will have a similar format to the request but the South African Date and Time. Note that due to time differences, the Date in a city around the world may differ from the Date in South Africa. Each request is read from the file of the meetings and has the format: o    Date, City, Time, Topic, Platform Where the Date is the date in South Africa and the City is the city in South Africa.   # tcp-server.py from socket import * # create the socket # AF_INET == ipv4 # AF_INET6 == ipv6 # SOCK_STREAM == TCP serverPort = 12000 serverSocket = socket(AF_INET,SOCK_STREAM) #bind a socket to some port on the server serverSocket.bind(("",serverPort)) serverSocket.listen(5) print ("The server is ready to receive") while True:      connectionSocket, addr = serverSocket.accept()      sentence = connectionSocket.recv(1024).decode()      capitalizedSentence = sentence.upper()      connectionSocket.send(capitalizedSentence.encode())      connectionSocket.close() # tcp-client.py from socket import * serverName = "127.1.1.0" serverPort = 12000 clientSocket = socket(AF_INET, SOCK_STREAM) clientSocket.connect((serverName,serverPort)) sentence = input("Input lowercase sentence:") print (sentence) #text = raw_input("Enter a Letter: ").lower() print text clientSocket.send(sentence.encode()) modifiedSentence = clientSocket.recv(1024) print ("From Server:", modifiedSentence.decode()) clientSocket.close() 30 countries to use. Belo Horizonte          Gaborone        Francistown    Molepolole      Shanghai         Guangzhou      Beijing          Havana            Santiago de Cuba        Holguín           Copenhagen    Aarhus Odense            Cairo   Giza          Alexandria      Helsinki           Espoo  Tampere          Paris

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

MR RAJA has research collaboration with other scientists located in different cities around the world. Such collaboration involves online meetings among the scientists interested in a specific topic and participation in students/staff presentations. Building around socket programming and your knowledge of python programming, you are tasked to develop a client/server system that makes conversion of time between South Africa and different other cities in the world related to the research collaboration between MR RAJA and his colleagues. The goal is to develop a system that provide MR RAJA services which are similar to Google Calendar but with the possibility of adding many more functionalities in the future. The requirements are as follow
•    The server maintains a file of the time differences between South Africa and at least 30 other cities in the World.: e.g. Missouri, Tokyo, Kinshasa, Lubumbashi, Kigali, Yaoundé, Melbourne, Stockholm, Brussels, Paris, Laval, Montreal, Toronto, Quebec, Vancouver, etc.
•    The client maintains a file of meetings scheduled in different cities which includes the dates of the meetings, the cities’ names, the topic of the meetings, and the platform to be used. The client process will read the file of meetings and submit time conversion requests to the server. The platform may be Zoom, Meet, and Teams. Each request is read from the file of the meetings and has the format:
o    Date, City, Time, Topic, Platform
Where the Date is the date in the organizing City and the time is also the time in the organizing city.
•    The server’s response will have a similar format to the request but the South African Date and Time. Note that due to time differences, the Date in a city around the world may differ from the Date in South Africa. Each request is read from the file of the meetings and has the format:
o    Date, City, Time, Topic, Platform
Where the Date is the date in South Africa and the City is the city in South Africa.

 

# tcp-server.py

from socket import *
# create the socket
# AF_INET == ipv4
# AF_INET6 == ipv6
# SOCK_STREAM == TCP
serverPort = 12000
serverSocket = socket(AF_INET,SOCK_STREAM)
#bind a socket to some port on the server
serverSocket.bind(("",serverPort))
serverSocket.listen(5)
print ("The server is ready to receive")
while True:
     connectionSocket, addr = serverSocket.accept()
     sentence = connectionSocket.recv(1024).decode()
     capitalizedSentence = sentence.upper()
     connectionSocket.send(capitalizedSentence.encode())
     connectionSocket.close()

# tcp-client.py

from socket import *
serverName = "127.1.1.0"
serverPort = 12000
clientSocket = socket(AF_INET, SOCK_STREAM)
clientSocket.connect((serverName,serverPort))
sentence = input("Input lowercase sentence:")
print (sentence)
#text = raw_input("Enter a Letter: ").lower() print text
clientSocket.send(sentence.encode())
modifiedSentence = clientSocket.recv(1024)
print ("From Server:", modifiedSentence.decode())
clientSocket.close()

30 countries to use.

Belo Horizonte          Gaborone        Francistown    Molepolole      Shanghai         Guangzhou      Beijing          Havana            Santiago de Cuba        Holguín           Copenhagen    Aarhus Odense            Cairo   Giza          Alexandria      Helsinki           Espoo  Tampere          Paris

 

Expert Solution
steps

Step by step

Solved in 4 steps with 4 images

Blurred answer
Knowledge Booster
Analysis of Performance Measurement
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education