Opened 15 years ago

Closed 15 years ago

Last modified 11 years ago

#142 closed enhancement (fixed)

Restart a server-based collaboration session / switch servers on the fly

Reported by: morgs Owned by: morgs
Priority: major Milestone:
Component: sugar-presence-service Version: Git as of bugdate
Severity: Major Keywords: r+
Cc: erikos, gdesmott, eben Distribution/OS: Unspecified
Bug Status: Resolved

Description

Add a control panel feature to restart presence service server_plugin connections, allowing resetting the presence state and switching jabber servers without restarting Sugar.

Attachments (4)

sugar-0001--142-Control-panel-button-to-restart-jabber.patch (3.7 KB) - added by morgs 15 years ago.
sugar patch
ps-0001--142-D-Bus-method-to-restart-the-server_plugin.patch (3.5 KB) - added by morgs 15 years ago.
sugar-presence-service patch
sugar-0001--142-Control-panel-button-to-restart-jabber.2.patch (3.7 KB) - added by morgs 15 years ago.
sugar patch
ps_reconnect.patch (2.1 KB) - added by erikos 15 years ago.
auto apply the new jabber server and reconnect directly

Download all attachments as: .zip

Change History (19)

comment:1 Changed 15 years ago by morgs

  • Cc erikos gdesmott added
  • Keywords r? added

Needs review: erikos for the sugar patch to CP, gdesmott for the PS patch.

|TestCase| In the Control Panel Network section, change the jabber server. Click on the "Reconnect collaboration server" button to disconnect the current jabber connection and reconnect to the new server name. Close the control panel (no restarting necessary). Go to Neighborhood view to see the buddies from the new server appearing.

Changed 15 years ago by morgs

sugar-presence-service patch

comment:3 Changed 15 years ago by gdesmott

PS patch looks good. I tend to avoid to modify PS anymore and use directly TP API but in this case I'm afraid that's not possible.

comment:4 Changed 15 years ago by erikos

  • Cc eben added

Hmm, I think we should use instant apply here as well. So a timeout does apply the setting and we do not need another button for this. Eben do you agree?

comment:5 Changed 15 years ago by erikos

Here is a new patch that does the instant apply after a few seconds. If Eben agrees I think we should go that way. Actually - the restart_jabber part could be merged in the set_jabber method. Or is there a case where we do not want to reconnect when the jabber server changes?

Changed 15 years ago by erikos

auto apply the new jabber server and reconnect directly

comment:6 Changed 15 years ago by eben

I think I agree. By instant-apply, you mean to say that changes to the jabber sever entry field (which aren't invalid) take effect immediately upon confirming the changes by pressing the accept button, but will of course be undone if the cancel button is pressed. In other words, the only difference here between current and previous versions is the omission of the restart prompt upon pressing accept. If that's the case, I'm fine with the update.

comment:7 Changed 15 years ago by erikos

a) Yes, there would be no restart prompt.
b) Actually, one option is to apply the setting after a timeout (when the input field changes), the ok button is then only to quit the settings page. If the alert is only modal to the home view you can then check in the mesh view what result the setting has without leaving the network setting page.

comment:8 Changed 15 years ago by eben

a) Sounds good.

b) Careful here. I understand the logic here, and it might be a good idea, but you have to also consider that someone might input something invalid (I suppose we'd indicate that and not apply it); they could pause while looking at a website or piece of paper to get the rest of the string, thus entering a partial string; etc. I guess since any change to this setting will break ongoing collaboration, it might be OK to ignore these edge cases.

However, one still needs to consider the ok button more than just a way to leave the module. Instant-apply or not, leaving by way of the ok button implies that the change should persist, and leaving by way of the cancel button should properly restore the previous setting, even if the entered value had been applied already.

comment:9 Changed 15 years ago by morgs

erikos, your patch does remove the button, which I'd still like to keep in some form if the user simply wants to reconnect to the server (handy if the Neighborhood View seems inconsistent).

comment:10 Changed 15 years ago by morgs

erikos, responding to your questions on irc:

<erikos> morgs: is there an indication of an invalid server (#142) ?
<erikos> morgs: visually, i guess you only don't see others
<erikos> morgs: does the setter return an error on failure?

The setter just populates the value in gconf, which PS uses when starting up or when poked via this new piece of API to restart the server connection.

Failure would be indicated (as it is now) by not seeing anyone in Neighborhood View...

As a future feature, we do need a better way of showing collaboration server status in Sugar itself, perhaps as a frame device.

comment:11 Changed 15 years ago by morgs

I'll post a patch a bit later today with erikos's improvements but with the restart button added back.

comment:12 Changed 15 years ago by morgs

PS patch is in sugar-presence-service 0.83.3

comment:13 Changed 15 years ago by morgs

  • Keywords r+ added; r? removed

comment:14 Changed 15 years ago by tomeu

  • Bug Status set to Resolved
  • Distribution/OS set to Unspecified
  • Milestone set to 0.84
  • Resolution set to fixed
  • Severity set to Major
  • Status changed from new to closed
  • Version set to Git as of bugdate

comment:15 Changed 11 years ago by godiard

  • Milestone 0.84 deleted

Milestone 0.84 deleted

Note: See TracTickets for help on using tickets.