Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (499)
Games in Android Showcase (118)
games submitted by our members
Games in WIP (567)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Database engine  (Read 1092 times)
0 Members and 1 Guest are viewing this topic.
Offline Orangy Tang

JGO Kernel


Medals: 56
Projects: 11


Monkey for a head


« Posted 2011-11-16 12:07:31 »

I'm looking into rewriting Tectonicus' cache handling, which currently uses about a gazillion flat files. This works but it's pretty rough on the HDD both in terms of access and number of files/directories.

I'm interested in moving to some kind of DB backend, but last time I tried using a proper DB via Java I got bogged down in configuring JDBC sources and a whole load of enterprise-y wank that I didn't want or need, and most actual users would run as soon as they saw they had to do it.

Basically I want a file backed database which requires zero configuration on the user's part and preferably is written in pure java. Sql support is optional, I just need to be able to store and manipulate data sets too big to hold in memory. HyperSQL is the only thing I've found so far ( http://hsqldb.org/ ). Can anyone recommend any others?

[ TriangularPixels.com - Play Growth Spurt, Rescue Squad and Snowman Village ] [ Rebirth - game resource library ]
Offline Riven
« League of Dukes »

JGO Overlord


Medals: 801
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #1 - Posted 2011-11-16 18:09:08 »

http://www.h2database.com/html/main.html

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Offline Orangy Tang

JGO Kernel


Medals: 56
Projects: 11


Monkey for a head


« Reply #2 - Posted 2011-11-16 19:38:58 »

Interesting! Are there any particular reasons why you'd recommend h2 over HyperSQL?

Someone also suggested that I might be better using EhCache instead but I've also not used that so I'll have to look into it. All I really want are List and Map implementations which can page in and out of disk transparently so they can be *huge* without requiring gigs of RAM usage.

[ TriangularPixels.com - Play Growth Spurt, Rescue Squad and Snowman Village ] [ Rebirth - game resource library ]
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Riven
« League of Dukes »

JGO Overlord


Medals: 801
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #3 - Posted 2011-11-16 20:14:50 »

Haven't used them for complex things. Just as a backend for unit-tests (in-memory DB).

It works... persecutioncomplex

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Offline Nate

JGO Kernel


Medals: 148
Projects: 4
Exp: 14 years


Esoteric Software


« Reply #4 - Posted 2011-11-16 20:47:15 »

+1 for H2, also used for an in-memory database, fast, easy to use.

Offline lhkbob

JGO Knight


Medals: 32



« Reply #5 - Posted 2011-11-16 21:36:04 »

I believe H2 is a newer DB that was based on or forked from hsqldb.  I've used H2 in unit tests for work and I'm very pleased with its performance.

Offline Chromanoid

Junior Member


Medals: 3



« Reply #6 - Posted 2011-11-16 22:58:32 »

if you are fine with key value stuff you might want to look at infinispan. similar to ehcache it has a local mode and eviction policies.
Offline Orangy Tang

JGO Kernel


Medals: 56
Projects: 11


Monkey for a head


« Reply #7 - Posted 2011-11-17 08:49:05 »

if you are fine with key value stuff you might want to look at infinispan. similar to ehcache it has a local mode and eviction policies.

I'm fine with key/value stuff as long as I can also iterate over the whole collection in a way that doesn't drag the whole thing into memory. Most of the documentation for EhCache is a bit vauge about that. Do you know if infinispan can do that?

[ TriangularPixels.com - Play Growth Spurt, Rescue Squad and Snowman Village ] [ Rebirth - game resource library ]
Offline princec

JGO Kernel


Medals: 386
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #8 - Posted 2011-11-17 10:14:40 »

What's up with HSQLDB? Why did H2 fork it? HSQLDB looks like the dog's bollocks.

Cas Smiley

Offline Chromanoid

Junior Member


Medals: 3



« Reply #9 - Posted 2011-11-17 12:20:07 »

mmh i am not sure if a cache really fits your needs. infinispan should not load all entries when iterating over the keyset. Are those flat files java objects or resource files like sound-, image- and textfiles? If they are java objects a cache can be a good idea. Did you look into virtual file systems for java?
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline lhkbob

JGO Knight


Medals: 32



« Reply #10 - Posted 2011-11-17 18:28:44 »

What's up with HSQLDB? Why did H2 fork it? HSQLDB looks like the dog's bollocks.

Cas Smiley

I looked back into it and I misremembered, H2 wasn't a fork they were just started by the same developer.  HSQLDB was started first, he dropped it and then 4 years later he released H2.  Other developers have since picked up HSQLDB's code base.

Visiting here, http://www.h2database.com/html/performance.html it would appear that H2 generally outperforms HSQLDB.  Although it should be taken with a grain of salt since it's from the H2 site.

Offline sproingie

JGO Kernel


Medals: 202



« Reply #11 - Posted 2011-11-17 22:44:50 »

I've used both hsqldb and h2, and they're both excellent databases.  hsqldb has greater compliance to the ISO SQL standard, if that turns your crank, and H2 has interesting features built in, like a web admin UI, and a cute feature that prevents sql injection by *requiring* bound parameters for all query values.  They're both ridiculously fast and they both blow the doors off sqlite when your data gets past a hundred megs or so.

Offline Riven
« League of Dukes »

JGO Overlord


Medals: 801
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #12 - Posted 2011-11-17 22:54:24 »

and a cute feature that prevents sql injection by *requiring* bound parameters for all query values
Every database manufacturer should do this. Provide backwards compatibility through -SECURITY_HAZARD commandline argument.

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Pippogeek (36 views)
2014-09-24 16:13:29

Pippogeek (29 views)
2014-09-24 16:12:22

Pippogeek (18 views)
2014-09-24 16:12:06

Grunnt (41 views)
2014-09-23 14:38:19

radar3301 (24 views)
2014-09-21 23:33:17

BurntPizza (60 views)
2014-09-21 02:42:18

BurntPizza (30 views)
2014-09-21 01:30:30

moogie (35 views)
2014-09-21 00:26:15

UprightPath (48 views)
2014-09-20 20:14:06

BurntPizza (52 views)
2014-09-19 03:14:18
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!