hybrid and PML
This commit is contained in:
parent
6e35a53b56
commit
fd11327b7f
2 changed files with 32 additions and 0 deletions
26
storage/hybrid/PML.txt
Normal file
26
storage/hybrid/PML.txt
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
This is PML format:
|
||||||
|
|
||||||
|
[OP]
|
||||||
|
0: create new session
|
||||||
|
1: destroy session
|
||||||
|
2: change session ID (sid)
|
||||||
|
3: modify (create, update key/val) session DATA
|
||||||
|
|
||||||
|
[SID] is session ID
|
||||||
|
|
||||||
|
[DATA]
|
||||||
|
0: -
|
||||||
|
1: -
|
||||||
|
2: new session ID
|
||||||
|
3: (key)|(val) - create and update DATA (key) only for delete key
|
||||||
|
|
||||||
|
|
||||||
|
PML log file:
|
||||||
|
______________________________________________________ LOG stream...
|
||||||
|
OP | SID | DATA | |
|
||||||
|
------------------------------------------------------ |
|
||||||
|
-- // -- // -- // -- |
|
||||||
|
------------------------------------------------------ |
|
||||||
|
... .... ..... |
|
||||||
|
OP | SID | DATA |
|
||||||
|
______________________________________________________ V
|
6
storage/hybrid/hybrid.go
Normal file
6
storage/hybrid/hybrid.go
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
// Package hybrid is session storage that use RAM
|
||||||
|
// and provider modification log (PML) for very fast efecient
|
||||||
|
// session operations and filsystem saving using SPML
|
||||||
|
// save session data into filesystem lazy save. PML is similar to
|
||||||
|
// WAL in databases
|
||||||
|
package hybrid
|
Loading…
Add table
Add a link
Reference in a new issue