Welcome Guest, Not a member yet? Register   Sign In
Session Class using database - multiple Ajax requests - concurrency problem leeds to lost update in session data
#3

[eluser]MaWoBi[/eluser]
Hi.

Well, we’re working on a solution that will fit to our needs. Bit this needs some testing. As soon as I consider our solution as „stable“, I’ll let you know.

The solution might be to read the session date again and then insert the new value just before writing the new session data into the database (session.php => sess_write ()). This must be done in an atomic function (transaction). This is just a solution for the lost update problem – any parameter change in both requests will still be dominated by the slowest request. But I can’t see any reason why the same parameter should be change by both requests. This constellation might be a design fault anyway… ;-)

In general most people just give you the advice to simply avoid the situation where this problem occurs as it is a general problem also in php native session handling. Personally I think avoiding might not be that simple at all… ;-)

MW


Messages In This Thread
Session Class using database - multiple Ajax requests - concurrency problem leeds to lost update in session data - by El Forum - 09-09-2009, 02:15 AM



Theme © iAndrew 2016 - Forum software by © MyBB