Coder Social home page Coder Social logo

quics's People

Contributors

chromato99 avatar namseonu avatar vivi108 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

quics's Issues

Structure the Cobra command and the RESTful API server (+ calling protocol)

Is your feature request related to a problem? Please describe.
For example, such the quics-client, the execution of the protocol server should be in after the command 'start'.

Describe the solution you'd like

  • Setup the cobra command
  • Implement some RESTful API using HTTP/3
  • Connect the cobra command and RESTful API
  • Start protocol server with qis listen (example) command.

Refactor main.go and app.go

Is your feature request related to a problem? Please describe.
For unity and clean structure, more better to place the initialization part at app.go instead of main.go.

Describe the solution you'd like

  • Move the part of initialization adapters from main.go to app.go.
  • Move the part of defining routers of each handler from main.go to app.go.

add hash validation on server

Is your feature request related to a problem? Please describe.
Only the client generates a hash for the current file and then the server receives it and uses it.
However, since this may become a problem later depending on the client, verification logic must be added to the server.

Additionally, this will allow you to check whether the file was interrupted during transfer.

Describe the solution you'd like
When the server receives a file, it calculates the hash and adds logic to verify that it is the same as the one sent by the client.

Additional context
Since the client and server must use the same hash algorithm, it would be a good idea to consider implementing a hash-related package in quics and importing and using it in quis-client.

Implement repository methods associated with protocol

Is your feature request related to a problem? Please describe.
Not a problem, just to implement the necessary part of protocol communication. Each repository is used to process not only the call from a service following a handler of the REST API server using http3 but also the request/response with protocol and client.

Describe the solution you'd like
The following checklist below is what I should implement for sending/receiving messages with quics-protocol. Anyway, I omitted detailed methods, and just wrote down a big skeleton checklist.

  • Implement necessary repository methods for please sync transaction.
  • .. for must sync transaction.
  • .. for conflict transaction.
  • .. for full scan transaction.

Reconfigure environment

Is your feature request related to a problem? Please describe.
I had to reconfigure to unify the environment configuration of the team.

Describe the solution you'd like

  • I changed the configuration of Viper.
  • I moved the package associated with Viper from /config to /pkg/utils.
  • I changed .yaml to .env.

Change the part of file path parsing and method associated with it

Is your feature request related to a problem? Please describe.
I missed the application of the file path (BeforePath, AfterPath).
So, some part of the file path is not necessary and not correct.

Describe the solution you'd like

  • Check all the parts of file path parsing (BeforePath, AfterPath)
  • Change the directory utilities (latest directory should be deleted, history and conflict directory is needed)
  • Should save the root directory with only AfterPath (duplicated name is kept out by client)

Define/change overall structures

Is your feature request related to a problem? Please describe.
Our software's logic was changed for better-transmitting files between server and client.
So, the overall structures of the previous version should be changed.

Describe the solution you'd like

  • I'll define the overall type struct for all entities, and these entities would be used on the client.
  • I'll define the skeleton of function calls for our changed logic.

add qis CLI usage description

Is your feature request related to a problem? Please describe.
The qis CLI is being added in a recent commit, but there is no documentation explaining its usage.

Describe the solution you'd like
Add cli command usage instructions to README or a separate documentation page.

Using protobuf on message types

Is your feature request related to a problem? Please describe.
In message exchange using the current protocol, the struct defined in types is serialized to gob and transmitted.
However, this is dependent on the go language and has the inconvenience of having to define each method one by one.

Describe the solution you'd like
Uses google's protobuf. This allows for cleaner message type definitions and cross-language compatibility.

Additional context
It would be good to consider whether there are other good libraries besides protobuf.

Various actions using file history (client-side)

Is your feature request related to a problem? Please describe.
Not related to any problems, only for implementation of new features.

Describe the solution you'd like
Using the file history stored in the server database, a quic-s client can request:

  • Show the file's history information
  • Rollback to a certain version of the file using the history
  • Download the file through protocol (not web browser)

Share or download the file that a client wants (client-side)

Is your feature request related to a problem? Please describe.
Not related to any problems, only for implementation of new features.

Describe the solution you'd like
The feature of sharing and downloading a file that a client wants to share with another(i.e., 3rd party).

  • Create the link for sharing a file
  • Download the file using this link
  • Cancel/Remove the created link
  • Block to download if the sharing count of a file is max. (i.e., expired)

Core Package Refactoring

Is your feature request related to a problem? Please describe.
Currently, the core package is heavily weighted toward sync.
This needs to be restructured appropriately to refine the code.

Describe the solution you'd like
Consider separating the modules appropriately, rather than simply lumping everything into one sync package.

Implement [MUSTSYNC] through quics-protocol

Is your feature request related to a problem? Please describe.
According to the changed protocol, I should change the handler/service part of MUSTSYNC.

Describe the solution you'd like

  • Implement all the parts of MUSTSYNC using the goroutine (-> open transaction part)
  • Detail: Get the root directory name of the updated file
  • Detail: Get the connection array using the root directory name and UUID (-> send UUIDs to adapter using for)
  • Detail: with network adapter and goroutine

Additional context

  • Add the client array (UUID) to types.RootDirectory struct.

Implement basic Sync logic

Is your feature request related to a problem? Please describe.
The basic file synchronization process does not work yet. This requires implementing several behaviors required for sync.

Describe the solution you'd like
The functions are divided into please sync, must sync, conflict handling, and full scan.

Additional context

Current Progress

  • PleaseSync
  • MustSync
  • Conflict Handling
  • Full scan

Refactoring repository packages

Is your feature request related to a problem? Please describe.

Currently, repository packages are grouped by core domain, with many redundant and inconsistent implementations.
This needs to be improved.

Describe the solution you'd like

I'm considering refactoring my repository based on data type.
This would avoid unnecessary duplicate implementations that could be reused by only injecting repository modules of the types used by the core domain.
It will also allow us to write more consistent code.

Additional context

This is still a work in progress, and we need to think about how to refactor it.

Need to add test code.

Is your feature request related to a problem? Please describe.
The current version is fairly stable. However, refactoring is necessary as the internal implementation is not clean. However, since the code changes during refactoring, bugs may occur and the program may become unstable.

Therefore, it would be a good idea to write test code based on the current behavior so that the behavior can be verified and then proceed with refactoring based on this.

This issue should be addressed before other refactoring-related issues.

Describe the solution you'd like
Add unit tests and integration tests. And we use github actions to automatically conduct continuous testing.

Additional context
Add any other context or screenshots about the feature request here.
We still need to think more about how to write the integration test logic.

Change the server password using database badger

Is your feature request related to a problem? Please describe.
User can change the server password from default to user-defined.

Describe the solution you'd like

  • If there is no user-defined password, then the server executes using default value in .env file
  • If user-defined password is exist, then the server executes using the user-defined password
  • User-defined password should be stored in database badger
  • User can change server password using qis set pasword <new-password> command

Implement [PLEASESYNC] through quics-protocol

Is your feature request related to a problem? Please describe.
According to the changed protocol, I should change the handler/service part of PLEASESYNC.

Describe the solution you'd like

  • Check the initialization part of File and FileMetadata
  • Implement all the parts of PLEASESYNC
  • Implement the skeleton of MUSTSYNC call

Additional context
I should implement MUSTSYNC call and logic using goroutine because the MUSYSYNC is called in PLEASESYNC transaction. However, the MUSTSYNC call does not affect to PLEASESYNC transaction's commit.

Setup the server's IP address using commands

Is your feature request related to a problem? Please describe.
Setup the server's IP address dynamically (not hard coding)

Describe the solution you'd like

  • User can setup the server's IP address using qis start --ip <server-ip> --port <server-port> command
  • HTTP/3 server should run on user-defined address

add Dockerfile to use Docker

Is your feature request related to a problem? Please describe.
For stable use of quics, it would be nice if it could be deployed as a Docker container by adding a Dockerfile.

Describe the solution you'd like
Add Dockerfile and deploy on docker hub.
Additionally, it would be good to improve environment variable settings for convenience when using Docker.

Various actions using file history on server (server-side)

Is your feature request related to a problem? Please describe.
Not related to any problems, only for implementation of new features.

Describe the solution you'd like
Using the file history stored in badger database, the quic-s server can do actions like the below:

  • Show the file's history information
  • Download the file to a user-defined directory (except to .quics directory)
  • (Cancelled) Rollback to a certain version of the file using the history

Overall the actions above are executed by commands implemented using Cobra library.

Set up a mutex lock on [PLEASESYNC]

Is your feature request related to a problem? Please describe.
For synchronization with multiple clients, the lock is necessary for PLEASESYNC service.

Describe the solution you'd like

  • Set up a mutex lock on PLEASESYNC service (i.e., business logic)

Define where the log is printed and fix it

Is your feature request related to a problem? Please describe.
Now, the log "quics: " is duplicated.
Because the log.Println() is called anywhere, e.g., Handler or Service.
log

Describe the solution you'd like

  • Define where the log is printed (I think it is better to print out any log at Handler)
  • Fix the log printing on overall quics's code

Cancel previous MustSync task, when a new MustSync task starts during a MustSync task

Is your feature request related to a problem? Please describe.
When a new MustSync task is started, the previous task becomes an old file, so there is no need to proceed with the task any further. Rather, you should cancel the operation because there is a risk of file conflict.

Describe the solution you'd like
Implements the function to cancel previous operations using golang's context syntax.

Additional context
For this task, it will need to create a variable that stores the context of the previous task.

required password encryption

Is your feature request related to a problem? Please describe.
Currently, passwords are stored in plain text.
We can strengthen security by encrypting and storing it.

Describe the solution you'd like
Encryption is implemented using the go language standard crypto library.
An update is required along with the addition of the password setting function.

Download conflicted files for checking conflict

Is your feature request related to a problem? Please describe.
When a client wants to check the conflicted file contents (not metadata), this feature helps the client.

Describe the solution you'd like

  • Return all conflicted files about the file requested from a client.

Reconfigure overall entities with type struct

Is your feature request related to a problem? Please describe.

  • The request-id is not needed anymore
  • When synced, the needed struct is only 2 (in the case of the server)

Describe the solution you'd like
Reconfigure overall entities (struct type) for optimizing and implementing this system.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.