 Yeah, we're three minutes, but we're live. Good. Thank you. Wow. Good room. Let's go because I have a full list of slides. So pitch me in the graph, most of all with gremlin. Anyone has been using writing already? One? Okay, so you're all beginners. You start from nothing, right? Good. I can tell you anything and okay, I seem to have a very young audience. If you want one of them, I can sacrifice one. But anyway, so, let me talk about gremlin, which is one of the languages to actually go into a graph and learn and extract data from it. So that's exactly what's on the agenda. I'm going to start working on presenting the graph itself, at least how we organize closer to the graph. I don't know. Okay, we're still live, right? Okay, anyway. So first part of the talk, where I'm going to tell you about the, well, if I have slides, I guess. Oh, that's the best here. We talk about, well, discovery of the graph, presentation of the graph itself. So you have the basis of the element. That's going to be very easy. There are two elements. There are notes and there are edges or however you call them. And then we're going to dwell on to the most interesting part, which is how to traverse, how to handle this big blob of data. Okay, it's not going to be like SQL where everything is nice and clean. Okay, column values and everything is understood in it, right? Everyone does that, right? Okay, here's the big mess. So we're going to see how to move like that. And I will finish by Graham and PHP itself, meaning that whatever I'm going to present you now, well, if you want to use it from PHP, of course, well, you need the link at the end. And I'll just show you at the end. So we skip the installation and the dirty, greasy details for the for the end. For those of you who don't know me, I'm the proud owner of the first elephant ever. That's my main achievement in life. I just, you know, I haven't torn it. I've been doing PHP for since the last century. And I'm probably the most, I would say, negative of a Belgium. That's possible. Yeah, I, I don't speak French. It's very, very badly, but whatever. And I give out to the country. So probably you take me, put it in a, you know, photo booth. And then I get you get a Belgium guy. So just a country. Anyway, how come do I do I end up with working with granny? Just because of that, I do for living static analysis. So I don't even run the code you plan to run. But before that, I actually tried to review it. So initially I did that on my own, you know, with my little hands, well, my little eyes. I realized it was way too much. Okay. Currently, it's like three o'clock. So I probably have already reviewed 12, two million lines of code since this morning. The machine is working for that on all the time. So basically it takes, it takes a piece of PHP, just break it into tokens and rebuilds the links there is between the lines of code and what's really happening. And you think about a little bit about it. It's more, it's not a table. You can put, you know, every if in one table and the switch in another one that the method calls in a third one, that's going to be a mess. You need relations between all those elements, whatever artificial they may be, and you want them into something that you can query. So that's exactly the experience. So one thing we're going to work on, and that's why we're going to, you're going to hear me listen and mention WordPress a lot, is that we're going to work on a very simple graph, which is the WordPress called graph. Okay. I chose WordPress because it's mostly functions. So you understand it's kind of easy. We take, you take one function, the function has a name. So that's what I'm going to collect. And from there, I know what are the other PHP functions that are being called. Okay. No namespaces. So that makes the wall of it very simple by itself. Most of the PHP function has been removed. So we won't have anything that's alone like that. Okay. Anyone understands what we're working on? Right? Okay. So if you understand what you're working on, then you're going to understand that because what I've shown you before that this concept of linking a function and its function called on the definition will end you up with that. So it's very easy. You can see there are nodes. And there are links. But there are a little bit. So that's actually the usual experience I have. Okay. I think about turning a network into something that I can understand. So I collect that. And the collection is usually kind of easy because here, what do I need? I need to tokenize PHP code. So there is the tokenizer extension for that. I collect the strings. I put that in. I just select the one that are important. And I put that in a dot format. And that's it. And then I try to understand what's there. And I don't know, right? I don't even know what to start with. Okay. It may be arbitrary, but when you look at a table, then you start at the top. I zero ID one, something like that. Here you don't have that. Where is it? Where is the number zero? I don't know. So we need a traversing language. And that's actually the definition for that. Traversal language, something that helps you navigate through the maids of the graph and will actually provide you with interesting data. That's what we want to end up with. Okay. And the one I discovered when I stopped looking for something that was not as well to support my static auditing was Gremlin. It was, I don't know, like four, five years ago, something like that. It was in version two. And we're going to work only on version three today, which is the current version since a year or something. So what is important? So first it's a domain-specific language, so it's going to work only for graph. Okay. You can apply that to something else. We will actually see how the concept can actually ooze into PHP. That will be the conclusion. It's a programming language. Again, I'm going to compare that with SQL. It is not something where you feel you have templates and you just feel a few keywords and you get some data. No, no. We're going to work. We can have variables. We can maybe not declare classes. That's going to be over here, I guess. But we can do lots of things. We can have loops. We can have variables, like crementations, filtering, you know, things like that. So that's the important part. It's open source. The code is online. It's actually an Apache incubator at the moment, so you can go and download it. It's vendor agnostic, so also we do not depend on one database. Okay. It's more standard as for that as SQL. You can apply that to many different databases. There's a list of them at the end, so when it's important to know that, you'll have the list. So the letters are here. G is V and E. They're actually the first thing that is actually kind of stressing when you start is that the vocabulary is not the same. Okay. So when we talk with Grammarine, we have graph for G, E for edges, and V for vertices. Simple enough. Vertex, if there's one. Okay. It seems like it's some kind of Roman language. And edges. You may also have people talk about nodes, links, and the data sets, or also objects and relations, and the data set again. Okay. So suddenly, two, three different words for the same reality. Okay. Be ready for that. It's not the same in the only situation where you'll end up with the same concept applied to different realities. So be ready. We'll try to stick with this one, although I've been learning that myself on my own, so I usually mix them. Please switch them from one to the other. First actor we have, well, we use the G here. That will be a recurring gag. G for graph, maybe for Grammarine. I don't want to exactly know which way it represents. Okay. But it's the default one we have. So we'll always start the query with that. And the first one are the vertices, which are the nodes. The object itself that are in the database. The big dot, red dot, no, black dot. You've seen in the first earlier cloud. That's it. We have that. What can we say from that? First, you get it. The full list of them is access release method. And if you just want one of them, every single node has an ID. So just like databases, all of them get one. Okay. The edges will get another one. But you start with that. If you ask for it, well, you get it and you don't get anything back. Okay. What you see here is really a method call. Okay. I have a first object, which is kind of special. We're not going to go into it any moment. We'll just wait for the rest. The rest are methods. And we're going to call methods. Each method are going to be linked with a preceding one. So a method will probably return an object vertex by itself. No details yet. Of course, we're going to be able to go into the details, but that's what you want at the beginning, the first one. If you want to go inside an object, well, the graph, most of the graphs are stimulus. Okay. So you can put anything you want inside an object in terms of properties. So if you ask for the object, of course, you get the object itself. If you want to go inside the properties, they're called values. And you can have the usual suspects in terms of value type. So strings, bullions, integers, reels, arrays, which is nice. So we can store full arrays in there in them. Arrays of arrays. Again, that can be interesting to have. But you can have them and you don't care if they find somewhere or not. Okay. You can always create one, destroy one. If it does not exist, it will return no. So in the time you end up with a no, then you're probably going to stop the whole query anywhere. So for example, if view one does not exist, then it's a no. The rest will be done and we end up with a no. Easy enough to do that. Nothing surprising, right? Okay. So let's move on. If you want to do some discovery, and again, when you're a beginner, that's a really useful tool, value map. Okay. You've seen that values will give you all the values itself. As long as you know the name, if you don't know, you want to discover what's inside the graph, then value map is going to return you everything in this format. Is it? Yeah. No. I don't know. Anyway, in an array here, it's interesting. Here, I move to another value. You can get the wall list or even just one of them like that. So in terms of discovery, when you don't know what's in there, you can start with a value map. That's an important. Our second concrete here, the edges. Okay. So we have the object. We now have to link them. That will be the work of the edges. They are stored conveniently into the big E method. You can access any edges by its ID, which also has an ID, and the two of them are separated. We actually won't care about that later. But they are too separated to them. They're two separated sets. And the only thing that's special about edges is that they always, well, they're free things. They can have properties just like we've seen for the objects. Okay. Same stuff. Properties, same values. So when you're crawling on the space, you can always, you know, check something along the edge. They have an ID. They have a start and they have an end, which are integers, which are the previous IDs of the nodes we've seen previously. Okay. And they also have a label. So that's why I put here calls. That's the one we're going to use. They always have a label. Okay. Our nodes can have a label, but it's not compulsory. They can have the same label for everyone. That's good. If they have different labels, then they will be, you know, probably indexed differently, but that depends on the lower underlying server. So up to now, it's okay. Nodes, we are okay. Labels, on the other hand, they're always, always, shall we put them together? Yeah. Yeah, of course we need that. At some point we'll have to do that. So edge discovery works exactly the same. On top of that, ID. So values for everything except for IDs and labels which are used by the language itself. Okay. They get a special method by themselves. Otherwise, when you get an E like that, it's an edge. If you get a V, it's a vertex. If you get a null, it's nothing. And otherwise you get an error. So shall we put that together? Yeah. Now we have the edges. Now we have the object. The main, the meat of Gremlin is, of course, to navigate through the network itself. So here is a very complex network. Okay. So then we have, we have like four objects and three links. I use the different IDs here so you can, we make the difference. I don't want to say, oh, this is H1 and this is linking the vertex one. They're all different, but they're probably, if you do that on your own, they will probably have one, two, three, four and one, two, three. Okay. That's normal. So from the edge, we said we have, we know the outgoing link. So we can, we can ask for out V, meaning I want the outgoing link and I need the vertex and we end up on two. So we say E5. E5 is this, this link. The outgoing is the one there. Okay. The ongoing, that will be the, the, the start. It will be on the, on the other side. Okay. This is called a directed graph. By default, all the Gremlin graphs are directed, meaning that they're always a starting point and an ending point. Okay. In general, you can have directed or indirect graph. So if you don't care, well, you just use, you know, out just as, as you like. We'll see another one, another one to, to do the movement in a moment. And there is a way to do the migration, the movement from any side. So the graph is good, but just information in it. So on top of that, following, following from an edge. So we've seen how to reach the, the edges of, well, the limits of an edge. If you are working from a node, then you will start with a V and instead of out V and in V, you'll get directly out. Out and in will just say, okay, if you follow the link that's are going from this link, then you'll go, tell me, tell me the list. You can see here from G1, G1, the incoming link, the incoming nodes from to one are only four. So I just get one result. Is it easy? Yeah. I like to see loading heads. On the other hand, you can have several layers, right? So if you want the out ones from V, coming from V and going outside, now we have two and three. And if you want all of them, you use both. Fair enough. And then you can get the list. If you really want to go inside the link and make some checks, then you can also mention the E. Remember when we go inside the E, and we want to go to a V, we have out V and out in V. Now if we are in V and we want to go to reach an E, then you just, just turns it in here. Okay. Now I think that's, that's probably an epiphany when I, when I was starting to work on that, that's the training. Then remember, I told you that, well, G is the start. That's bringing us a node. That's bringing us another node. So actually we could start chaining them. Okay. So let's say we want from the H2 and we want to see what is the ID of something that is in and in again. Okay. The first GV, I start with the ID. Then I go one way and I go another one. And I end up with the number four. And I can chain. And I can go one, two, out V, both, explode and start counting. Okay. I end up with a number. Okay. So I mentioned this is the graph. This is a number. This is a vertex, another, another. I end up with a number, with a number because here ID will say, okay, at that node, once I have found a node at that point of the traversal, I stop and I look into the node and I get a number. I cannot go on with another in at that point. Because it's a number. I am stuck. I'm in a property. There's nothing more I can do. Okay. We'll see later how we can extract something along the way. Yes. Here. Oh, it's just an example. We're going to move to something that is a little more, I would say, business like. Okay. We're going to move inside the database, the WordPress database. That's going to be more interesting. There you can stop thinking. That's more example. Yeah. It's going to be different. So remember you want to have a schema. Okay. It's schema less because we don't have any properties. If you want to remember the WordPress call graph, that's what it's going to look like. And actually on top of that, I should remove one of the function, right? Okay. Because actually we have only function types and this link. Very simple. So how come do we end up with that? Okay. I think I got 4,400 function definitions and I got something like 55,000 calls on the current version. Does that make sense? Yeah. For the current version, does it make sense? Like 4,400 functions in WordPress. Yeah. It's a pretty large piece of software, right? Including all the functions, I mean, all the inclusions they have, all the external libraries kind of make sense. They're using roughly each function as a means used 11 times. Okay. So can we find something interesting in that? So first, if we just convert, no, not one call. You don't use all of them all the time, right? Hopefully. Well, come to me. I'm going to reconfigure it. So the first, yeah, this. This if we start going, yeah. For example, yeah. It could be. It could be the function is still here. What press itself do not use it. But it's still there because they have previous version for which they want to provide backward compatibility. And that's it. How, well, it's way too early for me to answer that. Let me think. When I, when I reach the point where you can understand and so that, I'll ask you the query. Okay. Just a question. Yeah. So in WordPress, because you actually subscribed hooks and put the functions like strings. Yeah. No, no. For this example, no. No. Okay. Yes, that should be. I'm after me here. I needed a base with enough data so it could be fun and interesting. In the same time, I didn't check all the PHP special cases. So yes, you're right. And that was actually my first slide. There is one where they say, okay, apply filter and there is a name of a function. This is not taken in case here. But we're not going to, we're going to use it to navigate. Okay. So the simple version, if we, if we make it really large and just take a few elements, then we have one functions which are incoming calls. So those are the functions may call this function and they may, this function in its term may call something else. Okay. So if we want to just, you know, have a look at that form on this exact example, again, I start with an ID. I'm still stuck with that, but that will go away. I go out one, two, and I get the name. So I get those function names and I can call the incoming, the incoming functions on the other way. I'm not using out because this is directed graph. So I know which way they're calling one function is calling the other or the function is being called. I can know all the functions are calling VP set password, for example, by using the other one. Okay. Just application of what we've seen. Okay. So now question, would you imagine that WordPress? Okay. Yeah, let's move. I don't know what you're talking about. Now we're there. Now we're there. You know what? Please take over. That's good. Can we detect the number of WordPress functions that are actually recursive? What is a recursive function in our graph? In and out is the same. So that's interesting. We can start there. Get parent link. It calls get parents. Good. But this is not the same. So that's not a recursive function. Same stuff from the other way. What do we need here? We need to find a function that calls itself. Okay. At that point, you know how to move along the graph. You know you're able to go very far, but you don't know how to stop. So we need a little few more functions. Here are two of them. What I have on top, you know, well, GV is okay. Out is okay. Values are okay. What you need is two of them, which is as and retain. So the one we actually need directly is retain. Retain means that I will only let things go if it's the value that is provided here. Okay. So this is a filter that says if you give me a list of elements, I will only let those pass. And here I need to tell it which elements have to be passing. So I first name my element. So I start with something, for example, I start with this one. So, okay, that's myself. Now I go out there and I say, oh, is it myself? No, it's not myself because I name this one and I can understand that. And that's not the same. So I stop. Okay. Let's start again. I go there. Start 30. Okay. This is this one. I go out here. It's not myself. Here it's myself. So I can go on and I end up here. Then I got my name and I display the name. Does that answer the question? Okay. I don't remember how many exactly I found. Five or six. Does it make sense to have recursive function in WordPress? Why not? Of course. First, why not? There's no reason to be just a little surprising. Get parent, get category parents. This is for menu. Yeah, menu. Typical usage of things that we call each other. Well, the submenus we call the parent and the function is the same. Yeah. Come on. You've talked together, right? Wait for a slide. Because in between I have to show you that. The one we have done here, we said, okay, we start with this. We follow the call and we end up there. But it's a directed graph and we can move on the graph the way we want. Okay. If we can do that, then we can actually rewrite the same query and build it the same way, actually, but go it with the in instead of the out. Here is the same. Okay. Here I call the origin or I call the following. That's the same. Now you have this question. Could you find what I call ping-pong table functions? Okay. It's like, hey, oh, I have that. Hey, send you that. Oh, that's interesting, but hey, that's for you. Okay. Ping-pong function. How can we do that? We need an extra word. We need an extra filter that will actually filter things that are not ourselves. Okay. From what we've seen already, we know everything except, except. Oh, that's a bad transition. Thank you. Two of you are following. So we still have the retain. So what we want to do, we stop somewhere, we call and we don't want a recursive function. Okay. A ping-pong function is something, our two functions that are sending them each other probably the same value. Hopefully not the same, but they are calling each other. Hopefully they will stop at some point, right? But we want the first one not to be himself and on the other way, on the way back, we want it to be the same. Okay. So the first one we stop is 47. We call it, so we know what, what to compare it with. God, not me. Again, out again, me, and then I know my, my, my answer. And this will give me directly at least two answers. If there are none of them, that would be zero. Otherwise, I will get two of them. Well, actually not starting back with that. Okay. Anyway, if we don't start with the 47, then we'll get two of them because if this called that, then the contrary is good. So third guy, next question. So ping-pong, ping-pong function, so I actually found, found some. If we go on, we can do that with three, right? Yeah, yeah, that's what's easy to guess. I can do that with four. And I can do that a long time before you get fed up, right? So what do we need there? We just, we're just four. Yeah, it's fine, it's fine. I got two of them like that. So we can actually chain again, right? The first one, we don't want it. The second one, if we don't want it. The third one, maybe we could actually name the intermediate one so we don't end up with recursive functions. That could be an extra thing, but that will probably go out of the slide. So we go on, we go on. That could be nice to have a loop. So yes, there are loops. There are loops in Gremlin, which are commonly called repeat. They work with a subquery. So we are going to put between the parenthesis something that we want to repeat. We mentioned times. So we know how many times we want to repeat that here, three times. We can also have an until, until some condition is met. This is nice. So this is this first rule that really shrunks the size of the query. The other thing we have here is the emit. Emit itself will just emit anything that path through. So as long as I can run into that, the repeat will repeat itself. When it's done, the emit will say, okay, this value has been found once. I give it to you. If you put in it, in the emit, another filter except myself, while it's already there, but we could put except myself and not emit the thing. So we can do something in the loop. So the body of the loop may be complex. And when we end up at the end of the loop, we can have another condition for the emitting. Like, we don't, we just want the end of the loop or we want to emit anything we want, we find in between. That's interesting. And you can also put emit here or before. Then it will start immediately emitting. So it will emit the first one, like a do while. And otherwise, it will just repeat it once. No, that's a contrary. It will be a while, right? And otherwise, you can put it behind and it will just repeat that after or at least running it once. That's convenient, right? Can you do that as well? No. Yeah. So what have you, what have we seen up to now? Well, we've seen the node on the vertices we've seen in and out, which is the backbone of your navigation. You're going to use that a lot. We've seen a few filters except retain, in, without the label that's going to come, and the first loops. So now we're going to move to something more interesting. I'm still waiting for your question, right? But basically, traversing the graph is architecture around that. We're going to say, if I follow those, okay, I follow one, one, I start with a node, I follow that, that, that, that, that. And when I end up there, the whole story, if it's matching, then that will be my query. And I want to extract some data from that. That's exactly the chain I want to find, okay? I want to find one query that calls each other, okay, that calls itself, okay? That's exactly what we're doing. We just follow the path and then at some point make filters. If anything's end up at the end of the query, that's our result. So filtering, we've seen a few of them. Something, another one that is really convenient, I think, and I really like that is that you can actually add the extra label in the, in the edge you're moving on, okay? The example is not built for that because I only have one example, which is one edge, which is cool, okay? Imagine that you have classes instead of functions, okay? There will be classes instantiating, there will be inheritance, there will be extensions, extents and implements, for example. So different relations between all those tools, okay? And we can put all of them into those and say, okay, I want to follow and find an interface. I'm just going to follow implements, not extents, except if I start with a node, which itself is an interface, because interface has to be extended by another, extending another interface, while classes will be implemented in an interface. Two different behaviors, okay? That's a good one. If you have more than one, then you can put them just in a row that will work also, just the same. I'm going to use that alone, so that's kind of needed. Hello, internet. So if you want to filter on vertices, there is the as function. The first one says, does this vertex has a name? Whatever it is, is it defined? Is it not null? If it's not null, then it will pass, okay? If it's a null, then it will not pass, so it's not defined. Otherwise, you can put one value. You can ask it for it not to be the value. And those NEQ, you're going to see a few of them, or what they call predicate. They look like functions, and you can apply them. So here, not equal. There is another one which is equal. There is smaller, larger, things like that, all those operators. Strangely enough, there is, there's supposed to be a regx one, if you want that. But I've never seen it on Neo4j. For example, it depends on the server, on the underlying server. So there's a few of them, but not all of them. Within or without? You have a long list of elements. You can say, okay, if the name is in this list, then it works. But that's, that will be filtering, that will be filtering our nodes. Let's say, let's say we want to look for dying functions, functions that may end up calling VP die, okay? What do we get here? So notice that we don't know which are the functions. So we start with V. I don't put any ID anymore, okay? ID was initially good because I wanted to start from a point of view that you understand. Now we just say, okay, in the war graph, any of the, any of the verges, you follow one, and it must end up on the function that is called VP die. And then you show me the name. What do we get? Yeah, VP die, of course. What is important here? Basically, the query looks like that. I start with something, anything, everything in the, in the data sets are stopped. I flow something and I end up with, with VP die. And then there I say, okay, I want the name. But the name that I really want is the one that that beginning, not at the end, right? So the processing is important. Okay. Since we're changing things, start things are flowing through the pipeline and the wall, the wall query them. Yeah, we have to be careful. So how do we do that? Yeah, we run the other the opposite way. So we start with the function that is called VP die. Then we go inside and then we find the name of the function. And there we have a list of interesting things. Okay. So the graph is going one way, but we don't care. We are all the means we need to do it the way we want. Okay. So let's, let's use it this way. Okay. Actually, here for this example, it's kind of simple. You could actually end up with, you could end up with that situation. Initially, I use that and I didn't really care about the, the order of the query. Okay. So here we have the two of them and I introduce you with your good friend count, which makes sandwiches as you all know, right? So it's counting the number of units. And I say, I stopped with the God call, end up with VP die count for 84. If I do the other one the other way, I also get 84 because count just ended up counting the number of things that go through it. So we don't care if it's several at the same time. Okay. We, we, we, it was laughing, laughable for us to end up with all the names because they were all the same. But there are actually different results. We found another way to end up on VP die. And that's how we need to count. So at that point, one thing you want to make, if you want to make the difference is by adding dead up. Now did up, can you guess? Day duplicates. Yeah. I have no idea why the hell they only decided to have this one as abbreviated name. Usually they have long, you know, human rebel name. Okay. And the first time I got that like did up. It's like, what this is. Okay. Yeah. They duplication. So we have, I think there's another unique. Okay. I'll answer that. Okay. I think we'll see that later. There will, there is a little problem for that. Maybe the duplicate will be the same origin. I don't know. But this is the only one that's that has an abbreviation. So here I say, okay, got a function, you follow, you end up on VP die, you did up. So you only allow one instance of an object that has been reached, that has reached this point. And then you count. And of course, we end up with one. Okay. So no variety. On the other hand, if we do the same with several of them, then you have 84. I wonder if the usage of did up as a really ugly name is not made for one good reason here. It's a beautiful name. Is that your name, maybe? No? Okay. That happens. Here, what happens is that we scan everything, we follow, we end up on die. We actually end up with 84 elements and we just say, okay, I just want one. So we do a lot of work. We, we, we, we find everything and then we end up on that. On this one, it's a lot more streamlined because we just find the one we want, follow once and the first heat gives us directly all the results we want. We, we don't need the did up. It's completely useless. And we just manipulated 84 data. Here, if you have a million line, a million line to analyze, that's going to be a lot longer. So anytime you start using did up, what? You have to be faster. So on top of that, we, we've seen counting. So here is the, the count. There are a bunch of function interesting limits. Okay. Like in SQL range is the SQL limit, but with the beginning and the end. Okay. So you can get a number, tail for just the end. So that's interesting. There is coin also, which is nice. Just going to make a sample of that, just completely arbitrary and random. Okay. The number you have here is a percentage. So we get basically a percent of the elements, which means that you can, you can make, you want to test a query. You don't want to run it on the whole database directly coin. It will just make a number of them. Like once in a while, just going to give you a few data. So dying functions, back to the start. What do we need? Just rewrote it to introduce you with my good friend, select. We've seen again the, the, the as, remember? Okay. So I still use the out because it's interesting. What happens is I give a name of the element that's interesting me. I go out, do some checks. When I'm done, wherever I end up in the graph, then I say, okay, select, start. If you reach that point, if from there you can go out, find a way with IP die, then when you're done, stop, come back and get the thing called start by name. Okay. So the keyword here is select. Select will actually, at any point in the query, will move the, the cursor. If we call that, move it again to a place that has been made, a place you've been there. So you can, you know, go, find a, find an interesting node, go one way, come back, go another way, come back, do a third way, and then end up there. And in the same time, collect lots of interesting information. Okay. By here is not actually a functions. It depends on the previous method. Select, and there are a few others which may not mention by heart now, but select will say, first name will be displayed by name. So I mentioned a property, you display that property. I can actually say, start, start, mention two of them, and have two different properties selected from there. Or I could select several values, give them different names, and each time select, okay, the first one by name, the second one by ID, the third one by, I don't know, extension, whatever, whatever that means. So select and ask actually work a lot better than that we've seen. Okay. But yeah, that's exactly what I'm explaining. So let's imagine 10 minutes. Okay, let's finish with this one, the sub queries. Okay, here he's getting a little strange. I'm trying to look for functions that are calling both escape HTML and VP die. So someone that probably preparing some error messages, and then we'll actually push that to VP die, something like that. So since we have from what we've seen, okay, we start with the name, we go on, the first one has no constant, but that will be our result. So we'd name it. Okay, we don't care about what's a little bit that that's on our way. We go out, check the other function call, and then we select the results. So we know exactly the one we get from the middle, right? The order of processing is from here because we start initially with the VP die. And when we end up, we end up with the escape escape, right? So we do not, we do not start from where we want. And we do not end up again from where we want. We just have to use select to put to move everything back to the right place. Unless, of course, you use higher level, there is another function called where, which allows you to do sub queries. So you moved on the main, on the main graph. And at that point, you don't want to divert and have Gremlin go somewhere. We just want to do a little check on the side. Okay, that's exactly where he where say stop and go out, find a call if there is a VP die. Okay, if you find something where anything, a number, a node, an edge, VP, where we'll be happy, it will be considered a true. If it doesn't find anything and end up with a null, that it will be a false and will stop. Okay, so basically, I can now start from anywhere here, do a side, go to VP die. Oh, I found it, so I go back. And of course, we can do the same for the other one. Okay. And that will now look like that. Oh, and that's a miss. That should be a in, right? That should be a in. Why the hell do I have to add that? And that will be answering the question about did up, possibly. For out, actually, that's another typo. I just start with out and that goes, that goes. While on the other hand, when I start here, I have to start with underscore underscore underscore, represent the current node. Okay, which could make sense here. I could use underscore underscore, but here as a sugar syntax, I don't need it here. And that's, that's really puzzling when you really see that initially. Is that because, well, that should be in here. In is actually a keyword for Groovy. Who the hell is Groovy? Yeah, I mean, did I mention that up to now? Yeah, you have to show me another five minutes, right? Yeah. Actually, this, this engine is written on Groovy. So most of the code we have here, we have a programming language will be based on Groovy and Groovy as a keyword which is in. So we cannot start directly with in. It doesn't have a keyword called out. So starting with out is okay. But starting with in is not possible. So we have to underscore, use underscore underscore. This is there where we start, you know, seeing the limit between the, the language, the programming language and the underlying. There will be, I think they just published a C implementation of Gremlin. So possibly in this C explanation, in will not be a keyword and that will flow. So suddenly the standard is not exactly the same for everyone. Let's finish. If you want, oh yeah, our good friend count. So if you want to use aware and end up with something that is a negative, negative assertion, then use count and you make it equal to zero. And that's probably another type of. So let's finish with that. That's the full idea when you're writing a query with this language. You think about the way you want to traverse, then you think about the different conditions you have. It may be on the north, it may be on the side, it may be a little back trip, a side trip. And in the end, you mark in red the one you want reported. And that's how you end up with a, with a Gremlin query. So to finish, I'm sorry, I'm going to jump that. There's a filter which we see, we start using actually groovy code, okay? In the closures and there's a very interesting group count, group by, just the same as in SQL, but there's a group count. What I really enjoy with that is that you can have several group counts in the same query. Because actually the group count is just a counter. Just, okay, I get a node. I get a specification in it. I know what I want. I want to count the names of the function. So I collect that and I put that in an array. But I can do something with that, right? So I just show that to the next one. And the next one is another group count, which is now counting the number of times this function is being called. And I end up with one result and two different group count at the same time. That's interesting. So PHP and Gremlin, okay? Well, first of all, you can see that PHP is a lot better at logos than them. PHP for Gremlin, there is POM vert. Do not mistake that with POM. It's completely different, right? Yeah, yeah, yeah, great, great. So this one is POM vert. Gremlin PHP, it's on the Composer. So, okay, Composer install, you have it. There's a lot of old stuff for Gremlin 2. Make sure you start working Gremlin 3. Gremlin 2 is completely dead. But there's lots of servers running with it. So make sure that the one you choose is the one running. For example, OriomDB, which I will mention in a moment, is still running Gremlin 2. This is not what I've shown here. And they are going to move to Gremlin 3. It's on the way, but it's not done, okay? So just make sure when you make your choice that Gremlin 3 is the one that is being supported. Otherwise, from Neo4j, there's a plugin which uses REST API. How does that look like? Require once, use connection with the host and the graph being used, open, send, get the results, close. Someone hasn't understood? Okay, so that's very simple. From PHP point of view, it's very simple. I say that the meat of running the queries, rebuilding them, okay? Maybe fetching a number of information from your own PHP before putting that in the query with the usual injection problems, unless, well, no one knows how to use a Gremlin. So maybe we're safe for a moment. But that will happen, okay? So here, the version is 3. There is Gremlin initially, I think it was, there's one of those projects. It was initially 1, 2, 3, 4, 5 projects, okay? 5 different projects that were processing different parts of the graph and they most, they're from version 0 to version 3. You skip the 10 minutes, thank you. So each iteration, one of the project was merged into and finally it's only Gremlin. So just look for Gremlin or you can call that, it's currently called TinkerPop, okay? It's an incubator on Apache. You will find the information there. Now, I like say, Gremlin runs on different databases. I don't know if Maestro Mario Dibilla done it. The guy who wrote, Gremlin wrote Titan, so the integration is pretty tight. That's a good one. The stable ones I use for Gremlin, Neo4j, but Neo4j is running this, the show with Cypher. So initially, when I came, Gremlin and Neo4j were very good friends and that's, it was easy to set up, okay? I have to admit that I came to them with that. Nowadays, more and more, they're separated, so it's getting more and more difficult to use Neo4j from Gremlin and vice versa. But it still works, so it's okay. StarDog, I don't know, TinkerPop as a server by themselves and Rexter is the old server from Gremlin too, okay? One thing you have to understand, there is a server, the server itself may be the one that installs the underlying servers, okay? So there's a Gremlin server that you will tell it, okay, install TitanDB and you will be using TitanDB. At the beginning, it's a little confusing. I'm expecting to be Gremlin on top of that, but it's not the contrary. There's a Gremlin server which turns the query into something that's the underlying server understand. That's the way it works, okay? So basically you have to download the server, the console which you will be using to input your data and the server itself will run. There is an easy install from them all in common line and you have to use this common line, okay? And there it is. Well, thank you for staying with me. Yeah, that's me. I'm staying, well, I have to go, right? Yeah, three minutes for questions, but I'm staying here so if you want some more answers, I'll be able to answer. Yeah. Okay, I'm going to say no. I'm going to say no. The reason is Gremlin is the top-level language and it's actually relaying on the server to do the actual performance thing. So let me give you an example. Any time, do I have a query somewhere? That's not in Z1. Okay, anytime I start with that, for example, based on Neo4j, for example, just behind, instead of in and out, I make a label check. I check if my node is of a certain type. I have different types of that. The thing is, the Gremlin do not do any optimization for that. So we just say, okay, as label, good. And it shows that to Neo4j. Neo4j on the other hand, the first time he sees the label, he says, oh, do I have an index for that? Yes. Then a check. I have no way to create the index using Gremlin because Gremlin do not understand the index concept. I actually have to rely on Cypher. So when I set up the database, I call Cypher to build the index and then it will be used. But from Gremlin, though, there is no tool that will tell you, okay, you should do this way or you can do another one. The other trick I use is, as usual with databases, the less amount of data I manipulate, the better it is, okay? So after the GV, for example, or first check, I put a counter. I mentioned that you can include closure, okay? Groovy. So I use a little side effects. I didn't show that, but there's side effect. So I run a little counter and when I'm done at the end, I end up with another counter saying, okay, here is the number of data I processed. Here is the number of data that I have in the end. When I have too many of them, then I usually go back and say, okay, is there a way that I can make that faster? But at that point, no. This is the problem of the separation of this standard and the implementation. Sorry for the long answer.