際際滷

際際滷Share a Scribd company logo
弌从舒亢亳亠, 亞舒
仍亳 仂弍 亳仗仂仍亰仂于舒仆亳亳 Neo4J
于 于亠弍-仗仂亠从亠
仂亞亟舒
亳仆仂仄舒亳亳 仆舒
舒亶亠
舒仆仂于亳
仍亳从仂仄
仄仆仂亞仂
π壬亳于仆
亠亟于 仗仂亳从舒 亢亠
仆亠亟仂舒仂仆仂.
仆仂仄舒亳 仆亢仆仂
亞仂仂于亳, 亳仗仂仍亰:
亳仂亳 仗仂仄仂仂于
仄亠仂仗仂仍仂亢亠仆亳亠
于亠亟亠仆亳 于 仗仂亳仍亠
亳亰于亠仆亠 仗亠亟仗仂亠仆亳
Devconf 2014
Devconf 2014
magic
magic
亠仆亳亠
亰舒仗亳
仗仂仍亰仂于舒亠仍亠亶: 1 000 000
亟亰亠亶  仗仂仍亰仂于舒亠仍: 仂从仂仍仂 50
仆舒亶亳 仂弍亳 亟亰亠亶  亟于
仍舒亶仆仂 于弍舒仆仆
仗仂仍亰仂于舒亠仍亠亶
仍弍亳仆舒 亠仍亳仂仆仆舒 弍舒亰舒, 亠从. Neo4J, 亠从. 舒亶亟亠仆仂 亰舒仗亳亠亶
2 0,016 0,010 ~2 500
3 30,267 0,168 ~100 000
4 1543,505 1,359 ~600 000
5 亠 亰舒于亠亠仆仂 2,132 ~800 000
束 仂弍仆舒亢亳仍亳, 仂 Neo4J 弍从于舒仍仆仂 于 亳 舒亰
弍亠亠 仗亠亟亟亠亞仂 SQL-亠亠仆亳, 舒 亠从 亰舒仗仂仂于
仄亠仆亠 于 10-100 舒亰. 弌亠亞仂亟仆 Neo4J 仗仂亰于仂仍磳 Ebay
仗亠亟仂舒于亳 仆从亳仂仆舒仍, 从仂仂亶 亟仂 仂亞仂 弍仍
仆亠仄仍亳仄.損
个仂仍从亠 舒亠, 于亠亟亳亶 舒亰舒弍仂亳从, Ebay
clip
word
film
clip
word
next_clip
next_word
JavaScript PHP/Node.js Cypher
JSON JSON
HTTP HTTP
舒亰亠
仂仗舒于仍磳
亰仆舒亠仆亳
仗舒舒仄亠仂于
http://vangraph.info/server/fetch/clips/of/word/
you/limit/height/40/
{ word: you }
弌亠于亠
仗仂亟舒于仍磳
亳 于 亰舒仗仂
MATCH
(c:clip)-[:clip_word]->(:word {string:you})
RETURN
c;
clip_word
wordclip
string: you
var http = require('http');
var req = http.request();
req.write(JSON.stringify({
query: 'MATCH',
params: {
word: 'you
}
}));
req.end();
$r = new HttpRequest();
$r->addPostFields(array(
'query' => 'MATCH',
'params' => array(
'word' => 'you'
)
));
try {
$r->send()->getBody();
} catch (HttpException $e)
{  }
舒亰舒
于仂亰于舒舒亠
亠亰仍舒
{
data: {
collection: [
{ file: mov5.mpg,  }
{ file: mov96705.mpg,  }
{ file: mov803.mpg,  }
]
}
}
neo4j.org/develop/drivers
亞亳亠 仗仂仂弍
仗仂亟从仍ム亠仆亳 从
弍舒亰亠
console.neo4j.org
仂仗仂弍亶亠 仗亳舒
亰舒仗仂 仆舒 Cypher
舒仄亳!
MATCH
()-[r]-()
DELETE
r;
MATCH
(n)
DELETE
n;
CREATE
(:word {
string: "you"
});
CREATE
(:clip {
file: "mov34.mpg"
});
MATCH
(w:word {
string: "you"
}),
(c:clip {
file: "mov34.mpg"
})
MERGE
(c)-[:clip_word]->(w)
;
docs.neo4j.org/refcard/2.1/
亠仂仆舒仍仆舒
仍亳亠仆亰亳
仂亞舒仄仄舒
亟仍
舒舒仗仂于
仂亞舒仄仄舒
亟仍 弍亳亰仆亠舒 亳
仗亠亟仗亳亳亶
亠仗仍舒仆仂 $ 12 /亞仂亟 仆亟亳于亳亟舒仍仆仂
弌仂亟仆亳从仂于 < 4
仂仂亟 < 100 
仂仂亟 < 5 仄仍仆
个仂仆亟 < 10 仄仍仆
仂亟亟亠亢从舒 105 仂亟亟亠亢从舒 247
弌仂仆亠 亟仂舒弍仂从亳
仂弍于亠仆仆仂亠
仂弍于亠仆仆舒
仂弍舒弍仂从舒亞舒舒
舒仆亠仆亳亠 亞舒舒
仂仄舒仆仂
亳 仂亳弍从亠 于 仍ミ頴笑 舒亳
舒仆亰舒从亳亳, 弍舒亰舒 亟舒仆仆 仆亠
仄亠仆磳.
弌仂亞仍舒仂于舒仆仆仂
舒亢亟舒 仗亠仆舒 舒仆亰舒从亳
仗仂 仂仗亠亟亠仍亠仆亳 亳从亳亠
仂仍从仂 亟仂仗亳仄亠 亠亰仍舒
亰仂仍亳仂于舒仆仆仂
亰仄亠仆磳仄亠 于 仂亟亠 舒仆亰舒从亳亳
亟舒仆仆亠 仆亠亟仂仗仆 亟亞亳仄
仂仗亠舒亳礆.
舒亟亠亢仆仂
仂 仂从仂仆舒仆亳亳 舒仆亰舒从亳亳
于仂亰仄仂亢仆亠 弍仂亳 仂弍仂亟仂于舒仆亳
仆亠 于仍亳ム 仆舒 亠亰仍舒
舒仆亰舒从亳亳.
ACID - 舒仆亰舒从亳亳
舒舒 POST http://localhost:7474/db/data/transaction
{
"commit": "http://localhost:7474/db/data/transaction/7/commit",
"results: [  ]
}
仂亟仂仍亢亳 POST http://localhost:7474/db/data/transaction/7
舒于亠亳 POST http://localhost:7474/db/data/transaction/7/commit
从舒亳 DELETE http://localhost:7474/db/data/transaction/7
REST - 亳仆亠亠亶
亰仍 ~ 34 仄仍亟.
于磶亳 ~ 34 仄仍亟.
于仂亶于舒 ~ 68  274 仄仍亟.
亳仗 于磶亠亶 ~ 32 .
弍仄 亟舒仆仆 仂亞舒仆亳亠仆 仂仍从仂
舒亰仄亠仂仄 舒亟亠仆仂亞仂 仗仂舒仆于舒
仂从舒 亟仂仗仆仂 (HA)
弌仗舒亳弍仂 亰舒 于仆亳仄舒仆亳亠!

More Related Content

Devconf 2014