Java-Gaming.org    
Featured games (78)
games approved by the League of Dukes
Games in Showcase (530)
games submitted by our members
Games in WIP (512)
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  
  Peristence layer  (Read 1729 times)
0 Members and 1 Guest are viewing this topic.
Offline abies

Senior Member





« Posted 2006-04-17 20:13:33 »

I'm still quite new to Darkstar concept, so forgive me if I'm asking some obvious questions.

Is persistence layer pluggable ? Is there any other option than using serialization for long term storage of objects ?

From what I can understand atm, it seems that all objects are just serialized to opaque database table, using default java serialization. This strikes me as very dangerous for long term maintainability of data. Also, ability to query large amounts of objects seems to be very limited (outside of deserializing them one by one and checking their contents by java code).

Is there a way to replace serialization with custom routines marshalling data from/to normal relational tables ?

Artur Biesiadowski
Offline Jeff

JGO Coder




Got any cats?


« Reply #1 - Posted 2006-04-17 22:55:36 »

So yes it is pluggable though not currently at the app confugration level.
(That coudl be changed.) 

We purposefully keep the actual data storage format private to the object store because that allows it to implement
however it wants to for maximum efficiency.   The nature of the system also requires that arbitrary objects be martialable
with no external processing or apriori mapping knowledge.

We're looking at externalization tools for doing more standard database operations such as data mining.  Im curious to know what
kinds of uses you invision as it will help us with that tool design. My current gut level says id rather do conversion to external relational tables
for such mining uses then force that on the objectstore...







Got a question about Java and game programming?  Just new to the Java Game Development Community?  Try my FAQ.  Its likely you'll learn something!

http://wiki.java.net/bin/view/Games/JeffFAQ
Offline abies

Senior Member





« Reply #2 - Posted 2006-04-17 23:59:54 »

My main fear is maintainability. At some point in future, you may want to do some serious changes in the way data is structured - possibly even changing the relationships/class hierarchy etc. With relational backend, you are already separated a bit (because of explicit mapping to OO structures), but, what is most important, you can as well write some migration procedures for data. With serialization, it can be a major pain.

I have used serialization for long term storage in the commercial project and while it has speed up the development probably twofold (and allowed us to finish the project in required time with given resources) we started to be hit by it in major way already few months after going into production. We ended up with classes which had like 3 alternative slots for the same data, expecting nulls in every possible place even if it was set to reasonable value in every possible constructor, etc, etc. All this within 1 year after going to production, I'm worried what tricks they have to do currently to maintain it... As a side note, we had a major problems with customer data security department - after project was put to production, they have requested they should be able to read every single value in their SQL tools...

For data mining, I'm not really thinking about anything in particular - I have never run MMORPG, but I know that with old time mud, I used to grep through player files for amount of gold/level  Smiley I suppose that any reasonable MMORPG has to run a lot of statistics to get the feedback for balancing process - class/race distribution, amount of quests done per day, wealth levels for players, most often equipped items, etc. While some of the events can be probably logged separately to dedicated file/database, persistent data like equipment and players have to be queried from live data.

Artur Biesiadowski
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Jeff

JGO Coder




Got any cats?


« Reply #3 - Posted 2006-04-18 21:55:11 »

My main fear is maintainability. At some point in future, you may want to do some serious changes in the way data is structured - possibly even changing the relationships/class hierarchy etc. With relational backend, you are already separated a bit (because of explicit mapping to OO structures), but, what is most important, you can as well write some migration procedures for data. With serialization, it can be a major pain.

<snip>

[/quote
For data mining, I'm not really thinking about anything in particular - I have never run MMORPG, but I know that with old time mud, I used to grep through player files for amount of gold/level  Smiley I suppose that any reasonable MMORPG has to run a lot of statistics to get the feedback for balancing process - class/race distribution, amount of quests done per day, wealth levels for players, most often equipped items, etc. While some of the events can be probably logged separately to dedicated file/database, persistent data like equipment and players have to be queried from live data.
Quote

Okay, I suspect for most of this then round-trip extenalization is probably adaquate.  (Pusha  button to dump tables, push another button to suck tables back in.)

Got a question about Java and game programming?  Just new to the Java Game Development Community?  Try my FAQ.  Its likely you'll learn something!

http://wiki.java.net/bin/view/Games/JeffFAQ
Offline abies

Senior Member





« Reply #4 - Posted 2006-04-18 22:34:08 »

Okay, I suspect for most of this then round-trip extenalization is probably adaquate.  (Pusha  button to dump tables, push another button to suck tables back in.)

It would be great to have it done through some public interface. Something like getting a all-the-objects-in-the-world iterator (per data type probably) and leaving the messy details for the implementor. Other way could be more tricky...
And of course, reference implementation would be handy Wink

Artur Biesiadowski
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.

xsi3rr4x (72 views)
2014-04-15 18:08:23

BurntPizza (68 views)
2014-04-15 03:46:01

UprightPath (79 views)
2014-04-14 17:39:50

UprightPath (65 views)
2014-04-14 17:35:47

Porlus (80 views)
2014-04-14 15:48:38

tom_mai78101 (104 views)
2014-04-10 04:04:31

BurntPizza (164 views)
2014-04-08 23:06:04

tom_mai78101 (260 views)
2014-04-05 13:34:39

trollwarrior1 (210 views)
2014-04-04 12:06:45

CJLetsGame (220 views)
2014-04-01 02:16:10
List of Learning Resources
by SHC
2014-04-18 03:17:39

List of Learning Resources
by Longarmx
2014-04-08 03:14:44

Good Examples
by matheus23
2014-04-05 13:51:37

Good Examples
by Grunnt
2014-04-03 15:48:46

Good Examples
by Grunnt
2014-04-03 15:48:37

Good Examples
by matheus23
2014-04-01 18:40:51

Good Examples
by matheus23
2014-04-01 18:40:34

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:22:30
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!