aboutsummaryrefslogtreecommitdiff
path: root/Assistant/Types/NetMessager.hs
Commit message (Collapse)AuthorAge
* fix minor memory leak caused by recent CanPush changeGravatar Joey Hess2013-05-22
| | | | Putting the UUID in meant that equivilant CanPush messages no longer are ==
* add two long-running XMPP push threads, no more inversion of controlGravatar Joey Hess2013-05-22
| | | | | | | | | I hope this will be easier to reason about, and less buggy. It was certianly easier to write! An immediate benefit is that with a traversable queue of push requests to select from, the threads can be a lot fairer about choosing which client to service next.
* avoid building up a lot of threads all waiting for their chance to run a pushGravatar Joey Hess2013-05-22
| | | | | Only 2 threads are needed, one running, and one waiting to push something new. Any more is redundant and wasteful.
* XMPP: Avoid redundant and unncessary pushes. Note that this breaks ↵Gravatar Joey Hess2013-05-21
| | | | compatibility with previous versions of git-annex, which will refuse to accept any XMPP pushes from this version.
* per-client inboxes for push messagesGravatar Joey Hess2013-05-21
| | | | | | | | | | | This will avoid losing any messages received from 1 client when a push involving another client is running. Additionally, the handling of push initiation is improved, it's no longer allowed to run multiples of the same type of push to the same client. Still stalls sometimes :(
* XMPP: Be better at responding to CanPush messages when busy with something else.Gravatar Joey Hess2013-05-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Observed: With 2 xmpp clients, one would sometimes stop responding to CanPush messages. Often it was in the middle of a receive-pack of its own (or was waiting for a failed one to time out). Now these are always immediately responded to, which is fine; the point of CanPush is to find out if there's another client out there that's interested in our push. Also, in queueNetPushMessage, queue push initiation messages when we're already running the side of the push they would initiate. Before, these messages were sent into the netMessagesPush channel, which was wrong. The xmpp send-pack and receive-pack code discarded such messages. This still doesn't make XMPP push 100% robust. In testing, I am seeing it sometimes try to run two send-packs, or two receive-packs at once to the same client (probably because the client sent two requests). Also, I'm seeing rather a lot of cases where it stalls out until it runs into the 120 second timeout and cancels a push. And finally, there seems to be a bug in runPush. I have logs that show it running its setup action, but never its cleanup action. How is this possible given its use of E.bracket? Either some exception is finding its way through, or the action somehow stalls forever. When this happens, one of the 2 clients stops syncing.
* add uuid to all xmpp messagesGravatar Joey Hess2013-04-30
| | | | | | | | | | | | | | | | | | (Except for the actual streaming of receive-pack through XMPP, which can only run once we've gotten an appropriate uuid in a push initiation message.) Pushes are now only initiated when the initiation message comes from a known uuid. This allows multiple distinct repositories to use the same xmpp address. Note: This probably breaks initial push after xmpp pairing, because at that point we may not know about the paired uuid, and so reject the push from it. It won't break in simple cases, because the annex-uuid of the remote is checked. However, when there are multiple clients behind a single xmpp address, only uuid of the first is recorded in annex-uuid, and so any pushes from the others will be rejected (unless the first remote pushes their uuids to us beforehand.
* assistant: Sanitize XMPP presence information logged for debugging.Gravatar Joey Hess2013-04-24
|
* assistant: Added sequence numbers to XMPP git push packets. (Not yet used.)Gravatar Joey Hess2013-04-10
| | | | | | | For backwards compatability, "" is treated as "0" sequence number. --debug will show xmpp sequence numbers now, but they are not otherwise used.
* hlintGravatar Joey Hess2013-04-03
|
* xmpp: --debug now enables a sanitized dump of the XMPP protocolGravatar Joey Hess2013-03-16
| | | | So I can debug these damn google talk presence issues.
* assistant: XMPP git pull and push requests are cached and sent when presence ↵Gravatar Joey Hess2013-03-06
| | | | | | | | | | | | | | | of a new client is detected. Noticed that, At startup or network reconnect, git push messages were sent, often before presence info has been gathered, so were not sent to any buddies. To fix this, keep track of which buddies have seen such messages, and when new presence is received from a buddy that has not yet seen it, resend. This is done only for push initiation messages, so very little data needs to be stored.
* allow both one push and one receive-pack to run at the same timeGravatar Joey Hess2012-11-11
| | | | | | Noticed that when pairing, sometimes both sides start to push, and the other side sends a PushRequest, and the two deadlock, neither doing anything. (Timeout eventually breaks this.) So, let both run at the same time.
* separate data type for push stagesGravatar Joey Hess2012-11-10
| | | | This improves type safety.
* on second thought, do allow deferring StartingPushGravatar Joey Hess2012-11-10
| | | | | | My reasoning is that StartingPush could be received after another push starts being received, and it would be better to respond to it afterwards than not.
* fix deferring of CanPush, and stop deferring StartingPushGravatar Joey Hess2012-11-10
|
* add canpush xmpp commandGravatar Joey Hess2012-11-09
|
* xmpp push control flowGravatar Joey Hess2012-11-08
| | | | | | | | | It might even work, although nothing yet triggers XMPP pushes. Also added a set of deferred push messages. Only one push can run at a time, and unrelated push messages get deferred. The set will never grow very large, because it only puts two types of messages in there, that can only vary in the client doing the push.
* renameGravatar Joey Hess2012-11-08
|
* hooked up XMPP git push send/receive (but not yet control flow)Gravatar Joey Hess2012-11-08
|
* data types and xml generation/parsing for xmpp pushGravatar Joey Hess2012-11-07
|
* switch to silent chat messages for XMPP pairingGravatar Joey Hess2012-11-05
| | | | | Along the way, significantly cleaned up Assistant.XMPP, and made XMPP message decoding more efficient.
* workaround for Google Talk's insane handling of self-directed presenceGravatar Joey Hess2012-11-03
| | | | | | | | Maybe the spec allows it, but broadcasting self-directed presence info to all buddies is just insane. I had to bring back the IQ messages for self-pairing, while still using directed presence for other pairing. Ugly.
* XMPP pairing notifications are now sentGravatar Joey Hess2012-11-03
| | | | Rest of pairing process still to do.
* send a presence query when the buddy list is displayedGravatar Joey Hess2012-11-03
| | | | | This ensures that clients that have not sent presence in a while will show up in the list.
* refactor XMPP clientGravatar Joey Hess2012-11-03