Overall File System and Data Structure
#16
Posted 10 December 2011 - 07:55 AM
It would require package names to be unique across the community, but I think that is solvable in a number of ways. ( lets not get into solutions ideas in this thread )
I think you have created a convert ... good discussion.
#17
Posted 10 December 2011 - 08:11 AM
Do I get that the name of the zip file doesn't matter at all. ie the package will be identified by the package folder name inside the zip? I like this because the zip file name is often set by the web site where things are stored. This way it doesn't matter what the zip file is called. In fact a user could rename it if there are naming conflicts. The only thing that would be important is that it be unique in the content directory where its stored.
#18
Posted 10 December 2011 - 08:59 AM
wacampbell, on 10 December 2011 - 07:55 AM, said:
Yeah, the idea was that we have multiple "content directories" and OR merges its view across all of them in a defined way. Everything would just see a single list of packages.
wacampbell, on 10 December 2011 - 08:11 AM, said:
You are correct; websites controlling the filename was one of the reasons I went for using the directory name inside the zip only.
It occurs to me that a zip could contain multiple packages, but I'm not sure how useful that would be. (You should never need to have more than one package for a collecdtion of things.)
#19
Posted 10 December 2011 - 10:05 AM
One concern brings a question: For reuse you create a relative reference to another "package", the reference is complete text rather that half dots and slashes (good)... now repeat that many hundreds of times and then decide that package 143 is actually pretty bad now that you seen Joe's replacement. How do you remove (or over-write) package 143, in ignorance of how it is referenced elsewhere? What it looks like is Package 143 is there "for the duration".
It's a shame really that there isn't the sort of referential integrity at the file level that there is inside of a dbms... I keep wondering if we should give going down that path that some serious consideration.
Anyway, I know disk is cheap but time isn't... trying to sort & find a directory with tens of thousands of things in it sometimes a PITA and full backups take time too. So the idea of once it's installed it's there forever strikes me as a bit problematic.
#20
Posted 10 December 2011 - 10:14 AM
Genma Saotome, on 10 December 2011 - 10:05 AM, said:
I can see this might lead to another level of indirection or macro substitution or something like that. Really more an issue for how things are encoded in the file - not so much an issue for the directory structure itself. Even so, I am not sure I see the occasion where you could substitute one package for another. Would someone else's package have all the same files in it as the one you originally referenced?
Quote
Could you elaborate. Why do you think the proposed file and directory structure leads to this problem?
#21
Posted 10 December 2011 - 10:26 AM
Genma Saotome, on 10 December 2011 - 10:05 AM, said:
The proposed structure actually makes it simpler to remove things, as they're contained with single objects (directory or zip); there's also nothing stopping someone providing a tool to report which packages reference which other packages. We could include such a tool with OR, for example. (I've actually thought about a metadata file in each package could list which others it uses, but it's not critical to this design.)
#22
Posted 10 December 2011 - 11:07 AM
I've never run the Flying Scotsman... never intend on running the Flying Scotsman, have no idea how many different places its cab view might still be referenced, and have the unhappy experience of learning that all sorts of things break when I deleted its folder.
I'm not seeing anything in the proposal that solves that problem. Something as simple as \content\reused\"many packages" and \content\standalone\"many packages" might help.
===================
I'm also a bit concerned about the top level folder name used on content. I rename (and prune) a lot of the stuff I get because I find it vastly easier to use a directory named \SP #5637 GP-9 than I would if it were the original \Bob's GP-9 Collection.zip; Will the proposal allow me to rename and organize sets of files as I like w/o all sorts of stuff breaking? I'm concerned that it won't... not unless we also implement the feature that Scott and I have mentioned (tilde and %) to create an editable shortcut that works over a wide spread of files. Add that feature and then you enable files to hold logical references while in a control file you map them over to physical names and locations.
#23
Posted 10 December 2011 - 11:28 AM
Genma Saotome, on 10 December 2011 - 11:07 AM, said:
This problem is only solvable with tools, in the general case; no amount of arranging files will solve it IMHO. What do you do when you want to prune your "reused" folder, for example? I think we're better off defining the linking cleanly and neatly and then providing tooling based upon that.
Genma Saotome, on 10 December 2011 - 11:07 AM, said:
Zip files can be renamed freely; the top-level directory (in a content directory or a zip) cannot. Honestly, I'm not sure we should be catering to this need, but we can do it with only a small addition: a simple file in any content directory, containing package names and locations (directory or inside a zip file).
#24
Posted 10 December 2011 - 11:56 AM
#25
Posted 10 December 2011 - 12:22 PM
smmille1, on 10 December 2011 - 11:56 AM, said:
Yes, I have. You don't need the whole zip file in RAM to read individual files, or the file list, from it, and you don't even need to write the files to disk as an intermediate step for loading. Obviously some experimentation will be needed here, but the "worst" case is that we cache an expanded copy in a private folder.
#26
Posted 10 December 2011 - 12:23 PM
smmille1, on 10 December 2011 - 11:56 AM, said:
Certainly something that would have to be investigated. The world files and terrain files are loaded dynamically as the camera moves along the route. Ideally we will find that zip reading libraries can quickly reposition themselves in the zip file stream to any file needed.
Definitely worth investigating.
#27
Posted 11 December 2011 - 08:36 PM
Second, am I correct in understanding that the proposal allows for any sort of directory structure to fall under the top level directory of content? Everyone can do something different as it suits them? If so, that's flexible... perhaps waaaay too flexible for Joe Average to wrap his mind around on managing tens of thousand of files.
OTOH, if my understanding is incorrect, that there is an expected structure that exists under the top level directory... what is it?
=====================
All things considered I can't but think the reason this issue is hard is because there is a need to see the relationships -- which are Joe's files? Where did I get this zip? Let me see my installed F-units, where is that cool sound file? and so on. The stuff that sometimes, in more simple situations, file names, extensions, and the directory tree can adequately solve. But perhaps this software environment is, in fact, too complex and is in need of an app that provides varied views of the installed data and software that manages the relationships... a dbms database. Put that between the user and the files, between the OR software and the files, and suddenly what the file extensions are, what the file names are, and the directory tree and its names all fade into almost complete insignificance. Problem solved.
#28
Posted 12 December 2011 - 06:30 AM
Genma Saotome, on 11 December 2011 - 08:36 PM, said:
I don't think James' proposal is any worse in this regard, and perhaps better. We allow a user to set up as many content directories as they like. Consider I might have the following content directories:
1920 Rolling Stock
Traction Loco's
German Locos
1920 Scenery
Modern Scenery
Vegetation
European Routes
NA Routes
It should be pretty easy to find Tims PE1606 should he decide to issue an update.
Quote
I don't see how it could be 'too flexible' Some people are good at organizing their addons. Some are not, but this gives them a pretty flexible tool.
Quote
I am not sure what James' envisioned, but I wouldn't see that we have a top level content directory at all. The user adds his individual content directories to OpenRails through a configuration process. He can store the content directories wherever he wants even on different hard disks if needed. And as James' suggests, the OpenRails provided content would live in a content directory in the program folder.
Quote
I definitely see the appeal of this. a DBMS is a collection of data on the disk controlled by a program that indexes it and allows users to query it in flexible ways. But then isn't the proposed method also a DBMS where the records are represented by files and folders. All thats missing is the 'program' to index them and allow users to query it in flexible ways. ... and that could be added.
#29
Posted 12 December 2011 - 07:28 AM
Genma Saotome, on 11 December 2011 - 08:36 PM, said:
Finding the thing to patch is easy. The readme with the patch tells you what it's called and you open that thing in the content directory you've dumped everything in. (Or you can add an extra level of organisation by using multiple content directories as Wayne mentioned.) Actually patching things is a more interesting subject than finding them... (well, for zip files anyway; directory patching is identical to MSTS).
Genma Saotome, on 11 December 2011 - 08:36 PM, said:
OTOH, if my understanding is incorrect, that there is an expected structure that exists under the top level directory... what is it?
It's not clear to me what directory you are refering to by "top level" here. Let's see if I can name everything:
\OpenRails\Content This is a content directory. There can be any number of these and OR will merge its view as if only one existed.
\Routes This is another pre-defined directory.
Within each pre-defined directory, or required sub-directory when appropriate, the author can do pretty much anything they like with files and folders. So they could have all the shape files in "\UserContentPackage1\Shapes" or they could put them in sub-directories. If they put them in sub-directories, they'll need to use the sub-directory names when referencing the shapes from elsewhere.
The intention is that it is similar to MSTS, with pre-defined directory names and basic structure, but improved so that e.g. shapes are not "part" of the route and specifically allowing flexibility in organisation within the pre-defined directories.
#30
Posted 12 December 2011 - 07:40 AM
1. We have an import process where they are brought in, validated and converted to the OR file structure
2. We support drag and drop of MSTS items into our content directory for rolling stock folders and route folders. We might call these package folders 'Legacy Packages'. OR detects that its a MSTS legacy 'package' folder and modifies its behavior as needed.