Multi-User data entry capable?

Hoping to confirm Wappler can accomodate multi-user data entry with a MySQL back end.

Hello @TahorSuiJuris,
Are you referring to multiple database record insert?

Not bulk insert, multiple users all entering or editing or deleting at the same time concurrently.

On a daily basis we have several hundred (or more) Users online creating, updating, and deleting, everything from new records to images and other documents, as well as simply browsing their data. No issues at all.

2 Likes

2019-01-29_17-22-40

Busiest part of the day for this server (quite an average spec box).


Total processors: 6

Processor #1

Vendor

GenuineIntel

Name

Intel® Xeon® CPU E5-2603 v3 @ 1.60GHz

Speed

1200.000 MHz

Cache

15360 KB

Processor #2

Vendor

GenuineIntel

Name

Intel® Xeon® CPU E5-2603 v3 @ 1.60GHz

Speed

1200.000 MHz

Cache

15360 KB

Processor #3

Vendor

GenuineIntel

Name

Intel® Xeon® CPU E5-2603 v3 @ 1.60GHz

Speed

1200.000 MHz

Cache

15360 KB

Processor #4

Vendor

GenuineIntel

Name

Intel® Xeon® CPU E5-2603 v3 @ 1.60GHz

Speed

1200.000 MHz

Cache

15360 KB

Processor #5

Vendor

GenuineIntel

Name

Intel® Xeon® CPU E5-2603 v3 @ 1.60GHz

Speed

1200.000 MHz

Cache

15360 KB

Processor #6

Vendor

GenuineIntel

Name

Intel® Xeon® CPU E5-2603 v3 @ 1.60GHz

Speed

1600.000 MHz

Cache

15360 KB

Memory Information
Memory: 49270488k/52428800k

of course it can.

I’ve only ever used MySQL for standard websites, where only one or two people are ever adding data etc. - so I’m very interested in your experience.

I know there are various ways in which rows or columns are locked. Is there any easy way to inform a user that a record they’re viewing or start to edit is already being update/locked by another user? Also, would you recommend MyISAM or InnoDB, from the point of view of multi-user use. I find it quite confusing finding a reliable answer; there seems to be advantages to either and lots of different opinions. Thanks.

We set a timestamp on click for the edit button which inserts an activity record. The update record form then checks for any results (in the last 10 minutes) and if returned disables the update button. If no activity is detected the update button is shown. We also backup the record to a temporary 24 hour table which is truncated every 24 hours upon any update actions.

I’ve always used InnoDB and have had no issues with it at all. A lot comes down to the data you are retaining, the preference of the DBA or client, and of course the configuration of your MySQL server. There is lots of great documentation on all sides. Bit of a minefield though. If you have access to your MySQL server use something like Workbench or DBForge Studio to check your server for query performance, tweak, tune, deploy, and test again. We use this config as a starting point and tweak away from there: http://www.speedemy.com/mysql/17-key-mysql-config-file-settings/

I’m no DB expert by any means but memory is the key here. Use as much as you can without causing system stability issues. Scale up to a dedicated MySQL server cluster and add nodes as you require. Look in to replication and cron jobs, mySQL events, Triggers, and Procedures. These can help in reducing the load on your DB and return results a lot faster. I discover new things every day just playing around and exploring the ‘I wonder if’ scenarios which flood my poor mind (brain farts I believe they are called!). If you’re going to do anything major back everything up first, infact just backup regardless!

Not sure if any of that helped Tom…

:slight_smile:

2 Likes

Thanks Dave, that’s very helpful. I would probably only be concerned with small numbers of users. My largest customer has a little over 30 users, and most are 5 or less. (Not web-based).

I’m interested in your update approach - but not quite clear how it works. Eg User 1 starts editing a record. Then user 2 start editing the same record and clicks the update button. He sees the message that there’s been activity in the last 10 minutes. What does he do then? Might he have to wait for 10 minutes? I suppose the activity record would be closed if user 1 presses the update button in the meantime.

OUTSTANDING… Thank you Dave. @Dave

1 Like

Your hypothesis is correct (the button is actually hidden with a notification). You could (also) have a Scheduler event run every 10 minutes on the update form to either display or hide the submit button, so if a user was editing the record and theoretically timed out the button would be disabled for this user and the next user in the update chain would then see the button. We rarely see any form of issues with or without this feature so it is more of a fail-safe. Like I said backups of the original records are always stored for a minimum of 24 hours (can be extended via restore function in the waste table).

Great - that’s really useful. Thanks!

1 Like

The record author or an administrator can also set the record to locked. This disables any user from updating the record aside from the author or an authorised administrator.

1 Like

@Dave, I am going through the Server-side Components DOC all day today. Would you point me in the direction of the mirror video lecture of same?

1 Like

I’m not quite sure what you require Tahor? It may be a good idea to start a new Thread on this requirement?

Just seeking the video lecture that encompasses the same instructional information in the DOC.

Thank you @Dave

Sorry, there are no videos to go with the docs.

Thank you, @brad