diff --git a/Filer-Change-Data-Capture.md b/Filer-Change-Data-Capture.md index 1f60663..b085e89 100644 --- a/Filer-Change-Data-Capture.md +++ b/Filer-Change-Data-Capture.md @@ -2,6 +2,8 @@ Is it too much a dream to have something similar to [inotify](https://man7.org/l Actually SeaweedFS can give you more! +# Example + Here is an example, in Java: https://github.com/chrislusf/seaweedfs/blob/master/other/java/examples/src/main/java/com/seaweedfs/examples/WatchFiles.java @@ -21,6 +23,18 @@ Basically there are four types of events to handle: | Delete | exists | null | exists | equal to Directory | | Rename | exists | exists | exists | not equal to Directory | +# Other Languages + This is based on Filer gRPC API. You should be able to easily implement it in your own language. -https://github.com/chrislusf/seaweedfs/blob/master/weed/pb/filer.proto#L52 \ No newline at end of file +https://github.com/chrislusf/seaweedfs/blob/master/weed/pb/filer.proto#L52 + +# Possible Use Cases + +This is event processing for files. The possible use cases are all up to your imagination. + +* Detect new image or video files. Add versions with different resolutions. +* A **distributed configuration distribution**: stores configuration files under a folder. Detect the configuration changes and reload. +* A **job queue**: upload files to a folder, and processing new files as soon as possible, and delete the processed files. +* Do-it-yourself **Data Replication or Backup**. +