Skip to content

Commit

Permalink
Add README, LICENSE. Code cleanup
Browse files Browse the repository at this point in the history
Signed-off-by: Vitalii Parfonov <[email protected]>
  • Loading branch information
vparfonov committed Jun 25, 2020
1 parent d134204 commit f956583
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 9 deletions.
31 changes: 31 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
## About Eclipse Che Workspace Data Sync

This tooling provide ability to increase I/O performance for a developer workspaces.

==============
## Workspace lifecycle:

#### Workspaces Startup phase:
- Pods (workspace and data sync) are started in parallel
#### Startup data sync phase:
- Data flow goes from the persistent volume (rsync server) to the ephemeral volume (rsync client)
#### Normal workspace usage phase:
- Containers in the Workspace Pod have full R/W access to the ephemeral volume with restored project sources
- Container (rsync client) in the Workspace Pod have full R/W access to the persistent volume
- Data flow goes from rsync client to rsync server periodically by cron job
#### Workspace Shutdown phase
- Containers in the Workspace Pod stopped and data flushed to the persistent volume

## Requirements

- Golang `1.12`
- Docker

## Build

```sh
./build.sh -help
```

### License
Che is open sourced under the Eclipse Public License 2.0.
Binary file removed watcher/watcher
Binary file not shown.
9 changes: 0 additions & 9 deletions watcher/watcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package main
import (
"context"
"encoding/json"
"fmt"
"github.com/che-incubator/workspace-data-sync/pkg/progress"
"log"
"net/http"
Expand All @@ -30,12 +29,6 @@ func main() {
pw.Watch()
}()

//http.Handle("/track", websocket.Handler(func(conn *websocket.Conn) {
// pw.Notify(func(p progress.ProgressState) {
// send(conn, p)
// })
//}))

http.HandleFunc("/track", func(w http.ResponseWriter, r *http.Request) {
conn, err := upgrader.Upgrade(w, r, nil)
pw.Notify(func(p progress.ProgressState) {
Expand Down Expand Up @@ -72,8 +65,6 @@ func main() {

func send(conn *websocket.Conn, msg progress.ProgressState) {
sMsg, _ := json.Marshal(msg)
fmt.Print("send :: ")
fmt.Println(sMsg)
err := conn.WriteMessage(1, sMsg)
if err != nil {
log.Println(err)
Expand Down

0 comments on commit f956583

Please sign in to comment.