At a Conference? Need a Dataset? Neo4j at NOSQL NOW
For the "Lunch and Learn around Neo4j" with Andreas Kollegger we wanted to use a dataset that is easy to understand and interesting enough for attendees of the conference.
So we chose to use just that days conference program as dataset. Conference data is usually well connected and has the opportunity for challenging data model discussions and insightful queries.
So we set up a Heroku instance, connected to a provisioned Neo4j database hosting an informational website. It explains Neo4j, the local installation, the Heroku add-on and lists available drivers for the different languages. We then used a small ruby script. with the neography gem by our community rock star Max De Marzi to populate the database.
From our example-data site, you can download the graph.db directory for your local Neo4j server.
02.require 'neography'
03.
04.def neo
05.@neo ||= Neography::Rest.new("http://localhost:7474")
06.end
07.
08.def has_rel(node, dir, type)
09.res = neo.get_node_relationships(node, dir, type)
10.return res && res.size > 0
11.end
12.
13.def add_talk(slot, title, speakers,audience,tags)
14.root = neo.get_root()
15.talk = neo.create_node({:title => title})
16.slot = neo.create_unique_node(:slots, :slot, slot, { :slot => slot})
17.neo.create_relationship(:at, talk, slot)
18.speakers.each do |name, from|
19.speaker = neo.create_unique_node(:speakers, :name, name, { :name => name})
20.neo.create_relationship(:presents, speaker, talk)
21.company = neo.create_unique_node(:companies, :company, from, { :company => from})
22.neo.create_relationship(:works_at, speaker, company) unless has_rel(speaker, :out, :works_at)
23.end
24.tags.each do |name|
25.tag = neo.create_unique_node(:tags, :tag, name, { :tag => name})
26.neo.create_relationship(:tagged, talk, tag)
27.neo.create_relationship(:tag, root, tag) unless has_rel(tag,:in, :tag)
28.end
29.who = neo.create_unique_node(:audience, :audience, audience, { :audience => audience})
30.neo.create_relationship(:for, talk, who)
31.end
32.
33.neo.execute_query("start n=node(*) match n-[r?]-m where ID(n)<>0 delete n,r")
34.
35.[:slots, :speakers, :companies, :tags, :audience].each do |name|
36.neo.create_node_index(name, :exact, :lucene)
37.end
38.
39.
40.add_talk("08:30 AM - 09:00 AM",'The Journey to Amazon DynamoDB: From Scaling by Architecture to Scaling by Commandment',
41.{'Swami Sivasubramanian'=>'Amazon Web Services'}, 'Technical - Introductory', [ 'Cloud Computing',"NoSQL Architecture and Design"])
42.add_talk("09:00 AM - 09:45 AM", 'Then Our Buildings Shape Us: A new way to think about NoSQL technology selection',
43.{'Tim Berglund'=>'GitHub'}, 'Business / Non-Technical', [ 'NoSQL Architecture and Design', "NoSQL Technology Evaluation"])
44.add_talk("09:45 AM - 10:00 AM",'Create Powerful New Applications with Graphs',
45.{'Emil Eifrem'=>'Neo Technology'}, 'Business / Non-Technical', [ 'Graph Databases'])
46.add_talk("10:30 AM - 11:15 AM",'Why and When You Should Use Redis',
47.{'Josiah Carlson'=>'ChowNow Inc.'}, 'Technical - Introductory', [ 'NoSQL Technology Evaluation'])
48....
49.add_talk("10:30 AM - 11:15 AM",'Intro to Graph Databases 101',
50.{'Andreas Kollegger'=>'Neo Technology'}, 'Technical - Introductory', ['Graph Databases'])
51....
52.add_talk("01:15 PM - 02:00 PM",'Lunch N Learn with Neo Technology and Neo4j',
53.{'Andreas Kollegger'=>'Neo Technology'}, 'Technical - Introductory', ['Graph Databases'])
54.add_talk("02:15 PM - 03:00 PM", 'Using Graph Databases to Analyze Relationships, Risks and Business Opportunities - A Case Study',
55.{'Jans Aasman'=>'Franz Inc'}, 'Technical - Introductory', [ 'Graph Databases'])
56.add_talk("04:15 PM - 04:45 PM", 'High performance graph database using cache, cloud, and standards',
57.{'Bryan Thompson'=>'SYSTAP, LLC'}, 'Technical - Advanced', [ 'Graph Databases'])
58.....
59.add_talk("04:15 PM - 04:45 PM", 'Introducing Hadoop and Big Data into a Healthcare Organization: A True Story and Learned Lessons',
60.{'Vladimir Bacvanski'=>'SciSpike'}, 'Technical - Intermediate', [ 'Big Data'])
61.add_talk("04:15 PM - 04:45 PM", 'NoSQL Data Modelling for Scalable eCommerce',
62.{'Dipali Trivedi'=>'Staples.com'}, 'Technical - Intermediate', [ 'NoSQL Architecture and Design'])
63.
64.
65.add_talk("05:30 PM - 06:30 PM",'The NoSQL "C Panel"', {"Robert Scoble"=>"RackSpace",
66."Bob Wiederhold"=>"Couchbase",
67."Dwight Merriman"=>"10gen",
68."Emil Eifrem"=>"Neo Technology",
69."Jay Jarrell"=>"Objectivity, Inc.",
70."Kirk Dunn"=>"Cloudera, Inc."},
71."Business / Non-Technical",
72.["Graph Databases","Hadoop", "MongoDB"])
So we chose to use just that days conference program as dataset. Conference data is usually well connected and has the opportunity for challenging data model discussions and insightful queries.
So we set up a Heroku instance, connected to a provisioned Neo4j database hosting an informational website. It explains Neo4j, the local installation, the Heroku add-on and lists available drivers for the different languages. We then used a small ruby script. with the neography gem by our community rock star Max De Marzi to populate the database.
From our example-data site, you can download the graph.db directory for your local Neo4j server.
CODE:
01.require 'rubygems'02.require 'neography'
03.
04.def neo
05.@neo ||= Neography::Rest.new("http://localhost:7474")
06.end
07.
08.def has_rel(node, dir, type)
09.res = neo.get_node_relationships(node, dir, type)
10.return res && res.size > 0
11.end
12.
13.def add_talk(slot, title, speakers,audience,tags)
14.root = neo.get_root()
15.talk = neo.create_node({:title => title})
16.slot = neo.create_unique_node(:slots, :slot, slot, { :slot => slot})
17.neo.create_relationship(:at, talk, slot)
18.speakers.each do |name, from|
19.speaker = neo.create_unique_node(:speakers, :name, name, { :name => name})
20.neo.create_relationship(:presents, speaker, talk)
21.company = neo.create_unique_node(:companies, :company, from, { :company => from})
22.neo.create_relationship(:works_at, speaker, company) unless has_rel(speaker, :out, :works_at)
23.end
24.tags.each do |name|
25.tag = neo.create_unique_node(:tags, :tag, name, { :tag => name})
26.neo.create_relationship(:tagged, talk, tag)
27.neo.create_relationship(:tag, root, tag) unless has_rel(tag,:in, :tag)
28.end
29.who = neo.create_unique_node(:audience, :audience, audience, { :audience => audience})
30.neo.create_relationship(:for, talk, who)
31.end
32.
33.neo.execute_query("start n=node(*) match n-[r?]-m where ID(n)<>0 delete n,r")
34.
35.[:slots, :speakers, :companies, :tags, :audience].each do |name|
36.neo.create_node_index(name, :exact, :lucene)
37.end
38.
39.
40.add_talk("08:30 AM - 09:00 AM",'The Journey to Amazon DynamoDB: From Scaling by Architecture to Scaling by Commandment',
41.{'Swami Sivasubramanian'=>'Amazon Web Services'}, 'Technical - Introductory', [ 'Cloud Computing',"NoSQL Architecture and Design"])
42.add_talk("09:00 AM - 09:45 AM", 'Then Our Buildings Shape Us: A new way to think about NoSQL technology selection',
43.{'Tim Berglund'=>'GitHub'}, 'Business / Non-Technical', [ 'NoSQL Architecture and Design', "NoSQL Technology Evaluation"])
44.add_talk("09:45 AM - 10:00 AM",'Create Powerful New Applications with Graphs',
45.{'Emil Eifrem'=>'Neo Technology'}, 'Business / Non-Technical', [ 'Graph Databases'])
46.add_talk("10:30 AM - 11:15 AM",'Why and When You Should Use Redis',
47.{'Josiah Carlson'=>'ChowNow Inc.'}, 'Technical - Introductory', [ 'NoSQL Technology Evaluation'])
48....
49.add_talk("10:30 AM - 11:15 AM",'Intro to Graph Databases 101',
50.{'Andreas Kollegger'=>'Neo Technology'}, 'Technical - Introductory', ['Graph Databases'])
51....
52.add_talk("01:15 PM - 02:00 PM",'Lunch N Learn with Neo Technology and Neo4j',
53.{'Andreas Kollegger'=>'Neo Technology'}, 'Technical - Introductory', ['Graph Databases'])
54.add_talk("02:15 PM - 03:00 PM", 'Using Graph Databases to Analyze Relationships, Risks and Business Opportunities - A Case Study',
55.{'Jans Aasman'=>'Franz Inc'}, 'Technical - Introductory', [ 'Graph Databases'])
56.add_talk("04:15 PM - 04:45 PM", 'High performance graph database using cache, cloud, and standards',
57.{'Bryan Thompson'=>'SYSTAP, LLC'}, 'Technical - Advanced', [ 'Graph Databases'])
58.....
59.add_talk("04:15 PM - 04:45 PM", 'Introducing Hadoop and Big Data into a Healthcare Organization: A True Story and Learned Lessons',
60.{'Vladimir Bacvanski'=>'SciSpike'}, 'Technical - Intermediate', [ 'Big Data'])
61.add_talk("04:15 PM - 04:45 PM", 'NoSQL Data Modelling for Scalable eCommerce',
62.{'Dipali Trivedi'=>'Staples.com'}, 'Technical - Intermediate', [ 'NoSQL Architecture and Design'])
63.
64.
65.add_talk("05:30 PM - 06:30 PM",'The NoSQL "C Panel"', {"Robert Scoble"=>"RackSpace",
66."Bob Wiederhold"=>"Couchbase",
67."Dwight Merriman"=>"10gen",
68."Emil Eifrem"=>"Neo Technology",
69."Jay Jarrell"=>"Objectivity, Inc.",
70."Kirk Dunn"=>"Cloudera, Inc."},
71."Business / Non-Technical",
72.["Graph Databases","Hadoop", "MongoDB"])
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/301743/viewspace-744995/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- NoSQL 新貴之崛起的 Neo4jSQL
- 瞭解如何在 Neo4j 的 NoSQL 資料儲存中持久化物件和關係。SQL持久化物件
- JavaScript datasetJavaScript
- China Internet Conference(2018.07.12)
- SECARMY VILLAGE: GRAYHAT CONFERENCE
- OPPO Developers Conference(2018.12.26)Developer
- From now on
- 【Dataset】Maple-IDS - Network Security Malicious Traffic Detection Dataset
- Microsoft Artificial Intelligence Conference(2018.05.21)ROSIntel
- Artificial Intelligence Computing Conference(2018.09.12)Intel
- China Cloud Computing Conference(2018.07.24)Cloud
- Intel Artificial Intelligence Conference(2018.11.14)Intel
- Tencent Cloud Developers Conference(2018.12.15)CloudDeveloper
- Mmdetection dataset pipline
- tensorflow dataset APIAPI
- Everybody dance now
- NoSQLSQL
- Need to set ‘serverTimezone‘ propertyServer
- Pytorch Dataset入門PyTorch
- image-classification-dataset
- JavaScript Date.now()JavaScript
- [Javascript] Why need arrow function?JavaScriptFunction
- Vegetables need more practice.
- 聊聊 NoSQLSQL
- Dataset和Dataloader的使用
- You Probably Dont Need Derived State
- E. We Need More Bosses
- 2022江西省賽K Peach Conference
- NoSQL 述評SQL
- flink batch dataset 的基本操作BAT
- dataset、setAttribute()和getAttribute() 區別
- NoSQL資料庫概念與NoSQL資料庫家族SQL資料庫
- Getting NOW() in your preferred time zone
- Neo4j簡介
- neo4j匯入
- 《精通Neo4j》前言
- 理解BERT Transformer:Attention is not all you need!ORM
- [譯] You Might Not Need ES6
- 【P5】Attention Is All You Need