sli.do for questions #jrgql
Most starred and relevant question gets a gift
At first there were only the 3rd normal form
Users Relations
/----+-------+----------------\ /----+--------+------\
| id | Name | Email | | id | person | boss |
+----+-------+----------------+ +----+--------+------+
| 1 | James | [email protected] | | 1 | 1 | 2 |
| 2 | Wife | [email protected] | | 2 | 2 | 3 |
| 3 | Cat | [email protected] | \----+--------+------/
\----+-------+----------------/
???
In the last milennia HW was more expensive than Dev.
Strongly centralized languages, few big solutions existed.
Then denormalization exploded the DCs
James' relations Wife's relations Cat's relations
/-------+----------------\ /-------+----------------\ /-------+----------------\
| Name | Email | | Name | Email | | Name | Email |
+-------+----------------+ +-------+----------------+ +-------+----------------+
| Wife | [email protected] | | James | [email protected] | | James | [email protected] |
| Cat | [email protected] | | Cat | [email protected] | | Wife | [email protected] |
\-------+----------------/ \-------+----------------/ \-------+----------------/
???
~10 years ago map-reduce and nosql exploded the industry, new players emerged, changed the mindset.
Natural presentations for the win
{ name: James, email: [email protected] } -- boss --\
|
V
{ name: Wife, email: [email protected] }
|
{ name: Cat, email: [email protected] } <----- boss --/
???
There is no spoon, everything is a graph.
-
Neo4j
-
ArangoDb
-
Any Engine can hold a graph
???
MongoDb driver
G = (V, E)
-
Node collection(s)
-
Edge collection(s)
-
Edge list
-
Adjacency matrix
-
Adjacency lists
-
???
Ad. list is used in examples.
g.V.has('name','hercules').out('father').out('father').name
MATCH (node1:Label1)-->(node2:Label2)
WHERE node1.propertyA = {value}
RETURN node2.propertyA, node2.propertyB
GetAllTheThingsQuery { people(name: "GQL", search: "Smith", first: 5) { name } }
???
Gremlin is the oldest.
Cypher is the native lanugage of the biggest player.
GraphQL got many hype and is fancy because of FB authority.
Back to the basics again.
{
"name": "James",
"?boss": {
"?name": "",
"?boss": {
"?name": ""
}
}
}
[
{
"name": "James",
"boss": {
"name": "Wife",
"boss": {
"name": "Cat"
}
}
}
]
???
WYRIWYG
- regexps
- d3js
- codemirror
- JS gems
- remarkjs
- 260 lines
- existing language
- WYRIWYG
- still a document store
- MongoDB driver
???
JS regexp object is stateful.
d3js is not exactly jQuery.
JS gem: ASI
-
regexp should be opt-in
-
typelessness is value
-
missing features: ordering, !count, etc...