Hi,
I'm in the process of re-designing a webstore app. One of the features
built into the (CF5) app is the ability to share an order. The 'sharees'
gain full access and can add &/or delete items from the cart. I ensured
concurrency by 'locking' the order if any user (in the share list) is
currently editing the order. (This eliminated the potentially sticky
problem of two different users more-or-less simultaneously adding the same
items, etc.). I used the DB to store the 'state' of the lock. A lock is
cleared whenever a user logs out or switches to another order number. The
only caveat to this working was the occasional user who didn't log out
with a shared order open. I handled this by adding an admin screen to
clear the locks.
In the existing app, all of the required order data is in the session
scope and isn't written to the DB until the 'checkout' screen. For the new
revision, I'm thinking I could use the application scope to keep a
'global' struct/array containing owners, shares, order-nums & lock-states.
This approach would allow me to timeout locks but I can't think of any
additional benefits. I'm also questioning the value of locking shared
orders in the first place. I'm thinking that I need to keep a locking
mechanism due to the inability (or my lack of understanding) to push out a
refresh to 'sharing' clients in the event that two or more users are
viewing the contents of the same cart and a user adds or deletes items.
Surely others have delivered similar solutions... any ideas or comments
are welcome.
Regards, Mike
[Todays Threads]
[This Message]
[Subscription]
[Fast Unsubscribe]
[User Settings]
[Donations and Support]