Skip to content

yohanmoon/cs361_backup_service

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 

Repository files navigation

Back Up Microservice

Table of Contents
  1. About The Project
  2. Instruction
  3. UML sequence diagram

About The Project

This is a microservice where the program creates backup file of path specified by the user.

The backup automation will begin once the client program is connected to the server by Socket. The backup files will be saved in ./backup_file directory.

The microservice sends back the path of the latest backup file when a request is made from the client program.

Uses

  • Python
  • Socket

(back to top)

Instruction

Communication between the server(microservice) and the client program is made via Socket.

Request Data

How to request data from the microservice:

  1. Import socket module
    import socket
  2. Create a socket object
    s = socket.socket()
  3. Define the port on which you want to connect
    port = 12345
  4. Connect to the server on local computer
    s.connect(('127.0.0.1', port))
  5. Send request data by encoding the string
    request = "revert"
    s.send(request.encode())
    • The microservice will respond to "Backup" and "backup" for creating a backup file.
    • The microservice will respond to "Revert" and "revert" for retrieval of lastest backup file.

Receive Data

How to receive data from the microservice:

  • Receive the data by decoding to get the string
    s.recv(1024).decode()
    • The decoded string will the absolute path of the backup file.

(back to top)

UML

Assignment 9 UML

(back to top)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages