summaryrefslogtreecommitdiff
path: root/Assistant/Threads/XMPPClient.hs
Commit message (Collapse)AuthorAge
* 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.
* 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.
* avoid auto-accepting pair requests from friends already paired withGravatar Joey Hess2013-04-30
| | | | | | | Unless the request is for repo uuid we already know. This way, if A1 pairs with friend B1, and B1 pairs with device B2, then B1 can request A1 pair with it and no confirmation is needed. (In future, may want to try to do that automatically, to make a more robust network.)
* more xmpp debuggingGravatar Joey Hess2013-04-30
|
* assistant: Sanitize XMPP presence information logged for debugging.Gravatar Joey Hess2013-04-24
|
* refactor alert button creation codeGravatar Joey Hess2013-04-04
|
* fix build with xmpp and w/o webappGravatar Joey Hess2013-03-24
|
* webapp: Improved alerts displayed when syncing with remotes, and when ↵Gravatar Joey Hess2013-03-18
| | | | syncing with a remote fails.
* xmpp: Re-enable XA flag, since disabling it did not turn out to help with ↵Gravatar Joey Hess2013-03-16
| | | | the problems Google Talk has with not always sending presence messages to clients.
* xmpp: send a presence query when there's an important message to sendGravatar Joey Hess2013-03-16
| | | | | | | This may work around google talk's horrible presence handling, in which clients often don't learn about other clients, at least when using the same account. This way, every time we start a git push over xmpp, we'll waste bandwidth asking clients to please try again to identify themselves.
* 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.
* make liftAnnex and liftAssistant polymorphic, like liftIOGravatar Joey Hess2013-03-16
|
* webapp: Display an alert when there are XMPP remotes, and a cloud transfer ↵Gravatar Joey Hess2013-03-15
| | | | repository needs to be configured.
* webapp: Improved UI for pairing your own devices together using XMPP.Gravatar Joey Hess2013-03-15
|
* empty buddy list when client is connectingGravatar Joey Hess2013-03-07
| | | | | | | | This is not perfect, because on loss of connection, we do not currently immediately detect it and stop the client. It has to time out, and then the buddy list will clear. The NetWatcher should detect disconnects too..
* show when not connected to xmpp serverGravatar Joey Hess2013-03-06
|
* 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.
* better xmpp debuggingGravatar Joey Hess2013-03-06
|
* tag xmpp pushes with jidGravatar Joey Hess2013-03-06
| | | | | | | | | | This fixes the issue mentioned in the last commit. Turns out just collecting UUID of clients behind a XMPP remote is insufficient (although I should probably still do it for other reasons), because a single remote repo might be connected via both XMPP and local pairing. So a way is needed to know when a push was received from any client using a given XMPP remote over XMPP, as opposed to via ssh.
* webapp: Now allows restarting any threads that crash.Gravatar Joey Hess2013-01-26
|
* whitespace fixesGravatar Joey Hess2012-12-13
|
* add a yes/no confirm for xmpp pairing requestsGravatar Joey Hess2012-11-11
|
* auto-accept pair requests from JIDs already paired withGravatar Joey Hess2012-11-11
|
* don't try to transfer data to/from XMPP remotesGravatar Joey Hess2012-11-11
| | | | | Partition syncRemotes into ones needing git sync (ie, non-special remotes), and ones needing data sync (ie, non-XMPP remotes).
* 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.
* set negative XMPP presence priorityGravatar Joey Hess2012-11-10
| | | | | | | | This should help prevent git-annex clients receiving messages that were intended for normal clients they're sharing the account with. Changed XMPP protocol use to always send chat messages directed at the specific client, as the negative priority blocks less directed messages.
* more refactoringGravatar Joey Hess2012-11-10
|
* more nice refactoringGravatar Joey Hess2012-11-10
|
* separate data type for push stagesGravatar Joey Hess2012-11-10
| | | | This improves type safety.
* refactorGravatar Joey Hess2012-11-10
|
* use a lookup table for speedGravatar Joey Hess2012-11-10
|
* refactorGravatar Joey Hess2012-11-10
|
* avoid excessive debuggingGravatar Joey Hess2012-11-09
|
* run xmpp push actions in separate thread from xmpp clientGravatar Joey Hess2012-11-09
| | | | | Took me a while to figure out why the xmpp client was not receiving git xmpp push messages after a push started.
* 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.
* hooked up XMPP git push send/receive (but not yet control flow)Gravatar Joey Hess2012-11-08
|
* better handling of lifting from XMPP -> AssistantGravatar Joey Hess2012-11-05
|
* ignore Messages from our client's own jidGravatar Joey Hess2012-11-05
| | | | shouldn't ever happen, but hey
* finished XMPP pairing!Gravatar Joey Hess2012-11-05
| | | | | This includes keeping track of which buddies we're pairing with, to know which PairAck are legitimate.
* tweakGravatar Joey Hess2012-11-05
|
* 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.
* avoid repeated pairing alertsGravatar Joey Hess2012-11-03
|
* switch to directed presence for pair requestsGravatar Joey Hess2012-11-03
| | | | | | | | | | | | | | | | | | | | | Testing between Google Talk and prosody, the directed IQ messages were not received. Google Talk probably only relays them between clients using the same account. I first tried even more directed presence, with each client JID being sent a separate presence, but that didn't work on Google Talk, particularly it was ignored when one client sent it to another client using the same account. So, presence directed at the user@host of the client to pair with. Tested working between Google Talk and prosody (in both directions), as well as between two clients with the same account on Google Talk, and two clients with the same account on prosody. Only problem with this form of directed presence is that if I also use it for git pushes, more clients than are interested in a push's data will receive it. So I may need some better approach, or a hybrid between directed IQ and directed presence.
* XMPP pair requests are now received, and an alert displayedGravatar Joey Hess2012-11-03
|
* XMPP pairing notifications are now sentGravatar Joey Hess2012-11-03
| | | | Rest of pairing process still to do.
* bugfixGravatar Joey Hess2012-11-03
|
* 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.