diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/design/assistant/blog/day_271__more_xmpp.mdwn | 31 | ||||
-rw-r--r-- | doc/design/assistant/xmpp.mdwn | 2 |
2 files changed, 31 insertions, 2 deletions
diff --git a/doc/design/assistant/blog/day_271__more_xmpp.mdwn b/doc/design/assistant/blog/day_271__more_xmpp.mdwn new file mode 100644 index 000000000..14e734a2d --- /dev/null +++ b/doc/design/assistant/blog/day_271__more_xmpp.mdwn @@ -0,0 +1,31 @@ +Tobias has been busy again today, creating a [[/tips/flickrannex]] +special remote! Meanwhile, I'm thinking about providing a +[[more complete interface|/todo/support_for_writing_external_special_remotes]] +so that special remote programs not written in Haskell can do some of the +things the hook special remote's simplicity doesn't allow. + +Finally realized last night that the main problem with the XMPP push code +was an inversion of control. Reworked it so now there are two new threads, +XMPPSendpack and XMPPReceivePack, each with their own queue of push +initiation requests, that run the pushes. This is a lot easier to +understand, probably less buggy, and lets it apply some smarts to squash +duplicate actions and pick the best request to handle next. + +Also made the XMPP client send pings to detect when it has been disconnected +from the server. Currently every 120 seconds, though that may change. Testing +showed that without this, it did not notice (for at least 20 minutes) when +it lost routing to the server. Not sure why -- I'd think the TCP connections +should break and this throw an error -- but this will also handle any idle +disconnection problems that some XMPP servers might have. + +While writing that, I found myself writing this jem using +[async](http://hackage.haskell.org/package/async), which has a comment +much longer than the code, but basically we get 4 threads that are all +linked, so when any dies, all do. + +[[!format haskell """ +pinger `concurrently` sender `concurrently` receiver +"""]] + +Anyway, I need to run some long-running XMPP push tests to see if I've +really ironed out all the bugs. diff --git a/doc/design/assistant/xmpp.mdwn b/doc/design/assistant/xmpp.mdwn index bb7754ec6..8dadfaf97 100644 --- a/doc/design/assistant/xmpp.mdwn +++ b/doc/design/assistant/xmpp.mdwn @@ -4,8 +4,6 @@ who share a repository, that is stored in the [[cloud]]. ### TODO -* Prevent idle disconnection. Probably means sending or receiving pings, - but would prefer to avoid eg pinging every 60 seconds as some clients do. * Do git-annex clients sharing an account with regular clients cause confusing things to happen? See <http://git-annex.branchable.com/design/assistant/blog/day_114__xmpp/#comment-aaba579f92cb452caf26ac53071a6788> |