[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Persistence for the xmlBlaster
Hi,
i will programming a persistence DOM (PDOM) with XPATH-engine.
for the xmlBlaster.
The PDOM based on a direct-mapped-cache with write-trougth
Cache-strategie. The direct-mapped-policy is very easy.
Basics
-----
1. All DOM-Node of the xmlBlaster are divided in fix pages.
e.g. 128 Nodes -> 1. Page
256 Nodes -> 2. Page
---------
| Page 1 |
---------
| Page 2 |
---------
| Page N |
---------
2. Caching
The cache has a fixed memory size (e.g. 4 MB DOM-Nodes). Each
cacheline consists of next format :
------------------------------------------------
| Tag | V | M | LRU | 4
DOM-Node |
------------------------------------------------
Tag = directory the DOM-Nodes
V = Vaild-Bit
M = Modify-Bit
LRU = least recently used DOM-Node
Each DOM-Node-address of the xmlBlaster is mapped to a virtuell-
file-address on the harddisc-memory. A harddisc-memory-page is a file
now.
E.g. :
---
DOM-Tree (in the brackets = address of each Node)
--------
/Root
|
--/ A (1)
|
|--/AA (2)
|
--/AB (3)
Access on the cache over a virtuell adress
-------------------------------
-------------------------------
| Tag | Block-Nr. | Index | Node-Nr. |
-------------------------------
3. Database
We store messages in files. Each file for us is a page (compare the
hardware-strategie).
Harddisc-memory
-------------
---------
| Block 1 | <-- File 1
---------
| Block 2 | <-- File 2
---------
| Block N | <-- File N
---------
Summary
-------
We build a PDOM based on caching messages (DOM-Nodes). The
xmlBlaster-DOM-Tree will be divided in pages of nodes. DOM-Nodes are
cached in the RAM of your machine. Each-RAM-page is mapped on
a harddisc-file. The caching strategie is Write-Through with Write-
Allocation. We must build a XPATH-engine which knows when a node
is mapped on a database-file.
Further detail coming soon. I will start with the implementation next
week.
So long
Manuel
--
------------------------------------------------------------------------
| Manuel Kron, Mail: manuel.kron at gmx.net |
| xmlBlaster http://www.xmlBlaster.org |
| Office Phone: 07531 / 4545-00 |
| Radofzellerstr. 33, 78467 Konstanz |
| Konstanz,Germany Phone(priv): (++49-7531) 282770 |
------------------------------------------------------------------------