Webizing Python
Tim Berners-Lee
Talk at 10th
Python conference
Slides available at:
http://www.w3.org/2002/Talks/0206-python
- Python in the Web
- Python and web standards
- Web in python
Python is fun
- Thank you Guido
- Why I like it
- I am not a python expert!
What is Webizing?
- Make any language a web language
- Eg hypertext -> WWW
- Replace identifiers with URIs
- Remove centralizations
- Remove closed world assumption
File system
- Filenames can be considered relative URIs
- import http://www.w3.org/2000/10/swap/llyn.py ?
- urlopen etc get a long way
- Generalize metadata (file stat, HTTP fields, ect)
Online and Offline
- IOff-line things with URIs
- Optional: Deference them to get publisher's copy
- Optional: Look at information about them from other sources
- Persistent user-controlled program-accessible shared cache, please!
- Metadata about redirections and caches available
Metadata
- HTTP stuff - expiry, etags etc
- Module dependencies
- Module endorsement
Identifiers
- Namespaces (as in XML) in Python?
- Namespaces look like modules
- How to get namespaces into python? Use the "."?
- Fragment id for python? <furnace.py#minTemp>
Semantic Webizing: Weblike data
- Semantic web data is web-like (graph)
- Subject, verb object is general form
- No root
- Not one big graph but many different ones
- Graph is like relational database
- Can be sparse or dense
Python structures
- Sequence [ blue, grey, pink]
- Dictionary { color: blue, madeof: air, size: big }
- Graph { sky color blue, grey; madeof air . sea color gray. grey sameAs
gray }.
Dictionaries and graphs
- Nice: g.about[sky] = { color:blue; madeof: air} ?
- Nasty: Graphs can have >1 statement with same subject and verb
- Dictionaries can't have >1 value for each key
- Maybe g[sky] = { color: [blue, grey]; madeof: [air]} ?
- Graphs not always accessed subject->verb->object.
- Different stores have different abilities
Graph terminology
language: |
subject |
verb |
object |
database: |
row |
column |
value |
diagram: |
circle |
arrow |
circle |
RDF: |
(node) |
Property |
value |
Graph operations
APIs under discussion on www-rdf-interest
- g = g + { sky color blue }
- g.any( { sky color * } )
- for what, col in g.all( {* color * })
- more complex ones involve variables...
DAML-OIL-WebOnt-OWL
properties of properties (verbs)
- Uniqueness, Unambiguous,
- Transitive
- Inverse
- Cardinality, etc
-> Smarter query processing
Notation3
Playing with Graphs
- Ids :sky rgb:color "#0000FF".
- [ :name "Alan"; contact:mailbox <mailto:kotok@w3.org> ]
foaf:friend :Joe.
- Graphs themselves as first class objects { :a :b :c} log:implies { :a
:d :c}
XML serialization (without {}) is RDF Recommendation
Using graphs inside Python
- Metadata from system
- Experience of python system itself
- Database interface API
- Parse/serialize any data
Web Services and Python
- Web services are in fact more than RPC
- But being compatible with the RPC layer is good too
- SOAP work in Python
"Servicizing" python?
Summary/Conclusion
- Python programs could be web-absolute
- Identifiers map to URI#fragid, Filenames to URI.
- Namespaces
Acknowledgements
Thanks to Aaron Swartz for his thoughts on this
matter
Thanks to the #RDFIG crowd on irc.openprojects.net and the openprojects
sponsors