Ruleset Modeling Language - Discussions
September 07, 2010, 01:03:58 AM
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
: The new website and forum are up. Beware that they are still teething however.
Home
Help
Search
Login
Register
Ruleset Modeling Language - Discussions
>
RML Interpreters
>
Angela - Server Side Development
>
Databases
Pages: [
1
]
« previous
next »
Print
Author
Topic: Databases (Read 223 times)
Cayle
Not Normal
Administrator
Hero Member
Offline
Posts: 2042
Databases
«
on:
January 21, 2009, 12:36:01 AM »
Up until now, I've pretty much ignored databases in the development of Angela. Even if you have thousands of templates, the table structure is simple enough that a python dict will do the job in finding what you need. With entities, things get more complex. I see two separate issues:
1 -
Templates are static and need not be persistent across resets. We can just re-read from the XML file on server start. Entities do get changed from their initial state and do need to be saved to a DB. That state should constantly be kept updated.
2 -
Transactional data regarding entity updates should probably stored in its own DB table (or tables) along with metadata about the parent action, subject agent, controllers, etc. This way, if you have crystal reports or something similar - or know how to wield pivot tables in Excel - you can extract daily reports (good for GMs to peruse; especially for identifying exploits) or data mine the world to see what is actually happening
Both of these scenarios are shown in the sequence diagram in EntityUpdate.pdf. The general idea is that whenever an entity change is made, the changing method drops a fire and forget message into two queue objects. One updates the persistent database version of the entity repo, which also contains persistent entities that are not currently logged in. The other goes to the queue for tracking changes.
I have an interesting quandary with entities. Specifically, entities can freely take other entities in as members. Currently, if I want to see if an orc is carrying a goldCoin object, I'd use the getMemberEntiesByType() method on the orc (he is an Entity object). If I wanted simply to know whether he had a gold coin directly in his endocontainer inventory, I'd iterate over the things in his inventory (i.e. member entities) and take a peek at their parent meme IDs. Now if we set drillDown = True, we are telling getMemberEntiesByType() to look inside the inventories of all of those objects and so forth. Can this be done better and faster using SQL trickery? If this is so, how should we do it?
Logged
The Ruleset Modeling Language
- A project for making it easier to design virtual worlds.
Edward
Project Angela Team
Sr. Member
Offline
Posts: 443
Re: Databases
«
Reply #1 on:
January 21, 2009, 02:11:40 AM »
Quote from: Cayle on January 21, 2009, 12:36:01 AM
Both of these scenarios are shown in the sequence diagram in EntityUpdate.pdf.
Could you provide a link?
Logged
Cayle
Not Normal
Administrator
Hero Member
Offline
Posts: 2042
Re: Databases
«
Reply #2 on:
January 21, 2009, 02:53:46 AM »
oops! my bad
It is attached. In addition, EntityMemberSearch.pdf shows the possible outline of an approach calling on the DB to find all of the coins on an orc with drilldown turned on.
Logged
The Ruleset Modeling Language
- A project for making it easier to design virtual worlds.
technikhil
Have Posted
Offline
Posts: 5
Re: Databases
«
Reply #3 on:
January 27, 2009, 04:38:04 AM »
Hi David,
I haven't finished reading through the entire spec draft yet but one challenge would be representing recursive entities in teh database - the challenge would not be so much storing the structure but retrieving it in a performant manner - you might want to look into a memory cache or object stores. I will find some links - Lucene is one that comes immediately to mind.
Logged
Cayle
Not Normal
Administrator
Hero Member
Offline
Posts: 2042
Re: Databases
«
Reply #4 on:
January 28, 2009, 10:56:56 PM »
I split my long post from last night off onto a
seperate topic
as it was OT and worthy of its own dicussion.
Logged
The Ruleset Modeling Language
- A project for making it easier to design virtual worlds.
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Project Angela - Management
-----------------------------
=> House Rules
=> Introductions
-----------------------------
Epoch - A world made by some people who also happen to be PA members
-----------------------------
=> PA Specific Art
-----------------------------
Ruleset Modeling Language
-----------------------------
=> Requirements and Specs
=> Puzzle Palace (a.k.a Design Time QA)
=> AI Issues
=> Ruleset Creation
=> Help
-----------------------------
RML Interpreters
-----------------------------
=> Angela - Server Side Development
=> Angela - Game Engines
=> Other Interpreters - Development
-----------------------------
General Category
-----------------------------
=> General Discussion
=> Off Topic
=> Forum Tech Suppurt
===> Source Forge Projects
===> Task List
-----------------------------
Epoch Archive
-----------------------------
=> Epoch Client Side Dev
Loading...