skeezix said:
- you're not actually putting .pnd files into a database are you? (That sort of thing always makes my teeth itch; maybe I'm old school, but I prefer to keep relational data in a relational DB, and big giant zip files out of it, with references from the DB to the files (ie: name, whatever.) No reason to keep the entire repository as one big file (which introduces problems of its own, when trying to move the repo via flash drive, or onto a hard drive with a file system with 2GB file size limits, etc and so on. It also means ytou have one big file which is hard to work with, instead of many small files more easily split across things.) And most importantly, 1) DBs can go corrupted, and 2) maybe someone wants to keep the repo, and then later ditch the software for another repo software, and still have all the pnd files. Its never wise to suck agnostic data into a specific apps domain.
I most certainly am
I must say that I've probably gotten used to high-performance environments where extreme speed is the absolute goal, and thus haven't thought about the fact that people might want to run the app on less capable servers. You must know, however, that it most of the time is much easier to split up a database in multiple "files" or make backups of it etc, than it is to do so with a file system. Sharding is easy peasy and can be done across hosts transparently, and database backups, snapshots etc can be done in milliseconds with MySQL, for instance.
Of course, I never intended the database storage option to be the only one, especially after people wanted to grant access to file archive PNDs transparently in the PND Manager, so I'm currently loosening up the core a bit and allowing for PND files to be stored *anywhere*. You'll see what this means when I'm done
skeezix said:
- if you're talking about pnd downloads to a pandora/some-device, then streaming is the way to go; it would be insanity to pull the files into memory while serving them out. *madness* I say, madness! You'll be wanting to pull in reasonably sized chunks .. madness to keep multiple MB/GB in RAM while sending down to someones slow-ass dial modem for hours on end. Make a Stream object pair (In on server, Out on client), and they can just be dummies at first, who does whole file in RAM sillyness. But as time permits, down the road, you can make them have smarts and manage intelligently.
My reason for doing it this way originally was that I thought that many people would want to download the same file simultaneously (and that this would be the rule, not the exception; there will be some really popular apps for the Pandora and some small, unpopular ones that'll be downloaded only once in a while) so it would make sense to share memory between these downloads. But with the new storage system, this will change, of course.
@ Kramy Yes, I guess that one of the first storage engines I'll make available is one with external links (FTP, HTTP, HTTPS) so that files can be uploaded anywhere, even on the Pandora File Archive (
) or an FTP server somewhere. This will mean that I cannot depend on files being there any longer after the URL has been specified once (since the file might be deleted on the external server) but I'll put up some kind of system to handle this gracefully; the only option will probably be to just remove the PND file metadata entry from the PND Manager entirely.
Oh, and since we're using *ISO* with data appended *to the end of the file* here, an uploaded PND will have to be loaded completely into memory at least once, no matter what we do.