Skip to content
Browse files

new post

  • Loading branch information...
1 parent 6af807b commit b787830f168d7e9f50d149c834f7d5c01642822f @qnikst committed Nov 6, 2013
View
51 images/posts/pathfinding/_1.dot
@@ -0,0 +1,51 @@
+graph {
+ subgraph clusterM{
+ label="map";
+ d1[label=1];
+ d2[label=2];
+ d3[label=3];
+ d4[label=4];
+ d5[label=5];
+ edge[weight=95,label=5];
+ d1 -- d2;
+ edge[weight=60,label=40];
+ d1 -- d3;
+ edge[weight=1,label=100];
+ d1 -- d5;
+ edge[weight=90,label=10];
+ d2 -- d3;
+ edge[weight=70,label=30];
+ d2 -- d4;
+ edge[weight=90,label=10];
+ d3 -- d4;
+ edge[weight=80,label=20];
+ d3 -- d5;
+ edge[weight=95,label=5];
+ d4 -- d5;
+ }
+ subgraph cluster1 {
+ label="go";
+ subgraph cluster0 {
+ label="frontier"
+ f1[label="5 (0)",color=red];
+ fNil[label="Nil",color=red];
+ edge[dir=forward];
+ f1--fNil;
+ }
+ subgraph cluster01 {
+ label="visited";
+ v1[label="5"];
+ v1;
+ }
+ subgraph cluster02 {
+ label="current location";
+ }
+ subgraph cluster03 {
+ label="new elements";
+ }
+ }
+ subgraph cluster2 {
+ label="result";
+ n[label="..."];
+ }
+}
View
BIN images/posts/pathfinding/_1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
61 images/posts/pathfinding/_10.dot
@@ -0,0 +1,61 @@
+graph {
+ subgraph clusterM {
+ label="map";
+ d1[label=1,color=red]
+ d2[label=2,]
+ d3[label=3,color=red]
+ d4[label=4,color=red]
+ d5[label=5,color=green]
+ edge[weight=95,label=5];
+ d1 -- d2;
+ edge[weight=60,label=40];
+ d1 -- d3;
+ edge[weight=1,label=100];
+ d1 -- d5;
+ edge[weight=90,label=10];
+ d2 -- d3;
+ edge[weight=70,label=30];
+ d2 -- d4;
+ edge[weight=90,label=10];
+ d3 -- d4;
+ edge[weight=80,label=20];
+ d3 -- d5;
+ edge[weight=95,label=5];
+ d4 -- d5;
+ }
+ subgraph cluster1 {
+ label="go";
+ subgraph cluster0 {
+ label="frontier";
+ f3[label="3 (20)"];
+ f23[label="2 (25)"];
+ f31[label="1 (40)"];
+ f1[label="1 (100)"];
+ f32[label="2 (35)"];
+ n[label="Nil"];
+ f3 -- f23 -- f32 -- f31 -- f1 -- n;
+ }
+ subgraph cluster01 {
+ label="visited";
+ v1[label="5"];
+ v3[label="3"];
+ v4[label="4"];
+ v1;
+ v3;
+ v4;
+ }
+ subgraph cluster02 {
+ label="current location";
+ }
+ subgraph cluster03 {
+ label="new elements";
+ }
+ }
+ subgraph cluster2 {
+ label="result";
+ r5[label="5 (0)"];
+ r4[label="4 (5)"];
+ r3[label="3 (15)"];
+ r5--r4--r3;
+ }
+}
View
60 images/posts/pathfinding/_11.dot
@@ -0,0 +1,60 @@
+graph {
+ subgraph clusterM {
+ label="map";
+ d1[label=1,color=red]
+ d2[label=2,]
+ d3[label=3,color=red]
+ d4[label=4,color=red]
+ d5[label=5,color=green]
+ edge[weight=95,label=5];
+ d1 -- d2;
+ edge[weight=60,label=40];
+ d1 -- d3;
+ edge[weight=1,label=100];
+ d1 -- d5;
+ edge[weight=90,label=10];
+ d2 -- d3;
+ edge[weight=70,label=30];
+ d2 -- d4;
+ edge[weight=90,label=10];
+ d3 -- d4;
+ edge[weight=80,label=20];
+ d3 -- d5;
+ edge[weight=95,label=5];
+ d4 -- d5;
+ }
+ subgraph cluster1 {
+ label="go";
+ subgraph cluster0 {
+ label="frontier";
+ f23[label="2 (25)"];
+ f31[label="1 (40)"];
+ f1[label="1 (100)"];
+ f32[label="2 (35)"];
+ n[label="Nil"];
+ f23 -- f32 -- f31 -- f1 -- n;
+ }
+ subgraph cluster01 {
+ label="visited";
+ v1[label="5"];
+ v3[label="3"];
+ v4[label="4"];
+ v1;
+ v3;
+ v4;
+ }
+ subgraph cluster02 {
+ label="current location";
+ }
+ subgraph cluster03 {
+ label="new elements";
+ }
+ }
+ subgraph cluster2 {
+ label="result";
+ r5[label="5 (0)"];
+ r4[label="4 (5)"];
+ r3[label="3 (15)"];
+ r5--r4--r3;
+ }
+}
View
61 images/posts/pathfinding/_12.dot
@@ -0,0 +1,61 @@
+graph {
+ subgraph clusterM {
+ label="map";
+ d1[label=1,color=red]
+ d2[label=2,]
+ d3[label=3,color=red]
+ d4[label=4,color=red]
+ d5[label=5,color=green]
+ edge[weight=95,label=5];
+ d1 -- d2;
+ edge[weight=60,label=40];
+ d1 -- d3;
+ edge[weight=1,label=100];
+ d1 -- d5;
+ edge[weight=90,label=10];
+ d2 -- d3;
+ edge[weight=70,label=30];
+ d2 -- d4;
+ edge[weight=90,label=10];
+ d3 -- d4;
+ edge[weight=80,label=20];
+ d3 -- d5;
+ edge[weight=95,label=5];
+ d4 -- d5;
+ }
+ subgraph cluster1 {
+ label="go";
+ subgraph cluster0 {
+ label="frontier";
+ f31[label="1 (40)"];
+ f1[label="1 (100)"];
+ f32[label="2 (35)"];
+ n[label="Nil"];
+ f32 -- f31 -- f1 -- n;
+ }
+ subgraph cluster01 {
+ label="visited";
+ v1[label="5"];
+ v3[label="3"];
+ v4[label="4"];
+ v1;
+ v3;
+ v4;
+ }
+ subgraph cluster02 {
+ label="current location";
+ c23[label="2 (25)"];
+ }
+ subgraph cluster03 {
+ label="new elements";
+ c1[label="1 (30)"];
+ }
+ }
+ subgraph cluster2 {
+ label="result";
+ r5[label="5 (0)"];
+ r4[label="4 (5)"];
+ r3[label="3 (15)"];
+ r5--r4--r3;
+ }
+}
View
61 images/posts/pathfinding/_13.dot
@@ -0,0 +1,61 @@
+graph {
+ subgraph clusterM {
+ label="map";
+ d1[label=1,color=red]
+ d2[label=2,]
+ d3[label=3,color=red]
+ d4[label=4,color=red]
+ d5[label=5,color=green]
+ edge[weight=95,label=5];
+ d1 -- d2;
+ edge[weight=60,label=40];
+ d1 -- d3;
+ edge[weight=1,label=100];
+ d1 -- d5;
+ edge[weight=90,label=10];
+ d2 -- d3;
+ edge[weight=70,label=30];
+ d2 -- d4;
+ edge[weight=90,label=10];
+ d3 -- d4;
+ edge[weight=80,label=20];
+ d3 -- d5;
+ edge[weight=95,label=5];
+ d4 -- d5;
+ }
+ subgraph cluster1 {
+ label="go";
+ subgraph cluster0 {
+ label="frontier";
+ c1[label="1 (30)"];
+ f31[label="1 (40)"];
+ f1[label="1 (100)"];
+ f32[label="2 (35)"];
+ n[label="Nil"];
+ f32 -- f31 -- f1 -- n;
+ }
+ subgraph cluster01 {
+ label="visited";
+ v1[label="5"];
+ v3[label="3"];
+ v4[label="4"];
+ v1;
+ v3;
+ v4;
+ }
+ subgraph cluster02 {
+ label="current location";
+ }
+ subgraph cluster03 {
+ label="new elements";
+ }
+ }
+ subgraph cluster2 {
+ label="result";
+ r5[label="5 (0)"];
+ r4[label="4 (5)"];
+ r3[label="3 (15)"];
+ r2[label="2 (25)"];
+ r5--r4--r3--r2;
+ }
+}
View
61 images/posts/pathfinding/_14.dot
@@ -0,0 +1,61 @@
+graph {
+ subgraph clusterM {
+ label="map";
+ d1[label=1,color=red]
+ d2[label=2,]
+ d3[label=3,color=red]
+ d4[label=4,color=red]
+ d5[label=5,color=green]
+ edge[weight=95,label=5];
+ d1 -- d2;
+ edge[weight=60,label=40];
+ d1 -- d3;
+ edge[weight=1,label=100];
+ d1 -- d5;
+ edge[weight=90,label=10];
+ d2 -- d3;
+ edge[weight=70,label=30];
+ d2 -- d4;
+ edge[weight=90,label=10];
+ d3 -- d4;
+ edge[weight=80,label=20];
+ d3 -- d5;
+ edge[weight=95,label=5];
+ d4 -- d5;
+ }
+ subgraph cluster1 {
+ label="go";
+ subgraph cluster0 {
+ label="frontier";
+ f31[label="1 (40)"];
+ f1[label="1 (100)"];
+ f32[label="2 (35)"];
+ n[label="Nil"];
+ f32 -- f31 -- f1 -- n;
+ }
+ subgraph cluster01 {
+ label="visited";
+ v1[label="5"];
+ v3[label="3"];
+ v4[label="4"];
+ v1;
+ v3;
+ v4;
+ }
+ subgraph cluster02 {
+ label="current location";
+ c1[label="1 (30)"];
+ }
+ subgraph cluster03 {
+ label="new elements";
+ }
+ }
+ subgraph cluster2 {
+ label="result";
+ r5[label="5 (0)"];
+ r4[label="4 (5)"];
+ r3[label="3 (15)"];
+ r2[label="2 (25)"];
+ r5--r4--r3--r2;
+ }
+}
View
61 images/posts/pathfinding/_15.dot
@@ -0,0 +1,61 @@
+graph {
+ subgraph clusterM {
+ label="map";
+ d1[label=1,color=red]
+ d2[label=2,]
+ d3[label=3,color=red]
+ d4[label=4,color=red]
+ d5[label=5,color=green]
+ edge[weight=95,label=5];
+ d1 -- d2;
+ edge[weight=60,label=40];
+ d1 -- d3;
+ edge[weight=1,label=100];
+ d1 -- d5;
+ edge[weight=90,label=10];
+ d2 -- d3;
+ edge[weight=70,label=30];
+ d2 -- d4;
+ edge[weight=90,label=10];
+ d3 -- d4;
+ edge[weight=80,label=20];
+ d3 -- d5;
+ edge[weight=95,label=5];
+ d4 -- d5;
+ }
+ subgraph cluster1 {
+ label="go";
+ subgraph cluster0 {
+ label="frontier";
+ f31[label="1 (40)"];
+ f1[label="1 (100)"];
+ f32[label="2 (35)"];
+ n[label="Nil"];
+ f32 -- f31 -- f1 -- n;
+ }
+ subgraph cluster01 {
+ label="visited";
+ v1[label="5"];
+ v3[label="3"];
+ v4[label="4"];
+ v1;
+ v3;
+ v4;
+ }
+ subgraph cluster02 {
+ label="current location";
+ }
+ subgraph cluster03 {
+ label="new elements";
+ }
+ }
+ subgraph cluster2 {
+ label="result";
+ r5[label="5 (0)"];
+ r4[label="4 (5)"];
+ r3[label="3 (15)"];
+ r2[label="2 (25)"];
+ r1[label="1 (30)"];
+ r5--r4--r3--r2--r1;
+ }
+}
View
42 images/posts/pathfinding/_2.dot
@@ -0,0 +1,42 @@
+graph {
+ subgraph clusterM {
+ d1[label=1,color=red]
+ d2[label=2,]
+ d3[label=3,color=red]
+ d4[label=4,color=red]
+ d5[label=5,color=green]
+ edge[weight=95,label=5];
+ d1 -- d2;
+ edge[weight=60,label=40];
+ d1 -- d3;
+ edge[weight=1,label=100];
+ d1 -- d5;
+ edge[weight=90,label=10];
+ d2 -- d3;
+ edge[weight=70,label=30];
+ d2 -- d4;
+ edge[weight=90,label=10];
+ d3 -- d4;
+ edge[weight=80,label=20];
+ d3 -- d5;
+ edge[weight=95,label=5];
+ d4 -- d5;
+ }
+ subgraph cluster0 {
+ label="frontier"
+ n[label="Nil"];
+ }
+ subgraph cluster0 {
+ label="go";
+ subgraph cluster01 {
+ label="visited";
+ }
+ subgraph closter02 {
+ label="current location"
+ f1[label="5 (0)",color=red];
+ }
+ }
+ subgraph cluster1 {
+ label="result";
+ }
+}
View
BIN images/posts/pathfinding/_2.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
52 images/posts/pathfinding/_3.dot
@@ -0,0 +1,52 @@
+graph {
+ subgraph clusterM {
+ label="map";
+ d1[label=1,color=red]
+ d2[label=2,]
+ d3[label=3,color=red]
+ d4[label=4,color=red]
+ d5[label=5,color=green]
+ edge[weight=95,label=5];
+ d1 -- d2;
+ edge[weight=60,label=40];
+ d1 -- d3;
+ edge[weight=1,label=100];
+ d1 -- d5;
+ edge[weight=90,label=10];
+ d2 -- d3;
+ edge[weight=70,label=30];
+ d2 -- d4;
+ edge[weight=90,label=10];
+ d3 -- d4;
+ edge[weight=80,label=20];
+ d3 -- d5;
+ edge[weight=95,label=5];
+ d4 -- d5;
+ }
+ subgraph cluster0 {
+ label="frontier";
+ n[label="Nil"];
+ }
+ subgraph cluster1 {
+ label="go";
+ subgraph cluster01 {
+ label="visited";
+
+ }
+ subgraph cluster02 {
+ label="current location"
+ f1[label="5 (0)",color=green];
+ }
+ subgraph cluster03 {
+ label="new elements"
+ g3[label="3 (20)"];
+ g4[label="4 (5)"];
+ g1[label="1 (100)"];
+ g1 -- g3 -- g4;
+ }
+ }
+ subgraph cluster2 {
+ label="result";
+ r1[label="unfoldr"];
+ }
+}
View
BIN images/posts/pathfinding/_3.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
55 images/posts/pathfinding/_4.dot
@@ -0,0 +1,55 @@
+graph {
+ subgraph clusterM {
+ label="map";
+ d1[label=1,color=red]
+ d2[label=2,]
+ d3[label=3,color=red]
+ d4[label=4,color=red]
+ d5[label=5,color=green]
+ edge[weight=95,label=5];
+ d1 -- d2;
+ edge[weight=60,label=40];
+ d1 -- d3;
+ edge[weight=1,label=100];
+ d1 -- d5;
+ edge[weight=90,label=10];
+ d2 -- d3;
+ edge[weight=70,label=30];
+ d2 -- d4;
+ edge[weight=90,label=10];
+ d3 -- d4;
+ edge[weight=80,label=20];
+ d3 -- d5;
+ edge[weight=95,label=5];
+ d4 -- d5;
+ }
+ subgraph cluster1 {
+ label="go";
+ subgraph cluster0 {
+ label="frontier";
+ f4[label="4 (5)"];
+ f3[label="3 (20)"];
+ f1[label="1 (100)"];
+ n[label="Nil"];
+ f4 -- f3 -- f1 -- n;
+ }
+ subgraph cluster01 {
+ label="visited";
+ v1[label="5"];
+ v1;
+ }
+ subgraph cluster02 {
+ label="current location";
+ }
+ subgraph cluster03 {
+ label="new elements";
+ }
+ }
+ subgraph cluster2 {
+ label="result";
+ r5[label="5 (0)",color=green];
+ r1[label="unfoldr"];
+ r5--r1;
+ cluster1 -- r1;
+ }
+}
View
BIN images/posts/pathfinding/_4.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
57 images/posts/pathfinding/_5.dot
@@ -0,0 +1,57 @@
+graph {
+ subgraph clusterM {
+ label="map";
+ d1[label=1,color=red]
+ d2[label=2,]
+ d3[label=3,color=red]
+ d4[label=4,color=red]
+ d5[label=5,color=green]
+ edge[weight=95,label=5];
+ d1 -- d2;
+ edge[weight=60,label=40];
+ d1 -- d3;
+ edge[weight=1,label=100];
+ d1 -- d5;
+ edge[weight=90,label=10];
+ d2 -- d3;
+ edge[weight=70,label=30];
+ d2 -- d4;
+ edge[weight=90,label=10];
+ d3 -- d4;
+ edge[weight=80,label=20];
+ d3 -- d5;
+ edge[weight=95,label=5];
+ d4 -- d5;
+ }
+ subgraph cluster1 {
+ label="go";
+ subgraph cluster0 {
+ label="frontier";
+ f3[label="3 (20)"];
+ f1[label="1 (100)"];
+ n[label="Nil"];
+ f3 -- f1 -- n;
+ }
+ subgraph cluster01 {
+ label="visited";
+ v1[label="5"];
+ v1;
+ }
+ subgraph cluster02 {
+ label="current location";
+ c4[label="4 (5)"];
+ }
+ subgraph cluster03 {
+ label="new elements";
+ n3[label="3 (10)"];
+ n2[label="2 (30)"];
+ n3 -- n2;
+ }
+ }
+ subgraph cluster2 {
+ label="result";
+ r5[label="5 (0)",color=green];
+ r1[label="unfoldr"];
+ r5--r1;
+ }
+}
View
BIN images/posts/pathfinding/_5.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
57 images/posts/pathfinding/_6.dot
@@ -0,0 +1,57 @@
+graph {
+ subgraph clusterM {
+ label="map";
+ d1[label=1,color=red]
+ d2[label=2,]
+ d3[label=3,color=red]
+ d4[label=4,color=red]
+ d5[label=5,color=green]
+ edge[weight=95,label=5];
+ d1 -- d2;
+ edge[weight=60,label=40];
+ d1 -- d3;
+ edge[weight=1,label=100];
+ d1 -- d5;
+ edge[weight=90,label=10];
+ d2 -- d3;
+ edge[weight=70,label=30];
+ d2 -- d4;
+ edge[weight=90,label=10];
+ d3 -- d4;
+ edge[weight=80,label=20];
+ d3 -- d5;
+ edge[weight=95,label=5];
+ d4 -- d5;
+ }
+ subgraph cluster1 {
+ label="go";
+ subgraph cluster0 {
+ label="frontier";
+ f3[label="3 (20)"];
+ f1[label="1 (100)"];
+ n[label="Nil"];
+ f3 -- f1 -- n;
+ }
+ subgraph cluster01 {
+ label="visited";
+ v1[label="5"];
+ v1;
+ }
+ subgraph cluster02 {
+ label="current location";
+ c4[label="4 (5)"];
+ }
+ subgraph cluster03 {
+ label="new elements";
+ n3[label="3 (15)"];
+ n2[label="2 (35)"];
+ n3 -- n2;
+ }
+ }
+ subgraph cluster2 {
+ label="result";
+ r5[label="5 (0)",color=green];
+ r1[label="unfoldr"];
+ r5--r1;
+ }
+}
View
57 images/posts/pathfinding/_7.dot
@@ -0,0 +1,57 @@
+graph {
+ subgraph clusterM {
+ label="map";
+ d1[label=1,color=red]
+ d2[label=2,]
+ d3[label=3,color=red]
+ d4[label=4,color=red]
+ d5[label=5,color=green]
+ edge[weight=95,label=5];
+ d1 -- d2;
+ edge[weight=60,label=40];
+ d1 -- d3;
+ edge[weight=1,label=100];
+ d1 -- d5;
+ edge[weight=90,label=10];
+ d2 -- d3;
+ edge[weight=70,label=30];
+ d2 -- d4;
+ edge[weight=90,label=10];
+ d3 -- d4;
+ edge[weight=80,label=20];
+ d3 -- d5;
+ edge[weight=95,label=5];
+ d4 -- d5;
+ }
+ subgraph cluster1 {
+ label="go";
+ subgraph cluster0 {
+ label="frontier";
+ f34[label="3 (15)"];
+ f3[label="3 (20)"];
+ f1[label="1 (100)"];
+ f32[label="2 (35)"];
+ n[label="Nil"];
+ f34 -- f3 --f32 -- f1 -- n;
+ }
+ subgraph cluster01 {
+ label="visited";
+ v1[label="5"];
+ v4[label="4"];
+ v1;
+ v4;
+ }
+ subgraph cluster02 {
+ label="current location";
+ }
+ subgraph cluster03 {
+ label="new elements";
+ }
+ }
+ subgraph cluster2 {
+ label="result";
+ r5[label="5 (0)",color=green];
+ r4[label="4 (5)"];
+ r5--r4;
+ }
+}
View
BIN images/posts/pathfinding/_7.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
59 images/posts/pathfinding/_8.dot
@@ -0,0 +1,59 @@
+graph {
+ subgraph clusterM {
+ label="map";
+ d1[label=1,color=red]
+ d2[label=2,]
+ d3[label=3,color=red]
+ d4[label=4,color=red]
+ d5[label=5,color=green]
+ edge[weight=95,label=5];
+ d1 -- d2;
+ edge[weight=60,label=40];
+ d1 -- d3;
+ edge[weight=1,label=100];
+ d1 -- d5;
+ edge[weight=90,label=10];
+ d2 -- d3;
+ edge[weight=70,label=30];
+ d2 -- d4;
+ edge[weight=90,label=10];
+ d3 -- d4;
+ edge[weight=80,label=20];
+ d3 -- d5;
+ edge[weight=95,label=5];
+ d4 -- d5;
+ }
+ subgraph cluster1 {
+ label="go";
+ subgraph cluster0 {
+ label="frontier";
+ f3[label="3 (20)"];
+ f1[label="1 (100)"];
+ f32[label="2 (35)"];
+ n[label="Nil"];
+ f3 --f32 -- f1 -- n;
+ }
+ subgraph cluster01 {
+ label="visited";
+ v1[label="5"];
+ v4[label="4"];
+ v1;
+ v4;
+ }
+ subgraph cluster02 {
+ label="current location";
+ c34[label="3 (15)"];
+ }
+ subgraph cluster03 {
+ label="new elements";
+ n23[label="2 (25)"];
+ n31[label="1 (40)"];
+ }
+ }
+ subgraph cluster2 {
+ label="result";
+ r5[label="5 (0)",color=green];
+ r4[label="4 (5)"];
+ r5--r4;
+ }
+}
View
BIN images/posts/pathfinding/_8.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
61 images/posts/pathfinding/_9.dot
@@ -0,0 +1,61 @@
+graph {
+ subgraph clusterM {
+ label="map";
+ d1[label=1,color=red]
+ d2[label=2,]
+ d3[label=3,color=red]
+ d4[label=4,color=red]
+ d5[label=5,color=green]
+ edge[weight=95,label=5];
+ d1 -- d2;
+ edge[weight=60,label=40];
+ d1 -- d3;
+ edge[weight=1,label=100];
+ d1 -- d5;
+ edge[weight=90,label=10];
+ d2 -- d3;
+ edge[weight=70,label=30];
+ d2 -- d4;
+ edge[weight=90,label=10];
+ d3 -- d4;
+ edge[weight=80,label=20];
+ d3 -- d5;
+ edge[weight=95,label=5];
+ d4 -- d5;
+ }
+ subgraph cluster1 {
+ label="go";
+ subgraph cluster0 {
+ label="frontier";
+ f3[label="3 (20)"];
+ f1[label="1 (100)"];
+ f32[label="2 (35)"];
+ n[label="Nil"];
+ f3 --f32 -- f1 -- n;
+ }
+ subgraph cluster01 {
+ label="visited";
+ v1[label="5"];
+ v3[label="3"];
+ v4[label="4"];
+ v1;
+ v3;
+ v4;
+ }
+ subgraph cluster02 {
+ label="current location";
+ }
+ subgraph cluster03 {
+ label="new elements";
+ n23[label="2 (25)"];
+ n31[label="1 (40)"];
+ }
+ }
+ subgraph cluster2 {
+ label="result";
+ r5[label="5 (0)"];
+ r4[label="4 (5)"];
+ r3[label="3 (15)"];
+ r5--r4--r3;
+ }
+}
View
BIN images/posts/pathfinding/_9.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
6 index.html
@@ -35,6 +35,9 @@
<h1>Recent posts</h1>
<ul>
<li>
+ <a href="./posts/2013-11-06-openrc-supervision.html">Supervision inside OpenRC</a> [November 6, 2013]
+</li>
+<li>
<a href="./posts/2013-09-08-pathfinding.html">Basic pathfinding</a> [September 8, 2013]
</li>
<li>
@@ -61,9 +64,6 @@
<li>
<a href="./posts/2013-02-28-resourcet-usage.html">Resourcet usage</a> [February 28, 2013]
</li>
-<li>
- <a href="./posts/2013-02-20-openrc-cgroup.html">OpenRC Extended cgroups support</a> [February 20, 2013]
-</li>
</ul>
<a href="./posts.html">All posts…</a>
View
3 posts.html
@@ -35,6 +35,9 @@
<h1>All posts</h1>
<ul>
<li>
+ <a href="./posts/2013-11-06-openrc-supervision.html">Supervision inside OpenRC</a> [November 6, 2013]
+</li>
+<li>
<a href="./posts/2013-09-08-pathfinding.html">Basic pathfinding</a> [September 8, 2013]
</li>
<li>
View
136 posts/2013-11-06-openrc-supervision.html
@@ -0,0 +1,136 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+ <title>Qnikst blog - Supervision inside OpenRC</title>
+ <!-- Bootstrap -->
+ <link href="../css/bootstrap.min.css" rel="stylesheet" media="screen">
+ <link href="../css/additional.css" rel="stylesheet" media="screen">
+ <style>
+ body {
+ padding-top: 60px; /* 60px to make the container go all the way to the bottom of the topbar */
+ }
+ </style>
+ <script src="http://code.jquery.com/jquery-latest.js"></script>
+ <script src="../js/bootstrap.min.js"></script>
+
+</head>
+<body>
+ <div class="navbar navbar-fixed-top navbar-inverse">
+ <div class="navbar-inner">
+ <a class="brand" href="../">Qnikst blog</a>
+ <ul class="nav ">
+ <li class="active"><a href="../">Home</a></li>
+ <li><a href="../posts.html">Blog</a></li>
+ <li><a href="../projects.html">Projects</a></li>
+ <li><a href="../contact.html">Contacts</a></li>
+ <li><a href="../rss.xml">RSS</a></li>
+ </ul>
+ </div>
+ </div>
+ <div class="container">
+
+
+<div class="page-header">
+ <h1>Supervision inside OpenRC <br /><small><strong>November 6, 2013</strong></small></h1>
+</div>
+
+<p>The role of the supervision in the init systems becomes crusial. And many administrators wants some kind of s-vision support from the scratch. Here are some thoughts about this problem and a way how things will be solved inside OpenRC.</p>
+<p><small>(As always I’m sorry for my english and maybe problems in technitial details, so any feedback is apprecated</small></p>
+<h2 id="the-problem.">The problem.</h2>
+<p>The idea of supervision is to take care about running processes and restart them in the case if they fail. It’s interesting to say that ‘fail’ may mean different things:</p>
+<ol style="list-style-type: decimal">
+<li>Process exited (with non zero EXIT_CODE);</li>
+<li>Process fail to work as expected.</li>
+</ol>
+<p>In the most systems only first meaning is addressed, however it’s not very carefull and in systems where <em>reliance</em> is required we need to use additional tools to support 2.</p>
+<p>Another set of problem is about how we will decide if we want to restart service and run cleanup actions. And this problem is not easy at all, i.e. we may want to stop restarting service if it fails constantly, or increase timeout in restarts and so on.</p>
+<p>Also we may want additional features like say, remote access/control to supervised services, additinal notification.</p>
+<p>And it’s clear that it’s insane to support all required tools inside one service management package, and there the solution will be: ‘give a user possibility to delegate supervision problem to the standalone application’.</p>
+<p>So the solution would be the following:</p>
+<ol style="list-style-type: decimal">
+<li>Let OpenRC know that user may want s-vision for some services and what module he want to use;</li>
+<li>Provide a set of existing modules;</li>
+<li>Give an ability to create new modules.</li>
+</ol>
+<h2 id="monit">Monit</h2>
+<p>I’ve started to work on ‘monit’ approach. Monit (http://mmonit.com/monit/) is a monitoring that allowes user to monitor services and give much possibilites for their control. This tool provides a special language that describes how each service should be monitored started and restarted.</p>
+<p>Currently it’s possible to run monit as a standalone daemon and then control supervision via monit itself by calling <code>monit foo start</code>/<code>monit foo stop</code>. However having OpenRC as a common point for services control is a good idea.</p>
+<p>All the code available on s-vision branch (https://github.com/qnikst/openrc/compare/s-vision) and will be merged to mainline after some discussion with other developers and administrators that have a good experience with running monit.</p>
+<p>In order to put service under monit control one need:</p>
+<ol style="list-style-type: decimal">
+<li><p>Run monit under inittab control (or other low level s-vision subsystem). This can be done by adding:</p>
+<pre><code>MO:2345:respawn:/usr/bin/monit -Ic /etc/monitrc</code></pre></li>
+</ol>
+<p>to inittab</p>
+<ol start="2" style="list-style-type: decimal">
+<li><p>Add temporary config path under monit control (/etc/monitrc)</p>
+<pre><code>INCLUDE /run/openrc-monit/*</code></pre></li>
+<li><p>Create control file for service under <code>/etc/conf.d/monit-files/servicename</code></p></li>
+<li><p>Add s-vision module to conf.d file, i.e.</p>
+<pre><code>rc_supervise_module=&quot;monit&quot;
+rc_monit_type=&quot;file&quot;</code></pre></li>
+</ol>
+<p>When you will trigger service start it will check that it is supervised, copy all related files to the temporary config path, and then call <code>monit start service</code>, that will trigger file once again, but init will understand that it is monitored, and start service as usual.</p>
+<h2 id="future-work">Future work</h2>
+<p>There are a couple of work to be done before merging:</p>
+<ol style="list-style-type: decimal">
+<li><p>Introduce other <code>monit_types</code> like:</p>
+<ul>
+<li>simple - where basic control file generated automatically on the fly</li>
+<li>native - where existing configuration can be reused.</li>
+</ul></li>
+<li><p>Understand if it possible to run runscript only once</p></li>
+<li><p>Cleanup code</p></li>
+<li><p>Export general API that other s-vision subsystems can use</p></li>
+</ol>
+<p>All comments are welcome</p>
+<hr />
+<div id="sociallinks" class="pull-left">
+ <strong>Share on:</strong>
+ <a href="https://twitter.com/home?status=http://qnikst.github.io/posts/2013-11-06-openrc-supervision.html" target="_blank" class="social" title="twit it">t</a>
+ <a href="http://www.facebook.com/sharer/sharer.php?u=http://qnikst.github.io/posts/2013-11-06-openrc-supervision.html" target="_blank" class="social" title="share on facebook">F</a>
+ <a href="https://plus.google.com/share?url=http://qnikst.github.io/posts/2013-11-06-openrc-supervision.html" target="_blank" class="social" title="share on g+">g</a>
+</div>
+
+<div class="pull-right">
+ <em>Alexander Vershilov</em>
+
+</div>
+<br class="clearfix" />
+<hr />
+
+
+<div id="disqus_thread"></div>
+ <script type="text/javascript">
+ /* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
+ var disqus_shortname = 'qnikst'; // required: replace example with your forum shortname
+
+ (function() {
+ var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
+ dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
+ (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
+ })();
+ </script>
+ <noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
+ <a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
+
+
+ <footer>
+ Site generated using <a href="http://jaspervdj.be/hakyll">Hakyll</a> using <a href="http://johnmacfarlane.net/pandoc/">pandoc</a>
+ </footer>
+ </div>
+<script type="text/javascript">
+ // <noscript> я очень хочу вас посчитать, напишите комментарий хотя бы, пожааалуйста </noscript>
+var _gaq = _gaq || [];
+_gaq.push(['_setAccount', 'UA-38941774-1']);
+_gaq.push(['_trackPageview']);
+
+(function() {
+ var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+})();
+</script>
+</body>
+</html>
View
106 rss.xml
@@ -8,8 +8,65 @@
<name>Alexander Vershilov</name>
<email>alexander.vershilov@gmail.com</email>
</author>
- <updated>2013-09-08T00:00:00Z</updated>
+ <updated>2013-11-06T00:00:00Z</updated>
<entry>
+ <title>Supervision inside OpenRC</title>
+ <link href="http://qnikst.github.com/posts/2013-11-06-openrc-supervision.html" />
+ <id>http://qnikst.github.com/posts/2013-11-06-openrc-supervision.html</id>
+ <published>2013-11-06T00:00:00Z</published>
+ <updated>2013-11-06T00:00:00Z</updated>
+ <summary type="html"><![CDATA[<p>The role of the supervision in the init systems becomes crusial. And many administrators wants some kind of s-vision support from the scratch. Here are some thoughts about this problem and a way how things will be solved inside OpenRC.</p>
+<p><small>(As always I’m sorry for my english and maybe problems in technitial details, so any feedback is apprecated</small></p>
+<h1 id="the-problem.">The problem.</h1>
+<p>The idea of supervision is to take care about running processes and restart them in the case if they fail. It’s interesting to say that ‘fail’ may mean different things:</p>
+<ol style="list-style-type: decimal">
+<li>Process exited (with non zero EXIT_CODE);</li>
+<li>Process fail to work as expected.</li>
+</ol>
+<p>In the most systems only first meaning is addressed, however it’s not very carefull and in systems where <em>reliance</em> is required we need to use additional tools to support 2.</p>
+<p>Another set of problem is about how we will decide if we want to restart service and run cleanup actions. And this problem is not easy at all, i.e. we may want to stop restarting service if it fails constantly, or increase timeout in restarts and so on.</p>
+<p>Also we may want additional features like say, remote access/control to supervised services, additinal notification.</p>
+<p>And it’s clear that it’s insane to support all required tools inside one service management package, and there the solution will be: ‘give a user possibility to delegate supervision problem to the standalone application’.</p>
+<p>So the solution would be the following:</p>
+<ol style="list-style-type: decimal">
+<li>Let OpenRC know that user may want s-vision for some services and what module he want to use;</li>
+<li>Provide a set of existing modules;</li>
+<li>Give an ability to create new modules.</li>
+</ol>
+<h1 id="monit">Monit</h1>
+<p>I’ve started to work on ‘monit’ approach. Monit (http://mmonit.com/monit/) is a monitoring that allowes user to monitor services and give much possibilites for their control. This tool provides a special language that describes how each service should be monitored started and restarted.</p>
+<p>Currently it’s possible to run monit as a standalone daemon and then control supervision via monit itself by calling <code>monit foo start</code>/<code>monit foo stop</code>. However having OpenRC as a common point for services control is a good idea.</p>
+<p>All the code available on s-vision branch (https://github.com/qnikst/openrc/compare/s-vision) and will be merged to mainline after some discussion with other developers and administrators that have a good experience with running monit.</p>
+<p>In order to put service under monit control one need:</p>
+<ol style="list-style-type: decimal">
+<li><p>Run monit under inittab control (or other low level s-vision subsystem). This can be done by adding:</p>
+<pre><code>MO:2345:respawn:/usr/bin/monit -Ic /etc/monitrc</code></pre></li>
+</ol>
+<p>to inittab</p>
+<ol start="2" style="list-style-type: decimal">
+<li><p>Add temporary config path under monit control (/etc/monitrc)</p>
+<pre><code>INCLUDE /run/openrc-monit/*</code></pre></li>
+<li><p>Create control file for service under <code>/etc/conf.d/monit-files/servicename</code></p></li>
+<li><p>Add s-vision module to conf.d file, i.e.</p>
+<pre><code>rc_supervise_module=&quot;monit&quot;
+rc_monit_type=&quot;file&quot;</code></pre></li>
+</ol>
+<p>When you will trigger service start it will check that it is supervised, copy all related files to the temporary config path, and then call <code>monit start service</code>, that will trigger file once again, but init will understand that it is monitored, and start service as usual.</p>
+<h1 id="future-work">Future work</h1>
+<p>There are a couple of work to be done before merging:</p>
+<ol style="list-style-type: decimal">
+<li><p>Introduce other <code>monit_types</code> like:</p>
+<ul>
+<li>simple - where basic control file generated automatically on the fly</li>
+<li>native - where existing configuration can be reused.</li>
+</ul></li>
+<li><p>Understand if it possible to run runscript only once</p></li>
+<li><p>Cleanup code</p></li>
+<li><p>Export general API that other s-vision subsystems can use</p></li>
+</ol>
+<p>All comments are welcome</p>]]></summary>
+</entry>
+<entry>
<title>Basic pathfinding</title>
<link href="http://qnikst.github.com/posts/2013-09-08-pathfinding.html" />
<id>http://qnikst.github.com/posts/2013-09-08-pathfinding.html</id>
@@ -637,52 +694,5 @@ releaseChan (ChanMVar v) = go =&lt;&lt; tryReadChan v
<li>Read and writes should be exception safe</li>
</ol>]]></summary>
</entry>
-<entry>
- <title>OpenRC Extended cgroups support</title>
- <link href="http://qnikst.github.com/posts/2013-02-20-openrc-cgroup.html" />
- <id>http://qnikst.github.com/posts/2013-02-20-openrc-cgroup.html</id>
- <published>2013-02-20T00:00:00Z</published>
- <updated>2013-02-20T00:00:00Z</updated>
- <summary type="html"><![CDATA[<h1 id="openrc-has-extended-cgroups-support">Openrc has extended cgroups support</h1>
-<p>Staring with openrc-0.12 (not released ATM) openrc supports cgroup limit configuration. The simpliest and most reasonable way to configure it is use a multiline per-process values:</p>
-<p>At first I should note that openrc has optional cgroup support to add it you need to set:</p>
-<pre><code>rc_controller_cgroups=&quot;YES&quot;</code></pre>
-<p>Otherwise one of the option will be applied and openrc “plugin” will not be loaded. As always settings can be set in rc.conf file and can be overloaded in ‘/etc/conf.d/foo’ file for service foo.</p>
-<p>Each option is specified by name of the limit and value. Each option may be a multivalue, e.g.</p>
-<pre><code># rc_cgroup_cpu=&quot;
-# cpu.shares 512
-# &quot;</code></pre>
-<p>For more information about the adjustments that can be made with cgroups, see <code>Documentation/cgroups/*</code> in the linux kernel source tree.</p>
-<p>Currently next controllers are supported:</p>
-<ul>
-<li>blkio – block io controller</li>
-<li>cpu – cpu controller</li>
-<li>cpuacct – cpu accounting information</li>
-<li>cpuset – extended cpu configuration</li>
-<li>devices – devices access control</li>
-<li>memory – memory management</li>
-<li>net_prio – network priority options</li>
-</ul>
-<h3 id="why-do-i-ever-need-cgroups">Why do I ever need cgroups?</h3>
-<p>You can check kernel documentation. But roughly speaking you can monitor service processes, and manage resources much better.</p>
-<h3 id="differences-with-other-system-managers">Differences with other system managers</h3>
-<p>There are some differences between how systemd works, systemd creates hierarchies for system daemons and users in each controller. Openrc uses it’s own cgroup to monitor daemons, and create a group called ‘openrc_<servicename>’ in controller that is configures.</p>
-<p>So you can easily use other cgroup daemons like libcgroup with openrc without any problem</p>
-<h2 id="future-work">Future work</h2>
-<p>There are some work that can be done to make cgroup support better:</p>
-<ul>
-<li>configure controller merging</li>
-<li>cgroup-cleanup, i.e. destroy all childs when stopping service (there are some pathes but they were not applied upstream). We will wait for the real use cases here</li>
-<li>cgroup-watchdog, we can monitor if service is dead either by notify_agent (will not require any resources but will not restart service with childs alive) or by inotify (will require a watchdog service running but will have no such problems)</li>
-<li>notify-agent callbacks, currently we use notify agent only on openrc cgroup and there is no callback, but it can be fixed</li>
-<li>there is an abitify to make an api for freezer, but we’d wait for the real use case before implementing it.</li>
-</ul>
-<p>Usefull links:</p>
-<ul>
-<li><a href="https://access.redhat.com/knowledge/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Resource_Management_Guide/ch01.html">Red Hat manual</a></li>
-<li><a href="http://www.kernel.org/doc/Documentation/cgroups/cgroups.txt">kernel documentation</a></li>
-<li><a href="http://en.wikipedia.org/wiki/Cgroups">wiki</a></li>
-</ul>]]></summary>
-</entry>
</feed>

0 comments on commit b787830

Please sign in to comment.
Something went wrong with that request. Please try again.