← Back to team overview

syncany-team team mailing list archive

Re: Syncany GUI

 

Hi again,

no Doodle required -- only qualitative comments count :-)

A) REST vs WebSockets
-------------------------
I think we all agree that REST doesn't really fit to the real time
notifications we need for the GUI, so I think WebSockets is the way to
go. And from what I see, nobody is really against that. Does anyone object?

B) Messages
-------------------------
For the exchanged messages, I thought something like that would be nice:

- GUI->Daemon: {id: 123, type: "GetFoldersRequest"}

- Daemon->GUI:

{
   id:124,
   requestId:123,
   type:"GetFoldersResponse",
   data:{
      folders:[
         {
            repoId:"ae13aef..",
            localdir:"/home/pheckel/Syncany"
         }
      ]
   }
}

- Daemon->GUI:

{
  id:125,
  type:"NotifyChanges",
  data:{
    [
      {
        repoId:"ae13aef..",
        updates:[
          {type:"new",name: "file1.jpg"},
          {type:"deleted", name: "file1.jpg"}
        ]
      },
      {
        repoId:"beaf41..",
        updates:[
          {type:"deleted", name: "folder"}
        ]
      }
    ]
  }
}

Thoughts?

C) Library
-------------------------
Vincent is already testing with the JEE javax.websocket package,
although we can't use that because we're on Java SE. There are a few
libraries:

1) https://github.com/TooTallNate/Java-WebSocket
Says the RFC6455 is implemented, just tested the demo application,
works: http://i.imgur.com/Jb6gcHF.png
Java Server + Java console client + JavaScript/HTML5 client + Java/Swing
client

2) http://code.google.com/p/websockets4j/
Last code update 2010, final RFC not implemented ...

Not much more out there ... To early maybe?!
But I think (1) does quite well ...

Thoughts?

Best
Philipp


Follow ups

References