Fork me on GitHub
#rdf
<
2022-12-06
>
rickmoynihan13:12:57

@bartkl: For me one of the biggest benefits is that RDF is property centric; where as the relational model is entity or class centric. So it’s much more flexible; you can attach a property to anything, whether you own it or not. In a relational database you need to add a new column to the entities table. I spoke about this in a presentation I gave recently called unpopular ways to make better APIs; which was really about information modelling… though I’ve just seen that the organisers of the groups have deleted their youtube account and all the recordings 😞 This is basically why it’s more suited to data mesh architectures. Decentralised is always harder than centralised. So I suspect most of the push back is due to that, rather than anything else. The slides are here: https://drive.google.com/file/d/11CgMZbLxHUxVrx-l5gk9dIah5l-TcrFH/view (though I think I shared this presentation with you before). Other benefits are reusing existing ontologies/vocabularies… depending on what you’re doing you can often just pick up and specialise models that others have developed.

👀 1
Bart Kleijngeld14:12:55

Hey Rick, thanks for sharing. Yes, I watched that presentation before, love it! The property-first perspective is what really compels me to prefer RDF as well. And indeed, we are already using all sorts of existing ontologies, such as DCAT, Dublin Core standards and QUDT. It seems to me this is a lot easier to link (it's for a reason it's called "Linked Data" I suppose 😉) than it would've been with something like UML. Do you have any thoughts on that/experiences with that?

rickmoynihan14:12:48

I’m not sure I understand the question; can you reframe it?

Bart Kleijngeld14:12:28

Sure. I guess I'm asking: do you know how one would achieve such reuse of existing models/ontologies/standards with UML? And if it's perhaps limited in what you can do there? I don't have much experience with it, and I'm trying to really pin down at what point(s) RDF is simply more suited for data modeling than UML.

rickmoynihan15:12:57

Sure I can have a go, but I’m not really a UML expert… Also I’m not sure exactly what dimensions you’re comparing to UML; or what sense of modelling you’re referring to, when you’re comparing RDF/UML. The first thing that comes to mind is that it seems the comparisons are a bit vague and hand-wavy… i.e. UML as I’ve tended to understand it is mainly about discussing and designing systems and to some lesser extent requirements, use-cases and their constraints… essentially coming up with blueprints so an architect at the top of the pyramid can instruct people further down what they need to do to implement things. So blue prints are really communication tools, not software artifacts. Now when UML was formed, there was a consortium of companies led by the likes of Rational (now IIRC part of IBM), who wanted to take those semi-formal descriptions and use them to do code generation… e.g. convert a class diagram into a bunch of skeleton class and interface definitions. I toyed with some of those tools as a student in the late 90's, but I’ve never used them for real; nor have I ever been on a software project where that sort of workflow was used (or had any actual benefits). The main exception is the relational database schema development tools, where they are used and definitely do have some utility. So I think you might be referring to modelling in two senses: 1. a document/design tool which inspires/guides the development, but isn’t directly used. 2. something more like a schema or a real software artifact which is maintained alongside code etc. RDF can be used for either or both. It can be augmented by UML, for example many RDF vocabularies use things like class diagrams to describe their use… e.g. dcat and the rdf data cube. RDF is also obviously a data standard; where as UML is a standard notation for pictures — so in UML you can share pictures; but sharing beyond that I suspect will just be sharing rational rose files, or plant UML snippets.

rickmoynihan15:12:32

Again I suspect the most important difference depends on how much you need centralisation/decentralisation.

rickmoynihan15:12:50

If you can make one schema to rule them all; then stick with a relational database. If the requirements push you to supporting many perspectives simultaneously; and extensibility etc with the ability to interoperate with some effort then RDF gives you a technology which you can hang political solutions off. For example if you want to achieve a compromise between people; and aspire to levels interoperability; vs tight integration.

👍 1
Bart Kleijngeld15:12:04

Sorry for being vague before. Nonetheless I'm learning a lot from your response. > If you can make one schema to rule them all; then stick with a relational database. This is what we don't want anymore. > If the requirements push you to supporting many perspectives simultaneously; and extensibility etc with the ability to interoperate with some effort then RDF gives you a technology which you can hang political solutions off. This is what we are trying to implement. To clarify: we are a large company with the desire for a decentralized view on our data. Different departments should have some freedom to contribute to the totality of our (distributed) data model. Open world, AAA, very much Semantic Web candidate, right? 🙂 So, I'm on board on why RDF is a perfect fit here. I'm virtually breathing it throughout this story. What I'm looking for is insights in why UML is not a good choice for this use case. I feel convinced by this, but I want to have a proper justification, which is rather hard given my experience with UML is very limited.

rickmoynihan15:12:40

>> If you can make one schema to rule them all; then stick with a relational database. > This is what we don’t want anymore. >> … > This is what we are trying to implement. Hence I suspect the backlash is around this transition — rather than RDF as such. I mean sure the RDF tools often aren’t as mature as elsewhere; but assuming this decision is the correct one, I don’t know where else you can go… You need to accept that the trade offs are worth it; and that there may be localised downsides which you’re trading for systemic wins. Also, if you need meta-schemas you might be pushed towards RDF. For example the work I’m doing (helping government connect statistics) means that you can’t dictate a single schema; as every dataset essentially requires its own schema — but the datasets can share, and we can target tooling around a meta-schema (for us the RDF data cube). > What I’m looking for is insights in why UML is not a good choice for this use case. This is why I said all that stuff about UML 🙂 — for me UML is primarily just a communication diagramming tool, and it’s orthogonal to RDF/Relational etc… i.e you can still use it in combination with RDF. I suspect when people on your team say UML what they mean is some kind of entity-relationship-diagraming schema generator; that writes the DDL for them…

🙌 2
Bart Kleijngeld15:12:31

Ahh right. Things are starting to make sense now. Paula also mentioned UML and relational are orthogonal, probably meaning to tell me the same thing.

rickmoynihan15:12:24

Yeah; UML is huge - it’s something like 15 different types of diagram. Which bit do people mean?

Bart Kleijngeld15:12:12

Right, so, it's certainly clear to me that I can generate PlantUML from my RDF graphs (RDFS/OWL in particular, or any schema-providing language). It's just that people are afraid they can't use visual modeling tools anymore once we move to OWL/RDFS. Perhaps this assumption is wrong? I don't have the answer. Many of our architects are afraid to write Turtle, and love to draw diagrams in tools such as Enterprise Architect, Bizzdesign (I believe), and TopBraid's Composer

Bart Kleijngeld16:12:19

Ah right, so I think what you were getting at is that you can do your UML modeling just fine in some visual tool, and then have it be serialized in RDF? (if the tool supports it) Of course, OWL is another story, although there seem to be mappings from UML to OWL

rickmoynihan11:12:20

It’s almost but not quite what I’m saying, though the conclusion may be the same… I’m saying that as I understand it UML is really just a standardised notation for diagrams… so you can use UML on a whiteboard and much of it will work just fine for RDF too. Those software tools aren’t really “UML”, they’re specific tools with their own features that can draw diagrams in the UML notation. They may let you export as RDF; but I suspect most won’t. If people are attached to those specific products and features, and are used to generating code from diagrams etc, then they may need to change their expectations… though there may be some products and tools in the ecosystem that can help here, I wouldn’t really know — as I personally use primitive tools — prose, turtle and occasionally protege / pellet for this sort of thing. Ultimately though OWL and UML are very different. OWL is a description logic, and it’s about deriving entailments and satisfiability constraints. So you’d be missing out on all that if you treat UML and OWL as isomorphic to each other. That said, I’d question whether you really need OWL at all… and also whether you’re fighting the right battle. i.e. as @U051N6TTC said you should persue the low hanging fruit first. So perhaps imposing OWL/RDF on people who want to use other systems isn’t the right way to go. What problems do you expect to solve? And is a more data-meshy approach not to simply let people do what they do already, with perhaps even more independence — and then only mandate that when you merge data that you interpret it as RDF via for example JSON-LD contexts etc… Then you can build generalised vocabularies for the domain that create the correspondences across localised (non RDF) vocabularies; and use that to integrate. i.e. I’d urge you not to start with OWL; but instead with simple mappings, namespaces and assignment of identifiers. Then move to common properties in shared vocabularies — and developing those.

rickmoynihan12:12:38

A colleague suggested this: https://chowlk.linkeddata.es/ You can load a diagram template for OWL into googles http://draw.io; then do your diagram there and save the diagram as XML and convert it into RDF/OWL. https://chowlk.linkeddata.es/notation.html

quoll13:12:22

This deserves another thread, but I'll say it here to keep it in context... From a practical perspective, UML does define a diagram spec, however it is actually a formal modeling language. There have also been efforts to describe OWL in UML, and more importantly, there has been quite a bit of research on automatically converting between the two. This is useful, because there is no good way to diagram out OWL descriptions except via UML. Unfortunately, while I've seen tools that will draw OWL as UML, I only ever once saw an open source tool that could take systems modeled in UML and export them as OWL (that one was a plugin for a UML tool and became defunct nearly 20 year ago). Some commercial systems exist, but bleh. I'm interested to see what might be possible with chowlk though, so thank you for that pointer!

rickmoynihan13:12:28

Oh they’ve also just pointed me at: http://owlgred.lumii.lv/

quoll13:12:48

I guess I'm more interested in a UML-style diagram. Chowlk looks awesome

quoll13:12:14

Otherwise, people tend to prefer protege

quoll13:12:02

Personally... I use Turtle, which I think makes me a little strange. But my friend and mentor (who has their name on many of the OWL specs) uses RDF/XML

🥶 1
quoll13:12:25

I cringe at this every time 😖

rickmoynihan13:12:36

RDF/XML!? 😮

quoll13:12:02

She's a masochist, and I tell her so :rolling_on_the_floor_laughing:

😂 1
quoll13:12:45

She doesn't care. She's been doing this for longer than I have, and she's good at it

rickmoynihan13:12:06

Re: UML, Yeah I’ve always thought of it as semi-formal… for example state diagrams clearly embody the formalism of state machines. However other diagram types don’t seem to be quite so grounded… though I don’t doubt they make claims to formalism. For example class diagrams were always described as being independent of any particular language implementation; but then what does it mean when you introduce multiple inheritance; or treat classes like RDF/OWL does as set intersections, and partial orders.

quoll13:12:34

UML can be mapped to other languages, though some features aren't available in those languages, yes

rickmoynihan13:12:14

I get you can convert between different semantics but people will naturally target a UML diagram for the langauge of their choice… or assume UML’s semantics… its use is often fuzzy and informal

quoll13:12:03

UML itself is very formal in its definition. There have been several attempts to build runnable modeling systems based on it (I was contracted by SAP Research to implement OCL for one such system in 2005). I was also brought in to consult on how the MOF (Meta Object Facility) might be expressed in RDF, so I got to see a lot more of how structured it is.

quoll13:12:39

However, most people use a subset, and use it informally. The full system does not seem to be as well known

quoll13:12:08

That's because it was designed by a bunch of computer scientists, who weren't really experts at marketing 🙂

quoll13:12:15

They still work on it today!

quoll13:12:13

In committees formed by the wonderfully named https://omg.org/

quoll13:12:07

On the https://www.omg.org/spec/ under ISO Adopted Specifications, you'll see that https://www.omg.org/spec/UML/2.4.1, though I guess it's getting on a bit now, since it was published in 2011.

rickmoynihan13:12:05

👍 thanks for clarifying correcting me

quoll13:12:46

I actually knew none of this. I had come across UML reasonably early in my career, and for years I used it as a way of documenting class structures. I had NO IDEA there was a formal spec... right up until I was asked to implement OCL :rolling_on_the_floor_laughing: (OCL is the Object Constraint Language, and it extends UML to provide a java-like syntax for providing extra constraints that UML is not able to express on its own)

quoll13:12:17

And then my friend Elisa started asking me to contribute to the OMG meetings on the MOF, because of the role I'd played in RDF and SPARQL

quoll13:12:38

(MOF = Meta Object Facility)

quoll13:12:14

The MOF provides modeling for modeling languages. i.e. it's a meta-modeling language. And it uses UML to define that.

quoll13:12:36

Of course, then it needs to model the UML. So there's a layer that does meta-meta-modeling (I kid you not)

quoll13:12:10

I find it all very amusing, but it's actually useful stuff

rickmoynihan13:12:23

TIL 🙂 Is the meta circular definition done as proof of completeness or coverage, or is there utility beyond that? What do people use it for?

rickmoynihan13:12:14

shudders CORBA

rickmoynihan13:12:17

TBH I can see the utility

quoll13:12:43

a) good question. I'm not one of those people, so I don't fully know 🙂 b) I believe it helps design modeling languages, identifying what they can and can't do, and formalizing them. c) Personally, working with it has helped me understand modeling much better, because people often step into meta-modeling without being aware of it

quoll13:12:02

And CORBA is awesome!

quoll13:12:13

I don't want to use it, but it's so cool 🙂

quoll13:12:18

I used to do CORBA in C++, and it was a really nice library to work with. It taught me to write my C++ libraries in a way that made it very easy for others to use (or so they said)

rickmoynihan13:12:45

I did use it a tiny bit once, but only enough to superficially hate it, and shallowly agree with everyone who hated it 🙂 I was into Jini back in the early days of Java though 😁

rickmoynihan13:12:13

Which I still think was cool 🙂 and obviously that shares a lot with CORBA

rickmoynihan13:12:25

except you have one language to rule them all — yay Java!

quoll13:12:15

CORBA let you do all of that, but with ANY language!

quoll13:12:27

Which, for the day, was pretty cool.

quoll13:12:49

then we had SOAP 😖 Then HTTP RPC Then REST Then all the data moved to JSON, still over HTTP (REST never really won over RPC, because almost everyone saying they did REST wasn't) Now there's GraphQL. It's become less "capable", but it's become far more accessible, which is what was really needed

rickmoynihan14:12:11

As I understand it not quite all of that; but yes it let you do a large part of it (the distributed object systems SOA bit). For example I don’t think corba let you do the fancy aspects of Jini; where clients could dynamically discover new services and interact with them…. In jini, you’d search for services via a java interface; and discover remote services that implement the interface, then download a client (stub) that knew how to talk to that service. It was all built on the java security sandbox… pretty cool. I agree entirely on the technologies being less capable but more accessible.

Bart Kleijngeld14:12:47

I'm not yet at the level of experience where I can entirely appreciate everything you are discussing, but it's really informative. By all means keep going 😉. @U051N6TTC Re: the level of formalism of UML: I have been told that it's poorly standardized. Do you know more about that? Apparently exporting my UML diagram in tool A and importing it in tool B can be troublesome due to that.

quoll14:12:15

That may be based on standards of serialization. The standards of the data model are highly specified.

👍 1
quoll15:12:07

I think that it’s covered by XMI, but I’m not entirely certain about that. The only UML “descriptions” that I know of are in graphical format. But I suspect that XMI would describe the connections, and not the sizes and locations of graphical elements. I can see there being some big gaps there. But I’ve never looked at the spec closely enough to know

Bart Kleijngeld15:12:50

Well, I just spoke with our senior data architect and he tells me the same story. That yes, XMI is used, and that the graphical stuff is excluded. So good to hear the both of you suspect the same thing. And what gaps do you mean?

quoll15:12:01

Well, if I have a tool that lets me draw UML, I might have a few classes, with subclass relationships between them, then properties referring to classes, etc. I could then translate these objects and relationships into XMI. Then I give them to another tool that sees the XMI, understands the relationships, and then plots everything at position 0,0 on the screen, because no one said anything about where to put anything

Eric Scott14:12:49

I'm glad I got a chance to see your talk before it disappeared. I enjoyed it a lot. Yeah Eric Evans has written a lot about Domain-driven architecture, and uses the term 'ubiquitous vocabulary', where a lot of effort is put into describing your domain in detail so that work spread over several teams is all aligned and everyone is on the same page. The fact that the 'D' in RDF is for Description really points to one of its key value propositions. You're just describing things.

👍 2
Bart Kleijngeld14:12:23

Our goal seems to closely resemble what Evans describes here. And yes, the "just describing things" character of RDF is great. You really get to focus on expressing what things are, with lots of freedom of expressivity.

curtosis20:12:18

Can’t believe I hadn’t joined this channel previously. Oh well, I’m here now. 🙂

🎉 6