Jump to content


Photo

Check in/Check out for multiple user CMS system


  • Please log in to reply
1 reply to this topic

#1 rich1983

rich1983
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 26 October 2006 - 01:07 PM

Hello,

I have recently started a CMS project which allows users to create custom flash movies for a training system.  This uses a flash based back end, where users can design the look of the training.  This is sent to php files, which then query a mySQL database which then stores the content.  The content is then outputted in xml format and generates the content of the flash movies.

I know how I plan to implement the above areas.  However the system will have multiple training documents and multiple users.  I can see a problem where 2 or more users are using the system to update a particular section of the training.  Read/write conflicts would occur if one user decides they wish to update a part which being updated by another user.  For example, training could be overwritten by a user, or the system could crash if both users try and save at the same time or when another user is editing a section, etc.

I thought using a check in/check out system would solve this.  For example, a user would select a training they wish to edit, locking out it from all other users.  Then when they have finished editing it, it would be unlocked and available to all users again.  My knowledge of file handling and this area in general is limited.

Does anyone have any thoughts or suggestions on how best to implement something like this?  I have also looked at fopen and fwrite, but I am not sure these are of any use for what I want to achieve.

Thank you

Richard

#2 fenway

fenway
  • Staff Alumni
  • MySQL Si-Fu / PHP Resident Alien
  • 16,199 posts
  • LocationToronto, ON

Posted 26 October 2006 - 05:41 PM

Any check in/out system that involves the DB would have the same issues as the underlying DB record itself -- you could use transactional table to handle this, or use LOCKs when necessary to make sure that everything else is up-to-date.
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users