New Ethereum talks, every Monday. The week's conference uploads by event, in your inbox.

Loading player…

J2 RF 07 James Pitts Linking Dapps together with Metadata

Ethereum ParisTue, Oct 9, 2018, 12:00 AM

Transcript

okay so this talk is about using metadata and decentralized applications something that has been called semantic aetherium and if you're if well I guess I'll start with Who am I I'm Jamie Pitts I help out at the etherium foundation at one time I was very much a fan of the Semantic Web and it went on for a long time and then I discovered a theory and some very I'm happy that that changed but I still I still semi-hard the Semantic Web is a very interesting effort a lot of resources went into it and I think we can learn from it even though it didn't quite pan out the way that Tim berners-lee wanted it to pan out so if you're going to start about talking about Semantic Web you should start talking about metadata and this is ironically the Google info box definition it's data that describes other data simple as that we often use it in our web applications but you know we might use it for SEO purposes but there's a real depth to it and there's there's a real theory behind it and there's a world of developers and especially standards developers working on it particularly with the w3c and the notion is that there's just it just goes deeper and deeper and data can be connected together to everything else so the the Semantic Web was this visionary project by Tim berners-lee in the arts and I think he first wrote about it or initiated it in 1999 2000 there abouts and so the the thing about Tim berners-lee he developed the original web and so because he did that you know there's a tendency at least in my heart to really listen to what he has to say and so I really tuned in I'm like this is very interesting stuff so he started with the current web and he said we can we can take just what's content and actually turn it into data and that we know who posts this data and that's a web of trust you can you can form trust and you can analyze that data knowing the source of that data and then in the deeper level it's a web of meaning that some meaning can be derived from it and all cut a whole world of services can can emerge from there and the effort has been going on for a long time and it's still going on they're still working on it and so a key aspect is to establish ontology x' which is how structuring the information especially relationships between different kinds of objects it's really similar to how you would design a database and web application and the key is once you've established ontology so you publish data about those ontology and normal web or otherwise and that data would refer to the ontology so that if you have a person that person would that that that data would refer to the untaught unta logical information about the person so you can you can reason about it and obviously this is not for normal users like you and I are not going to be browsing the Semantic Web enjoying that unless we really have an appetite for pain but it's really for machines and essentially that all all of the all these relationships which are loose they're not enforced the relationships between all these points of data because it's all over the web it could create a gigantic graph database and if you think about Google right what Google does it saw the web itself as a graph and and that's the origin of his success and the the notion is that that if you release this publishes data the entire web could become a database no index on that database but that's the job of aggregators and you can see from this diagram how things might be connected and it can get it just it could just go on and on and on as things refer to each other so here's a cool standard it's called sparkle and it it's published by the w3c and it's how you can query this graph data in a sequel like manner it's you know you can see from it it's not elegant like sequel but it's kind of its kind of alluring to see that and I was really interested in that when it came out now there's a conundrum to this when you loosely declare stuff it it's ambiguous but if you go really deep on describing things that's very burdensome for developers have burdensome for normal people to create these ontology to create this this data you know and obviously the Semantic Web did not go big it didn't take over the universe it didn't become anything like the phenomenon that were wrapped up in and but but the thing is that developed all these standards lots and lots of standards some of them very very ornate but no no nothing that a user would know hey this is a Semantic Web I'm using right unless you're like a domain expert and there's a famous article written by Cory Doctorow that calls a meta crap and he just goes into how because of the nature of human beings declaring this data there's going to be lies inaccuracies all those things all those things were quite used to on the Internet in general and so he you know he's a big doubt he's a big doubter of this um but the thing is metadata is widespread if your web developer you know you're constantly thinking about it for SEO purposes and just in general to be a good citizen so here's a couple of good examples of actual Semantic Web standard data being used when you get your email about your airline ticket Gmail is actually interpreting Semantic Web standard data and rendering that and even github actions those little actions there google has published a way that you can using semantic web standards create a github style those little nice dropdowns and of course Google has these info boxes which are kind of controversial Wikipedia like info boxes that comes from harvested Semantic Web data so if you think about when w3c standards are Co recommendations so what do they provide what is what are these recommendations provide one is linkage things are linked together and you know think about a link on a webpage you know pretty much universally we'll know what that is but there's a specific way Semantic Web data or metadata links to other day link refers to that ontology refers to other related data so that's linkage another one is descriptive descriptive meaning that's a second thing it provides another key is structural meaning you can actually create an ontology that has all these special relationships and just gets extremely ornate it's like you can just get lost in it and you can define something in the real world with just six you know excruciating level detail of a potential object and it's invalid like you could define ontology for microphones and you could just go to town on that I mean I'm sure I'm sure somebody has developed an ontology for microphones for an industry specific application now if you do these thing if you have those three things it provides what does it lead to you know as a publisher you have lots of options the data structured so it's much more easy to aggregate Google's advantage and any search engine is they just have huge engineering resources huge computational power you know then they apply statistics and they can analyze things and that's because the data that they're analyzing is so messy and that's how you know that's a big part of their their power position in my opinion being that the Semantic Web data's might be there it creates a potential value chain much like in aetherium ecosystem that we see in contracts the Semantic Web was potentially going to like you can layer new interests things on top of it and then new services coming from that and so how does it how does metadata do this how does Semantic Web standard data do this highly formalized assertions so like okay you're going to make some metadata about a microphone you know you're going to assert like okay that's colored black it's plastic that's this and that like all these different facts about it those are assertions and those will be structured the data format is called RDF it's a graph it has a really special format it's mentally taxing to Tevan grok RDF like it's very mentally it's very interesting it's I went I would recommend it but not to develop in it and it's layered on top of the current web Tim berners-lee wanted it to be decorating the current web like a light so so it it can piggyback on the current web and it has been doing that like if you open up any web page and look at the source there's tons of duck metadata all throughout that thing either declare it as a block of some data or inside the HTML tags it's just it's just woven in there and you can kind of see it you know how it's a sign like annotating annotating what's in the webpage like tables of data now one thing about Semantic Web data it's really interesting is say an ape like an API has a rigidity about it you know you expect a a an API to have these results and it's going to be like person and have these fields Semantic Web data allows you to express all kinds of concepts as long as you're referring to them Tollett the the ontological aspect properly you can expand in all kinds of data you have a person and you can put a dog in there you can just put all kinds of stuff in there and the aggregator could be able to in a comprehensible way query that data even though it's just completely mixed up with all kinds of different objects that's why that's why it's so excruciating in terms of needing struck like structure for that data so here I've given example it's kind of fun there's a there's a some people at Stanford a couple of years ago I can't figure it out if they did it you know just to kind of be mean-spirited or if they just did it for fun it's a Samana it's a piece of ontology and if you just google pizza ontology is there it's huge it's just like pages and pages of XML and it just describes everything a piece that could do and still be a valid pizza so if you took a hamburger there's no way it's going to comply with the pizza ontology because it doesn't have like all these properties all these relationships between objects like cheese and toppings and stuff so that's an so we'll make we'll use semantic Pizza because it's a little bit fun and this stuff is really excruciating um so thinking about linkage one key thing about linkage is a resource that's always there and this is one key thing about etherium that we have this great advantage you know we we have a permanency here and the current web like so much semantic semantic web data web pages everything dis vanish within a couple of years once that business goes out of business poof you know but there's potential for our ecosystem to provide the permanency permanent linkage and so here's the here's some things you might be familiar with from HTML you see these XML namespaces this is how you refer to things with Semantic Web data and you can see this is this is our DF right here I don't even want to go into why how RDF is structured and why it does what it does but this kind of gives you a notion that it's that it's linking to things out there and you can see how it's defining these namespaces like you see there you see there there's pizza referring to the location of pizza owl which is an ontology and owl follows an ontology and so if you go to that location you'll just see this giant chunk of text of the pizza ontology so you think of descriptive meaning types and properties you know much like a database odd you know a database table so think about assertion about Los Angeles this is the RTF format it comes in triples and so Los Angeles it's a type of city this is how you would tell a Semantic Web date like aggregator or query about like Los Angeles is a city that that thing in the middle there you have you have to you have to say it this way in RDF now here's an ontological assertion about pizza a topping is is a is a property or ingredient of a pizza and there's actually I would I'm certain somewhere in that piece ontology is aligned at an hour do you have to look that says that so here this is this is this is a chunk of XML that would would talk about descriptive meaning there's actually like a schema describing the notion of type there's this you know there's there's schemas for everything in semantic up everything can bagent you know starting with you know there's probably even one for nothing nothingness so structural meaning the relationships between these different objects that we've described so I'll take I'll take one some more exotic transitive property of ingredients so the ingredients of ingredients are ingredients of the whole and you know it's pizza like who cares right but you know if you're writing if if you're writing the application you might fill it you know the valid data to happen this is a very this this comes in handy and so there's in this owl standard there's tons and tons of these sorts of things like transitive property it all stems from that field of I don't even know the name of it on top ontological studies there's there's a field of study for this stuff and they haven't in a whole world of vocabulary for it and so reasoning with the transitive property so this is a kind of pizza that's fun in Asia and like Taiwan and Japan have these pizzas and it's crazy it's like the crust actually has little hot dogs and there's like little there's little ketchups on top of the hot dogs I can't believe people would eat this thing but this is a really good example of transitive property is to catch up on hot dogs an ingredient of the pizza if you would like to compute that if you'd like to prove that the Semantic Web makes it possible and you know of course you go through the reasoning and yeah you can prove it that you know this simple thing right here that this strange Pizza is still a pizza it's a pizza even though it's got hotdogs and ketchup and the ketchup is an ingredient of the whole pizza because of that and you know this is just like one of those tiny little corners of the Semantic Web but you know kind of illustrates the ornate nests of this whole initiative and there's no way that we're gonna do that and you know that might be why it failed and but but the thing is this person man who's Barney came along and he he really was a critic of the difficulties of this and he actually worked on standards at the w3c for many years and he came up he come up with an alternative and he's a founder of digital bazaar as well by the way this is very interesting person and so he wants to reform our DF he he he would like to add this this disability without without all the work and so he developed this thing called Jason Aldean and json-ld is very much more accessible than the ornate rdf as interesting as it is developers can kind of deal with this all you have to do is put this context in there and it's a little bit different but you can get the same sort of the sorts of expressiveness without going all the way just enough and so this is much more accessible for normal web developers and I think that this is an opportunity for theorem to actually participate and and construct something along the lines of a Semantic Web and so why would we do this why will we why would we use this this not failed but not known to the public and not fully expressing Tim berners-lee's full vision of of what he wanted to do why will we use this so the key is our data in our systems that we're gonna be building is potentially forever and you know you don't want it you you you have to think to the future and you have to think the the you know people are going to be looking at this and trying to figure out what you're trying to do and the weirder your solution to less conformed at the standards it is the more difficult is going to be in the future and you can cooperate on developing these ontology so if you have very lightweight ontology so you can work with other developers and then you don't have to keep redoing the same stuff in and in the various DAP objects that you're dealing with users and all these other things and in the key especially with the theorem because it has the truss it has so many these features that weren't present when Tim berners-lee was coming up with Semantic Web we can we're I mean we're almost we're developing ecosystems so rapidly it's amazing but if we had more structure we could do we could do so much more and one interesting thing about a theorem is we have tons of metadata already and you know ERC 20 is really good one I'm a RC 735 you know even documentation that's descriptive metadata and the key but structural like in the Semantic Web there's there's ways to validate but in our system it's it's much more rigid and that's a good thing they're either forced by the EVM or they're enforced by your gaps and so like how how might we go about it I I would I mean just they obviously think about it just go light just go light on it you know stick with thinks the developers are that's accessible to developers and one key thing that was really bothering me like in the last couple of weeks before I I'm giving this now is like how do you incentivize people to do this more work and if there's something here it's going to be from that those additional new layers and because of the because of the theorem itself you can get you can get paid and that's going to be very interesting the the future ecosystem built on top of your thing you get you get revenue from that and so like the key recommendations let's stop repeating like reinventing all these different common objects create schemas that are that are known and shared and there's a schema.org is really interesting resource basically they've packed it in with all kinds of common common use objects and json-ld very commonly refers to it many semantic metadata things referred to it and this is fun too browsers all kinds of things I don't think there's pizza in there they missed that one and so and obviously with with swarm put the json-ld on swarm and then refer to it in contracts in the json-ld in and swarm that just have them refer back it back and forth to each other between the contract and swarm the data on swarm and you know thing you can you can get the the highly structured benefit more expensive benefit of contracts and then just the immense storage capacity of swarm and ipfs and so like you think about these the lessons I guess I'm repeating myself don't burden the developers build things for ecosystems and take a look at the w3c standards there's many of them and they are a little bit of a you know rabbit hole like when some of these centers like owl you go down al rabbit hole like I did back in 2000 whenever and you know I didn't come out for a while you know I wouldn't recommend it too much but I think it's very important to go and review what's already been done out there as opposed to just kind of like hey I'm just gonna build this thing and you know like someone's else gonna build the same thing or practically in a different way learn from the Great's and they did a lot of great things they overdid it but they did a lot of great things so that's it if you guys have any questions and I'm interested yeah I built this presentation in HTML by the way it's kind of cool [Applause] yeah you were you were talking about shame at all and to build a tea rooms chair without tremor at all I would I would it be different and I would you where do you publish the shimmer off of your metadata yeah you would create a swarm resource for schemas like you would just pack like I would I would say I would see that you'd create a system of contracts so that you could version different schemas that you would develop and you can host all the schemas and as json-ld or as just our files traditional alpha I will fight like ontology files and you just put it on swore and put it on ipfs and you could just mirror schema.org and then just encourage people to refer to it like what they're gonna declare person make sure they say this is a person according to schema 'if schema Dottie or whatever it's going to be and so that's what I would think it would just be filled with lots of ontology documents and then contracts to maintain that system for versioning and you know just control

Automatic transcript — names and jargon may be misspelled.