Support the ongoing development of Laravel.io →
Database IOC Architecture
Last updated 1 year ago.
0

Looks okay to me but, i really don't think using the database to store tenant data is an overkill. Reading a file on disk is slower than reading from a database. Also consider a scenario where you have 100's of tenants and you need to edit a config file to make a single change. You can also consider storing tenant data on a separate database for isolation and scaling.

0

did you say reading from a file is SLOWER than a database? that is simply not true (and not what i have heard all these years)..

The question should be about making sure data stays the same ie ACID.. which might be difficult to achieve if reading/writing to a file..

0

shez1983 said:

did you say reading from a file is SLOWER than a database? that is simply not true (and not what i have heard all these years)..

of course try searching for something in an array that's really really long vs searching the something on a RDBMS. databases are made for these tasks. If you load an array in to memory and search it you will definitely run out of memory, try doing that per server request.

0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.