This page last changed on Jun 10, 2011 by cortextual.
Eric Bariaux and I are currently working on client-side controller failover. He is working on this for iOS, and I am working on it for Android.
Here's a slightly edited version of Eric's description of what he has done so far:
- When the user enters a controller URL or when a controller URL is auto-discovered, the console calls /rest/servers on that URL.
- It then uses the list of URLs returned by this call as its group members (and only those, it does not use the URL entered/discovered in the first place, allowing some kind of proxy/re-direction mechanism).
- When a call is required of the controller, the console tries the last valid URL (the first time, it just picks one from the group members at random) and tries to connect using it. If it fails, it picks the next one in the list, until all have been tried. If it reaches a different controller, it recalls that this is the new valid URL to try first. Each failed attempt to connect to a controller in the failover group should be logged. If no controllers from the failover group could be contacted, this should be logged and the user should be notified in some way.
- In addition, in the current implementation of the iOS console, if a call is a sensor polling and none of the URLs are reachable, the polling is stopped and needs to "manually" be restarted (this is achieved by navigating to a new screen).
I'd like to know how the failover group is present to the end user in the list of controllers. Is the URL to the controller that was entered manually or auto-discovered used or is the failover group name used? I know that there is a group name defined in WEB-INF/classes/roundrobin.properties or controller.xml, but I don't think that the group name is returned by the /rest/servers service or any of the other REST services.