To view parent comment, click here.
To read all comments associated with this story, please click here.
Yes, there are methods for recreating the state but they are not necessarily that simple. Clients can, for example, reconnect to the server and replay actions that lead to the lost state. This might be hard to do if there is a lot of server-side state (like in legacy X applications) or if the session was migrated to a different resolution/color depth/dpi/... screen.
So, we need to keep the information on the client side as well. And that's what, as you pointed it out, modern toolkits do. The price to pay for it is that all the drawing operations are now being done in software (in the client) and Xserver and graphics card acceleration are only used for blitting the resulting images onto pixmaps and applying some 2D/3D transformations. Yes, it works well (at least locally) but it is not the model X was designed for. In fact it works by deliberately avoiding legacy Xserver features.
The limitations are that this solution works slowly over network (or doesn't work at all if the client/toolkit uses XShm only) and is limited to applications written with new toolkits leaving e.g. $$$ Motif apps behind. That's what I meant by "performance hit" and "changing the clients".
Uhh, who says the drawing has to be done in software? Do you remember what happens when a non-composited window is obscured and then exposed? The contents must be redrawn, manually, by the app. So what's the difference between that and having to redraw because the X server crashed? Very little, aside from a some pixmaps stored on the server and a few other bits. If the toolkits tighten up their policy about pixmaps on the server so that the pixmaps can be recreated if they get lost (which I imagine they probably already can be anyway), then your problem is moot.





Member since:
2006-01-02
They only suffer a performance hit when they have to reconnect, which is fine because the goal there is simply to get back to where you were, not to do it seamlessly fast. The fact of the matter is, clients *do* know pretty much everything they need to know to restore their state. The toolkits have an entire client-side hierarchy of objects that represents useful state. Regenerating the few bits needed on the server should be trivial. And if the app really can't handle the server crashing, then it can just exit gracefully (that is, stay alive long enough to reconnect, then give the user a useful error message, save state somewhere and exit).