Comments (13)
Yes, in order to better carry out this work, we can do some review and refactoring before starting.
from gofs.
+----------+ +----------+ +----------+ +----------+ +----------+
| | | |<---(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.
- A client only needs to configure the connection address of the server, and the client will be registered in the server.
- 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.
- On the server side, multiple file synchronization policies can be created.
- On the server side, file synchronization policies can be associated with one or more tagged clients.
- 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.
One of the scenarios is: building a backup center,
- Machine A, path /data/p1, backed up once a day
- Machine B, path /data/p2, backed up once a week
- Machine C, path /data/p3, backed up once a week
- 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.
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.
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.
+----------+ +----------+ +----------+ +----------+
| | | |<---(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.
+----------+ +----------+ +----------+ +----------+ | | | |<---(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.
+----------+ +----------+ +----------+ +----------+ | | | |<---(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:
- Pull files from server
- Push files to the server;
- Pull files from other addresses such as minio or sftp;
- Push files to other addresses such as minio or sftp;
from gofs.
Should the client support multiple tasks at the same time? We need an isolated context to handle multiple tasks.
from gofs.
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.
WIP #157
from gofs.
See Task Mode
from gofs.
Related Issues (20)
- Found data race in the "tcpServer" HOT 1
- Such a tool needs a feature to limit bandwidth HOT 6
- Consider moving fsctl to a new standalone project HOT 1
- 删除文件的操作无法同步远程 HOT 5
- 重命名函数好像不大对劲 HOT 2
- How to use gofs as a library HOT 2
- remote_client_sync模式当同步路径中包含#,数据不同步 HOT 20
- Is gofs send all files or only the difference ? HOT 1
- Build Dockerfile successfully, but failed to run
- 实际使用方法 HOT 1
- Relay HOT 3
- 您好,这个是否支持增量同步呢
- 是否可以直接打包一个可执行文件 HOT 1
- delete the source files and source directories HOT 2
- gofs\server\handler\file_api_handler.go 優化建議 HOT 1
- Found data race in the "Local Disk" mode HOT 1
- Fix code scanning alert - Use of insecure HostKeyCallback implementation
- Fix code scanning alert - Arbitrary file write during zip extraction ("zip slip")
- Found data race in the "Remote Disk Server" and "Remote Disk Client" mode HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gofs.