GithubHelp home page GithubHelp logo

Comments (13)

mstmdev avatar mstmdev commented on July 24, 2024 1

Yes, in order to better carry out this work, we can do some review and refactoring before starting.

from gofs.

mstmdev avatar mstmdev commented on July 24, 2024 1
+----------+                           +----------+                           +----------+                           +----------+                          +----------+
|          |                           |          |<---(C)---connect&auth ----|  Client  |                           |          |                          |          |
|  Server  |                           |  Server  |                           |  Manager |  (process or goroutine)   |  Client  |                          |  Client  |
|  Disk    |                           |          |----(D)--deliver policy--->|          |----(E)-- start worker --->|  Worker  |                          |  Disk    |
|          |                           |          |                           +----------+                           |          |                          |          |
|          |                           |          |<-----------------(H)--- connect&auth ----------------------------|          |                          |          |
|          |<---(J)--- read file   ----|          |<-----------------(I)--- pull file -------------------------------|          |                          |          |
|          |                           |          |                                                                  |          |                          |          |
|          |----(K)--- return file --->|          |------------------(L)--- send file ------------------------------>|          |----(M)--- write file --->|          |
|          |                           |          |                                                                  |          |                          |          |
|          |                           |          |<-----------------(O)--- report result ---------------------------|          |<---(N)-- write result----|          |
+----------+                           +----------+                                                                  +----------+                          +----------+
                                          ^    ^                                                                        |    ^ 
                        (A) create policy |    |                                                  (F) add to task queue |    |   
                                          |    |                                                                        |    |
                                          |    | (B) assign policy                                                      v    | (G) execute task  
                                       +--+-—--|--+                                                                  +-------|--+
                                       |          |                                                                  |          |
                                       |  Admin   |                                                                  |  Task    |
                                       |          |                                                                  |  Queue   |
                                       |          |                                                                  |          |
                                       |          |                                                                  |          |
                                       |          |                                                                  |          |
                                       +----------+                                                                  +----------+

For better isolation, consider creating a process for each task, something like the Daemon Mode.

from gofs.

mstmdev avatar mstmdev commented on July 24, 2024
  1. A client only needs to configure the connection address of the server, and the client will be registered in the server.
  2. On the server side, the registered client can be tagged.

Thanks for your suggestion and that sounds great. @myselfghost
At present, there is a simple client registration implementation, see the online field in the Report API.
In order to achieve policy delivery, we need to further enhance security, stability, and reliability.

  1. On the server side, multiple file synchronization policies can be created.
  2. On the server side, file synchronization policies can be associated with one or more tagged clients.
  3. On the client side,The client will receive the file synchronization policy from the server and execute the actions of this policy

Which scenarios require support for policy delivery: pulling files from the server, pushing files to the server, or both?
What policies do we need to support? All existing flags, or some other policies?
Do you have any user cases for specific scenarios involving multiple policies, and how to resolve or detect policy conflicts?

from gofs.

myselfghost avatar myselfghost commented on July 24, 2024

One of the scenarios is: building a backup center,

  1. Machine A, path /data/p1, backed up once a day
  2. Machine B, path /data/p2, backed up once a week
  3. Machine C, path /data/p3, backed up once a week
  4. Machine C, path /data/p4, backed up once a month

maybe need so many policy ,It would be better for us to manage these policies uniformly on the server side.

from gofs.

mstmdev avatar mstmdev commented on July 24, 2024

So, how to assign the policy 1 to machine A, and the policy 2 to machine B?
Do we need a back-end management platform to assign the policies by administrator?

from gofs.

myselfghost avatar myselfghost commented on July 24, 2024

So, how to assign the policy 1 to machine A, and the policy 2 to machine B? Do we need a back-end management platform to assign the policies by administrator?

Looks like a web backend is needed. We can use this web to create a new policy, tag machine, and then bind the policy to one or more tags

from gofs.

mstmdev avatar mstmdev commented on July 24, 2024
+----------+                           +----------+                           +----------+                          +----------+
|          |                           |          |<---(C)---connect&auth ----|          |                          |          |
|  Server  |                           |  Server  |                           |  Client  |                          |  Client  |
|  Disk    |                           |          |----(D)--deliver policy--->|          |                          |  Disk    |
|          |                           |          |                           |          |                          |          |
|          |<---(H)--- read file   ----|          |<---(G)-- pull file    ----|          |                          |          |
|          |                           |          |                           |          |                          |          |
|          |----(I)--- return file --->|          |----(J)--- send file   --->|          |----(K)--- write file --->|          |
|          |                           |          |                           |          |                          |          |
|          |                           |          |<---(M)-- report result----|          |<---(L)-- write result----|          |
+----------+                           +----------+                           +--|-------+                          +----------+
                                          ^    ^                                 |    ^ 
                        (A) create policy |    |           (E) add to task queue |    |   
                                          |    |                                 |    |
                                          |    | (B) assign policy               v    | (F) execute task  
                                       +--+-—--|--+                           +-------|--+
                                       |          |                           |          |
                                       |  Admin   |                           |  Task    |
                                       |          |                           |  Queue   |
                                       |          |                           |          |
                                       |          |                           |          |
                                       |          |                           |          |
                                       +----------+                           +----------+

The above is a simplified flow diagram, and there's a lot of work to do.

from gofs.

myselfghost avatar myselfghost commented on July 24, 2024
+----------+                           +----------+                           +----------+                          +----------+
|          |                           |          |<---(C)---connect&auth ----|          |                          |          |
|  Server  |                           |  Server  |                           |  Client  |                          |  Client  |
|  Disk    |                           |          |----(D)--deliver policy--->|          |                          |  Disk    |
|          |                           |          |                           |          |                          |          |
|          |<---(H)--- read file   ----|          |<---(G)-- pull file    ----|          |                          |          |
|          |                           |          |                           |          |                          |          |
|          |----(I)--- return file --->|          |----(J)--- send file   --->|          |----(K)--- write file --->|          |
|          |                           |          |                           |          |                          |          |
|          |                           |          |<---(M)-- report result----|          |<---(L)-- write result----|          |
+----------+                           +----------+                           +--|-------+                          +----------+
                                          ^    ^                                 |    ^ 
                        (A) create policy |    |           (E) add to task queue |    |   
                                          |    |                                 |    |
                                          |    | (B) assign policy               v    | (F) execute task  
                                       +--+-—--|--+                           +-------|--+
                                       |          |                           |          |
                                       |  Admin   |                           |  Task    |
                                       |          |                           |  Queue   |
                                       |          |                           |          |
                                       |          |                           |          |
                                       |          |                           |          |
                                       +----------+                           +----------+

The above is a simplified flow diagram, and there's a lot of work to do.

It is indeed a lot of work to develop into a mature product, and there is no rush. We can think carefully about the actual usage scenarios, slowly design the product architecture, and then develop it.

from gofs.

myselfghost avatar myselfghost commented on July 24, 2024
+----------+                           +----------+                           +----------+                          +----------+
|          |                           |          |<---(C)---connect&auth ----|          |                          |          |
|  Server  |                           |  Server  |                           |  Client  |                          |  Client  |
|  Disk    |                           |          |----(D)--deliver policy--->|          |                          |  Disk    |
|          |                           |          |                           |          |                          |          |
|          |<---(H)--- read file   ----|          |<---(G)-- pull file    ----|          |                          |          |
|          |                           |          |                           |          |                          |          |
|          |----(I)--- return file --->|          |----(J)--- send file   --->|          |----(K)--- write file --->|          |
|          |                           |          |                           |          |                          |          |
|          |                           |          |<---(M)-- report result----|          |<---(L)-- write result----|          |
+----------+                           +----------+                           +--|-------+                          +----------+
                                          ^    ^                                 |    ^ 
                        (A) create policy |    |           (E) add to task queue |    |   
                                          |    |                                 |    |
                                          |    | (B) assign policy               v    | (F) execute task  
                                       +--+-—--|--+                           +-------|--+
                                       |          |                           |          |
                                       |  Admin   |                           |  Task    |
                                       |          |                           |  Queue   |
                                       |          |                           |          |
                                       |          |                           |          |
                                       |          |                           |          |
                                       +----------+                           +----------+

The above is a simplified flow diagram, and there's a lot of work to do.

Let me add one more thought. The client receives a policy from the server, and the actions performed by this policy should have multiple possibilities. for example:

  1. Pull files from server
  2. Push files to the server;
  3. Pull files from other addresses such as minio or sftp;
  4. Push files to other addresses such as minio or sftp;

from gofs.

mstmdev avatar mstmdev commented on July 24, 2024

Should the client support multiple tasks at the same time? We need an isolated context to handle multiple tasks.

from gofs.

myselfghost avatar myselfghost commented on July 24, 2024

Should the client support multiple tasks at the same time? We need an isolated context to handle multiple tasks.

maybe the client should support multiple tasks

One of the scenarios:

Machine C, path /data/p3, backed up once a week, push files to server
Machine C, path /data/p4, backed up once a month,push files to minio

from gofs.

mstmdev avatar mstmdev commented on July 24, 2024

WIP #157

from gofs.

mstmdev avatar mstmdev commented on July 24, 2024

See Task Mode

from gofs.

Related Issues (20)

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.