Hello.

2012/12/02 14:34:15 +0000 Thomas Adam <tho...@xteddy.org> => To Peter 
Vereshagin :
TA> [Adding back tmux-users@ to Cc list.  Please don't cull it next time.]

thought I did. No X-Mailing-List comes here so mutt's 'list-reply' doesn't
work.

TA> No.  You seem to be under the impression that client <-> server
TA> implementation implies some direct communication where everything is
TA> controlled by the server.  But in terms of how tmux operates, the server is
TA> only really responsible for keeping track of client/sessions [1]; the
TA> commands which can run on clients and sessions, are handled by each specific
TA> command which is invoked -- but the communication has already happened with
TA> the server by this point to establish FDs, etc.
TA> 
TA> So when you run something like:
TA> 
TA> % tmux lsk
TA> 
TA> That will call the "list-keys" command entry and run whatever is inside
TA> there.  That such keys are held in RAM by the server doesn't mean that tmux
TA> is querying the server directly via some mythical protocol which you think
TA> might be there *just* because you've heard tmux is client/server based.  No,
TA> rather all that happens is that tmux commands have *access* to such things
TA> directly.  There is no *communication* channel happening via some protocol.
TA> 
TA> So can you see now, why using tmux directly, and using its commands *is* the
TA> protocol you're after? [2]

Yes.

TA> > At the very least for the trivial monitoring task I can think of like GUI
TA> > applet watching for amount of seesions and windows in a particular Tmux 
server
TA> > polling every, say, 3 seconds. Running a polling Tmux command means a much
TA> > resources consumption.
TA> 
TA> To do what?  When I finish adding in hook support to tmux, this will make
TA> such tasks trivial.

I remind why I have a 'to ask about this' on my list.

Some of the Debug::Fork::Tmux use cases started with Tmux v1.5 and less. But
the needed commands are found only in v1.6+. I hoped some internals (like the
C api) are behind the Tmux commands and thought if they are/will be usable as
a shared library and a standard/specs, if not an RPC.

Now I see that even with 'control mode' implemented, the version dependency
remains no less than it is.

TA> 
TA> -- Thomas Adam
TA> 
TA> [1]  I am very much simplifying the explanation here.
TA> [2]  If you've ever heard of "control mode" for tmux, this is a way of being
TA> able to control tmux via output to stdout, which like this "protocol" you're
TA> after.  But it is not finished, and nothing internal to tmux is using it
TA> yet.  There's no guarantee anything in tmux ever will, either.

--
Peter Vereshagin <pe...@vereshagin.org> (http://vereshagin.org) pgp: A0E26627 

------------------------------------------------------------------------------
Keep yourself connected to Go Parallel: 
BUILD Helping you discover the best ways to construct your parallel projects.
http://goparallel.sourceforge.net
_______________________________________________
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users

Reply via email to