Upload
barakmich
View
972
Download
0
Embed Size (px)
DESCRIPTION
Citation preview
JGD: Personal GraphsBarak MichenerMarch 10, 2010
Thursday, March 11, 2010
The Problem:From Tables to Graphsor, an SQL Query walks into a bar...
Thursday, March 11, 2010
Dinner Party
• Friends• Preferably Techies
• Networking
• Matchmaking (shhh)
• Vegetarian?
Thursday, March 11, 2010
Party.xls
Name Status Veg? Company
Bob Single TRUE Microsoft
Fred Relationship FALSE Yahoo
Mary Single FALSE Google
Sue Single TRUE Apple
Thursday, March 11, 2010
Party.xls
Name Status Veg? Comp1 Comp2
Bob Single TRUE Microsoft
Fred Relationship FALSE Yahoo
Mary Single FALSE Google Apple
Sue Single TRUE Apple
WRONG, but very common
Thursday, March 11, 2010
An SQLish SolutionName Status Veg? ID
Bob S Y 1
Fred R N 2
Mary S N 3
Sue S Y 4
Comp_ID Name
1 Microsoft
2 Apple
3 Google
4 Yahoo
Person Company1 1
2 4
3 3
4 2
3 2
But now we’re getting complex.I just wanted to plan a party.
Thursday, March 11, 2010
Today’s Semantic Web<?xml version='1.0'?><!-- If you are running a bot please visit this policy page outlining rules you must respect. http://www.livejournal.com/bots/ --><rdf:RDF xml:lang="en" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:ya="http://blogs.yandex.ru/schema/foaf/" xmlns:lj="http://www.livejournal.org/rss/lj/1.0/" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:dc="http://purl.org/dc/elements/1.1/"> <foaf:Person> <foaf:nick>barawulf</foaf:nick> <foaf:name>Barak</foaf:name> <lj:journaltitle>Barak's Livejournal</lj:journaltitle> <lj:journalsubtitle>rantings of a geek leader</lj:journalsubtitle> <foaf:openid rdf:resource="http://barawulf.livejournal.com/" /> <ya:country dc:title="US" rdf:resource="http://www.livejournal.com/directory.bml?opt_sort=ut&s_loc=1&loc_cn=US"/> <ya:city dc:title="Berkeley" rdf:resource="http://www.livejournal.com/directory.bml?opt_sort=ut&s_loc=1&loc_cn=US&loc_st=&loc_ci=Berkeley"/> <foaf:img rdf:resource="http://l-userpic.livejournal.com/52234957/2173900" /> <foaf:page> <foaf:Document rdf:about="http://barawulf.livejournal.com/profile"> <dc:title>LiveJournal.com Profile</dc:title> <dc:description>Full LiveJournal.com profile, including information such as interests and bio.</dc:description> </foaf:Document> </foaf:page> <ya:blogActivity> <ya:Posts> <ya:feed rdf:resource="http://barawulf.livejournal.com/data/foaf" dc:type="application/rss+xml" /> <ya:posted>149</ya:posted> </ya:Posts> </ya:blogActivity>
...and we’ve just got started (316 lines)
Thursday, March 11, 2010
Let’s start over
• Goal: Represent Data
• HTML circa-1996 Simplicity• Complete with “blink” tags
• Proposal: Use JSON!
Thursday, March 11, 2010
Demo
Thursday, March 11, 2010
1: Graph Data is Simple
Thursday, March 11, 2010
Personal Graphor, What does it take?
Thursday, March 11, 2010
What Do I Want?
• Easy Relationships
• Easy to Edit
• Easy to Query (MQL)
• “Personal Freebase”
• Don’t want the complexity of RDF
Thursday, March 11, 2010
The Conflict
• Freebase is cool and powerful
• Never, ever want to load this data
• Graph databases are hard to set up
Thursday, March 11, 2010
Enter JGD
• JGD == JSON Graph Data
• Tool for manipulating a personal graph based on JSON files
• A mini, personal, MQL and Graph implementation
Thursday, March 11, 2010
Demo
Thursday, March 11, 2010
Graph Merge is Powerful
Bob
Sue Mary
Bob
Mary
Fred
Phil
test1.jgd test2.jgd
Thursday, March 11, 2010
Graph Merge is Powerful
Bob
Sue Mary
Bob
Mary
Fred
Phil
jgd2 cat test1.jgd test2.jgd
Thursday, March 11, 2010
Demo
Thursday, March 11, 2010
Some Stats
• First demo was 685 LOC
• Rough equivalent checkout of Freebase stack ~800MB
• Command-line ready
Thursday, March 11, 2010
2: Graph Data is Powerful3: Triple Stores Aren’t Scary
Thursday, March 11, 2010
Into the Cloudsor, “First step into a larger world”
Thursday, March 11, 2010
Great, but...
• Small datasets, bigger questions
• How can I include *more* data?
• Answer: Strong identifiers
Thursday, March 11, 2010
Demo
Thursday, March 11, 2010
Full CircleName Status Veg? ID
Bob S Y :bob
Fred R N :fred
Mary S N :mary
Sue S Y :sue
Comp_ID Namefb:/en/microsoft Microsoftfb:/en/apple_inc Apple
fb:/en/google Googlefb:/wikipedia/en/
Yahoo Yahoo
Person Company:bob fb:/en/microsoft
:fred fb:/wikipedia/en/Yahoo
:mary fb:/en/google
:sue fb:/en/apple_inc
:mary fb:/en/apple_inc
Thursday, March 11, 2010
Full Circle
• MQL results are valid JGD!
• “Pull” in more data
Thursday, March 11, 2010
Demo
Thursday, March 11, 2010
4: Strong Identifiers Connect the Data Cloud
Thursday, March 11, 2010
Where Do We Go From Here?
• In-browser graphs• Microdata, Faceted Browsing
• Simple MQL implementation• SPARQL translator?, other adapters
• Sharing data (cat, push, pull)
• Queries are subgraphs
Thursday, March 11, 2010
Thank You
Join in! Fork jgd on github:
http://github.com/barakmich/jgd
Thursday, March 11, 2010