So, the last thing we were looking at was this cascade connection, yeah, so this was the last sort of topic in passivity that we were doing, so you will have your tutorial of course, so hopefully you will have a bit more clarity. What we were seeing is if you have a passive system which is actually driving a stable system, then the passivity property is retained, ok, and you know that once you have passivity property and zero state observability, then you can construct a stabilizing feedback, ok. So, we have already seen this, yeah. So, along with back stepping, this is a very, very strong you know method for designing controllers, right. So, this becomes a another rather rather powerful tool, yeah, in your arsenal, ok. So, we also saw these examples of course, we saw the you know robot example, right, which was the case where you were talking about feedback passivation, right, that was the robot case. Then you also looked at the rotational dynamics, yeah. I tried to explain a little bit what these MRPs are and so on, but again like I said, we are not so concerned by how these kinematics are formed and so on. We are more interested in just working with the equations, yeah, because this is not a dynamics course. So, we are not trying to explain the equations, but as you can see it is this kinematics system was being driven by the omega, right. So, omega can be thought of as a control, omega is of course, the angular velocity and the angular velocity dynamics along with the output was this part, alright. So, this was and we of course, saw or at least you are supposed to prove that this is in fact passive, right. This is a passive system with this input and of course, some modified output, yeah. So, there is this feedback passivity and passivity are more or less identical, yeah, because if you apply a feedback, you get a new control with which you can get passivity, okay. So, you had this passive system with output omega and this output is driving this kinematics, alright and we figured of course, well I mean I asked you to figure that how you can select a controller and so on, yeah. And in fact, the control structure was also very obvious, right for this cascade case, the structure is actually given in this, you know, how we work this out, right. The structure is right here, right and that is exactly what we had here, right. And all I asked you to do in your exercise was to choose a particular W function. This W was essentially the Lyapunov candidate for the kinematics system and I asked you to choose this particular W and this again comes from the motivation for this is from the kinematics, yeah, from the MRP formulation, yeah. So, do not worry about how I got this, I did not get this magically or anything like that. Folks who came up with the modified Rodriguez parameters and started working with it for control design came up with this, okay. So, not all right. So, all I asked you to do was use this W here and take the partial and you get a control, okay. So, now you of course have already posted on Moodle, you have your exercise, right, which is this problem and the robot problem. So, these are as real as they get, right, you have a robotic manipulator system, you have a rigid body attitude control problem. So, you have both these problems and you have been given some numerical data of course, what is the inertia and so on and so forth, link lengths and things like that and you are asked to actually do the control, of course, complete the exercises and formulate the control and implement it in code, okay. So, you are expected to run simulations, all of you should have different looking plots, not same plots, try different initial conditions, yeah, I want the plots to look different, they should not be the same, okay. And that should give you enough exposure to, in fact, I have also asked you because we have not done any exercise on back stepping, I have also asked you to do a bit of back stepping design for the robotic system at least. And so this gives you enough exposure to the two key methods of control design we have learned, yeah. And really, really, I hope if nothing Antonio's lecture should have impressed upon you that almost every system you can think of is passive, yeah, everything is just an energy input output equation. The only thing you need to be careful about is what is the output to choose or if you have to do some feedback passivation that is you have to add some term to the control to make it input output passive, yeah. But this passivity seems like it is free because it just relies on, in fact it does not even rely on dissipativity, right. If there is no dissipation, you still have the less than equal to but if you have dissipation, you have the strict inequality and strict passivity and passivity, yeah. But in all the cases that we have been working on and which mostly Khalil, the textbook of nonlinear systems focuses on is just passivity. He is not looking for strict passivity because the strictness can be introduced using the feedback, right. I mean you can always add a negative definite term, you will get your strictness, no problem. So the strictness is not, you know, a limiting factor, yeah. So that should give you a good enough exposure. If you can do this, you know, assignment well, you simulate, you can get good plots, you would have, I mean I would think you would have learned enough in terms of control design, yeah, nonlinear control design. You will be able to pick up a system, I mean you may have some hiccups here and there but you will be able to pick up a system and design a controller, okay. You will be able, because these are two very, very far-reaching tools, yeah. In fact, back-stepping and passivity also are very closely related because you can use the back-stepping ideas to, if you remember, the idea of back-stepping was to just get CLFs, right. If you keep adding systems, you keep getting more newer CLFs, right. So you can use those CLFs as storage functions for the passivity. So it also helps you construct storage functions, yeah. You might be able to use that storage function to gauge passivity and then do a design, yeah. So these things can also be combined in a very nice way, all right. Okay. In general, the control that you design with passivity ideas will be simpler than back-stepping. Anyway, you will see that, yeah. You will see that in your assignment. All right, did. I was reading some reinforcement learning stuff. Yeah, this is a good one. You should also try to read. I mean, this is an article. It basically connects reinforcement learning to adaptive control. So basically reinforcement learning is control, nonlinear control in some sense, yeah. So if you try to do any real-time learning, because mostly, most of the learning that you will learn in courses, you will see that soft line because it's really data intensive. But if you want to do real-time learning, because that's where you want to go, because if you do offline learning with some data set, and then if your real conditions, don't meet that data set. For example, you did all your exercises in the day time, all your data was collected with a manipulator or with a quadrotor in the day time, and you did amazing learning of all your vision data, you did exceptional work. And then if you fly the quadrotor even in the dusk, not just not even night, if you fly it in the dusk time when the light is a little bit lesser or different, your learning will fail. So there is to be some online learning also. So reinforcement learning is actually feedback based learning. So it's actually sort of connected. So anyway, I was also reading stuff. Okay, great. So what we want to do is go to sort of the last key topic, last key compulsory topic in this course, which is on feedback linearization. Feedback linearization is also a design, control design method. Yes, one of the older, I would say oldest control design method does not rely on any Lyapunov theory at all. There is no Lyapunov theory here. It relies on vector fields and flows and things like that. Therefore, the theory is a little bit more complicated. Yeah, so I spend a little bit more time on this. But it's a very powerful tool in the sense that if you once you know how to use it, you can actually simplify your control design to a large extent. Okay, so what's the motivation? Okay, let's look at it. Just the pendulum, I keep bringing up the pendulum example. It's such a nice example for a lot of situations. If you look at the pendulum, this is the dynamics for this, whatever pendulum that I've drawn here. And if I write it with this state space notation, I get something like this, very standard nonlinear system.  Now, if I choose this feedback, what is this doing is basically cancelling this nonlinearity. You are used to doing this, by the way. And we have been inadvertently doing this in all our everything we've been doing, right? We cancel this nonlinearity. So what do I get? I get a double integrator, which is why I kept saying a lot of times to you that most mechanical systems look like double integrators are double integrators. Now, for this system, it seems rather simple. Let become a double integrator. It's a linear system. So what did you do? You use a feedback transformation, what we call this is called a transformation, because you used a feedback to construct a new feedback.  So, but the purpose of this feedback transformation is to linearize the system or make the system linear. I will not use the word linearize because by that, you have a different connotation, you think Jacobian and all that, we're not doing any Jacobian here. We applied a feedback, which basically cancels the nonlinearity. And therefore, you have a linear system as an outcome. What is the good thing about it? You can use linear control principles to now drive the system. I can even use, you know, whatever frequency domain methods, I can specify overshoots and all the nice things that people know about frequency domain methods. So, therefore, you have a lot more sort of playground to play with that everybody knows which is the motivation to look at feedback linearization to begin with. Now, if I go back and look at say, for example, a slightly more complicated system, which is say the robot dynamics. Yeah, you look at this system, it's not very obvious how it is feedback linearizable, but it's not that bad because you already know that this is an invertible matrix. Right? This mass matrix or the inertia matrix is an invertible matrix, right? We know that. So, I can of course, put in the inverse everywhere, right? Everywhere I get an inverse, excellent. Then I can write this as q1 dot is q2 q2 dot is the entire right hand side, right? With an inverse. Now, if I use my control to cancel all of this stuff out, just cancel it, right? So, I can apply a control you can see which is cq q dot q dot plus dq dot plus gq that will cancel everything, right? And then with a new control say m times v, right? Then m inverse and m cancels out again becomes identity and then I just have q double dot is v, again a double integrator, okay? Very simple. In these cases, it's very simple. Why? Because things are evolving in nice Cartesian coordinates. That's why this looks very simple, okay? But there are more complicated examples also. One such example is again something we've seen, this guy, okay? This is also feedback linearizable, right? We are not, it's not evident how, yeah? Because if you see here the nonlinearity is where in the kinematics, right? Whatever nonlinearity is here, it's easy to handle, right? I can always cancel this, right? Cancel the nonlinearity using the control, I'm done. So, this becoming linear too easy, no problem. The problem is that this is nonlinear, then how do you make the entire system linear looking, okay? But the fact is this system is also feedback linearizable, yeah? The question is how do you look? What are the new states in which it is linear, okay? So, feedback linearization is combined with state linearization, okay? So, you also have a state transformation and a feedback transformation typically, okay? It's not just application of a feedback, okay? Remember that. Whenever we talk about linearization, feedback linearization, although the topic is called feedback linearization, actually we are also doing state linearization, which means you are choosing appropriate state transformation, yeah? These transformations are nonlinear transformations, okay? Not easy linear transformations, okay? So, anyway, let's look at, let's go forward and see. So, anyway, yes. You mean the other lecture, yeah? Here? I think we discussed this a little bit. I mean, this is again a dynamical systems notion, not a control theory notion, but because it's a dynamical, it's a mechanical system, that's why I can say all this. Kinematics is just, see, rho in this case represents angles, actually. It's actually representation of orientation, right? So, it is sort of a position variable, if you think about it, angular position variable. So, anything that gives you angular velocity, the derivative of angular position, this is always called kinematics, okay? Same in robots, right? What is robot kinematics? It is the relationship between the joint velocities and the end effector velocity, yeah? So, x dot, y dot, z dot versus q1 dot, q2 dot, q3 dot. You have this Jacobian equation and all that. If you have seen robotics courses, you have a relationship between these velocities and this. So, this is exactly what this is, right? There is relationship between body angular velocity and the rate of the orientation variable, yeah? The variable is complicated and nonlinear, because if you remember rotation is represented as a matrix and this is just a parameterization. So, it's complicated, but still, it's still a rotation variable, okay? So, anything that gives you rotation rates as a relation with the body rates, it's a kinematics because it's relating position derivatives, okay? And then anything that gives you velocity derivatives, this is the angular velocity derivative, this is dynamics, this is the dynamics of the system, okay? It's just actually terminology, nothing more. So, this is the dynamics of the system and typically, this is where the force and the moments and all these appear, yeah? Okay? Great. Now, so that was the motivation that we can actually get rid of nonlinearities of some systems, yeah? In more often than not, we can only get rid of the nonlinearity partially, only in some states, not in all the states, okay? But we want to explore when, how, or how much can we do, okay? That's the whole idea. So, we start as usual with this nice control affine system, we are used to this, right? That the system is basically affine in the control. These are f and g are all in Rn. So, states are in Rn. So, f is a n vector, g is an n vector, yeah? We already know this is called a drift vector field, this is called a control vector field. Here, I have written in this way where there is only one control, which is scalar in like a single input system, you can of course, generalize it, just makes the presentation very complicated. Therefore, I restricted to single input case and everything is smooth, right? I have assumed all the nice properties. Notice also that this theory is very, very painful to present and talk about even if explicitly time appears here. Time appearing will make this whole thing very, very messy, yeah? So, invariably most, almost all feedback linearization theory that you will see is for time invariant systems or autonomous systems, okay? Actually, a lot of theories that we do is for that. That's why method like back stepping and so on are powerful because they will work irrespective of time varying and all is irrelevant, yeah? It will work anyway, all right? Excellent. So, we are focusing on control affine systems, autonomous control affine systems, single input, n states, all right? Great. Now, let's not worry about this guy. So, I mean, I was just trying to work out what these are, but I am not going to do it now. We already know this notation, but I am going to repeat this notation. What is the lead derivative? I hope you know this notation, yeah? What is the lead derivative? If you have a function, which is a map from Rn to R, okay?  The same things can be done in geometric spaces also, geometric manifolds also, but we are not doing any of that. If you have a map from Rn to R, yeah? Everything is smooth, by the way. Smoothness is a given, yeah? And if you have a function f from Rn to R, yeah? Then Lfh, okay? That is the lead derivative. This is the lead derivative of h with respect to f is just partial of h with respect to f times f, yeah? We have already seen this notation in this, when we were talking about the Sontag-Sussmann universal formula and things like that, yeah? This notation is pretty standard, yeah? So, all this and remember, h is a scalar valued function, yeah? This notation works only for scalar valued functions. If it is not scalar valued, this is not the correct notation. I mean, this notation is still used if h is not scalar valued, but then it means something else. So, Lfh is the lead derivative of a scalar valued function with respect to a vector field, yeah? f is a vector field, yeah? It is the drift vector field to be specific, yeah? That is how we are using this notation, yeah? It is just partial of h with respect to x, f of x, that is it, that is the formula. And you already seen, I mean, we have not talked about controllability or anything, but you have already seen that these lead derivatives play a big role in the universal controller design, right? They are, they form key terms in this universal controller design. So, obviously, these are very important quantities, okay? That is Lfh. Then we have what is called a lead bracket, okay? This is actually a bilinear, not a bilinear, it is a bilinear operation. It is a bracket operation, okay? This is, again, you are not going into too much of details. You can look at more details if you want. I have taken notes from Ravi, little bit of bits of his notes. You will see that there is more material other than that. So, I have taken bits of notes from him. And he has taken it from this book, okay? This is the absolute Bible when it comes to feedback linearization, yeah? For this topic, Alberto Isidore's book is the final word, pretty classical book by now. So, what is the lead bracket? It is a bracket operation that is it takes two vector fields, yeah? Here we had a scalar field and a vector field. It is a scalar valued function and a vector field. Here we take two vector fields. And what is the lead bracket? It simply is this operation, dgx fx minus dfx gx, okay? What is this dgx dfx? This is the Jacobian, okay? Just the Jacobian. This is basically, this is how it is written, yeah? But why I have used capital D instead of writing it like this, I have tried to make a distinction here because here h was a scalar valued function. So, this, what is the dimension of this guy? Anybody? What is the dimension of del x del x? h is scalar valued, x is n vector, yeah? So, typically the way I look at it is as a 1 cross n, a row vector, I have always look at it as a row vector. It is your call how you want to look at it because if I look at it as a row vector, then this multiplication makes sense, right? del h del x fx makes sense, yeah? Otherwise, there is a little bit of a problem, right? Or you can look at it as an inner product between the two also, yeah? Anything is fine, your call. You can look at it both as vectors and you can look at this as an inner product between the two, yeah? Same deal. Fg is basically dgf minus dfg. I do not write it like this, I use this because g is actually now a vector valued function, right? It is a vector field, right? So, this will be a matrix and n by n matrix now. So, you can see that this, if you take the lee bracket of two vector fields, you get another vector field, right? What is a vector field? It is just giving you vectors as functions of state. That is it. That is why it is called a vector field, yeah? It is like saying that I take a point here, I get a, I get a, I think we discussed this also, right? If you take this sort of space and you have these many points, at every point I get a vector. This is a vector field, okay? It actually tells you how in what directions the systems can move, yeah? We do not talk about controllability again, but it is well understood that if you have the drift vector f and the control vector g, then you can also move in the f, g inner lee bracket direction. You can make the system move in this direction also, yeah? So, you see, right? I got a new direction to move in, right? So, it is almost like saying I have a car, right? I am saying that I can turn right by 90 degrees or I can go straight. I can only do two things with this particular car of mine. But then just by those two operations, I can also do the lee bracket operation, which I do not know. It may be some other direction, maybe 35 degrees in between, yeah? So, it is actually telling you that you can actually move in directions that are beyond the drift vector field and the control vector field directions, right? Because naturally, if you look at this expression, it would seem to you that you cannot, right? At least intuitively, it seems like this is just a scalar multiplying g, right? So, you are just moving in span of f and g, it looks like, right? You can only move in f direction and g direction, right? But it can be shown that you can also move in f, g direction in the lee bracket direction. Again, this is not something we are looking at right now, yeah? Let us not worry about it. But that is why these are important, yeah? Because these actually give you new directions to move in, yeah? And that is why determines controllability of a system, right? As many directions, if you can move in all the directions, if you have three dimensions, you can move in all three directions, you are done, which means you have controllability, right? At every point. But so, lee derivative, very critical, whenever we are looking at all these potential functions and the derivatives of potential functions along some direction, along a dynamical system, right? Lee bracket because it talks about new directions in which your control system can move, yeah? So, this is what forms the basis of all of feedback linearization, okay? Like I said, I take with permission these nodes. So, this is the system again, some, I mean, here he has specified some open set and so on. Let us not worry about it. So, if you take some output of the system now, okay? And you can see I have repeatedly used the same notation for the functions. I denote the output as h of x, okay? If I take some output h of x, okay? Then what is the derivative of the output? If I take the total derivative of the output, that is y dot, what will it be? It will be partial with respect to h, partial of h with respect to x, right? Times the dynamics, x dot, which is fx plus gxu. So, that will be what? So, if I actually write it out. So, y dot is partial with respect to x, yeah? And this guy is actually Lfh, the way I have defined it. This is Lfh, right? So, you need to get used to this notation. And this along with this is Lgh, right? So, that is why y first derivative is Lfh plus Lgh times u, okay? All right? So, that is pretty simple, okay? This is how the first derivative goes, okay? If I take the second derivative, now let us try to see what happens if I take another derivative, yeah? It is pretty simple because I will keep writing in the same notation, yeah? If I take derivative of this, it will again be partial of this with respect to x times fx plus gxu, yeah? But that is basically going to be the same as saying Lf square h plus Lgh times u, okay? You can work it out. It is very easy, yeah? Because it is just partial with respect to x and then you multiply by Lgh. So, it is actually pretty straightforward, okay? So, and so this will be the second derivative, okay? This will be the second derivative, yeah? So, if I keep doing this on and on, yeah? So, one of the assumptions that we typically make is of a relative degree of a system, all right? What is the relative degree of a system exactly defined by this? That Lglfk hx is 0 for all k from 0 to r minus 2 and it is non-zero for k equal to r minus 1, okay? This is called a relative degree of the system. It is nothing very complicated. It is very straightforward. It just tells you how many times I have to take the derivative of the output to get the input in the equation, okay? So, that is why I have actually taken this example. If you see this pendulum example, okay? Let us take this example, yeah? Suppose I take my ys, y equal to hx as the first state, x1, okay? What is the, what is Lfh, by the way? Lfh is first I take partial with respect to x. So, it is 1, 0 in the row vector, okay? Then I multiply it by the f. What is f? f is the drift vector field, this guy, right? The one without the control is f. The one with the control is g, right? So, I just multiplied it with x2 and this whatever minus g sin x, g over L sin x1 will be here and the product is what? Just x2, right? Is that clear? Yeah? This has to make sense to you. This is very simple. This does not make sense. You will have trouble later. Yeah? All right? Great. Now, if you see when I took my y and I took its derivative, all right? I have not computed an Lgh, okay? What is the Lgh? Let us compute the Lghx also. It is the same thing, 1, 0 multiplied by g. g is what? The control vector field. It is 0 comma 1 over ml square, right? That is this guy and the product is 0, okay? So, what does it mean? It means that y dot, I mean all this effort to do one, y dot is actually equal to x1 dot is equal to x2. You see that is the same x2 that appears here, okay? Because that is what I did. All this expression, all these g derivatives and so on, this guy, this guy is just to express the derivative, the total derivative of the output, subsequent total derivative. You see the control does not appear here because Lgh is 0. Now, let us take the next derivative, y double dot, second derivative. That is what? Is equal to x2 dot and that is what? This guy minus gl sin x1 plus 1 ml squared u, okay? So, what? Control is appearing in the second derivative of the output, okay? Relative degree is 2, okay? So, same thing will show up in the lead derivative also. Now, let us take Lf squared h, yeah? What is Lf squared h? It is basically the, you take this as h now and then do an Lf again. So, this is del partial of this with respect to x multiplied by f again. So, partial of this with respect to x is what? 0, 1, not 1, 0, but 0, 1. And if I multiply it with the same guy again, I get the second term, right? And that is this, alright? That is this. Then what? What about Lglfhx? Again, take this as, this is the Lfh, partial with respect to x is 0, 1 again, right? Multiply now by g, the control vector field. So, it gives me 1 over ml square and that is exactly the second derivative, right? Again, this is all this Lfh, Lglfh, all this is notation just to express the total derivative, okay? This notation just makes life, I mean, although as of now you might find your life more complicated, but actually this is supposed to make your life easy when you are doing calculations, okay? Because when you take recursive derivatives, you cannot keep doing x1 dot, x1 double dot. I just did a special case, right? How will you write the general case? So, you need this notation, okay? And that is the whole idea. What was the condition for relative degree r? It was that Lglfkh is 0 from k to r minus 2, okay? And that is the case for us, for the pendulum example. What did we have? We had our relative degree is 2. So, r minus 2 is actually 0, okay? So, what have we shown? We have shown that Lgh is 0, yeah? Because this is 0 means this is not there. So, Lgh is 0 is what we have shown, right? And then we also have that Lglfh, r minus 1 is 1 in our case. So, Lglfh is actually non-zero, right? We saw that. And as soon as Lglfh becomes non-zero, you see, I just did this, right? The second derivative contains Lglfh, right? Lf square which is non-zero already, but Lglfh is non-zero. So, in the second derivative control showed up because this term became non-zero, right? So, this Lglf, Lglf square, they will keep appearing now, okay? This is where this is a little bit more complicated because of the notation, yeah? But the idea is they are just trying to express the derivative, several rounds of derivation, yeah? Which you cannot express otherwise. There is no other nicer way of expressing this than this, okay? Because you have a dynamics coming in at every derivative, all right?


All right, so let's get started. Please keep quiet. As I mentioned last time on Friday, we started discussing the terrorism issue. It is something definitely of great significance on its own regardless of any specific region. But of course, Middle East, for a number of reasons, is one of the regions where terrorism is seen more often. And of course, with great casualty rates and a number of attacks, especially in Iraq, while the frequency and the overall number of attacks may have been decreased over the last couple of years. But still, whenever there is a suicide bombing or roadside bombing, perform or carried out with improvised explosive devices, which are called IEDs, of course, we keep hearing on the news that there are dozens of casualties, of course, big damage, human loss. These are very, very important issues. And this is a presentation that I made as the academic advisor of the Center of Excellence Defense Against Terrorism. And I got these flags from that center. This is, of course, courtesy to their trust in me in my work. If there is any question out there, you can ask me rather than asking your classmates who may not have the answer. So we will therefore discuss today in two hours, maybe on Friday as well. In just one hour, we will cover this terrorism issue. And I have the intention to conduct a little bit of a rehearsal on Friday, at least for, like, 10, 15, 20 minutes in order to prepare you for the next week's simulation so that you know what you are going to do and how you will act, what kind of roles you will have within your groups and within the overall simulation. Anyway, so starting with the subject, of course, it is always useful to identify the subject. And we discussed a little bit on Friday. And we emphasized that there are basically two issues with respect to the struggle against terrorism. One is definition of terrorism, that not everybody defines certain acts which may or may not involve violence as terrorism. And there is therefore deep divergences of opinion as to what constitutes terrorism or a terrorist act. And that this is something that is one of the biggest stumbling blocks in front of cooperation. And another issue, as we discussed also a little bit within this one hour on Friday last week, was the necessity of having proper intelligence. Proper intelligence, actionable intelligence that is necessary intelligence, reliable intelligence necessary in terms of the substance, the amount of information coming with that intelligence, and also reliable sources must be reliable. And also intelligence must not come after a terrorist attack is carried out already. So it must be timely so that the security forces or intelligence units may take steps to prevent any attack from occurring. And from time to time, we learn from the press releases or certain information that may leak to the press or from other sources that even though the large populations may not be aware of, there were several attempts, terrorist attacks, which were tormented and which were just prevented from occurring by the security forces, police, the ministry, the intelligence, whomever might be involved. So therefore, intelligence is one of the most important instruments, most important assets in the fight against terrorism. And it is also the area where cooperation is not only needed the most, but also the most difficult. So therefore, these are the two issues, intelligence sharing and difficulties in intelligence sharing and definition of terrorism. And of course, the divergence of opinion in the definition of terrorism. Having emphasized this, I believe, enough last Friday, I think we can go ahead with identifying the overall problem again, bearing in mind the two issues in definition and intelligence sharing are the important issues that we are dealing with in academia and also in the academic dimensions of the institutions who are dealing with this problem. As I emphasize here, the world is getting, of course, thanks to globalization. Globalization is not always something that may have brought with it a number of opportunities, but also there are certain difficulties. There are certain problems emanating from rather high pace of globalization. Well, there are certain issues which are definitely very good for the humanity. There are no borders. You can reach from one part of the world to the other part of the world, depending on, of course, what kind of transportation medium you may have. Or you can also deliver services to every single corner of the world. Thanks to the capabilities that are advanced with globalization. But this globalization also created a very highly interdependent and complex interdependence occurs, a highly interdependent world. And because of this, vulnerabilities of states increase, and certain threats are emanating just merely from this increase in globalization. So certain threats which may have been located, which may have been isolated in certain parts of the world, now have become also global. So threats have become global. And states, of course, not all of them, maybe not any one of them, not all of them are in though with necessary capabilities to deal with them. So it is therefore essential that states bring together their capabilities and fight against this predicament altogether, especially after 9-11. We have seen that not even the United States is capable of dealing with the threat of terrorism. Yes, the United States may not be looking forward to getting the fullest cooperation of every single nation that is willing to cooperate with the United States. There are certain differences of opinion as to on what grounds this cooperation should occur. But still, it is a big problem. So what is important to underline here is that the distinction between international security and national security, or some prefer to call it homeland security, is getting blurred. I mean, in the past and still is today, I mean, this, I don't really buy this argument that no nation states have evaporated, they've just dissolved. There is no such thing as a nation state anymore. Well, there may be, yes, the borders are lifted. There is this high pace of globalization, global cooperation, trade, communication, everything became global, but still, nation states are still the very important, if not the single most important, but very important units of analysis in international relations, and states are still important. So it is not possible to get rid of state structures or to undermine their significance or their power or their effectiveness. So whenever something happens, you look around for a state institution to help you out if there is a problem. So therefore, this is not something that I agree with, but what I agree is that in the past states were more capable of, as I mentioned, to isolate a problem and solve it in their own borders and deal with the problem on their own if that was the case, but because of this globalization, security problems have also become global and international security and national security are not necessarily highly distinct areas. I mean, there is this huge amount of overlap. So therefore, what is important here is that a coalition of the willing as well as capable partners is necessary for conducting effective counterterrorism operations. So coalition of the willing and capable. So what is important, willing and coalition of willing were enthusiastic and capable. So a group of countries which are not only determined to deal with terrorism, but also must be capable or not only capable, but must be willing because there are certain countries which are capable of dealing with terrorism, but may be staying away from cooperating with other states. Or there are certain states which are willing to cooperate, but don't have much capability to help with your efforts. So what is important to note here is that states which are fighting against terrorism must be both willing and capable to do so. This is important to note here. Well, this issue, especially the willingness issue is still a problem. And what I understand, this is my conviction. This is my sort of understanding based on my observations, based on my studies with respect to states behaviors, with the terrorist activities, is that the definition is not only, or the problem of definition is not only an ideological one. There are certain states which may have some problems, ideological or political problems in terms of defining an act as terrorist act. But some states may be acting that way that way under the guise of having a political problem or ideological stance vis-à-vis terrorism, but the real cause might be they may not want to be target of terrorism. Because terrorist organizations do usually need a safe haven to establish their headquarters, to recruit people, to mobilize some funds, to raise some funds in order to sustain their activities, to arm themselves, to give training, whatever. So as we discussed last time as well, on Friday, I gave this example of Syria harboring the PKK as a terrorist organization, and that brought Turkey and Syria to the brink of a hot confrontation back in 1998. And since then Turkish-Syrian relations are remarkably good. But there are other states in the world which use, as I also mentioned on Friday, which use terrorism as a proxy strategy, a strategy which they believe they can achieve certain goals without openly confronting other states. So use terrorist organizations as an instrument, as a leverage in their relations or in their activities or policies toward other states. Just again, like Syria did use PKK against Turkey, which retarded Turkey's Southeastern Anatolia project maybe for a couple of decades and cost Turkey hundreds of thousands of, hundreds of billions of dollars. Of course, in addition to what is most important, the loss of thousands of people's lives. So therefore terrorist organizations in most cases, but this is not, as we will see, an absolute necessity anymore. But in most cases, terrorist organizations need states sponsoring them or harboring them, providing them sheltered, providing them the logistical support, munitions, training, money, whatever. So this is how, this is one aspect of terrorist group and sponsoring or harboring state relation. There are also, well, this is an active sort of relationship between states and state-sponsored terrorist groups. But there are also some states which may not necessarily directly sponsor terrorist organizations, which may not provide them shelter, which may not provide them any logistical support, but they may turn a blind eye to their activities. They may not necessarily do whatever their laws may necessitate them or require them to do in terms of arresting some people or maybe taking some or conducting some investigations about the activities of certain parent companies which are used as some instruments to carry out illegal activities, et cetera. And Turkey is very much complaining and we have heard this not only as statements from low-level bureaucrats, but we have heard this from the level of the president, from the level of prime ministers who have complained time and again, the lack of cooperation or lack of understanding between Turkey and Turkey's European allies, not only within NATO, but also considering that Turkey is now a country which has a European membership vocation, which has a perspective, well, no matter how far it may seem to be at this point. And Turkey asked from time to time, from a number of European states to investigate certain groups or to investigate certain activities or to arrest certain people, individuals, and not in most cases, these have been realized. So there is this type of disagreements and what I was trying to say here is that terrorist organizations, not only on the one hand, conduct activities against certain states or certain groups, but also on the other hand, they threaten other states which may not be their primary target, but they tell them in an indirect way or they send them certain messages. There are different ways of messages that could be sent either directly by sending a person to meet some person from the government or by carrying out an activity which may be received as a message by the intelligence services of that particular country that if you do something against me, you are not now my target, but you may become my target. So terrorist certain groups, therefore, certain states, therefore are concerned with the possibility of becoming a target while they are not targeted at this moment, but to become a target in the future if they take certain restrictive actions against the activities of terrorist organizations. So we have seen this in the past. We are now seeing this. Of course, it is not easy to give names here. Even intelligence services or the police department or other interested units or politicians may not have enough evidence to put on table or mention publicly, but we know very well that there are certain states which are motivated in their stance vis-a-vis terrorist activities with the concern in their mind that, well, I'm certainly not the target of this terrorist group or this type of terrorist activity, but if I provide a certain asset to other states which are dealing with this terrorist group, would I become a target of that group? Well, why should I make my life a difficult one by helping other states in their fight against terrorism? But what must be understood, especially at this stage, I mean from today and into the future, there is a significant change in the profile of terrorist groups and also in the types of activities these terrorist groups are carrying out because especially since the end of the Cold War, the profile of terrorist organizations exhibiting start differences, as I mentioned here. What we knew, I mean, I still know, as I mentioned last Friday, there are certain terrorist organizations, which are the quick ones that come to, once mine are IRA, PKK, Tamils and ETA, et cetera. And these are mostly, not exclusively, but mostly motivated by ideological sort of motivations and have mostly, in most cases, have separatist ambitions and they are found, in most cases, in more or less an identifiable geographical location. They are not dispersed to all parts of the world. They're maybe not in a specific city or town, but they can be found more or less within a certain boundary and there is a clear, top-down hierarchical structure. I mean, there is a leader, some of them may not be known by the public or by the intelligence services, but they're at least a small cadre of leadership cadre and people who may have established form the group and take decisions about the next attack or whom to recruit or what kind of protocol goes forward to put on table to claim, et cetera, et cetera. But, and these are such organizations that the intelligence services, security forces, have huge amount of information about them. Well, and in most cases, even including Hamas and Isbullah, well, some define as terrorist organizations, some do not consider them as terrorist organizations, but anyway, intelligence services may have infiltrated into these groups and they may get reliable intelligence, sometimes may not be very timely because of the difficulties of, you know, giving the information out from within the group, but in most cases, these groups are well known, by and large, as to where they are, who they are more or less, what are their ambitions, what are their capabilities? I mean, how many people they have, for instance, there is this certain understanding about the armed units of the PKK on the Kandil Mountains. There is this figure which varies from four to 5,000 terrorists on the mountains and some 1,000 or 1,500 within the Turkish frontier on Turkish territory. So, I mean, there are this kind of information that are more or less reliable and which makes sense. Islam, any question about this? So, but since the end of the Cold War, the profile is changing. I don't mean to say that all the other types of what or some people call traditional, well, I don't know whether there's anything traditional with respect to them, but for the ease of understanding, in order to make a distinction between the two types, broad, of course, categories, not specific categorization, two broad categories of terrorist organizations, especially after the end of the Cold War period, these differences are becoming much more clear and also make a distinction in terms of the fight against these groups. And these differences must be properly understood beforehand because without properly identifying the problem, you cannot sort of come up with a number of strategies as to how to cure the problem. So, it is therefore necessary to understand this thing. And what we see, I mean, when compared to what we have so far known as traditional terrorist organizations about which we had more or less reliable and satisfactory information about capabilities, identities, whereabouts, you know, the coordinates and whatever, or ambitions, et cetera, these are still around and they are not likely to go anywhere anytime soon. No one claims that, well, there's no more, not anymore any such terrorist organizations. Yes, there are still around, but added to this, a new dimension of terrorist activity or a new sort of a more or less broad group of terrorist organizations, which are different than what we have known so far. And we have understood this from their activities over the last couple of decade. And these are transnational networks of local organizations. I mean, unlike the so-called traditional terrorist organizations which have more or less an headquarter somewhere and the leadership cadre somewhere and in a rather close distance, not too far, there is this, you know, other backup units or training groups or recruits or armed units or whatever, logistical support training areas, et cetera. Unlike this, now the whole world, the world is now the sort of the headquarters of these kind of organizations. If not the headquarters are the sort of, there are locations where small units of this kind of transnational, what is important here is transnational network. This is something that, you know, that is across the nations around the world. So this is one thing. Secondly, against what we have known so far that most separatist terrorist organizations were motivated by ideological, you know, stance with their, you know, distinct ideological stance. Now, this kind of transnational network of local organizations are motivated by religious or mystical beliefs. For instance, the mystical belief, what I mean, the Aum Shurikio, for instance. Have you heard about this, you know, Tokyo subway attack on March 8, 1995? A dozen people were killed. They tried to implant syringes in the Tokyo subway. And they were planning to release this gas in different parts of the Tokyo subway by pointing or just, you know, by exploiting the small bags of syringes with the tip of the umbrellas. But they were not, hopefully, successful. Yet, a dozen people were killed from the gas which was released. And four or five thousand people were injured, some of them, because the gas caused damage to their lungs, their body, to their tissues, et cetera. So there are such groups and their mystical philosophy, whatever it is, something that is known as having caused what they have at sort of stage in March, 1995. And up until that time, Japan, in Japan, actually, because they're mostly there, Aum Shurikio was not an organization which was sort of, or whose activities were limited by the, you know, laws of Japan. And because of this difference of opinion or differences of understanding in the Japanese culture, they have not condoned their activities until this attack took place. And even then, after Aum Shurikio's attack in March, 1995, they also tried to continue to some of their activities. But what we know, when we talk about, or what we talk more about, transnational networks of local organization, most of them are known as motivated by religious beliefs. So this is something that we have not seen much until, you know, most recently. And again, what is interesting to note, when you think of the PKK, Eta or Tamils, yes, apart from the leadership cadre, some of them who are ideologues, who may have been educated at universities or in some institutions, and the rest are food soldiers, you know, mostly recruits from villages, from the lowest strata in terms of economic sort of capabilities or whatever. But now, what we see, I mean, based on reports that are released to the academic circles, to the media, that there are people who are highly educated and also competent in many issues, in many areas. And it is not just, you know, a matter of food soldier who carries an AK-47, Kalashnikov, or just who lives on the mountains for an extended duration, or, you know, who's just taking orders and blows himself up, or just carries an attack with machine guns and kills people, no. There are people with degrees, with PhDs, with even higher degrees and also competence, and also with some distinguished carriers in diplomatic, academic, military fields. Yes, this is not highly pervasive, this is not, you know, I don't mean to say that every single member of these groups is such and such person. But now in transnational networks of local organizations which are motivated by religious or mystical beliefs, there are people who are highly educated and very, very competent in some issue areas.  No, this is not at all the case anymore. So, this is therefore something that must be properly understood. I mean, unless you know what you're up against, you may not sit back and, you know, draw certain strategies as to have to deal with that problem. And what is more important in that, as I mentioned at the very last moment of last Friday's session, is that cooperation is needed old more and more than ever in the face of the threats posed by weapons of mass destruction. And because, you know, this is something that relates in not only religious dimension, but also competent people, highly educated people, and also access to other networks of illegal activities like smuggling activities, trafficking activities, you know, who may have access to a number of material that can be weaponized. Or weapons themselves, because in the former Soviet territory, there are still problems. Yes, the problem has been dealt with to a great extent with the help of the so-called non-nuclear program or the cooperative threat reduction program which established a strong link between the United States and Russia or US Senate or in Russian Duma which brought together the state structures of both the United States and the former Soviet republics which have earned their independence after the collapse of the Soviet Union. Or that was because the collapse has come anyway. And the immediate utmost concern of the United States and those who were knowledgeable about the dimensions of the problem, the utmost concern was what would happen to the weapons in the chemical, biological, nuclear weapons and also material that could be weaponized and technology and scientific knowledge that were in an abundant amount of this kind of weapons and the capabilities that were still available which still up in the market in the former Soviet territory. And the United States has initiated this cooperative threat reduction, the cooperation between the United States and Russia to deal with the threat, to reduce the threat, cooperative threat reduction, non-nuclear. Known after the name of two US senators, non-nuclear, cooperative threat reduction. Wait, this is something which has evolved now in global partnership, something that is much bigger. And the aim was to seal what was there and not to let the weapons, the material that could be weaponized, technology, technological parts, technical capabilities and scientific capabilities, not to let them spread to the rest of the world or pass into the hands of those who were looking forward to receiving any or all of these capabilities such as Iran and North Korea, Libya, Iraq, Syria, these were the states of concern in the eyes of the United States. And that's why, as I mentioned earlier, during the Clinton administration, Iran and Iraq were subject to what was called dual containment, et cetera, et cetera. So therefore, taken into consideration this change in the profile of terrorist organization, looking at their motivations and their structure, motivations and the capabilities, of course, the threat posed by weapons of mass destruction is becoming much more serious at threat. I mean, yes, it is what we call a low probability, high consequence scenario. Well, of course, when you talk about these people, one of the first things people ask, well, so far, if it was that easy, why didn't happen that, you know, already? Well, of course, 9-11 was not a very difficult thing as we have seen, but 9-11 did not happen on 9-10 or 9-9, whatever. Until something happens, people tend to underestimate or undermine that some such and such thing is likely. But once it happens, especially after having seen the consequences, then people cry out and say, what should we do about it? Well, it's too late for doing certain things. Still not late to do other things or to take other precautions or at least to mitigate or to limit the damage or the collateral damages to prevent the second or other third attacks, et cetera. But what is important to bear in mind is that, yes, they may not happen, occur, they may not occur every single day, but once, if and when it happens, the consequences are high. Are you ready to bear the consequences? That's the question. So if you're not concerned about the consequences, I don't care. Well, that's God's will if thousands or hundreds of thousands of people are going to die. Well, that's not a big deal. We have several millions in the world. Well, this cannot be the answer of a statesman. A statesman or a responsible officer, security officer, intelligence officer, an academic or a politician is to take the necessary measures which in the first place would prevent such an occurrence and if fail to prevent, then limit the damage. So this is what we call indeed arms control or taking some actions in order to limit the or to lower the probability, but still the consequence are so high that even the smallest probability must or might be serious enough to bear in mind and to take certain kinds of actions. Okay, let's give a break before we continue with the next slide and we'll see what comes next.


Here we go. We are in organic groups in in or you are in in organic groups. That's fun We're gonna talk about the d8 group module My name is Scott self. I'm a senior software engineer for mobo mo If you were happened to be at the NASA talk a little while ago same team Different team same company. I usually work on USGS most of my days Along with these guys of NASA. This is the kind of the snippet of mobo mo's profile in the federal space got a lot of commercial accounts as well For me, I live and work remotely from Birmingham. I'm a bomo is actually out of the DC area and rest in Virginia Married to my college sweetheart to two kids. She homeschools them. God bless her I Got a bachelor's and master's in French of all things and here I am now I Fancy myself a bit of a musician big fish head bluegrass And I am Scott self with one T one T on Twitter, I see triple org just about everywhere I have been working with Drupal about ten years started I did a handful of triple five sites a lot of six and mostly seven just get my feet wet with eight mostly Have been known to been in the country for space as well. So try and pitch in where I can So a little disclosure on where this talk came from or why I decided to do this talk Been working with organic groups on the USGS site for a little over two years Took me a while to figure out how long it had been because I asked a couple of people They're like, I don't know four or five years because that's how long it's felt but Only about two years apparently two years and a quarter maybe We talked about the the possibility of migrating to date in the future It's not a real thing But we just sort of open up the idea and so we're looking at you know One of the biggest things that would be important is how to manage the groups that we already have on us Just I govern how would we go about that in D8? Like can we even do it? So that's sort of where that started wasn't ever really asked to do it fully but this sort of gave me the impetus to start digging into it see what it might take I am not an expert on either module necessarily. I definitely a lot more a student OG but not by any means an expert I Will have some of the answers but not all of them if you have a good question I will try and get back to you later So And yeah, again, just to make sure you understand this is not like a organic groups versus group module Fight to the death kind of thing. Who's better? Who's worse? But this is just Some of the facts about both and then we're gonna just look more closely at the D8 version So why or why not organic groups? Let's do some pros and cons real quick real simple First of all, what do they both do well? They both have some sort of concept of what group is And how to relate content types and I should have put users as well as members I sort of did here by granting membership. So you have users that are members in a group They both have the idea of custom roles and permissions You know at a group level so you can define a group and they have their own that type of group has its own Set of permissions which are separate from Drupal permissions. They're obviously intertwined but And they neither of them make very many assumptions about what you're going to do with it So just some some real basic But powerful Uses just they don't tell you how to use it necessarily a lot of modules do I did a talk at Drupal Camp Atlanta about how we use text on any And organic groups kind of together In the USGS site. So if you're interested check this one out by that's animating again. Okay So D7 Organic groups pros. There's a lot a lot a lot of sites using it So that helps, you know with getting bug fixes quicker and you know how that works in the Drupal contrib space It has a pretty good developer Side of things has you know a lot of API functions that you can use Simple things like og group and og ungroup to put somebody or a piece of content in a group It is very it was very full-future It has you know groups have the roles and permissions like I mentioned you can actually with og you have the option to Allow an individual group say, you know, you've got a set of I Don't know libraries and they have each library branch has its set of default permissions But then each you can allow us an individual library say well, we want our permissions to be a little bit different Which is kind of a nice thing depends on how you look at it That's kind of where the word the organic part of organic groups came from It has lots of views integration. There's some default blocks that get shipped with it It does handle field level access and it integrates with like user registration forms So when you Are creating an account you can choose which groups you want to be involved in And there's a ton of contrib modules that go along with og All of which mentioned here we use on usgs.gov Some taxonomy how a group can have its own taxonomy and Manage those terms themselves and they're only available to them they have their own menus They can have their own workflows permissions for each workflow Skulled anybody use Skulled for media in here. Yeah, we love it usgs loves it. NASA loves it And there's this og integration for that module as well and it's It was among the hundred and six most downloaded modules for D7 this cool old chart that embassy labs built cons so Organic groups relies on fields fields making the reference to Either from the user to the content to the group or from the group to its content And I'm a title if he's here or not, but he's I've seen him walking around who wrote organic groups or most of it He himself, you know it called this abusing the field API. So There's also there's some things about the UX that are a little confusing so an example here in a second The whole field usage and then you have the configuration for all the group types is sort of It's out of place to me Another problem with d8 develop development seems to be stalled for you know, they're doing other things Which is you know kind of the nature of the contrib space Now this is the interface for the the fields when you can add fields to the to a group type or any kind of bundle If you've ever who here has used organic groups before it was you seven of most of you awesome Cool, so you know what this is like Geez what's that all about all right, whatever so I'm sure it'll be highlighting something here in a second So in d8 and again remember this is or G is really just d7 pretty much and then this group module is also Primarily d8 though it does have a d7 version I haven't checked it out, but we'll get back to that And d8 this new group module, which is mostly what we're going to talk about today The group itself Is a fieldable entity so it's you know first-class object just like any other entity in the system All right has a really great developer side API everything's object oriented plugins classes all the you know the new Drupalate goodness that we're learning to enjoy and love if you have if you're coming from a triple seven background and not a pure PHP background So we'll talk about this a little more in-depth in a second but there's a separate entity for the relationship between the group and the user and as well as the group and the content itself and a single group Cannot override the settings at a group type. So if you set up a group type to work a certain way Individual groups of that type do not have any way of Overriding so it always functions the way you set it up You can see they set this up here at the top as a top-level item And it's got all these tabs we can talk about in a second on the con side it was kind of hard to come up with as many as I thought I would but It does need a little UX love and I'd plan on if anybody feels like jumping in with me I'd love to spend some time on contrib Down on the sprints later to try and resolve some of these things most of them are small. So Some of the configuration leads to some Things that kind of make you go, you know scratch your head if you haven't run into this before and I'll go through that in a second Just some of the nomenclature in the wording You'll see what I mean in a second There is no integration currently with what you would call a config entity in d8. So things like menus and taxonomy and web forms that aren't True entities as it were they're not PHP entities. They're config entities And there is an open issue that they're working on that and also You know, I took the same point and turned it into con as well because if you want Individual groups of a certain type to be able to override what the setup is Default for that group type. You can't so I'll actually show this in a minute. So I'm gonna skip over that part I totally stole this from Mike and Olo. He has seen him walking around but this is from his Triple easy podcast the chart that he hid there. So right here in the middle. You've got your group How you're gonna create a group when you create a group You're obviously gonna want to relate the group to two things nodes or content of some sort all kinds of other entities probably and and users who have memberships in them so The way that group handles this is these sort of intermediate Relationship entities is what I prefer calling them They're actually calling them group. I say group node here. It should say group excuse me It should say group content. So they call this group content article or group content basic page Which again be clear? This is a separate entity from the node itself So there's the node the relationship entity and the group itself and Then back down the same thing down to users as well We'll talk a lot more about that But you kind of get the the idea of the structure of this and each one of these is fieldable Which makes for some interesting things you can do for like, you know So I want to when I sign up I want people to provide when I join this group I want somebody to be able to provide additional information about why they're joining I can say, you know You know, what's your what's your interest in this thing or There was one an example about like a video game like how good are you at this part of the game or whatever? You can do all kinds of things with this There's lots of good examples in the examples. I'll give you at the end here, too. So the question was Excuse me. Why are why not organic groups and the answer is really two parts? It's D7's probably is organic groups I'm sure the group module for D7. It's probably great. I just haven't a chance to try it But I do know that organic groups I think in my opinion has the leg up for D7 just because of the contrived Editions that you can get that are just covering just about everything you might run into that you want to Be handled by organic groups in the group strategy For D8, it's at this point hands-down group. There doesn't there isn't a stable version of OG for D8 yet Listen to the talk that Amitai gave in Baltimore, you know, I don't know if there will be a D8 organic groups. We'll see So demo fun times So I was just gonna spin one up this way everybody else has used anybody tried and simply test me, right? Anybody not use this thing pretty cool, right? So you can start out with a project name in this case we're gonna Base everything on our group module. I'm gonna get the latest development You can also add things like you know Excuse me for instance, I know I need token and I need an address field for this demo I'll use like inline entity form and you can keep filling this out all day long and put everything you want in there It's just gonna add them to your To the make file that it's using in the background to build this.  I've already done this so We're just gonna log in All right, and then of course the first thing you got to do is enable these things because again all it does is put them in your in your build We're gonna enable two things group itself and then group node which as it says enables group functionality for nodes We'll talk a little more in depth about How that works in a second install those give them a second and It will have a top-level icon here. There was some discussion There's a good one of the links later. If you follow it see which one was that I don't remember which one There's quite I looked at so many things But one of them specifically he addresses why he put it here instead of where it might have gone structure or content or whatever I can ignore this for now because it just keeps coming up. So let's create a new group Well, we can't create a new group. We don't have any types, right? So In this case, I wanted to do the demo around the idea of like building a Like a music fan website. So something here you could log in and you know put in your favorite band or create a An album and you know somebody that didn't put an album up there or a show that they've played or something like that, right? You can be fans of this Okay, let's talk about these options quickly Okay, some of these are pretty obvious and everybody can see that pretty well or it's pretty small The first one says the group creator automatically becomes a member It's exactly what it says if you create a group you're automatically a member If that's checked you may or may not want that to be the case for the person who creates the group to be the member a member Great group creator must complete their membership So this goes back to What I was saying about this chart So as you're creating a piece of content a Node in this case of whatever content type we'll talk about in a second You're also going to be creating this relationship entity at the same time and so What they're saying here is when you create the node Or when you sorry when you create I told you the opposite part. This is the bottom part when I create the group This gets created right so this entity relationship gets created between me As the creator in the group now when I fill this out Do I want the person who's creating the group to have to complete their membership? and all that really means is You're gonna get another step after you create the note the band in this case to say I want to Here's another opportunity for them to define fields on that relationship So I could say you know how long have you been a fan something like that, right? And that could be something that's real. It's relevant to how the user ties to the group and That's all it's relevant for it's not relevant to the user outside of the group context, right? And it's not useful as to the group itself Unless you wanted to come up with a list of how long people have been You know fans of this group and you could come up with that then But I'm gonna leave this checked on purpose for the moment just to show you one of the little things It's sort of annoying that I hope to ask them to fix and maybe provide a patch for This third one automatically configure an administrative role It's exactly what it sounds like is there to be an admin role on this by default or not And then whether the group creator gets that admin role or not and obviously if this isn't done You can't do the fourth thing so that goes away. I'm gonna check them all for now So we're gonna create this group type. All right, cool So, of course, it looks just like, you know, your your content types, right? So we can manage fields on the band We can do Whatever we want here, of course I was gonna do something like Members, of course, this is gonna be unlimited and we'll just make it a simple text field and just ask them like include That way you don't have to fiddle with a field collection here for now That would be probably the better way to do it You always could add, you know, like a description field or whatever some sort of body to describe the So just like any old Content type now we have a group type of a band So let's look under here Wanted to do since I enabled it might as well use it So under groups now we have we can have a list of groups We're gonna add a group now because we can't actually let me let's take a step back real quick Let's look at the group types tab real quick So we've got a fully fieldable entity which we just filled with and you can of course manage the form display in the display You can edit which is just editing that band group type, which is that original form? We looked at before right or essentially the same form Then you have the permissions part which we talked briefly about earlier and I'll show you that in one second group roles and available content So if we just and you can actually if you go from the list, you know to a specific one you can see those So we got to create one first Actually, no, let me go back. Sorry. I should have done it from here So let's go right from here the the global permissions for this group type are set up right here by default so Yeah, again, you have admin role that got created by default when you create the group and Then you have these other three roles that get created by default no matter what anonymous is exactly what you think an Outsider is somebody logged in but not a member And then members a member and then of course you can have any number of custom roles that you like And as you go, of course this permissions page will grow for anything that you have Control over within the context of the group module Okay, so that's permissions and again like I said you can create roles just like you would at the Drupal level no difference They're just only valid within the context of this group type. So that makes sense All right, just like just like an og most of you've used og so that's kind of a new brainer All right, so let's go back to the list Let's create a new group anybody Whoever well, I wish I'd have moved that that always annoys me Am I know throw out a band that they know all the band members for and all their instruments come on come on Somebody likes music in here 311 all right 311 We're the band members. Let's see play Guitar, that's guitar. That's that's nice feel right there Guitar I Used to know this Okay, and peanut right Oh Let's call peanut in the base. Yes. He's just vocals. That's right. Who's the good chat? All right So we're gonna build a site around 311, you know They play awesome music Okay, so here's the first thing that's kind of interesting to think about When it comes to creating the groups themselves, so this is create band and complete your membership Remember how I checked that box at the beginning That said the group creator must complete their membership Okay, so that's where we're going now. So I'm gonna go complete. So now I'm on this screen now You tell me if you've ever you never used this before that this isn't like confusing because I Didn't know where I was the first four or five times. I tried this I was like am I Recreating the same alias for the node. I just created or what's going on here But it makes sense once you get it, but I was so lost going why am I on ad group again? And all I get is this URL fail alias field But point being to all that is that if you get a group type created that in fact, let's just show this really quick So for creating a group type whoops This to me and should be default off right and something more like if you Have fields you're gonna want to enable this right? So if you have fields on your because you're not by default can have any fields on your membership entity and when you're creating it at This point you definitely don't So to me you'd need to come back here and check that box versus the opposite But that's just my personal preference. I guess maybe maybe we'll get some advocates on the on the issue queue for that So that's what's going on there so I can Ignore this because it doesn't need an alias really Okay, so now I have a band so now I'm in This is the other thing that's a little weird because you created the Relationship entity and left it on a check to where you had to go to that screen and that was the last thing I did I'm actually looking at the relationship entity now, which is It really useful to me probably not in most cases. I don't think it's gonna be It's good to have you know that it's there and you know how to get at it from the group or from the user because fields and values But I always thought this was strange So you you're actually in related entities, which is the membership of the admin user in the 311 group Does that make sense? So I thought that was a little strange So now we have this 311 node No, it's the I even still did 311 group entity And you have this three three tabs on that, you know This one's got all related entities and then members and nodes automatically get their own separate tab Because that's why I did it now why I have two in here Maybe because I went forward as a couple of screens and back. I don't know. I have no idea what happened there Is there good to know all right, so And this is using the dev version, but if there's a patch I didn't didn't drop it in there So we'll definitely I'll definitely look into that Yeah, so this is members I've got two of them. I don't have any nodes yet Let's see if you do it from here We didn't get the dev version related entities back to here. So now you have two options. I can really have one Oh, right. Sorry. I skipped a step. Okay now. So let's go back to this part. Okay So the last thing I didn't cover here is this available content part This is important. That's why that last attempt to do something didn't work Okay, so this screen basically defines What content types are Going to get this new intermediate relationship entity Right now the only thing that has one is the user which is installed by default And I don't think you can really tell from here, but oh, yeah, you can the star there is always Always on so this module does not allow this particular plug-in to be turned off And that's what the group node module itself does is makes Nodes available as available content to the group types Talk about that a little more in one second But I'm just gonna install for now and in fact, let's do some let's do some content types that are a little more relevant So let's do something like a title of an album A body can be just a description and then we'll call this could go through and Put them in one at a time Whatever like that. Okay And then I'd like a show So if you wanted to put in something when they played put it on the set list tell how awesome the show was You could do stuff like that from our cool fan site, right? Show date Anybody else run into that before Okay, and then whatever we can build this out as much as we want to point being back to the group types available content Every node type is you know, but potentially something that we can tie to a group, right? So of course we want albums to be available as group content this is a similar thing that To the one before where you have this blank screen with just the or alias if you don't have any fields Almost the exact same thing here when I create a See if it shows me a group node album Entity which is what they're calling that relationship entity When I create that do I want to use the two-step wizard? Which means I'm gonna Get dropped off in this middle step to fill out the relationship entity and then end up in the relationship entity, right again the defaulted to checked I'm gonna uncheck it now because I don't plan on putting any any sort of metadata on the relationship, right? So that's That's I'm gonna go about this. There's other cobalt settings here that are kind of cool This just says how many basically how many albums can a band have This is one of those things where I think they're the wording could be a little bit better Like this is confusing the amount of band groups a single content entity can be added to as a group node album. I Just have a real hard time process in that personally Anyway, so this one is how many times can the same Entity in this case album be added to a Group as as an entity or as a member or whatever or have the relationship and this the group node plug-in Says this the one you can't really tell I don't think from there, but it's disabled Because you can't change that but some other providing Some other module providing a plug-in to get some other entity type available as As group content could allow you to tie the same Entity to this group twice Okay, that's a lot of talking Okay, cool. So now this one's Installed and you see it's installed And then notice like once it's installed you basically this is almost like you have another set of node types, right or Any sort of entity type So you've got this is the relationship entity to the user. So again, if I wanted to require somebody To say in this case So then I would go back to if I wanted to require that to be you know filled out as you're becoming a member. I Can't figure this. I think I guess the looks like the band when you actually don't have that choice Maybe that's what it was. Yeah That's all right. There you go. Yeah, so this is still checked. Oh, no, that's creating a band though. Yeah That's right. So if I go back to yeah, you're right Come back to here create a new group. We'll go with Rolling Stones because why not I'm for I'm sure Guitar guitar so again complete create the band and complete your membership And now we have this field to say however long you've been a fan. So again URL alias really doesn't have a lot of use in this particular You know use case or whatever so Let's go back to the available content And manage the form display on that and just get rid of that So that won't come up again The only thing they'll have to fill out next time when they create a band is how long they've been a fan. That's it, right? Any questions so far we pause for just a second and see if there's any questions And get some water All right, so back to the beginning real quick just to recap here and then I'll go back to the demo side. So we've got You know obviously have to create you turn it on Had a group you can't because there's no group types. Of course you have to create a group type Again with the if the membership has no fields when you're creating a group And your your user is gonna have to create a membership. That's just means you probably want to uncheck that just that's Important config my for me and it changes the the button text when you create the thing too So if that's unchecked it just says create band and become a member if it skips that to to the two-step wizard So you again you have to install a Content type or an entity type or bundle I guess we'll have to How do I say this so a module can define which entity types are Available as group content and you can then install them as group content one at a time just saying hey Let me create me an entity relationship between the two and then you have these configuration options when you create that and Then you of course you can uninstall something so uninstalling Really all it says is get rid of the membership entity between the two things right so Articles or even you know in our case albums or shows are just Normal nodes now they don't have any sort of relationship to The group band type Once you uninstall them. I don't know if it deletes all those entity Relationship entities in the database. I've meant to look into that, but I don't know This is right here was just an example. I found on one of Christian Vanden Einde is the one who actually wrote group who's with decent out of the UK So a big shout out to him for writing all this. It's really really solid but he Gave this example here of how you can extend it to another Entity type so for an example you've got you know group node provides the integration with nodes obviously Well the way this plug-in Works is all you have to do is this few lines of code right here with this annotation I forget what they called it. Somebody told me the name of yesterday of a space annotation based plug-in and So like all your configs up here in the comment And then you're just extending the group content enabler base And so this is just for instance show making commerce products Something that you better is it is a group content so theoretically you could have you know products They're only available to the groups and that kind of thing We talked about permissions and roles You have so every time you install a plug-in for a content type for albums and shows like we did Each one of those of course is going to add to your permission screen. So you've got view edit delete any and own For each content type that gets enabled as well as the relationship entity between them So you can really control who has access to what? Related entities we briefly touched on Let me see if we can just look at that one more time In this case all we can do at the moment is relate an existing entity to a group Probably because there are no nodes obviously we haven't created any so Let's create a new album. So that's one of three eleven's albums. We'll leave it at that I don't know any of the track names doesn't matter Now I created this node outside of that group, you know right now that group doesn't know anything about this album So this is I'm going to be able to relate an existing entity So I don't want to relate a new user. I want to relate an album And you got your nice little autocomplete Maybe oh the title Thank you Yeah, so we're creating that Relationship to the between the two so so from the related entities dad now you've got you know visibility of the music's album and You should be able to create a new entity and I know it was the permissions which we didn't touch So let's fix some of those permissions types I Notice this Sort of annoying it doesn't work the same way as some of the other things The admin role even though it's supposed to have everything when you enable new content Types or whatever install them install the plug-in for the relationship. You don't automatically get those permissions So it might be something to look at as well Of course So now I can relate I can create a new entity in the group as well as relate existing entities And in fact I may have been wrong about the permissions and it was just a cash all along But we do need to set up the permissions right anyways Don't forget to visit your per local permission screen when it becomes necessary Right so we can create a new one and this does both steps at once right So this is really what you want to do is to create it from the group itself You'll notice That did both at once again if we had that that intermediate step where there was some definition of you know What the relationship of that album was to 311 you could have fields on that relationship and that would have popped up And then we would have filled that out first All right, so that's related content Relating existing entity you can add members this way second member additional members yet, so That's the majority of now there's a lot more you can get into here But I'm gonna try and keep this part sort of short because I didn't really get too deep into this piece when I was exploring all this but Any block Whether it be one that you create for og purposes, which is more likely than what I'm about to show you but you could Now it has this additional option, so like just do something down like page title, but I Have this context that is by group types So just like you have for node types you could say that this is You know only to show up on on band entity group entity pages and then views I had a little bit of time to try and build something but There's a couple of things that are a little tricky how to do this quickly Screenshots so you see I was trying to build a view that would show a Link back to The group itself on the album for instance, right and you would think that would be fairly straightforward and it is but I Couldn't figure out how to do it with this group ID from URL piece The only thing that and I in fact I looked around and other people were saying the same thing that they end up having to use this raw Value from URL piece to get the relationships, right? And that once a piece of content is part of a group it lives here So it's gonna be group you know in our case group two because it was no group one because it was the first group We created and then that whatever the ID of the music or whichever album was right So once it's tied to that so you would have to use like raw value from URL to and for if you wanted to Somehow get you know get at the relationship data and then finally You know there's obviously tons of stuff like we could have done here We could get into flags and flagging content favorite shows favorite albums We could do comments and voting and if might be a fun to site to build out actually But for now, that's just a demo And I did there's some to do's in here Which are the things that I mentioned earlier that I would personally like to get in into one of these sprints and maybe hammer this stuff out Some of the stuff I pointed out to you with the defaults in the checkboxes. I think that's confusing personally The thing with the views contextual filters I ran into a bug a couple times And I meant to create a new issue for it. I haven't gotten around to it but Where when I was creating a new group everything seemed fine and I came back You know hours later, then I would try to create a new group and it would have the exact same The data from the group I had already created which was submitted successfully and I don't know what was up with that That's just I was thinking I'd be nice to have you know how you have No add links up here. You don't have that by default So it'd be cool to have group add a group and then the types of groups.   I'm hoping to be like I said dealing with some of these things in there tomorrow And yeah, that's it Okay, are there any questions So you mentioned that any additional roles could be added is member required to always exist And then other roles will be a addition to that or can you delete member exactly big member and Outsider and anonymous are all required You can you can tell it not to create that admin role when you first set it up like a surgery But that's the only one you can get rid of Yeah I was wondering about content that's owned by multiple groups how permissions kind of play on there to be played with that at all That is a good question. I haven't gotten to play with that at all. So it's a good question The question was how does the group play with multiple if the node is owned by multiple groups Question, how would you use or could you? Does groups allow for something similar to og menus where the group content can automatically be linked Directly to groups when you create a content and because I noticed that you had a menu settings But I didn't know or see a Way to link those cut those content types to that group Right. I honestly don't know. Oh, yeah, good. Great. Go Okay, is there a group in DA? Very cool. No, thank you. I have you tried or do you have any advice on migrating from? og in seven to this and eight Not the foggiest Personally wouldn't attempt it, but I'm not that I'm not that sharp So maybe it would be easy for some some other developers, but it sounds like a scary thing to work with Thanks, I'm sure it's doable. You know, it's just a matter of how much effort Thank you


I mean, you know at the end of the day, I don't look at it like I'm just singing or not anything when I'm making music. I'm just trying to make great music and stay rubbery. You know what I mean? We did a lot inside this hip-hop game. I know you know what I mean. I'm just trying to see rubbers that pay the way still be around. So, all I'm doing is just trying to consider being who I'm supposed to be. You know, I'm not considering anything, but I mean, at the end of the day, just being who I'm supposed to be. And that's what they're going to look at and say, you know, I wish I had that in the track record. You know, because it ain't only a lot of niggas that are doing that part. So for me, I just come in and do what niggas want me to do. You know what I mean? I'm probably with the young, I'm probably with the older, I'm probably with the new, I'm probably with everybody because I respect the hands and I know how hard it is to get home. What about the point where the grind hasn't changed? It ain't gonna never change because I'm coming from this. I'm coming from a different club. It's like the club that we was doing it from is like niggas was really, really taking it for real right now. They've become such a hard lurker and he's working to it. So I work for them niggas. I work for them niggas. I say, yo, I need a good tape, man. I need a good man. I need something that I can say, yo, I can throw it in and I can trust it. You know what I mean? That's what I come in with. You know what I'm not asking to be on the top of everybody or whatever. I'm comforting them, man. But at the end of the day, it's like, yo, niggas always give that CD from that certain niggas. And we can love loving them certain niggas. You know what I mean? We're living with that. So if I could touch a generation of niggas that just gonna love the stuff that I do, you know niggas? It's like, yo, at least I know that I sat back and I gave them some proof. You know what I mean? Nothing is like that. If you're honest with me, you're gonna throw these darts out of me. Don't throw them around, man. Come here, man. Come here, sweetie. I can go to Poland. I'm spreading the France, niggas. I'm spreading the France.  What's your problem? I do it. You talked to Jews earlier.  The beats being important. I do it. I do that big concept. I'm like, the beat going mad.  I mean, how you feel about that?  There's only this one. Rope is important. But I understand that. I work on them because we, to be the niggas that way. I take the lyrics as being respectful. You know what I mean? That's that sword.  So I understand what you're talking about. But the other side of it is a bit astute because, if there was a game, you could be nice, but if you don't got it, if you got the wrong production, that's going to, of course, be nice. Right?  And that's what I was meant to want to say. We're not going to hold it. We're not going to hold it. We're not going to hold it. We're not going to hold it. We're not going to hold it. We're not going to hold it. We're going to hold it.


Welcome back to the breakfast here in Plus TV Africa. Now let's go back in history and I'm going back to the year 2012 to tell you of course once again one of the most popular Athletes in of course Olympic history, but of course popular for other reasons as history eventually showed us in 2012 is popularly known as the Blade Runner Oscar Pistorius on this day on the 4th of August in 2012 in London He became the first amputee to compete at the Olympics by running in an opening heat of the men's 400 meters Pistorius finished second out of five runners and advanced to the semi-finals where he finished eight out of eight runners His image would drastically eventually change early the next year when the star athlete was arrested for the murder of his girlfriend The Reaver Sting Camp. He took second place at a time of 45.44 seconds in that heat In the semi-finals the next day he finished last place with a time of 46.54 seconds and also failed to advance to the finals Pistorius also carried a flag at the opening ceremony of the 2012 Summer Paralympics his one of South Africa's most famous athletes But of course, you know, everyone knows how his story eventually ended With him being sent to jail for the murder of Reaver Sting Camp, but of course on this day He made very very big history terrible terrible story here at first. It was a great one People were happy first amputee runner Computed with regular athletes then with you know other amputees One six gold one one bronze one one silver great story out of Africa But then when we heard that he had murdered his girlfriend, you know a year later and that was about 2013 Exactly on Val I mean on Valentine's Day. That really broke our hearts Anyway, moving on to our next top story on today in history is 29th of I beg your pardon 2019 August the 4th. What happened today in history was the second mass shooting in 24 hours. So About 24 hours before then there was this mass shooting and this guy had went on on social media and basically put out information that was racist to Latino immigrants and People were really worried they said that that definitely was fueled by by Donald Trump and all his rhetoric against you know Immigration and all of that. So this guy basically went into a Walmart in El Paso, Texas You know, that was popularly patronized by Latinos and he just went in there Just fired randomly cute 22 people injured 24 and then less than 24 hours later This particular guy in the early hours of the morning in Dayton, Ohio on August 4th 2019 went ahead to kill nine people and injured 27 others now the sad thing is that His sister was caught in a crossfire. His sister also died and the police were actually nearby just around the corner when this guy began shooting and in less than 30 seconds the police was able to gun him down So he in 30 seconds this guy killed nine people and injured 24 to let you know that he was really just firing So to just aim and kill as many people as possible still about, you know, like I mentioned the Anti-immigrant rhetoric the lax gun laws in America and all of that. That's what happened today in history United States of America is Well, sadly, you know with the amount of mass shootings that it records the early I'm not sure what else, you know, I Don't know. I'm not sure what the answer really is, you know, and you know, they've they've had conversations about gun laws for a long long long Time, you know, and nothing really seems to be changing.  What does the United States government think it needs to do to Reduce the likelihood of these mass shootings happening. They must, you know, take these things seriously I know that, you know, and I've said I think a couple of weeks ago. I mentioned, you know, that the NRA You know, politically, you know, has been one of the stumbling blocks to enacting better-gone laws in the United States and reducing the You know, the possibilities of people just having weapons Licensed in their bedrooms So, well Sad story really really sad Yes, and that's what we have for you today in history In 2012 Oscar Pateros became the first amputee runner nicknamed the Blade Runner and On this in history the terrible second mass shooting in less than 24 hours and August the 4th Let's take a break here and we'll return with our first big story