On 04/13/2014 07:44 AM, Shish wrote:
> I wanted a systray interface to exist, so I made one~
>
> Currently tested against the ruby daemon, on the assumption that the
> client-daemon interface will be approximately the same in the C++
> version (in the visible API sense -- switching from JSON to MsgPack
> should be trivial, as long as there's still an add_share(code, path)
> method, etc). I plan to switch to working with the C++ daemon as soon as
> it actually exists :P
>
>
https://github.com/shish/python-clearskies
>
https://github.com/shish/clearskies-gui
Awesome work! I will link to this from the main clearskies README so
that other people can find it.
Python seems like a good choice for the desktop GUIs.
> I have the infrastructure set up for building binaries, but I'm assuming
> they aren't wanted yet (for starters, the gui currently only covers 75%
> of the CLI features; the rest shouldn't be too hard, I've just not got
> round to them).
That's also awesome. There has been enough interest in the project that
once we start shipping binaries I think we'll see a lot more contributors.
> A couple of API questions though:
>
> - The client communicates with the daemon via Unix socket in
> ~/.local/share/ -- how does this translate to windows?
It seems like "Named Pipes" (e.g. CreateNamedPipe) work in a similar
manner. We can also have the control interface be over a local TCP
socket if there are reasons why named pipes won't work.
> - "For forwards compatibility, unrecognized keys should be ignored.
> Unrecognized messages should be give <sentence is cut off>"
Heh, so sorry about that. I type much faster than I can think. (I'll
let you decide if that's because I'm a fast typer or just a slow thinker.)
Since the protocol is request-response, unrecognized messages should be
responded to with a "not_understood" response:
{
"error": "not_understood",
"message": "Could not understand $type message"
}
I think that gives us reasonable forwards compatibility, as a newer GUI
can probe an old daemon to see what it is capable of.
> - protocol/control.md seems very unfinished, is the protocol likely to
> have large changes in future? (If it's vaguely stable, I'd be happy to
> finish documenting what currently exists)
Yes, I started documenting it and then got distracted by other things.
I figured that once we actually had a GUI that we could fill in the
blanks. If you'd like to document it, I'd be happy to merge your
changes. Also if there are parts of it you don't like, let's change
them. As the first GUI, you can decide what direction it should take.
The only big improvement that I can think of is that we should probably
have a way to push messages, so that the client doesn't have to
continually poll. I think the simplest way to do this, from an
implementation standpoint, would be to let the client open a second
connection to the server, and then request to put it in push mode. Once
it's in push mode, it just streams a news feed of all updates until the
connection is closed.
There are probably some minor changes related to the large
"protocol_cleanup" merge that I did a month or so ago. It introduced
new things that aren't in the ruby implementation, such as a method for
handling conflicts. Those new things would also need to be exposed in
the API.
One final thought: on mobile we'll be integrating the C++ core right
into the application so that it's all in a single process. Let's call
this approach "libclearskies" for clarity. It doesn't make sense to
have this be a completely new interface for controlling the clearskies
code, so I'd like to see if we can have the control protocol to work
well for both cases.
Steven