Developing an example Protection plugin
#11
Storage revision
While coding the cStorage:AddArea(), I found out that the initial DB structure was not thought out thoroughly. The protection areas will be specific to a world in which they're created, so each area needs to know its world as well. Either we need to store the world name for each area, too, or we need to have a separate DB file for each world.
The first approach is better when we think about the planned ProtRemUserAll command - it will be able to remove the user from all areas in all worlds easily.
The second approach is better when we think of each world as a closed entity, theoretically being able to migrate an entire world to a different server. Another plus points are for DB performance - the DB won't have so many rows, thus the queries will run faster. On the other hand, this approach would require a separate "SQLite DB handle" for each world, making things complicated.

I decided to take the first path now, with a change to the second path being still available later on in the development.
Reply
Thanks given by:


Messages In This Thread
Developing an example Protection plugin - by xoft - 05-18-2013, 01:29 AM
RE: Developing an example Protection plugin - by xoft - 06-08-2013, 12:30 AM



Users browsing this thread: 5 Guest(s)