https://github.com/conker84/nodes-2k19
Repository of "Streaming Graph Data with Kafka" talk @ NODES 2k19
https://github.com/conker84/nodes-2k19
Last synced: 2 months ago
JSON representation
Repository of "Streaming Graph Data with Kafka" talk @ NODES 2k19
- Host: GitHub
- URL: https://github.com/conker84/nodes-2k19
- Owner: conker84
- Created: 2019-10-06T18:58:23.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-10-06T19:18:48.000Z (over 5 years ago)
- Last Synced: 2025-02-10T15:50:19.991Z (4 months ago)
- Language: Shell
- Homepage:
- Size: 42.5 MB
- Stars: 2
- Watchers: 4
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Repo of Streaming Graph Data with Kafka talk @ NODES 2k19
## Step 1
Execute the `docker-compose` file via the following command:
```bash
docker-compose up -d
```You'll find:
* Neo4j Browser @ http://localhost:7474
* Kibana @ http://localhost:5601## Step 2
Create some data by executing the fake data generator:
`java -jar kafka-connect-data-generator.jar`
This will populate Neo4j (as graph) and Kibana (as indexes)
## Step 3
We want to find the most important actors into our graph, and use the result of this computation to sort and reinforce the search operation over Elastic indexes by a hypotetic API
```cypher
CALL algo.pageRank.stream(
'MATCH (p:Person) RETURN p.id AS id',
'MATCH (p1:Person)-->()<--(p2:Person) RETURN distinct p1.id AS source, p2.id AS target',
{graph:'cypher'}
) YIELD nodeId, score
MATCH (p:Person{id: nodeId})
WHERE p.name is not null
CALL streams.publish('rank', {id: toString(p.id), entity: 'person', properties: {rank: score, name: p.name, born: p.born}})
RETURN nodeId, p.name, score
ORDER BY score DESC
```