e01 process narongsak mala equinox develop team draft version 1.0.0
DESCRIPTION
Overviews Introduction limitation Additional Configuration Backup Practice and exampleTRANSCRIPT
E01 ProcessNarongsak mala
Equinox Develop Team
Draft Version 1.0.0
Overviews
Introduction limitation Additional Configuration Backup Practice and example
Introduction
What’s E01(Global Configuration)It ‘s a proprietary that similar to database. Use
key and value(KV) principle for structure of E01.You can keep whatever you need.
Limitation
Number of key is five to eight Key size is 64 byte Size of data is less then Equinox message
size(256 Kbyte) Available Command search, add, delete, replace.
Additional Algorithm for search
NormalUse hashing key to get number key for access database(base on arrays).
DefaultChange some or all key as “def” key for find out nearest the keys and search again with the normal method.
NearestTrim KEY0 backward each one character and then use the default and normal method again.
Additional(cont.) Algorithm for search.
Normal methodAssume that we will search with:
<t>OBJ</t><0>K0</0><1>K1</1><2>K2</2><3>K3</3><4>K4</4><d></d>
key(numeric) = hash(“OBJK0K1K2K3K4”)
And then, Use key for access database. If it doesn't found ,it will use default method.
Additional(cont.) Algorithm for search.
Default methodAssume that we will search with:
<t>OBJ</t><0>K0</0><1>K1</1><2>K2</2><3>K3</3><4>K4</4><d></d>
we will replace key with “def” which replace by binary base principle.
For example,
case 1 (0001):replace K4 with “def”
case 2 (0010):replace K3 with “def”
case 3 (0011):replace K3,K4 with “def”
…
case 15(1111):replace all with “def”
And then , we will use normal method for search with the new key again. Repeat until found a record or completed 15 case.
Additional(cont.) Algorithm for search of E01.
Nearest method(trim)We will use the nearest method when all of above didn't found a record. By
reduce KEY0 each one byte per a round.
For example,
Assume KEY0 is “abcd”
round 1, KEY0 = “abc”
round 2, KEY0 = “ab”
round 3, KEY0 =“a”
In each a round, we will use the normal and default method respectively.
Configuration <?xml version="1.0" encoding="tis-620" ?><configuration>
<cold><HomeDirectory value="/opt/equinox" /><sf group="APP_NAME" service="0" instance="0">
<Host host="localhost" port="10500" />//use for connect to E00</sf><httpd ip="0.0.0.0" port=“9090" backlog="256" />//use for e01prov utility<db id="1" ip="0.0.0.0" port="45676" size="100000" link_file="latest_backup1"> //use for replication in server mode
<replication id="2" ip="localhost" port="45677" /> //use for replication in client mode </db>
</cold><warm>
<SFLOG value="FATAL|ERROR|WARN|INFO" /><StatInterval value="10" /><HousekeeperInterval value="10" /><RestartDelay value="1" /><MaxRetry value="0" /><SFMessageTimeout value="5" /><SFMaxClient value="1" /><SFConnectTimeout value="10" /><SFReadTimeout value="5" /><SFWriteTimeout value="30" /><SFACKTimeout value="60" /><SFWatchdogInterval value="30" /><SFMaxWriteLength value="0" /><SFHighMessageCount value="20000" /><SFLowMessageCount value="15000" /><HttpMaxSession value="200" /><HttpReadTimeout value="5" /><HttpWriteTimeout value="5" /><HttpIdleTimeout value="30" /><BatonHeartbeatTimer value="30" />
</warm></configuration>
Backup
Usually, we use utility for control and manage. Sometimes you can control directly E01. eqx
eqx -w [filename] <APPNAME> <PROCNAME> backup Ex. eqx -w mybackup myapp E01 backup
Via E01 /opt/equinox/bin/E01 <APPNAME> <SERVICE> <INSTANCE> backup [filename] Ex. /opt/equinox/bin/E01 myapp 0 0 backup mybackup
After that, see your file backup in path /opt/equinox/backup/filename
Practice and Example
e01prov utilityUse for management E01 data. There are commands to operation for manage data on E01.We
often use e01prov for add(provisioning) data to E01, verify data with search operation and others.
parameter :-a hostname/IP “xxx.xxxx.xxx.xxx” or “localhost”
-p port number
-o operation add, search, delete, replace-f filename file data for operation.
-h help show usage
-V verbose show all detail.
Example:
e01prov -a localhost -p 9090 -o add -f add.txt
e01prov –a localhost -p 9090 -o search -f search.txt
Practice and Example
e01prov utility(cont.)Example:
e01prov -a localhost -p 9090 -o add -f add.txt
Assume we have already added the data to database of E01.
Thus,
<t>OBJ</t><0>xyz</0><1>1</1><2>2</2><3>3</3><4>4</4><d>DA</d>
<t>OBJ</t><0>xyz</0><1>1</1><2>2</2><3>3</3><4>def</4><d>DB</d>
<t>OBJ</t><0>xyz</0><1>1</1><2>2</2><3>def</3><4>def</4><d>DC</d>
<t>OBJ</t><0>xyz</0><1>1</1><2>def</2><3>def</3><4>def</4><d>DD</d>
<t>OBJ</t><0>xyz</0><1>def</1><2>def</2><3>def</3><4>def</4><d>DE</d>
<t>OBJ</t><0>xyz</0><1></1><2></2><3></3><4></4><d>DF</d>
Practice and Example
e01prov utility(cont.)E01 database<t>OBJ</t><0>xyz</0><1>1</1><2>2</2><3>3</3><4>4</4><d>DA</d>
<t>OBJ</t><0>xyz</0><1>1</1><2>2</2><3>3</3><4>def</4><d>DB</d>
<t>OBJ</t><0>xyz</0><1>1</1><2>2</2><3>def</3><4>def</4><d>DC</d>
<t>OBJ</t><0>xyz</0><1>1</1><2>def</2><3>def</3><4>def</4><d>DD</d>
<t>OBJ</t><0>xyz</0><1>def</1><2>def</2><3>def</3><4>def</4><d>DE</d>
<t>OBJ</t><0>xyz</0><1></1><2></2><3></3><4></4><d>DF</d>
case 1 :Search with parameter
K0 = xyz
K1 = 1
K2 = 2
K3 = 3
K4 = 4
Result is DA
Practice and Example
e01prov utility(cont.)E01 database<t>OBJ</t><0>xyz</0><1>1</1><2>2</2><3>3</3><4>4</4><d>DA</d>
<t>OBJ</t><0>xyz</0><1>1</1><2>2</2><3>3</3><4>def</4><d>DB</d>
<t>OBJ</t><0>xyz</0><1>1</1><2>2</2><3>def</3><4>def</4><d>DC</d>
<t>OBJ</t><0>xyz</0><1>1</1><2>def</2><3>def</3><4>def</4><d>DD</d>
<t>OBJ</t><0>xyz</0><1>def</1><2>def</2><3>def</3><4>def</4><d>DE</d>
<t>OBJ</t><0>xyz</0><1></1><2></2><3></3><4></4><d>DF</d>
Case 2:Search with parameter
K0 = xyz
K1 = 1
K2 = 2
K3 = 3
K4 = NULL
Result is DB
Practice and Example
e01prov utility(cont.)E01 database<t>OBJ</t><0>xyz</0><1>1</1><2>2</2><3>3</3><4>4</4><d>DA</d>
<t>OBJ</t><0>xyz</0><1>1</1><2>2</2><3>3</3><4>def</4><d>DB</d>
<t>OBJ</t><0>xyz</0><1>1</1><2>2</2><3>def</3><4>def</4><d>DC</d>
<t>OBJ</t><0>xyz</0><1>1</1><2>def</2><3>def</3><4>def</4><d>DD</d>
<t>OBJ</t><0>xyz</0><1>def</1><2>def</2><3>def</3><4>def</4><d>DE</d>
<t>OBJ</t><0>xyz</0><1></1><2></2><3></3><4></4><d>DF</d>
Case 3:Search with parameter
K0 = xyz
K1 = 1
K2 = 2
K3 = NULL
K4 = 4
Result is DC
Practice and Example
e01prov utility(cont.)E01 database<t>OBJ</t><0>xyz</0><1>1</1><2>2</2><3>3</3><4>4</4><d>DA</d>
<t>OBJ</t><0>xyz</0><1>1</1><2>2</2><3>3</3><4>def</4><d>DB</d>
<t>OBJ</t><0>xyz</0><1>1</1><2>2</2><3>def</3><4>def</4><d>DC</d>
<t>OBJ</t><0>xyz</0><1>1</1><2>def</2><3>def</3><4>def</4><d>DD</d>
<t>OBJ</t><0>xyz</0><1>def</1><2>def</2><3>def</3><4>def</4><d>DE</d>
<t>OBJ</t><0>xyz</0><1></1><2></2><3></3><4></4><d>DF</d>
Case 4:Search with parameter
K0 = xyz
K1 = NULL
K2 = 2
K3 = 3
K4 = 4
Result is DE
Practice and Example
e01prov utility(cont.)E01 database<t>OBJ</t><0>xyz</0><1>1</1><2>2</2><3>3</3><4>4</4><d>DA</d>
<t>OBJ</t><0>xyz</0><1>1</1><2>2</2><3>3</3><4>def</4><d>DB</d>
<t>OBJ</t><0>xyz</0><1>1</1><2>2</2><3>def</3><4>def</4><d>DC</d>
<t>OBJ</t><0>xyz</0><1>1</1><2>def</2><3>def</3><4>def</4><d>DD</d>
<t>OBJ</t><0>xyz</0><1>def</1><2>def</2><3>def</3><4>def</4><d>DE</d>
<t>OBJ</t><0>xyz</0><1></1><2></2><3></3><4></4><d>DF</d>
Case 5:Search with parameter
K0 = xyz
K1 = NULL
K2 = NULL
K3 = NULL
K4 = NULL
Result is DF
Practice and Example
e01prov utility(cont.)E01 database<t>OBJ</t><0>xyz</0><1>1</1><2>2</2><3>3</3><4>4</4><d>DA</d>
<t>OBJ</t><0>xyz</0><1>1</1><2>2</2><3>3</3><4>def</4><d>DB</d>
<t>OBJ</t><0>xyz</0><1>1</1><2>2</2><3>def</3><4>def</4><d>DC</d>
<t>OBJ</t><0>xyz</0><1>1</1><2>def</2><3>def</3><4>def</4><d>DD</d>
<t>OBJ</t><0>xyz</0><1>def</1><2>def</2><3>def</3><4>def</4><d>DE</d>
<t>OBJ</t><0>xyz</0><1></1><2></2><3></3><4></4><d>DF</d>
Case 5:Search with parameter
K0 = xyzzzzaaayyyddd
K1 = NULL
K2 = NULL
K3 = NULL
K4 = NULL
Result is DF
Practice and Example
e01prov utility(cont.)E01 database<t>OBJ</t><0>xyz</0><1>1</1><2>2</2><3>3</3><4>4</4><d>DA</d>
<t>OBJ</t><0>xyz</0><1>1</1><2>2</2><3>3</3><4>def</4><d>DB</d>
<t>OBJ</t><0>xyz</0><1>1</1><2>2</2><3>def</3><4>def</4><d>DC</d>
<t>OBJ</t><0>xyz</0><1>1</1><2>def</2><3>def</3><4>def</4><d>DD</d>
<t>OBJ</t><0>xyz</0><1>def</1><2>def</2><3>def</3><4>def</4><d>DE</d>
<t>OBJ</t><0>xyz</0><1></1><2></2><3></3><4></4><d>DF</d>
Case 6:Search with parameter
K0 = xyzzzzaaayyyddd
K1 = We
K2 = LOVE
K3 = AIS
K4 = HEY
I believe you can do it
Good luck