DB vrs Flatfile?

Discussion in 'Plugin Development' started by feverdream, Jan 7, 2011.

Thread Status:
Not open for further replies.
  1. Offline

    skuggi

    I just thought of something, firebirdsql is also ridiculously simple to setup, it's a little lighter weight and open source. They also just released a beta JDBC connector so that could work. Maybe even bundle it in with bukkit itself.

    @abstraktion lol can't go anywhere anymore without finding another BBY'er

     
  2. Offline

    Geoff Winans

    I don't understand why you're all still arguing this.

    The decision is made. If you want flatfile support, then put together your own plugin that handles flat files and you can go on using them. If you're running a minecraft server, then complaining about the 1MB of memory SQLite uses makes me think you're trolling. Seriously.

    At the peak, I had ~100 different .txt files in the root directory for plugins. That was disgusting. Disorganized.

    AS most flatfiles were key-value pair, we can use one master DB and store all plugin data in there. As long as people are smart about it and prefix their key names with unique prefixes.
     
  3. Offline

    feverdream

    For the record, people are trolling when they say I'm against sql.. It has its place. I just don't think its here.

    The problem is, in this case, its implamntation and use is activly going to stoop people from being able to manage a server unless they are willing/able to add a bunch of software they dont need. Thats wrong.
     
  4. Offline

    \\slashies

    Sqlite. No server, no setup. runs from the JVM. Also I've made some progress on my key value store to the point where I think it is ready for programmer testing. The goal of this is to make something braindead simple so that it is EASIER to use than a flatfile anywhere that it possibly could be used. Since you are the archetype that I'm trying to reach with this project how about you help give me direction on it.

    I'd love to have you try my code, see how it works, and tell me what things you like or would like to see or would like to see changed. I can get praise from anyone. I need a critic.

    Gimmie a hand, good sir?
     
  5. Offline

    feverdream

    I respect the ida of making things simple; However in my decades as a programmer I have often realized that "simpler" does not mean to add software.

    I - respectfully - believe you to be forgetting the folllowing:
    1 . Most serevers are headless. That means No GUI of any kind to use.
    2. A ssh connection is all some people have to a server physically located in another state, often sitting on the fat pipe of their co-location company with nothing installed but the basics for a slimed down "server" install of Centos (as thats the most common server install).

    I don't care if it runs in the JVM or not, if I cant edit the config for my own server using a ssh connection its worthless. And requiring somebody to install apache and all that other worthless - for them - stuff just creates other issues.
     
  6. Offline

    Tythus

  7. Offline

    \\slashies

    I've said it elsewhere, but there are a lot of threads like this one so I don't mind repeating myself: For the love of FSM, put all config into config files. That is the perfect place for it, and if the only thing that goes into the config file is config then it should be suitable for many plugins to share a config file. I'm with ya on that. Those values are read rarely and written even less.

    sqlite has command line tools, but I'd agree they might not be available everywhere, so my next step is to make my little project create the sqlite file and table by itself so that all ties to external tools are severed.

    I could still use a critic.
     
  8. Offline

    Obsidian

    hi, simple google search here, 1st result - problem solved, learn SQL and get over your paranoia of databases.

    I'm no java guy, but shouldn't there be a DB-nonspecific ORM library available for Java? Something similar to Doctrine for PHP, which handles all of the differences between RDBMS's itself?
     
  9. Offline

    Chewi

    Probably but I'm not a Java guy either. I know Java and I help maintain Java-based Gentoo Linux packages but I haven't really coded it in much for years. I'm not planning to write any plugins so I'll leave this for others to decide.
     
  10. Offline

    Raider

    ok people are saying how much more mysql uses compared to flatfile I/O.
    My question is.. have you actually checked how much memory your computer uses when using I/O?
    seriously. using a shell is extremely easy to set up just about anything. Not to be rude.. but if you dont know how to configure your stuff... you hsouldnt be running a server anyway =P unless your willing to learn that is(akia doing it for learning processes) in which case, you would jump for joy for the chance
     
  11. Offline

    Obsidian

    Flatfile takes more processing for advanced "queries" in the end, which means more execution time and a bit more lag on a live server.

    Not to mention, if you have multiple processes accessing the same "flatfile" database, race conditions ahoy.
     
  12. Offline

    tehbeard

    1) pulling figures out of thin air.
    2) SHOUTING.
    3) fear mongering is just wrong.

    A valid point, SQL is a bit OTT for simple config, unfortunatly bad practice is to cram everything into flat file if you have one at hand already. (which i'm guilty of).

    They don't particuarly need bukkit, but they were willing to install that? or the plugins that bukkit or hMod offer?

    /rant

    Lets clear this up, since //slashies is the only one who has shown he knows his stuff in this topic, and I will gladly admit I know less about this sort of thing than him.

    1) SQLite is not going to be a "oh god I can't run that on my server cus I'm not allowed, waaahhh!" situation, if you have a server that you are allowed to run minecraft on,then SQLite is the equivalent of a native java library (you know, like the ones minecraft uses to read files off disk, or tell clients to move creeper to XZY?), it will run, it will take about a meg of RAM, total, if you can't afford that you have something screwed with your server.

    At the risk of a linux user chastising me, SQLite is like MS access, single file based, read by a library called by the application accessing the database. No installation, no setup, just calls from an app to a library. If this is confusing you might want to read up some more on programming.

    2) The decision is not final yet afaik, I understand people are complaining about maintaining config files over SSH, yes a Database would need an additional jar file, but if it's a database it can be standardised.

    So instead of hunting through a hundred config files, your just doing.

    java -jar configman.jar PluginToConfigure

    While a config directory thats nested would be nice, it means your placing some of the management on the OS, which even if its linux makes me wary.

    The main problem is that configuration and data are getting lumped together in old plugins for hMod and we risk this with bukkit. config and data are different, config should really be plugin specific features, enabling/disabling sections. Data would be permissions, lists of plugin items (i.e. warp locations) that stuff related to an acutal function in a plugin.
     
  13. Offline

    Obsidian

    Yup, pretty much. The main difference between SQLite and a full-fledged RDBMS (e.g. MySQL, PostGreSQL) is that former interacts with the database files directly, whereas the latter passes queries and such to a database server program, which then in turn handles interaction with the database files. SQLite takes out that middleman (the database server program that stays running in the background) at the expense of allowing multiple processes to query that specific database at once.

    That and SQLite is a lot nicer than MS Access. Less bloat, and contact with those accursed Microsoft programmers who seem to break everything they get their hands on. Blargh.
     
  14. Offline

    feverdream

    Wow this old girl is still flying?

    I'm more then aware of the nuances of dbs.. m=y point is we as a comunity should be looking out for our users, not make it harder for them, and above all provide manageable options that can work with the current standard forms of administration of a mc server.
     
Thread Status:
Not open for further replies.

Share This Page