Project

General

Profile

Create Context » History » Version 14

Tomislav Pleše, 09/27/2025 08:08 PM

1 1 Tomislav Pleše
# Create Context
2 2 Tomislav Pleše
3
4
|- T-001: Shard-01 
5
|  |- T-004: Point
6
|  |- T-015: Point
7
|- T-001: Shard-02
8
|  |- T-016: Point
9 3 Tomislav Pleše
|  |- T-017: Point
10 2 Tomislav Pleše
|  |- T-005: Shard-01 
11
|  |  |- T-006: Point
12
|  |  |- T-014: Point
13
|  |  |- T-007: Shard-01 
14
|  |  |  |- T-010: Point
15
|  |  |  |- T-013: Point 
16
|  |  |- T-007: Shard-02 
17
|  |  |  |- T-011: Point
18
|  |  |  |- T-012: Point  <-- starting point
19
|  |  |- T-007: Shard-03 
20
|  |  |- T-008: Point
21
|  |- T-005: Shard-02 
22
|  |  |- T-018: Point
23
|  |- T-005: Shard-03 
24
|  |- T-009: Point
25
|- T-001: Shard-03 
26
|- T-002: Point
27 3 Tomislav Pleše
|- T-003: Point
28 2 Tomislav Pleše
29 1 Tomislav Pleše
30 2 Tomislav Pleše
31 3 Tomislav Pleše
Context: [012, 011, 007(S01+S02), 014, 006, 005(S01), 017, 016, 001(S01+S02) ]
32 2 Tomislav Pleše
33 1 Tomislav Pleše
34 2 Tomislav Pleše
35 3 Tomislav Pleše
36 2 Tomislav Pleše
|     PointId                                                                                                |     012                                                |     007                                                                          |     005                                                                          |     001                                                                                                            |
37
|------------------------------------------------------------------------------------------------------------|--------------------------------------------------------|----------------------------------------------------------------------------------|----------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------|
38
|     StartingPoint   [in code]                                                                              |     012                                                |     012                                                                          |     012                                                                          |     012                                                                                                            |
39
|     PreviousPoint   [in code]                                                                              |     ""                                                 |     012                                                                          |     007                                                                          |     005                                                                                                            |
40
|     ParentPoint                                                                                            |     007                                                |     005                                                                          |     001                                                                          |     001                                                                                                            |
41
|     PointChildren                                                                                          |     null                                               |     null                                                                         |     null                                                                         |     [002, 003]                                                                                                     |
42
|     ShardList                                                                                              |     null                                               |     [S01, S02,   S03]                                                            |     [S01, S02,   S03]                                                            |     [S01, S02,   S03]                                                                                              |
43
|     ParentShard                                                                                            |     007-S02                                            |     005-S01                                                                      |     001-S02                                                                      |     null                                                                                                           |
44
|     CurrentParentShard   [in code]                                                                         |     null                                               |     007-S02                                                                      |     005-S01                                                                      |     001-S02                                                                                                        |
45
|     ShardPointChildren                                                                                     |     null                                               |     S02[011,   012]                                                              |     S01[006,   014, 007]                                                         |     S02[016,   017, 005, 009]                                                                                      |
46
|                                                                                                            |                                                        |                                                                                  |                                                                                  |                                                                                                                    |
47
|     PRINT full:                                                                                            |     012                                                |     011, 007(S01+S02)                                                            |     014, 006, 005(S01)                                                           |     017, 016, 001(S01+S02)                                                                                         |
48
|                                                                                                            |                                                        |                                                                                  |                                                                                  |                                                                                                                    |
49
|     If   (ShardPointChildren == null && currentParentShard == null) Else   (PointChildren == null)         |     * True:   not a Shard                              |     * False:   It's a shard. Print ShardPointChildren preceding PreviousPoint    |     * False:   It's a shard. Print ShardPointChildren preceding PreviousPoint    |     * False:   It's a shard. Print ShardPointChildren preceding PreviousPoint     (else,   print PointChildren)    |
50
|                                                                                                            |                                                        |     * PRINT [011]                                                                |     * PRINT [014, 006]                                                           |     * PRINT [017, 016]                                                                                             |
51
|     Print   CurrentPoint:     If(Shard)   => Print from ShardList     Else If   (!Shard) => Print Point    |     * Not a   Shard: Print Point                       |     * Shard:   Print ShardList from CurrentParentShard and those preceding       |     * Shard:   Print ShardList from CurrentParentShard and those preceding       |     * Shard:   Print ShardList from CurrentParentShard and those preceding                                         |
52
|                                                                                                            |     * PRINT: 012                                       |     * PRINT: 007- [S01+S02]                                                      |     * PRINT: 005-[S01]                                                           |     * PRINT: 001-[S01+S02]                                                                                         |
53
|     If   (ParentShard == null)                                                                             |     * False:   Set CurrentParentShard = ParentShard    |     * False:   Set CurrentParentShard = ParentShard                              |     * False:   Set CurrentParentShard = ParentShard                              |     True:                                                                                                          |
54 1 Tomislav Pleše
|     If   (ParentPoint == PointId)                                                                          |     * False:   Set PreviousPoint = currentPoint        |     * False:   Set PreviousPoint = currentPoint                                  |     * False:   Set PreviousPoint = currentPoint                                  |     * True:   This is Root ParentPoint - END                                                                       |
55
|                                                                                                            |     * Go to   ParentPoint: 007                         |     Go to   ParentPoint: 005                                                     |     Go to   ParentPoint: 001                                                     |                                                                                                                    |
56 3 Tomislav Pleše
57
58
59
FLOW
60
61 4 Tomislav Pleše
  
62
  ParentPoint cases: 
63 1 Tomislav Pleše
    1. Start Thread - New Root
64
    2. Under Regular Point Child
65
    3. Under Point that is a Shard Child - no Sharding
66
    4. Under Regular Point - 1st Sharding
67
    5. Under Existing Shard - 2nd Sharding
68
69 8 Tomislav Pleše
|Object |Property |1. New Root |2. Regular Point |3. Regular Point under Shard |4. Initial Sharding |5. Second Sharding |
70 7 Tomislav Pleše
|--|--|--|--|--|--|--|
71 12 Tomislav Pleše
|pointArgs |previousPointId |null |previousPointId |previousPointId  |previousPointId  |previousPointId  |
72 13 Tomislav Pleše
|pointArgs |parentPointId |null |parentPointId  |parentPointId  |parentPointId  |parentPointId  |
73
|pointArgs |parentShardId |null |null  |parentShardId  |null  |parentShardId  |
74 14 Tomislav Pleše
|pointArgs |isShardPointChild |false |false  |true  |true  |true  |
75 11 Tomislav Pleše
|newPoint |newPointId |newPointId |newPointId  |  |  |  |
76 8 Tomislav Pleše
|newPoint |parentPointId | newPointId |  |  |  |  |
77
|newPoint |parentShardId |null |  |  |  |  |
78
|parentPoint |parentPointId |parentPointId  |  |  |  |  |
79
|parentPoint |pointChildren |add newPointId  |  |  |  |  |
80 1 Tomislav Pleše
|parentShard |parentShardId |null  |  |  |  |  |
81
|parentShard |shardPointChildren |null  |  |  |  |  |
82 12 Tomislav Pleše
|updatedNewPoint |newPointId |newPointId |newPointId  |  |  |  |
83
|updatedNewPoint |parentPointId | newPointId |  |  |  |  |
84
|updatedNewPoint |parentShardId |null |  |  |  |  |
85
|updatedParentPoint |parentPointId |parentPointId  |  |  |  |  |
86
|updatedParentPoint |pointChildren |add newPointId  |  |  |  |  |
87 6 Tomislav Pleše
    
88 4 Tomislav Pleše
89 3 Tomislav Pleše
1. T-012
90 4 Tomislav Pleše
    1. 
91 3 Tomislav Pleše
2.