We will give a good gift for those who bring the softest pillows tomorrow, insha'Allah Al-Fatiha before I begin if we can get the brothers to please move forward because There's a lot of scatter space So if you can make room So as people come in they can adjust right away. Thank you very much. We will give a good gift for those who bring the softest pillows tomorrow, insha'Allah Who has touched you and our safety has come O our Lord, O our Lord, my master is with you So we will win and we will win Allah says in the judgment of His Noble Book and His Truth And He is the most truthful and truthful I seek refuge with Allah from Satan, the accursed In the name of Allah, the Gracious, the Merciful And from His Signs He created for you from yourselves Husbands that you may rest And He made between you a bond of mercy So when you're gathering with Allah's remembrance upon Muhammad As a gift to the soul of our beloved Sayyidi and Mawlana Abu Abdullah al-Hussain recite the second Salawat To hasten the reappearance of Sayyidina and Mawlana Sahib al-Asri al-Zaman recited the third Salawat with the loudest of your voices Amongst the most amazing and memorable times Within the lives of human beings As the pre-marriage period A period where we are engaged And getting to know our significant other A period in which we experience a new chapter in our lives A period full of love, joy and tender feelings And indeed the pre-marriage period As the best period which allows one To put his guards down and become ready for that final commitment To commit to the actual marriage And when two people choose to be married They come together in order to experience companionship And they come together in order to experience love, harmony and joy And to quench their thirst for those special feelings And indeed the best time for us to get to know one another As the time before marriage However, the time before marriage can also become very deceiving I remember a couple of years ago when I was in Florida A young couple got introduced to the community Several weeks later they came They said, Sayed, we'd like to get engaged So they got engaged And I believe weeks later the girl came up to me And she said, Sayed, I would like to truly thank you I'd like to thank you for allowing us to get to know one another We're engaged and we are living the best days of our lives In fact, she told me, I believe that I have found the man of my dream An angel He's humorous, he's generous, he's kind, he's compassionate All the good things I went to him and I said to him, what do you think of the period of engagement? He said, Sayed, how can I complain? This girl, I go to their house, she cooks the most delicious meals She takes my shirts during the weekdays She washes my shirts, she irons my shirts, she gives them to me in the weekends She laughs at my jokes, she finds me to be attractive, she finds me to be humorous I think I found the girl of my dream And of course they got married and after they got married for a while I didn't see them They went on honeymoon and starting a new home And I remember several months down the line, I got a phone call one day Picked up the phone and it was her Assalamu alaikum, alaikum assalam Sayed, where are you? I said alhamdulillah, it's finally time for them to maybe invite me to their house Give me a gift, lunch, dinner, maraza So I said, I'm in California, insha'Allah I'll be back in a couple of days Sayed, when will you be back? Exactly I said, I'll be back on Thursday I said, okay Thursday morning we have to come to the masjid, we'd like to see you I said, what is this in regards to? She said, we need some counseling We need to speak to you I said, okay So as soon as they arrived through the door they sat down, I looked at her I said, my dear sister, tell me what's going on? She said, say it in one word, he's the devil I said to her, but a couple of months ago you were telling me he's the man of your dream He's an angel, today he's the devil She said, say it, he's the devil Why?  I don't like this food Before when I would want to iron his clothes He says, no, why you have to trouble yourself? You don't have to do this? Now he always tells me, why am I sure and ironed? Why aren't you doing the work of the house? Why aren't you doing this? Why aren't you doing this? And he thinks of me as his own servant I don't want to be his servant anymore I can't see myself living with this guy I said to him, what about you brother? He said, say it, before anything I say she would laugh She would make me feel good Now I go out with my friends I crack jokes, she doesn't laugh at my jokes She doesn't do anything in the house She doesn't care about me and you know the usual And fortunately after the commitment of marriage Through the ups and downs of marriage Gaps are created between the husband and the wife And this is completely normal However sometimes those gaps tend to grow and grow larger While people stay in the marriage They endure the marriage But the marriage no longer has any sort of significance in their lives So for 40 years, 50 years they're married But it doesn't mean anything They say a guy took his wife to Jerusalem On the 50th anniversary When he took his wife to Jerusalem on the 50th anniversary There she died, she passed away So they came to him, they said to him, listen You can keep your wife in the holy land Bear her in the holy land And it will only cost you $1,000 But you can also choose to take her back to California It will cost you about $50,000 to $60,000 So he said, no, no, no, please I'd like to take her with me to California So they said to him, this is very beautiful After 60 years, 50, 60 years You still want to take your wife back But you know what, this is the holy land This is sacred and it costs you a lot less He said, listen, Jesus died here And three days later he got resurrected So for 50 years some people are married But the marriage has no significance in their lives And at times, no Two months later, six months later One year down the line Two years down the line there is a divorce An unfortunate divorce Which is extremely disliked by Allah SWT And studies show That children that come out of divorced families Have emotional trouble throughout their entire life And they are more likely to have failed families And failed marriages themselves And I said this And the first night that I came to this community this year I said I firmly believe that every community Should take the mission statement Of Imam Abu Abdullah al-Hussain Write his mission statement And the very entrance of the Amman Bargah And the very entrance of the center And the very entrance of their community Why? Because when I'm about to walk in and out of the building I see the mission statement of Imam Hussain I remind myself of the mission statement of Imam Hussain I bring that mission statement within my life And what is the mission statement of Imam Hussain? I have not left for any worldly reasons I have not left for the Khilafa I have not left for popularity I have not left for fame I have not left for power I have gone on this journey of sacrifice For what? To perfect the ummah of my grandfather And part of perfecting the ummah of Rasul Allah To perfect our families our families, brothers and sisters, I can assure you today the greatest threat in the world, believe me, it is not the nuclear weapons and it is not the economic situation. It is the lack of morality within the family. And unfortunately, we live in a society of divorce. We live in a society with broken families and the year 2010, two million women aborted their children in this country. Two million people, two million deaths, two million murders. Allah Subhanahu Wa Ta'ala in the Holy Quran says this is the act of the Jahaliyah. 1,400 years ago when they would have baby girls born they would marry.  Abortion is an act of murder. Wa idhal ma'udah to su'ilat. Wa idhal ma'udah, the baby, this baby that is aborted. And the day of judgment will rise and it will ask. Wa idhal ma'udah su'ilat. Be ayyidam bin qutilat. Why did you murder me? Why did you kill me? Two million people aborting their children in this country. And we live, where I come from California and where you live, New York, are the states of divorce. And California divorce rate is 72% and in this beautiful state it is 75%. And we examine our community and we find that there is no trouble in the pre-marriage period. MashaAllah they don't have a problem in getting engaged. They don't have a problem in meeting one another. They don't have a problem in the engagement period. But the problems begin right after that commitment in marriage. And the very first thing that we have to do in our communities and within the month of Ramadhan many people say we'll say it. This topic about family, we hear about it all the time. We have to dedicate at least one night to speak about our family in the ten nights of Muharram. We have to dedicate at least one night to perfect our families and the school of Abu Abdullah al-Husayn, Salawatullahi alayhi. That is why I have chosen to speak of verse 20 of Surah Al-Rum tonight. Allah Subh'anaHu Wa Ta'ala and this verse introduces family and marriage in a completely different manner than many of us believe in. First of all Allah Subh'anaHu Wa Ta'ala says that marriage wa min ayatihi. Marriage and family is amongst Allah's signs, Allah's ayat.  Marriage is an act of worship. Just like Salah, just like fasting, just like Hajj. It's an act of worship. Rasulullah sallallahu alayhi wa sallam says, man tazawwaja faqad ahraza nasfadeen. Whoever marries, he has completed half of his faith. So indeed it's a great act of worship. Al-Imam Ja'far ibn Muhammadan al-Sadiq states rakatan, Allahumma salli ala Muhammadan. Two rak'ah performed by a married person is superior to Allah than 70 of a person that is not married. A great act of worship. Rasulullah states whoever wishes to meet Allah as pure in the day of judgment, man arada an yalk Allah taheran min dhanb wa dhanas fa yulq illaha bi-zawj, then allow him to be resurrected as a married person in the day of judgment. So Islam gives a lot of importance to marriage and let me ask you in any act of worship in Islam, what is the most important element in that act of worship? What is it? Niyah. Today if I stand here and I pray 100 rak'ah without Niyah, will they be accepted? No. If I go to Hajj and I wear the Ahram and I perform the Hajj and I pay my tour guide and I do everything but I don't have a Niyah. The intention of Hajj is not there. I don't have the Niyah for Hajj. Does it count? No. Tomorrow wake up in the morning, don't eat anything until Maghrib. Does it count as a fast? No. You need the Niyah. And this act of worship, we have not been taught that in this great act of worship, we need the Niyah. We need an intention. For Allah SWT to bless this marriage. Where do we find the Niyah? We find the Niyah within the Holy Qur'an. Allah SWT, I don't have time to speak about the entire verse, but we'll divide the verse into two segments and we'll touch upon two segments of the verse. Allah SWT in Surah Al-Rum states, Bismillah ar-Rahman ar-Rahim. He's created for you spouses from yourselves so that you may seek tranquility from one another, so that you may become intimate. And at many times there is no intimacy within the family, unfortunately. What do I mean by intimacy? Scholars of human behavior suggest that intimacy has five different levels. There are five levels of intimacy. First level is intellectual intimacy. What's intellectual intimacy? Or mental intimacy? When I wake up in the morning, as soon as I wake up, my thought process begins. So I think about, for example, taking a shower, having breakfast. I think about the fact that I don't have time to take a shower. I don't have time to have breakfast. I need to rush to my office. I get to my office. I start, for example, prioritizing my work. Other thoughts. For example, I need to do my taxes. I need to, for example, call a family member. I need to take my car to the car wash. Those are all thoughts. We're constantly thinking during the day. And of course, the thought process continues until night. When we come home, we don't share those thoughts. And of course, if we don't share those thoughts, there isn't going to be mental intimacy with my partner. That is why studies show it's very hot in here. Can we solve this problem, please? Or I'm going to have to take off my qabwah. Salli ala Muhammad wa aali Muhammad. I know the brothers, please donate generously because the another salawat, please. If I don't share those thoughts, then there isn't going to be any mental intimacy. And that is why studies show that at many times people that we work with tend to know us better than our own spouse. Why? Because I spend nine hours, 10 hours with this person in the office. I share my thoughts constantly with that person. So I constantly have mental and intellectual intimacy with the person that I work with. But when I go home, I don't share anything. That is a very big problem. Another type of mental intimacy or intellectual intimacy is for you to share things with your significant other, not just with your significant other, with those who you love. So for example, if you're a medical doctor, you can share some of what you know. If you're an attorney, you may share some of what you know. If you're a teacher, you may share some of what you know. If you've read, for example, something about religion, you may share what you know. If you, for example, heard a lecture, you may share that with the members of your family and your significant other. If you've read, for example, an article about politics, politics, you can share that also with your significant other. There's nothing wrong with that. This is called intellectual intimacy. The second type of intimacy is emotional intimacy. What do I mean by emotional intimacy? Is when I share my emotions with those who I care for and those who care for me. For example, I tell my wife, I tell my children, I tell my parents, what is it that I like? And what is it that I dislike? What is it that encourages me? And what is it that, for example, makes me sad? What is it that makes me upset? What is it that, for example, I enjoy life and I also ask them and even if we don't communicate on this level, then I try to learn that through their acts, through their body language, through spending time with them. Therefore, through the first two types of intimacy, our minds and our hearts become intimate. And those are the most important aspects of our existence. Third, spiritual intimacy, where we spiritually become intimate. At many times, such intimacy does not occur within many of the Islamic families. A Muslim family has to go through spiritual intimacy every single day. We wake up in the morning, let's do Fajr together. We can't do Fajr together. Let's do Maghrib and Usha together. We can't do that. Then let us read a passage from the Quran together. Let us, for example, examine a passage from the Quran. Let us hear a sermon. Let us read a hadith.  Those are different levels of experiencing so, experiencing spiritual intimacy. That's a third type of intimacy. The fourth type of intimacy is social intimacy. What do I mean by social intimacy? At many times, we find, especially young couples, experiencing a lot of difficulty in this department. For example, I come home and I tell my wife, listen, tonight we're going out for dinner with, for example, my friend, Ali. Suddenly my mom, no, no, no, no. I don't want to go with him. I don't want to go with that family. I don't like this family. I don't want to associate myself with this family. Or the opposite. For example, my wife tells me the Sunday we're going to my cousin's house. No, I'm not going to your cousin's house. I don't want to associate with them. It's better that we discuss this.  Who is it that I enjoy associating myself with? Those type of people I really cannot become close to. Those type of people I'm willing to meet once, twice, three times a year. Those are my circle of friends. And she tells me of her circle of friends. So we discuss this when we have time, when we have a peace of mind and we come to an agreement. Therefore, we won't run into such problems. And last is the physical intimacy that starts with the mental intimacy that starts with the emotional intimacy that starts with the spiritual intimacy that starts with the social. And it is concluded by the physical intimacy.  And that is the only way for us to go through all levels of intimacy to truly feel the significance of the ayah. Then Allah, Subhanahu Wa Ta'ala, says, وجعل بينكم مودة ورحمة. And Allah has placed مودة amongst us. You all know the difference between محبه and مودة. محبز love. مودة is for us to show our love, to demonstrate our love, to express our love. Many people come to me and say it, I work 12 hours a day, 10 hours a day, six days a week. I take my family on vacations every year. I buy them new clothes. I spend on them. I buy my wife so many gifts, jewelry, this, that. I buy her a new car. She doesn't care. It's as if I don't even do anything for them. She doesn't appreciate me. And of course, on the other hand, the wife will tell you, say it, he doesn't appreciate me. Because when he comes home, the house is clean. The food is on the table. Everything that he's asked, I've done. So what does he expect from me? Scholars of human behavior suggest that every person has five different primary love languages. Listen to this. Recent studies show that sometimes, for example, when I worked 10 hours a day and I buy my wife jewelry and I expect her to really enjoy this jewelry, but yet she doesn't, that means I am indeed not communicating with her through her primary love language. If your husband comes home and the house is clean and the food's on the table, that's good. But maybe that is not his primary love language. He expects to feel loved through other ways. And therefore, there would be a clash.  They don't feel loved by me. Or I don't feel loved by them. My parents, my family members, I have to come and communicate with individuals through their own primary love language. What are the primary love languages? Number one, words of affirmation. What are words of affirmation? For me to speak kindly. For example, we read Hadith Al-Qus'at how many times a year? A thousand? Maybe. We hear. We hear at least a thousand times a year. And what we understand from Hadith Al-Qus'at is that Ahl al-Bait have become pure through Hadith Al-Qus'at. And Allah created the universe and everything within the universe for the sake of Ahl al-Bait and everything else. But what is it that we tend to be forgetful when we examine Hadith Al-Qus'at? Is the way that the Prophet and Ahl al-Bait speak to one another? Imam Al-Hasan, a young boy, comes and says to his mother, Ya'umma, Anni ajudu andakiraiha ta'ibah, ka anna ha raiha tujaddi rasulillah, O my beloved mother, I find us a beautiful scent here as if it is the scent of my grandfather, Rasulullah. Then he approaches his grandfather, As-salamu alaika ya jaddah, As-salamu alaika ya man iqtarahullah, At-t'adhanuli an adkhula ma'aka tahtal kisaa. He greets his grandfather with his titles. Then he asks him, O grandfather, do you allow me to enter the cloth?  Pick up the cloth, go under. Who's the grandpa? The grandpa doesn't mean anything. But look at the words of affirmation and look at how Rasulullah responds. Wa alaika as-salam ya bunayya, wa ya habibi, wa ya tamrata fu'adi. He speaks to him with the most kind and beautiful words. The same way he greets his Rasulullah would stand in front of the door of Fatima al-Zahraa. Only Fatima sometimes would be at the house. Only Fatima.  He would greet Fatima by stating, Fatima, you are Ahl al-Bayt. He would stand and seek permission. As-salamu alaikum ya ahla bayt al-nubuwa. Wa ma'dana al-risalah. Ata'zanuli bid-dukhul. Do you allow me to enter? This is how he spoke to his daughter Fatima al-Zahraa. The way he spoke to his son of Allah, Amir al-Mu'mineen, the way he spoke to his grandchildren, Al-Hasan wa Al-Hussein, those are words of affirmation. Amir al-Mu'mineen looks at Hassan, Imam Hassan, Imam Hassan's young. He says to him, Bunei Hassan, O my beloved son, Hassan, wajat tuka ba'zhi. I have found you to be part of my heart. Then he says, La wallah, bal wajat tuka kulli. He says, no, by God, but I found you to be all my heart, all my existence. Now, many of us, we tell our kids we love them in the phone call, you know, when we're finishing the conversation. I love it. This doesn't mean anything. That split second of me saying I love you doesn't mean anything. We have to actually talk to our significant other. We have to actually express our love for our children with words of affirmation. That's one way. Another way that's many parents need to keep in mind is the way they talk to the teenagers and the youth and their children. In general, for example, I have a son, he's 16, 17 years old, and he likes to, for example, play football, or he likes to, for example, play hockey, let's say. So one day I go on, I watch him play, and he comes in the car and says, what is this? Playing football. What's this going to get you? It's not going to get you anywhere. Besides, you're not even good. That kid, Mike, he was somewhat better than you. Those destroy that self-esteem within the youth and within the children. It doesn't matter if he's good or he's not good. It doesn't matter if you like hockey or you don't like hockey. You have to tell your children as long as it is halal, as long as Allah Subhanahu wa ta'ala is okay with it. Give them words of affirmation. Support them. Support their cause. And soon, like all the youth, they'll grow out of it. If your wife is cooked a meal and one day the meal is not the best of meals, it's okay for you to say this was a delicious meal. This was an awesome food. I loved it. You're the best cook. It's okay. They don't tax us on words. If, for example, your husband, the sisters, that is, if your husband is, for example, an author and he wrote a book, even if nobody reads the book, even if it's a failed book, it's miserably failed. Tell him I read the book. It's a very good book.  If he's, for example, a teacher, tell him you're the best teacher, tell him you're the best father, you're the best husband, words of affirmation play a significant role in creating love within the home. The second primary love language is quality time. Quality time for us to spend quality time with our family members. Don't say I don't have time because I can see everybody who's business work. The unfortunate scenario is sometimes when we procrastinate, we don't have time, we don't have time, we don't have time. Suddenly we have to put a lot of time. Suddenly we won't have time for anything else besides the misery of creative. Some people say, we'll say it every once a week, twice a week. I take my kids to the movies. I take my kids to the mall. I drive them to school every day. This is spending time in close proximity. It's not spending quality time. Go read the studies. Quality time is when I sit with the person that I choose to spend quality time with, whether it's my wife, whether it's my son, whether it's my daughter, whether it's my father, whether it's my uncle, and I spend quality time. My cell phone is turned off. I give them attention, undivided attention. I speak to them. I hear their emotions and I cater to their feelings. That's called quality time. And believe me, that is missing in our families today, especially the fathers, especially the fathers, those youngsters who are trying to build an emperor for themselves. The house is now treated as a five star bed and breakfast. I show up at night, have the food, sleep in the morning, I have breakfast, shower, bye bye. This is not it. The third primary love language is acts of service. What do I mean by acts of service? Sometimes I need to show people that I love them and I appreciate them through different acts. For example, I'm very busy person, but yet I take out time to call my father, father, do you need me to do anything for you? Do you need me to serve, do you need me to serve you in any way? And if he tells you, yes, I need you, for example, do this for me, you drop everything, you do it. Because in that time and that specific time, you will show them your love for your father. Similarly, call your mother, do you need anything? Your grandmother, your uncle, your aunts, your friends, run errands for them, serve them. Not only this is a primary love language, but look at the reward that Allah will give you, especially if it's your family members. And it's not your family members if it is a brother to you in faith. Allah says if you run one errand for your brother in the dunya, if you solve one of his problems in the dunya, Allah will solve a thousand of your problems in the day of judgment. One of them is paradise. One of them is paradise. Let's take advantage of such times. Sometimes we always require our children to serve us. And that's how Allah says, Allah says me, then your parents. So we serve our parents, but sometimes if the parents really need to show their love to their children, it's okay for you to engage in an active service for them, drive them, do something for them, help them in an assignment, help them on their business, help them out. Well, for example, in taking a vacation, this is called an act of service. And for some people, their primary love language is through acts of service. The fifth primary love language is receiving gifts.  I know it wouldn't happen.  I brought this for you from Mecca. I remembered you. I gave you the small gift. Some people truly bond with that gift, even if it's a small card, even if it's a flower, even if it's something of financial insignificance. Allah says when you go through all those five love languages, you will have love within the family. And the day of Ashura communicated to Allah through all those love languages. If it was words of affirmation, look at his words.  Yet he raises his head to Allah. And he says, God how I'm a nuzzle a bee. Be Anna who fee I know. And deed, it gives me ease that I know you're watching. The continuous relationship. He sees Ali and as I murdered, he says the same thing. The last moments where there was no one left to come to his rescue. What did he say? What did he say? He said to the swords and he said to the enemies in canadine Muhammadan. If the religion of Muhammad and the call of Allah has become weak, and if I have to give my blood in order to strengthen it, then all swords attack me. All swords attack me. This is what he gives. This is the way he speaks to Allah. And for many of us, we know Hussein in the 10th of Muharram, but go and read his dua in the day of Arafah. Allahu Akbar. Allahu Akbar. How Imam Hussein spoke to Allah. That dua explains the sacrifice of Hussein. Because the only way for me to explain how Hussein gave Ali the bigger, Ali the smaller, Abbas, his brothers, his companions, and he knew that his family is going to be taken as captives is to say Hussein had unconditional love for Allah. He saw nothing besides Allah. That's what motivated him. That's what drove Hussein to do this. And that shows in his dua in the day of Arafah. Whether it's an act of service, many people, brothers and sisters, I tell you, we have to know their value in our community. The volunteers, those behind the scenes, I arrive, I sit in the membar, I give the speech, you arrive, we all leave. But there are some people that put in the time and the effort. Those are the people that are showing their acts of service for Allah and Imam Hussein. The people that walk all the way from Basra, all the way from Najaf, all the way from Baghdad to visit Hussein, they can also drive the car and go. They can also fly from Baghdad to Najaf. They can take the highway, but yet they decide they will walk for Imam Hussein. This is an act of service. And Imam Hussein and the day of Ashura gave the most beautiful flowers as gifts. Imam Hussein and the day of Ashura gave the most incredible human beings as gifts to Allah. Yesterday, we spoke of Imam Hussein's arrival to Karbala. As soon as Imam Hussein arrived to Karbala, he was intercepted by a man by the name of Hurr ibn Yazid al-Riyahi. Imam Hussein suddenly he stood up and he said, go and give them water. Not only give them, but give their cattle and their horses as well. Let them drink. Give them food. Be hospitable to them. Then Imam Hussein says to him, Hurr, what is it that brings you? He said, Ya Abdullah, I am here to take you. I am here to surround you and to take the bay'ah from you. Yet Imam Hussein continued to be kind to him. To be polite to him. And as the ninth of Muharram arrived, Hurr ibn Yazid al-Riyahi was in the tent of the enemies. He saw them drinking. He saw them partying. He saw them joyful. He went to Omar ibn Sa'd. He said, Ya Omar, what are you about to do tomorrow morning?  He said, seriously, you really want to do this? He said, yes. Hurr ibn Sa'd on the back of his horse. Allahu Akbar, how every year there will be Hurr within every community. There will be people that had the past that we are not proud of, but they make that immediately that we want to be like Hurr. We want to be individuals that are remembered just like Hurr is remembered. We want Allah's mercy just like Allah gave his mercy and compassion towards Hurr. So Hurr sat on the back of the horse and he went towards the camp of Abu Abdullah al-Husayn. What did he see there? He saw them either reciting the Quran and Ruku or in Sujood. He came immediately in front of the tent of Abu Abdullah al-Husayn. Ya Sayyidi, Ya Abaa Abdullah. Let's all go to Abaa Abdullah al-Husayn with Hurr tonight. We say to him, Ya Sayyidana wa Maulana. You don't know the significance of the statement every night. The significance of this sentence gives cure to the ill and it gives you your hajats and it protects you until the following year where you will participate in the Majalas of Imam Husayn. He didn't say, he was ashamed to say, I am Hurr. He said, I am the man that intercepted your caravan. I am the man that left you from escape and I've caused this misery. The most beautiful element in our faith. For ask for forgiveness and Allah shall grant you that forgiveness. Now I want everyone in this Majalas, the brothers, the sisters, they are everyone in this Majalas three times. Raise your hands to Allah and three times with Hurr. Decided that he's going to sit on the back of the horse until Imam Husayn gives him permission to go and defend his cause. Amongst the first was Hurr Ibn Yazid Al-Riyahi. He came to seek permission. Aba Abdullah gave him permission. Until he fell from the back of the horse stating Assalamu Alaikum. Aba Abdullah. Aba Abdullah went to him.  Meaning what? Meaning a free man is a man that comes out of the ignorance of the disobedience of Allah and enters into the freedom of the obedience of Allah subhanahu wa ta'ala. And he put the Allah, he put the hadaf, but on the day of ashura, when Husayn stood saying, Who was there to come to the rescue of your Huzayn? Our hands raised to Allah subhanahu wa ta'ala. O Allah forgive our sins. Shower on to us from your forgiveness. O Allah our parents, our grandparents, our relatives, friends. Mu'minina and mu'minat, those who have passed away from this community. Shower on to their graves from your mercy and compassion. Haste in the reappearance of Mawlana Sahib al Zaman. Every man and woman in this majlis with a hajj give them their hajjant. Every man and mu'min, every mu'min and mu'min in this majlis with an illness give them cure. O Allah we ask you to grant us the visitation of Huzayn, the Shafa'ah of Huzayn. O Allah we ask you to bestow on to our families from your mercy and compassion.


Hey there, that's Robbie thought I'll make a quick video on the subject of copy and the best way that I found to Write great marketing materials and sales materials in your emails and in your sales pages Now this is a subject that I've had a lot of problems with it took me many many years to find how to actually Do copy well and I would always sit down and either not know what to write or write things They were very kind of chaotic and congealed. It wasn't very clear what the goal was and the marketing Content was just not very good. So I actually learned a very interesting framework of how to Write proper copy that when I learned it actually made it super simple Or I could sit down and in about 30 minutes to an hour write a very very good marketing material and Not really have problems with it I don't get any more riders block and just in general the content is very exciting for me I really get the sense that I like what I'm writing So this video is pretty much meant for people who have problems sitting down and writing Proper marketing material or think that it's boring or that it's chore So this will teach you how to do it very very easily So you only need to answer two questions in order to write really really good marketing materials. The first question is basically, what is the narrative for what I'm writing Which means the narrative meaning what's the story that I'm trying to tell behind the scenes? So often we start writing something But we're not sure what the actual underlying narrative is and the reason we need a narrative is because people think and Stories they think in in big overline narratives That's why books like Harry Potter are very very successful It's because they have a lot of mythical narratives built into them underlying the actual story So for example when you hear on CNN This guy was this black guy was attacked and this white supremacist Are in their eyes and all these stories They're actually trying to kind of push out a narrative which says America is a racist place So there's the story. There's what we were saying on the surface and then there's the underlying narrative they were trying to like build up and That narrative is very important because that's what actually drives people to take action for example, I could also tell you a narrative that e-commerce is not working anymore and that people are Just not making the results that they used to get from e-commerce now I could just give you some statistics, but that would not really That would not really touch your emotional side They would only touch your logical part but if I actually start telling you a story and narrative about a guy who opened up his own e-commerce shop and at the beginning He made a lot of money and then gradually he started seeing his profits go down the more I kind of pull you into a narrative the more you'll actually Be drawn in to read and the way you want to write is where everything you write Every single piece of content in your video in your email is always Pushing into a certain narrative so you only write things that promote that narrative and you double down on them and you Redact you take out any part of the email or the video that doesn't Increase it doesn't make the narrative stronger now The second thing you want to know before you even start writing and if you don't know these Don't start writing is what is my goal, but not just What's my like sort of cool goal? What's my actual? Ultimate goal for this piece of content So for example in this video, there is no specific goal other than just letting you know something But if there was a goal for example click here or I want you to buy something Then what I would do is I would tailor the narrative to the goal So I would have a narrative for example the narrative might be again America is a very racist place and the goal might be vote Democrat. So America is a racist place I'm going to give you a lot of just hit you with a lot of different Angle to make you really buy into that narrative and then when you fully bought into the narrative the goal The action I want you to take becomes an afterthought So if America is for certain and a very Racist place and the Democrats are the solution then the obvious answer would be to vote Democrat Just the same as if I can convince you of the narrative that the e-commerce market is now working that people are losing their income Then the next logical conclusion would be the action that I want you to take and the funny thing is It doesn't really matter what actions I want you to take I can fit multiple actions to the same narrative So I could say again the e-commerce is dying. You can't stay in it anymore So you have to go to stock market trading or you have to go to building your own business There's basically an infinite amount of things that I can Direct you to from the narrative, but there has to be a narrative if there's no narrative Then there's no meat in it There's no interesting part to what you're writing and it's not very clear what we're doing So when you have a narrative and you have a goal what happens is you basically have a Specific target that you're trying to hit and then you have a straight line of how you're going to get it And the only thing you need to do is build the narrative from the beginning to the end point Where you even go past this part where it makes sense already at the about 70% of your email It already makes sense that you should make the decision So you don't even need to finish the email or the video to already feel like Okay, this goal this action just makes sense that I should take it and all you're doing is setting up kind of like the rails With here's a story that promotes the narrative. Here's an example that promotes the narrative Here's statistics that promote the narrative and just you just keep building it through a petition and through different examples Until you hit your goal and that's how you write really good content very easily Even if you're like me and you don't really like to write this is how you actually focus your mind So there's no such thing as a writer's block There's only a lack of clarity and when you have an answer to those two questions What is the narrative? I'm trying to write and what goal what like final action? Am I trying to get this user to take then? It's very easy to start writing because then you already know where you're trying to get and what's the story behind it? So now all you need to do is kind of fill in the details where the lack of writing ability comes from or the lack of Clarity or the lack of They're basically the writer's block where it comes from is when you don't really know where you're aiming at or What's the underlying story to get there because then instead of filling out details? You have to like find yourself in a huge room and then it doesn't make sense So this was my tip for today I haven't made a video in about six months and the goal is to kind of reinvigorate the channel So if you like this kind of content, I believe you're gonna start seeing more and more and I hope you like it Let me know what you think if it helped you and if it did just click like and comment I would be very happy. So thanks for watching and I hope to see you soon


I did a video a little bit ago on DWM which is one of those suckless programs where in order to modify it you actually have to change the source code with patch and diff and stuff like that. Now I don't specifically want to talk about suckless programs in this video but you should probably watch it if you're a suckless, interested if you're suckless curious. But I really just want to do a general video on patch and diff because a lot of people don't know about these programs despite the fact that they're on every Unix, Linux, they're very useful but a lot of people don't often use them just because I don't know maybe they seem a little weird or something like that. So what are patch and diff and what are they actually used for? So here's my hypothetical example.  You can actually tell this is old stuff. I had it back when I was a normie because there were like space names in the folders and capital letters and stuff like that. Anyway, so as an example I'm going to open up my master's thesis. Now this is a really big document. It's over a thousand lines and this of course is law tech but you could hypothetically have any kind of source code from any program markup language or just any kind of text document. So here's what we want to do. Let's say hypothetically I am revising this, I'm making changes, I'm actively writing this and at the same time I want to have someone come in and you know I guess make edits, correct the mistakes or something like that. So that's what I want to do. Now as an example, let's say I send this off to someone and they're going to use diff and patch. How are they going to benefit from using diff and patch? Okay, so here's an example. Let's say we go here and add in some extra text. So here is a new paragraph, blah, blah, blah, stuff like that. Just add in some kind of text. I'm going to add in some stuff over there. I'm going to go to the bottom, we'll say this is a new old paragraph, stuff like that or maybe all capitalized stuff or something like that. I always almost forget the VIM shortcut for capitalized but I remembered it. So we've made some changes to our file and now what I'm going to do is I'm going to save it not as thesis.tech but I'm going to save it as thesis underscore new.tech. So that's going to be the change that this hypothetical editor has made to my document. So here's the problem normally is if he just sent that back to me, maybe at the same time I'm making a bunch of changes to that document and now I have to manually go through and find out what the changes are and intersperse them and copy and paste a whole bunch of stuff but we could just use diff and patch. So first off, you may know that there's this program named diff and one of the other things that it does by default is you can give it two files and what it does is it prints out the lines that are different between them. So these green lines right here, the lines that are pointing to the right I guess, they are part of our second file but not our first. So these three lines were added in our second file but they're not existent in the first. These lines here are also added in. You'll notice that this line I changed this word on on what the diff generates So it shows you what it looks like in one file and it shows you what it looks like in the other file. So it shows you that distinction. So diff shows you all the differences between files. Now one nice thing about diff is that you can actually make files to use patch with. So specifically now this enough actually is very nice. It's very convenient. Okay now I can see all the changes between these. Hypothetically you could go through and you know copy and paste this it would at least be easier than going through the whole document. But one nice thing about diff is that you can generate a diff file. Give diff the U option and that will generate, well let's actually look what this does first off. It first off gives you the file names. It also gives you the approximate location of these changes in terms of line number. And it also gives you the lines that are around those lines. So hypothetically you can see exactly where these changes are taking place. So the interesting thing is we can output all of this. We can say let's output all this to thesis.diff. So now we have this file thesis.diff. So the nice thing about this is we can use it with patch to automatically change our file. So what we can do now is I can say patch thesis.diff and it's going to say patching file thesis.tech. Now of course it knew to use the file thesis.tech because again in thesis.diff it tells you where exactly that is. But what exactly did that do? So long story short it made the changes to make it like the other revised file. So I can open up thesis.tech and I can see I forget exactly what I said paragraph or something. So you can see that these lines that we added in have been added in. So I think the other one was maybe contemplate. So these changes have now taken place. You can also let's say we want to reverse that change. I can run patch with the capital R option and if you've already applied a patch this will undo the patch. Now let's show you where the goodness is. Now right now we're just changing files. Again the interesting use case is when someone is making changes to the file while I'm concurrently at the same time making different changes. Changes that might even be really close to each other. So let's open up this file again and I think it was around this line. So I've unpatched the file so now it's how it originally was and let's say I go to this place where the diff file wants to add stuff and I add in another paragraph. I'll say something like this is a paragraph that I added on my own machine. So now we have that stuff in there. Now let's try running our patch again. And if we do that you'll see that it still worked. Hunk 1 succeeded, Hunk 2 succeeded, Hunks are just like the modifications. That's what that means. The interesting thing is that Hunk 1 is the one that we change stuff around and it says it succeeded with Fuzz 2, offset of two lines. Now what that means is, let's actually look at what it means. Where was that defect? Yeah, you'll see that so there's this paragraph that we had added on our own machine and the diff file added in this. And the reason, keep in mind we changed the environment that it was looking for but it realizes okay it's close enough to the line number. It's close enough to this additional text. I'm going to put it in. I assume that that's what they want. So that's one of the nice things about patch. It's actually pretty smart. Now let's make a change. Let me actually undo that patch once again. Let's make a change that will make it too difficult for patch to automatically decide where to put something. So let me go back in there to that same line that I keep searching for. Let's say I comment out. Let's say I change these lines down here and that change is going to throw off patch totally because it'll see that this line is similar. It's going to see that we're looking at a similar line number. But this is probably a little too much for patch. So let's just try that out. So I'm going to save this. Now if we run patch, what's going to happen is it says 1 out of 2 hunks failed, saving rejects to thesis tech reg. Now what does that mean? I'll tell you what it doesn't mean. It doesn't mean, I had an error. Let me go online and search for it so I can figure out what happened. Don't do that. Because it actually gives you the answer right here. Now what happened is patch wasn't smart enough or wasn't exactly sure how to change one of these hunks. So it saves the hunk that it didn't change to thesis.tech.redge. So you can open this up and see yourself if you want that, oh, these are the lines that failed. So if you have, let's say again, you're patching a suckless program. And because you've patched so many patches, it's changed so many of the environments that eventually patches get to the point where they have errors. Well, you just open up your rejects file and you see, okay, this is what's going on. I'll open up thesis.tech myself if I want. And I will add in this line that patch didn't quite know how to add. So I'll add it in here, do whatever, change whatever you want. And that'll be pretty much all you have to do. Actually, I'm going to undo this because I might do some more changes to this. But that's what you're supposed to do.  So one nice thing that patch does is it actually gives you a, in addition to a reject file, gives you an or a file, an orage file. I don't know how you want to pronounce it. But in this one, it gives you what that document looked like before you applied any patches if you ran into an error. So this is what it, if you totally mess things up, if you're applying patches and patches and everything gets too confusing and you can't really run patch R because you've changed too much, you can usually go into the orage file or the orage file and get. So again, the nice thing about patching diff is you can use them on any kind of files. They work, of course, similar to git. I think actually git might use, I'm not sure how git works, but I think it might actually use patch and diff sort of as a back end partially. They definitely can generate diff files and stuff like that. But patch and diff is a nice way. You don't need git or anything fat. You don't need to start a git repository. If you're just making simple changes to a file, or first, actually I use this every once in a while because I'll make, I'll be testing something on my .files on another computer, the .files that people use publicly for larbs. And I might make a whole bunch of changes. Well, I can make a diff file instead of uploading, re-uploading all files or starting a new git repo and or connecting to my git repo. I can just make a diff file and send it to myself or something like that. And that gives me pretty much all I want. Now you, of course, should double check diff and patches command, you know, mans, just to make sure you know what's going on, make sure you know all the options. I've only sort of scratched the surface here, but that should give you an idea of the kind of things you can use them for. And they definitely are useful. So that's about it. And I will see you guys next time.


Okay, so thank you very much for coming everyone especially on Sunday last day probably very few talks very less talk So thank you for being here. So I'm Riviera. I work at Red Hat and software engineer and today I'm going to talk along with my colleague my comacubes also working at Red Hat about composable microservices for streaming analytics and First we're just going to give like a quick historical context or also view where this Concept of microservices comes from it's not necessary Where most people think of then we're going to briefly talk about the cat architecture about streams And then how we can view the streams as this microservices as primitives which you can use to build complex analytical systems then finally We're also going to show some examples of streaming microservices in action so To briefly introduce historically the concept of microservices in that Overworlded sense of the word We can trace it back probably to Ken Thompson one of the previous units and the Unix you also see so the Unix you also see as many interpretations, but here we just like a popular one from Peter Say was and Basically states that We should thrive to build systems which do one thing have components We should work do one thing and do it well this one should work well together and They should also handle tech streams because that is universal interface and As you'll see these principles were originally applied to the Unix system and they work for binaries working on the Unix system But we can generalize them to modern architectures as well. We'll try to show you so a simple example of this unit philosophy is for instance pipelines, right so Pipelines allow us to change the inputs and outputs of different processes and In this case, that's exactly what you're doing. So we're reading an input file. We're passing it to another Basically using a process called cat, which I'm sure everyone knows to read an input file Then we're sending the output of that process to to a text processing program Then we're starting at using another program and then finally writing it to disk so one advantage of this Way of laying out things is this is very composable So if any point we want to do some further processing like we only say remove any kind of duplicate lines We can just insert a command in the middle of this pipeline. That is exactly that so a modern architecture that follows very loosely this kind of a Philosophy of the Unix philosophy is a microservice architecture. So what is a microservice in today's context? So ideally a microservice has many things in common with with Unix philosophy So we tend to write programs or processes that one do one thing and do it well We try to write programs or services that work very well together But this time we're just not using a text stream So we're doing one general using well-defined APIs over the network because that is universal interface so let's just look at some of the Commonalities between microservices and Unix philosophy and some of the differences where are the technical differences? Well, for instance previously we Sorry That's good So One of the differences is before we were handling we're dealing with Programs or processes binaries on this right and those were like their computational units and now we're dealing in microservice world with Some kind of a server. So something that's living It's running by itself and it's communicating via some kind of Protocol like HTTP or RPC, etc So another difference is configuration, right? So a way to configure Common lines is obviously the CLI the common interface so that's the way we pass arguments we pass the data or we pass configuration to the processes and in Microservice world the way we do that is usually we configure a process at deployment time using JSON or YAML Some kind of configuration file and also the API so the API is well-defined that allows us to configure the running microservice at runtime So they say if you have a rest Service then we can actually specify which kind of data format we want back or we can send extra data extra parameters, etc and And Finally, we have the communication so that's quite different obviously in the Unix world we communicate via the pipes or Redirection and in the Unix world in the microservice world. We're actually using the network for communication between the microservices so Sorry So why should we use microservices? So we're just going to briefly because how many of you are familiar with microservices and microservice architecture Okay, so some of you are familiar. So for the ones which are not familiar I was just going to do a very quick overview of what are the advantages of using this kind of So we're going to start with the simplest one, which is the code simplification. So Microservices allow us to reduce compared to a monolithic application the code surface area So that means that our code is going to be specialized in a single task. Hopefully it's going to be simpler Because we can focus on a specific task We don't have to worry about how it fits with the global overview of the entire application We have a well-defined API and that's how we communicate with the world also Which reduces the cognitive load of the developer because instead of opening like a code base with millions of lines You can actually focus on a very well-contained piece of code and you can look at it So it also introduces a separation of concerns, so I mean actually using separation having the separation of concerns we can do Things which are very useful to us as a developer like decoupling unit testing So if anyone had to do a continuous integration on a monolithic app because it's particularly difficult, right? It's very easy to overlook some subtleties and on the testing scenarios or you know There's always something you might want to miss or you never Plan for and if you have obviously a smaller component of code with well-defined API Then it's much easier to create testing scenarios or continuous integration for that It also allows for parallel development, which means I mean if you have like a big team of Developers they can actually work on the services Almost in isolation. So if you have a well-defined API defined a priori You don't have to wait for another component of your system to be ready So you can actually mock data you can you can simulate calls to the API So you can progress your work on a specific surface without being blocked by someone which hasn't finished a bit of a Message monolithic application so this also allows things like Simplifying refactoring for instance, let's say you have a Bunch of services on your application, right? And you want to change the internals of one of them So you find a better algorithm for it or you find a better framework that Than the one you were using so that's quite easy to do in isolation, right? If the API is stable, and it's well-defined then obviously you can just change whatever is inside the micro service and if it works You know passes all the tests and you should work finding the rest of the system another thing which which allows for this kind of easy Simplified refactoring and the fact that you can have a polyglot development, right? Because one of the problems of monolithic apps that you always going to try to find something That's a silver bullet, right? You try to find a run time for the entire system a framework that does everything That's very difficult in this architecture. You can actually pick the best tool for the job So say you want to write a rest server in Python or you want to write something else on Java or using OJS That that's fine. You can do that and in fact if you want to Refacture the code so you want to rewrite Python bit on go or hopefully the other way. I don't know perhaps you So these are big advantages of using micro services But it's not the silver bullet as well. So as with any architecture There are some there are some problems. So for instance, you might have orchestration problems So say you have like a multitude of micro service. You're not just We're talking about you're at 2,000 micro services, which have to communicate between themselves So that can be a real problem to orchestrate them. So right services might go down you need to read Care of the plumbing that might be problem versioning might be also a problem because We talked about parallel development, right? What happens when someone is doing a micro service and it changes Breaking changes, right? You have to know that your services are communicating with the right version of the API Security is also concerned almost in any field You know So you have to make sure that you have authentication set up that services can call what you were made for originally That services have the right responsibilities and of course things like communication should be encrypted and Finally, you have discovered services cover. So in a fully automated Application you might want services by themselves don't know that other services exist So you have to have some kind of registry or catalog to find the micro services So fortunately, there are tools which in conjunction with good practices allow you to Overcome some of these challenges. So, you know platforms such as OpenShift or kubernetes They allow you to solve some of these problems like your persuasion versioning Up to certain points of use and also discovery By, you know giving you tools to deal with this and this couple of good practices should minimize Most of the problems we talked about so another misconception is the fact that Microservices solve scalability problems, right? So that's not true by itself like changing your monolithic app to micro services Not going to magically solve your scalability problems, but micro services being Usually stateless by nature They make they are a natural fit for containerization and in platforms such as OpenShift or kubernetes That means you have an easy way to scale out your system, right? So if you have stateless micro services, you can just increase the number of instances of micro services and you don't have to worry about it Even if your micro services are not stateless if they have to keep state of some kind or the problem is not the actual micro service So I say you have a micro service that performs heavy computational loads You can still use a micro service architecture by for instance connecting it to a spark cluster So I mean if you're familiar with spark with a patchy spark okay, so spark is a Distributed competing framework. So basically what it does is distribute second the calculations or computations or whatever you want to do by several nodes on a cluster and It does the processing in memory and you can scale easily by adding more nodes to that cluster So basically if you have a way of making your micro service communicate through the cluster If you're having a computational bottleneck, then you can just you know give more notes to the spark cluster And it's still using a micro service architecture. So a common No, my culture a way of referring to the stream processing architecture is usually the capital architecture So the copper architecture very broadly works by not Disposing of the the batch processing layer on an application and what you want to do now is deal with streams Which are basically coming from a pending only immutable log I guess the first example that comes to your mind is is Kafka You do something like a patchy Kafka which turns events into streams and basically now our micro services are going to React to the streams in real time. So you don't have any kind of batch layer or we can do micro batches But you know, we're not we're not like storing a huge amount of data processing it overnight results on the next day, so we're doing things with data in motion and with the cap architecture we we we notice a pattern which is since our Stream layer so the the Apache Kafka case is immutable what we're doing is we're consuming streams We're processing them and we're writing new streams So we're not actually changing your regional screen streaming in any way So any of the outputs of these stream processors will be new streams which could be in turn read by other services so Stream architecture also has some challenges obviously and the most of all the I mean, these are just a pick up for Common problems with working with stream based architectures Latency will be one. Obviously if one of your micro services introduces heavy latency on the processing Obviously all the other services consuming it are going to suffer from it Statal transformations are not very very trivial to you, especially if you want to do something complex So obviously if you just want to transform the stream without keeping state That's going to be easier, but sometimes you need to use that for transformations as Always security is a problem if you have data in motion should be encrypted Authorizations as I mentioned etc and stream reconciliation obviously is a big problem because you always going to have failures at some point and You're going to have to deal with them So now I just want to introduce. Oh, sorry. I Just want to introduce What we're wanting to talk basically which is how to use micro services then to build modular analytics architectures so an interesting thing is that Usually when you when you go to a micro service talk you you listen about how you can split Business concerns so you can split business logic like you have the ordering micro service You have the billing micro service, etc. But here we propose to think of them at even more Finally granular level. So it's a really small primitive computation So if you look at the micro surface as a really small unit of computation, there's one really single task you can start finding for instance some Similarities between this type of stream programming and functional programming So as we talked before the streams are immutable, right? So here what you're doing is just applying some kind of mapping of a function to an immutable quantity You know, that's like a fundamental principle of functional programming This This micro service can only be composed, right? So this is like a typical function programming Compositions so you can add micro services which read from one stream writes one other stream and those are the inputs of other streams Has k of transformations and you're creating new streams. So this is another pattern that you find in and for instance, you can you can even think of Referential transparency as in functional programming that means that You can take one of these services and actually replace it by two services That overall do the same thing and compose those two right you can replace lambda 2 by 2 for the services And then we will have the same functionality without changing anything else on the application and I mean you have lots of constructs with micro services that you know Give you like building blocks and primitives like in in programming. So you can have Microservices that you stream splitting right that'll be like a conditional branching. So they're writing to one stream if you set the You have filtering you can have micro services that you filtering you can have reduce operations, right? You can have a micro service that consumes from several streams Combining them again, this is like a stateful transformation. It's keeping some kind of state some accumulator But it's transforming them into a new stream so I'll just Quickly show like a simple example like one of the most simple examples you can think of making this work So this is not going to be a complex application, but here you're using primitives to build an analytic system so as a stream you have some kind of Numerical data coming into a stream. It doesn't matter what it is a bunch of numbers coming in and You want to create a service that's going to calculate a mean and a variance of that data that's coming in in an online way, right? Okay, so this is like a stateful transformation, but you're just keeping like an accumulator basically you're transforming It's like a reduce operation and Then you're going to write that that the mean and variance values to another stream Which is going to be read by a Qsume or a cumulative control chart Which is basically a way of detecting abrupt changes on or drift on a series of values But now we're not trying to detect a drift on your original data. We're trying to detect the drift of the mean So you're basically just detecting we have a stable mean Let's say number of visitors on our website or whatever We want to know if that changes abruptly it might be growing you might be going down But you know if it's not abruptly it's fine, and then we write those values again to a further stream so I Mean Here you can see then some of the advantages like I mentioned for instance the refactoring Let's say that now you're not interested in calculating the mean So we're interested in calculating just the variance, right? So you can just rewrite that micro service to do something else and everything else in the system will be workers previously You're still detecting a drift or an abrupt change on whatever's coming from that stream It's just it's just a different thing now, you know So you don't have to rewrite anything else on your system or if you want Let's say you have like a predictive model and you want to try to predict How that variance is going to look like say in two days or or any other interval Then you just consume from that variance stream You perform the prediction with a train model and a micro service and then you get an output Which is written to another stream and actually you can actually see You can pipe it back to to the cumulative sum and see what does the prediction value actually Changes abruptly so you can see how we can compose and create complex analytic systems or just with simple primitives So as I mentioned some of these services are Stateful one of them is not The prediction one is not but in the sense that it's not, you know, it's even potent in a way But the variance of the Q-sum services they're actually stateful So, you know, you can actually see them as accumulators working on a new sequence of numbers so Now I'm going to pass to my colleague Mike and he's going to give An example is going to show some examples of micro services in action All right, so we did a great job of kind of showing us the theoretical side of this And what I'd like to do now is take some of that theory and show how we're doing it on OpenShift How many people here are familiar with Kubernetes or OpenShift? Couple people okay, so Kubernetes and by extension OpenShift because OpenShift is an enterprise packaging of Kubernetes an open-source enterprise Kubernetes is a system for orchestrating containers across a cluster of physical nodes and so What we're gonna do with this and I'll Okay, so we'll look at This is kind of the generalized architecture that we're gonna play with We're gonna have two Topics on our stream. We'll be using Kafka to do this. Who here is familiar with Apache Kafka? Okay a bunch of people so This we have a broker that's handling this message stream We have two different named topics now We're gonna have a data generating service at the top that's going to push data into our first topic And then what we'll do is we'll show an example of an application that just reads from that Just to take the data. It doesn't necessarily do anything with it And then we'll look at another application that takes the data and does something with it and place it out onto the second And we'll look at another application that reads from that so we can kind of verify what's going on Delay between one a Okay, so but first I'm going to talk about the Kind of the technology that you'll see here So we're using OpenShift as our platform because that's kind of the developer platform that we like to use We're using Kafka as our message broker and Apache Spark as our compute cluster and Spark gives us a very easy way to Generalize operations across a distributed cluster of machines And we're using that in a containerized way so that we can really leverage the power of Kubernetes To give us a scale-out potential kind of across an abstracted hardware layer and then lastly I'm using Python for all the samples I wrote here just because I really like Python and I think it's kind of easy So how many people here are familiar with Python? Okay, now how many people are comfortable enough to look at a little code from Python? Okay, so this will be the first Example that will dive into when it I know if I hit it again, it'll go too far so This is the first application we're going to look at our data stream is going to be a series of random numbers Okay, so this is kind of like the mean example that we was talking about before a filtering application that's going to either Filter out all the even numbers or filter out all the odd numbers and it will play those onto a second topic So I'll show you real quick the filter function that I'm going to use and I'm using There's a wrapper application that I actually have that's doing the spark interaction But at the core of that wrapper application this is the function that I'm going to apply to everything that comes across the stream and because Things that you know what the data that we're dealing with coming off of Kafka is in a string format And we're going to play back on a string format So this function expects some sort of stream value and then it will return either a string value or a none Depending on if we want to play the value onto the second top So what we're what we're looking at here is the console of open shift and each one of these Pods as they're called here is a view into a container But this one called the generator is our random number generator and if you can see it's got a blue ring there That means that container is running right now And if I click into it you can see a little information here And I want to show this to touch on some of the topics that Rory was talking about you can see up here It says what the image is and there's a hash at the end of it and it tells us what build it was and You know where the source is actually this was built directly from a git repo and then deployed into open shift So I never built the image open shift built it for me And you that source line is actually the last commit message that came out of there So you can see how I'm already having a view into what version of the software I'm running so it's very easy for me to monitor that and then this at the bottom is telling me a little bit about What's exposed into this application? You know networking-wise and whatnot Now right now if I look at the logs for this, I won't really see anything because it's not printing out It's maybe has some error logs or whatever. That's all it's printing out So I'm going to start the first application here Then I'm calling the listener now. I didn't know how much time we would have for this So I built this application ahead of time and on open shift and I've scaled it down So it's not running what I'm going to do is scale it up and as it starts to run right now It's pulling the image and it's starting it I'm going to go into this pod I'm going to look at the logs that are coming out of it and I'm actually looking at the wrong topic right now So what I need to do is redeploy this so I I was playing with this to try and get it working the way I wanted to and The way that we're injecting Information into this application is I'm using environment variables inside the container And so Kubernetes allows me to modify what's going on inside that container I'm using those environment variables to tell it where to read from So the first thing I'm going to do is tell it to read from a topic in Kafka called numbers Which is my random number topic This is one of the really nice things, you know that I like about open shift in Kubernetes You can see that it's automatically redeploying the application for me and it's handling the cut over the networking to make sure that it doesn't start Until until the other one is over Okay, so we can see Is that too small can everyone see that You can see it's spitting out numbers here and this is all this is the log part This is just the raw message we're getting from the stream And so what I'll do now Is I'll start up our Filtration service and I'm calling it evens filter because it's going to filter out all the even information all the even numbers now Ruri and I work on a project a community project called ran analytics, which is focused on Creating or helping empower people to write these kind of machine learning Applications in containerized environments and what we're going to see is as this application starts up It is it's still pulling the image. It looks like or perhaps. Okay, so it's pulling the image because When I built this I'm running on a seven node cluster So there are seven VM or seven, you know virtual machines that I have running in Google's cloud right now And that's the the cluster that's running this we use this for a lab earlier So I built this image and the image was built on one of those nodes But Kubernetes scheduling has decided to run it on a different node this time So the image had to be pulled to that other node. So it's probably running now and As we see it start up Some of the tooling that we created is going to automatically deploy an Apache spark cluster for us and Bind it to the application. So right now it's spawning the spark cluster and Those those images are being deployed and if we look at the the logs for this What we'll see is that? Right now the app this is the tooling that we've injected into the container So this is actually happening before your application runs and it's waiting for the spark master It's found the spark master and now it's waiting for the workers to come alive And so the workers are starting to come alive now and once the workers are alive It will start running and now it's starting to process the stream and apply that function to the stream So let's go back And if anybody has questions about what I'm doing, please stop me and you know, it's perfectly fine We can discuss any of these topics. So I'm going to go back to the listener now And I'm going to put it back on that evens topic so I can see if I'm actually getting the evens information And we can see again, it's it's redeploying for us. It's pretty quick because this app, you know starts up very fast This is kind of goes back to what we were talking about with the do one thing do it well It's it's very small so it can start up very quickly So hit the logs And now what you can see is okay first of all we've changed the message So now I've structured the message that I'm playing on to the second topic Maybe this is what our this is how we've defined our API and you can see it's just pulling out All the even numbers and filtering so this this is pretty simple And this is a very basic example But I hope you can see how you might be able to use this to do something a little more complex And that that's what we're going to get into now. So let's look at something more complicated transforming data and actually Analytics to what we're doing. So in this example What we're gonna be getting is these Complex messages that kind of look like a Update right like maybe this is a Twitter update or something You know we have an update ID and a user ID and the text that came You know, I don't care to take another buddy hashtag Thursday hashtag Halloween So someone ate too much candy or something and they want to tell the world about it And what we want to do because perhaps we're the social media provider We want to do sentiment analysis on each one of these to see if someone's saying something positive or negative Or maybe we want to learn if people are using Phrases that break our terms of service or we want to find out if there's harassment going on And so we're going to use analytics to create this sentiment that will tell us what it thinks about that statement And to do that We're going to use spark again but this time we're going to use two python packages called spacey and Vader and one of them is a Language kind of deconstruction Tool that tokenizes the language into the parts of you know sentence and the other one is an analysis tool that tries to make up He tries to determine the sentiment of what's going on and what we're going to see is that you know My workflow is very similar to what I was doing. I have the generator running in a different project I have another listener and these are you know some of these applications are things that I use over and over again So you imagine the cat tool or the LS tool in your operating system These are tools that we've built this listener is a tool that we like to use with Kafka because it's very easy to deploy this Microservice and then I don't have to worry about like SSH and into a machine inside the cluster to get a command line to read the Kafka topic Because that's all hidden behind the networking that's going on in OpenShift. I haven't exposed any of this to the outside world I'm only going through this console to see what's happening Now if I Hopefully I didn't misconfigure this one. I did So I'm gonna have to deploy it again and what you know what happened here Is that I didn't I didn't reset this to look at the source. So let's look at the source to begin with And you can see like you know one of the things I like about this is this this app is just very quick to redeploy So it's it's not as quick as using the command line But you could imagine, you know, some people talk about the cloud as the new operating system, right? So if that's the case then these microservices are starting to become the utilities that we'll use, you know to pipe together data So look at the logs and I'm gonna I'm gonna pause this because it's going back pretty quick, but you can see We're getting that we're getting these messages like we saw in the slide, right? There's the update the user and some information to go with it. So now What I want to do is start up this sentiment generation And I'm just calling it the transformer here and It's prop unless it get randomly hits the same note again. It didn't oh didn't so you see this one started very quickly And it's already spawning the spark cluster for us You know one of the nodes is already so while that's happening I'll I'll relaunch my listener again to look at the the new topic and as soon as it It may already be Jenna. Okay, so it's not receiving any information yet But what's happening right now is like we saw with the other application. It's waiting for spark to spin up You know and the other application isn't doing anything yet, but here we go. Okay, so the information is coming across I'll just stop this quickly You can see now the message is there's our message, but we've added the sentiments, right? so the application that we wrote is used the sentiment analysis on our spark cluster to apply this and The reason that we're using spark to do this is because spark is designed for distributed processing And so we can do a lot of generalized processing and it gives us a very easy way to horizontally scale that so I in this case, I'll do it manually, but there are tools that will automate this for you and Let's say that let's say that I was Twitter right and I'm getting Thousands hundreds of thousands of messages a second coming in this this stream is operating at 10 messages a second It's not very fast, but if that were the case It would be very easy for me to just scale up So we say I'm going to scale up my spark cluster to have four pods now running right so be this This dash W are the workers, you know spark has a master worker kind of relationship So the master node is controlling the workers and it's distributing information out to them work to be done So now if the stream gets faster, we can scale this up and if it slows down we can scale it down And there's a project that we have on the on the red analytics site. That's actually doing this automatically It looks at logs coming out of spark and it sees when spark says I've got too much pressure I need more executors to execute this and it will tell kubernetes or will tell OpenShift Up the number of executors until it sees that pressure to go down and then if the pressure goes off it can reduce that number So you can start to get automated scaling inside of your application pipelines as it were and this you're not really going to see any You know output from that because the stream is just not going fast enough to really do anything But you know what you what you could do and this is we've exposed this You know if we needed to examine what was happening This is not looking into our spark master and we can see you know kind of what's going on it's using up like it's Trying to grab an outrageous amount of memories You know four quarters running on each one of those so that you can start to introspect into what's happening with your spark post So at this point what I might do now that I've created the second transformation stream is perhaps I'll build applications to go on that other stream Maybe I'll pass it off to another group so they can do it And at this point what happens is? The messaging that we've the schema that we're using in that topic becomes an API And so if I publish that schema within my organization and I publish the brokers that this information is coming on We could allow developers to get access to this and experiment with the data to you know Take it to different groups and show off different ways of interacting with the data And it helps to go into something that Ruri was talking about which is parallel development You know so Once I've set this architecture up Maybe my group is interested in doing the sentiment analysis But perhaps there's another group that's interested in doing a more complex analysis on the underlying Data that's there they could use the same data stream and start creating their own applications We can do this completely You know alongside each other without needing to communicate about the API is between our applications The schema that's on the topic is what becomes important at that go back here All right, so Let's talk about some practical concerns that come up when you're operating in this type of environment, right? Like I just said message formats are going to be something that they become the API So in the past we might use something like if we're creating a rest server you might use open API Are you familiar with swagger or open API? So this is a format for describing an API for a rest endpoint. You might use GRPC which has very structured Templates that can tell you what the structure of the API is but these are programmatic API's Again, the messaging formats now become kind of a de facto API or a soft API, you know This is the schema you can always expect It'll just be one number and these numbers are coming from you know sensor data perhaps on a specific device That's in the field and so you say well, we've got buses all around town. We want to monitor, you know the some sort of G-force sensor inside of it to see if there's been an accident or something, right? So you could imagine a stream for each bus that exists in your city and Applications on each one of those streams doing the mean calculation looking for big deviations, you know As long as the message format is the same and you publish that internally Many different groups could be like creating value out of that data Another thing is brokers and topics and kind of configurations So this kind of goes hand-in-hand with the message format schemas is it these will be something you'll need to publish internally Or maybe you don't want to publish it internally Kafka has a very deep security mechanism on it that allows gating for who can have access to which streams and and these are ways That you'll have to kind of share the information internally so that all your developers can either get access to it or not have access to it also data provenance and this was something that Riri touched on a little bit which is If I have a message come into my system and we saw with synthetic Social media data. I had like a user ID and a message ID, right? If I just took the text and added sentiment to it and then got lost the user ID and the update ID Those next applications wouldn't on the next stream wouldn't know where it came from They wouldn't know maybe how to look back and say what what user is this? What is this user's history? You know, do they have a history of making really negative comments or really positive comments? You know, those are things that your applications would want to do to bring the data together So you'll have to be very careful about how much information do you persist into the other streams? And then getting into testing can be a really interesting situation as well because you want to have good data streams to test from And it's not always easy to use the data that's coming live But Kafka makes it really nice and that you can replay old streams So you could test against streams that have already come in to say like what if we want to change a Machine learning model that's doing some sort of predictive analysis We could take some data that we just saw the day before Run the new model against it and see if anything's changed And you saw how easy it was for me to manipulate open shift and kind of deploy different applications I could create those testing applications in separate projects and have them run against live data And then I can do kind of like a B testing or blue-green deployments where I can you know Determine which one of these do we think is working better for what we're doing? And I think you know debugging is always tough It's even more so tough in that when you're in the cloud You could see how my access to those containerized applications. It wasn't like I wasn't get shelling in I was looking at logs. I was examining their their health based on kubernetes So you'll have to think about that as you're making your applications, you know, we always want to be putting good logging in our apps We always want to be putting out good, you know, exception traces or whatnot That becomes really important when those logs are your main view into what's happening with the application So I want to just review what we talked about today We talked about Kind of the Unix philosophy and how we think that's important to microservices You know kind of chaining from one to the next and using an easy format between them We talked about microservices and how you know, they we think they should be contained in a way Where you've got to structure with some sort of API a clean interface and the applications sitting behind it And we also talked about the Kappa architecture and how you can really leverage streams and the applications that sit between them To to really unlock your data and transform it in interesting ways and so this QR code will take you to a github repository where you can find Code samples for everything you saw today that I ran here and there's instructions So you can you can deploy this yourself and experiment and red analytics.io is the community Project that we work on you can find lots of tooling for OpenShift and Spark and a lot of tools that we're You know really trying to empower people to take these things and have fun and you know play with the data and make Here on things and if you'd like to get in touch with myself or with hurry here's our email addresses and our Mastodon IDs if you're on that network So I guess with that any questions Yeah, yeah, go ahead The Kafka cluster was already is already running actually So Kafka well I want there I had another project on there called Kafka and in there the brokers are running in there So they've actually been running, you know all day pretty much. I didn't just start it up now, but There's a project called Strimsy at Strimsy.io. They've done some great work, you know We talked to Jacob if you want some more information The it makes it really easy to deploy Kafka into OpenShift and into Kubernetes and you just take you deploy these scripts and within a minute or two You'll have a Kafka broker up and running so it is very I could have deployed it here I just didn't want to push the time good good question. Thank you. Yeah. Yeah, go ahead Yeah, sorry, so you're saying I don't know Any other questions? All right. Well, thank you very much


The next presentation, I will be giving on behalf of the maintainers of the WalletFramework.net. The WalletFramework.net is one of the projects that are right now in the process of being proposed to the TAC for adoption. It actually started as an areas project on the areasFramework.net and is already being used in productive implementation of wallets in the wild and the team and the contributors decided to enhance it and bring it to Open Wallet Foundation and on that way also changed the name to WalletFramework to also indicate that this is the focus of the work being done in the future. So the main maintainers are Sebastian Bickele from the LISI team and Christopher Hample from ASATOS. So as one of the most notable features and I just told how I was a bit surprised to see that almost all of the projects we have seen so far are native code, right? So we've got native code for Android or backend systems, Kotlin or Java and we've got Swift code for iOS. We have a low code platform that is cross-platform and this one here is also cross-platform as the.net framework allows people to build applications that run on different platforms. So there's quite a mix of options and I really like that because it allows the developers to pick and choose what's Swift that needs the best. So the framework already supports Didcom V1 and Anocrats and going forward the team and the companies behind the team are interested to align it with the most, mostly with the Open, with the European Digital Identity Wallet Initiative or EIDOS2. I mean, those companies operate out of Germany and in the European Union so that's of utmost importance to them. So what they are doing right now is they are implementing OpenID for verifiable credentials with a focus on what's called the High Assurance Interoperability Profile. So this is a profile of OpenID for verifiable credentials that is especially designed to fulfill the requirements of regulators in the EIDOS world but in other jurisdictions. And the project will not only be a library fall that implements the protocol, the maintainers also plan to implement another credential format. Right now Anocrats are supported as in almost all of the areas projects. Right now they are also implementing SDJOT VC. The project proposal has already been submitted. As far as I'm informed, this project shall be discussed in the meeting after the next TAC meeting. Perhaps we slightly adjust the schedule to get it adopted faster because we have a lot of inbound contributions. Yeah, that's it. So it's .NET, it's there, it's been worked on and they are looking for additional contributors that are interested in that kind of technology. Is there any questions around that? Drummond? Status is involved? Yes, Christopher Hempel. So those two companies in my perception are the main maintainers of the project. And they want to really use that for production systems. So especially ASATOS wants to run it out in their special kind of projects in the construction industry, for example. So it's really, it's already battle proven. And the Lizzy team and also ASATOS want to use that really for production in the short term.