← Back to team overview

syncany-team team mailing list archive

Re: Syncany GUI

 

On Wed, Dec 11, 2013 at 10:15 PM, Philipp Heckel
<philipp.heckel@xxxxxxxxx>wrote:

> 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?
>

Websocket seems better than REST for our purpose


>
> 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"}
>         ]
>       }
>     ]
>   }
> }
>
>
Great, I'll try to write a kind of grammar ....


> 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:
>

Ok, I'll check is there is a Java SE JSR for websocket ;
Pros of using JEE JSR is that we'll always find a vendor/open source
project implementing the API ... and not rely on project that could become
obsolete at some point ?



>
> 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
>
 I'll look at it


>
> 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
>



-- 
Vincent Wiencek
vwiencek@xxxxxxxxx

References