So I'm sure that it's going to be interesting for all of us and I request Mr Ajay to take over and how we go about it because in case it is interactive or anything so he can set the rules for the game and then we will take it forward. Thank you Mr Ajay, all yours. Thank you Arvind. Thank you sir. So what there has been some amount of gap since I did part one. So in part one what I did was I went into how exactly shareholder litigations arise, what are the different kinds of shareholder litigations and I also went into various other aspects relating to how what and all the judgments you need to look at how what are the documents that you need to collect from a client and I also gave a few judgments on these issues. So now what I will be doing now is I'll be going into various avenues for shareholder litigations. One of the key things what we must realize as lawyers is strategy is very important. Where do we file a case? How do we file a case? All of these things become very important because in the facts of each situation you will need to adopt certain strategies. I'll give you a few examples. So what used to happen in the early 1990s is that when foreign investment was allowed into India, lot of the majority had to be with the Indian company. But the foreign companies made sure that they put in a lot of clauses to buy back the shares at a particular price. They put in a lot of clauses to protect their rights and also there were a lot of multiple agreements which were entered in. So for example, if you were to take the case of say McDonald's. So McDonald's had entered into an agreement with a person called as Vikram Bhakshi. Vikram Bhakshi is a guy who was a real estate man. He didn't have any experience in the restaurant business. So there were multiple agreements, there were franchise agreements, there were suppliers from whom McDonald's would source supplies and there were agreements with the company which was formed as a joint venture between McDonald's and Vikram Bhakshi. Vikram Bhakshi, the company was called Conaut Palace Foods Ltd. So what happened here is that when Vikram Bhakshi, the company was doing really well, they wanted to buy off the shares and McDonald's wanted to hold their presence. See because ultimately it's McDonald's brand and the trademark, everything belongs to McDonald's. So ultimately he's only a franchisee but he's a man who built the market, who built recognition for the product and he did a lot of things around it. Now why I'm talking about Vikram Bhakshi's case is because it's one of the latest cases that you will see. But if you go back and see a lot of company law board decisions in this regard, you will see that there are a multitude of decisions. There are lots of decisions. There's ultra filter versus ultra filter. The earliest one is Needle Industries versus Needle Industries which is over 1981, which was a battle between Fahli Nariman and Nagore Sirwai. Fahli Nariman calls this one of the most important cases which he succeeded in. Like most very famous senior educates, they talk about, I mean like especially Harish Salve and Fahli Nariman. Harish Salve talks about the bearer bonds case, which is also a company law related issue. And Fahli Nariman talks about Needle Industries saying that these are the cases which made them. And may give them the kind of recognition which brought them to the fore and made them very prominent lawyers. So why I'm bringing that into the picture here is because these are the kinds of litigations where strategy is very important. Now what happened in Vikram Bhakshi's case is there was an arbitration clause and under the arbitration clause are promptly McDonald's initiated arbitration. Now what Vikram Bhakshi did was he filed a suit for declaration that the arbitration clause itself is invalid. In addition to that he filed an operation and misfinishment litigation. Now you need to understand why this strategy was adopted. Now this strategy was adopted for the simple reason that operation and mismanagement under operation and mismanagement, the NCLT has a lot of options. You NCLT can give you a wide range of reliefs including relief of modification of any agreement which is entered into between a company and another third party. Even that can be modified under the company's land. So that is the kind of power which is there before the NCLT. And I'll tell you why such power is there. What happens is that there are a lot of related party transactions which happen and those related party transactions are with different entities. Now this happened also in the case of Indigo. So in Indigo there was a Bhatia group and there was another group. So Bhatia group had entered into contracts with their related parties for supply of various things and these related party transactions were substantial. So the other group took Amraj to it but ultimately the matter didn't go to litigation because they just wrote letters to Sebi and then it went away from that because both parties were holding a certain percentage and a certain other percentage was being held by a third party and litigation would become very complicated because control, the whole concept here is control is not with one person. I mean in shareholder litigation the most important thing is control. So I'll just come back to the Vikram Bakshi example and then I'll trace it back because what I'm trying to do here is I'm trying to give you a flavor of the strategies which people adopt. So what Vikram Bakshi did is not entirely new. It's something which has been adopted time and again. So what we do is we try to invalidate a steady arbitration. One of the ways of trying to stay the arbitration was by filing a suit. Now this concept because of the bird's eye view which is given by, sorry, someone gave a comment and I just saw that, sorry. What I was saying was that this kind of litigation relating to arbitration where to basically stall the arbitration what people would do is they file suits and this situation has been now largely modified after the 2015 amendment and a series of pro arbitration judgments. So the arbitration went on in the Vikram Bakshi case, an award came to be passed at the same time operation mismanagement were happening and ultimately parties settled. So this is broadly the kind of litigation strategies, the strategy which was adopted by Vikram Bakshi ensured that the whole thing stalled for a considerable amount of time and ultimately parties arrive at a settlement. This is one way of doing it. Another way of doing it is to try and obtain a stay on the functioning of the company by stopping key decisions. All of this is to force the hand of the other party to arrive at a settlement. So this is broadly the kind of things which we can do in filing multiple litigations now. What we do is we also write complaints to the CS frauds office. Apart from that, we can write to SEBI if it's a listed company, we can invoke criminal law or go into other regulatory authorities like PMLAS but then so many other things people do. So what I will now get into is I will get into filing an operation and mismanagement case before the NCLT. What are the drafting tips that you need to remember? How you need to really look into it and this you have to read in conjunction with what I had spoken on the previous part relating to what are the kinds of documents that you need to collect from the client to understand the situation. So in the last webinar, I had gone into concept of minority protection. Up to a certain level, minorities are protected in the sense that their rights cannot be trampled at the same time, there has to be a balance between how a minority group in a company and a majority group in a company function in the sense that just because I'm a minority, I must not stall the functioning of the company. I must not say that everything is a problem. I must not cry wolf for everything. So before NCLT, the CLB and the various high courts Supreme Court have laid down a series of stringent standards. So these stringent standards were under the old act under 397 and 398 and now under the new act under 241 and 242 of the company's act. So the requirement under 241 and 242 is that you must show that the affairs of the company are being conducted either in a manner which is traditional to public interest or traditional or oppressive to you. So how do you do that? First thing that you do is you look at all the decisions which are taken by the board and you look into how it is traditional to you if dividend is being paid less or if a certain amount of money is being paid by the majority who are in key managerial positions, then you have to highlight that. Now merely because you want the company to take a particular direction and the company is taking in another direction, that by itself will not be prejudicial because ultimately it's a business decision and no court will interfere in the business decision if the other side is able to provide some rationale for it. Unless and until it is so irrational and so unbelievably impossible that any reasonable person will do it except for the purpose of bringing down the company. So typically what would happen is you will file when you see that your financial interests are getting affected. So you need to be able to clearly highlight. Second thing, second reason why you will file is if there's a material change in the management or control of the company by alteration of the board of directors which is not beneficial to either you or another class of shareholders. But here what you need to understand is if you want to approach the NCLT under operation and mismanagement, you have to have a minimum threshold of 10% of the shareholding. If you hold just one share, you cannot approach the NCLT under operation and mismanagement. Why? Because one share is too insignificant for you to have any role in governance. You are just one share and there's I mean you're just 1% and there's 99% if 99% want to take the company in one way, you cannot solve them. So 10% is like the threshold bar which has been put. The reason why this threshold bar of 10% has been put is to ensure that every action of the company is not questioned from time to time. That is the reason why 10% bar is put. Now assuming you're slightly below 10%, you're 8% or you're 7%. Now what would happen is just to ensure that you cannot approach the NCLT, what they would do the other side is they will issue bunch of shares to themselves and they will increase the percentage of shareholding. If they increase their percentage of shareholding, then your percentage automatically comes down. Once it comes down, you cannot meet the threshold bar. So these are the kinds of things also which people would do. Like they will reduce their shareholding to 1% by 100s and 1000s of shares. So when in these kind of situations what would happen is you would file an application. You would bring out these facts. You will say that look this is the reason I'm coming and I'm telling you that these entire transactions are bad in law because they have been done without following procedure which is prescribed which is you must hold a general body meeting. In the general body meeting, issuance of shares has to happen. There has to be a resolution passed. Certain number of shareholders have to be there. All of those things have not happened. I did not receive notice. I was not able to attend because of that and as a consequence of this issuance of share capital is incorrect, they should have offered it to everybody so on and so forth. This you will find a very good discussion in Shanti Prasad versus Kalinga Tews is a 1965 judgment. So in this particular case where such kind of your dilution has happened, dilution of your shareholding has happened, you can approach the NCL team, you can file an application saying exempt me from that 10% threshold bar requirement and the reason why I want you to exempt me from 10% requirement is because of the reason that I have been reduced to below 10% only reason and that reduction itself is an act of oppression which I'm complaining of. So therefore, please, that is one way of overcoming threshold. Another way of overcoming the threshold bar is to say that please see there are only two or three groups of shareholders and the other two groups of shareholders are acting in oppression to me. So because the other two are acting in an oppressive manner therefore, please take action against please consider it as a situation of a quasi partnership because it is a situation of a quasi partnership where effectively although it is a company where shares are held by individual members, it is being controlled by two or three groups or only two groups. So therefore, in the situation of a quasi partnership, I have a right to govern as well. But you need to take a step back here and understand that a company comprises of multiple number of shareholders. It can comprise of multiple number of shareholders. A private company can have 50 shareholders. A public company can have endless number of shareholders. Now, in this kind of situation, what happens is if you get into a situation where there are thousands of shareholders and you are just one of them and you can't complain of oppressive misconduct. Like for example, what would happen at least in the 1960s and 70s and like someone would get one share of reliance or one share of another company and they will complain they will say that this is I am a shareholder in this company, affairs of this company are being done in this manner and all that they will write letters to the board. And after that, they'll write to the authorities and so on and so on. So there's a threshold which is put in so far as operation in this management is for other issues that threshold is not so much as derivative litigation for which also you need to have one percent of the shareholding, but that's a different issue and that will come to in a bit. So this is one aspect. So you'll have to when you're drafting, coming back to the issue when you're drafting, you need to show that look, this is the number of shares that I have lost or have been issued and why that issuance has been done is to remove me from the control and the affairs of the company. Now, if I have a certain number of shareholders, I'm entitled to have a certain, I'm entitled to have a director in the company. Now, if I'm not being given an opportunity to be a director by the other side simply by over muscling me by superior shareholding power in such a situation, it's an act which is oppressive to me because I have a right to be part of governance. The reason I have a right is because there are only two groups of shareholders. Now, merely because I hold 5% or 6%, am I entitled to be a director? No, even if you hold 10%, you're not necessarily entitled to be a director. But these rights, assuming that you have got it written in the articles, that these are the rights that I as a shareholder have. That is, I will always be holding 10% of the shareholding of the company. I will always be having one director or two directors in the board of the company. If you've written such a thing in the articles, then those aspects have to be highlighted to say that look, this is the reason why this conduct is oppressive because I have a right under the articles and that right under the articles is being taken away by virtue of an oppressive conduct. So here, what you need to understand is, what is this oppressive conduct? Oppressive conduct can be perfectly legal. There's absolutely no difficulty if you call for a board meeting. In the board meeting, you remove me as a director. It is perfectly legal. That's how Cyrus Mystery was removed from the board of directors of Tata Group of Companies. It's called in the meeting, he was removed as a director, he was removed as a managing director first and then subsequently as a director. But merely because it is legal doesn't mean it cannot be prejudiced or oppressive. So many times what happens is it may even be illegal because if I call you for a board meeting and you also hold 50% of the shareholding, then there's always going to be deadlock. So when there is going to be deadlock, where affairs of the company cannot run at all, then again, you are in a situation where you would want to do something as a defendant or as someone who wants to control the company. You may just say, we should have noticed. So typically what people will do is they will say that we should have noticed under certificate of posting. So under certificate of posting is something, you will just write everything and you will get an acknowledgement and no date will be there and after that you post it and then you can get, you can claim that I have issued it or they would show a courier receipt, they will show that it's gone to an address, it will go to another address where that person doesn't normally recite and so on and so forth and say we should notice. So this is what people used to do. So now the thing is these kind of things where I have not received notice or where a proper resolution is not passed or sometimes what happens is people just fabricate the minutes of meeting. They just, even though no meeting has happened, they just fabricate the minutes and on the basis of that fabricated, these are the kind of things which are also irregularities or illegalities under the company. So you'll have to show it.  As the shareholder you're wearing one hat and as a director you're wearing another hat. So your rights as a shareholder should present itself in your rights as a director and that is what 41.1T says that alteration to the board or control of the company has resulted in a situation which is traditional to you. And as a consequence of the fact that there are board of directors, the board of directors are there and those board of directors are going to have a predisposition against you and they want to conduct affairs against or against your favour. So these are the kind of things that you will need to plead and you will need to, when you draft the petition, you'll need to put all of these things in. Now first thing what you must know is what are the kind of prayers, what are the kind of powers that the NCLT has and that you will find in section 242. So under section 242, the NCLT can regulate the conduct of the company, it can amend the articles, it can even order a sale or purchase of shares or reduction of share capital.  You both will not be able to survive in this company, whatever I do and I can't keep supervising every dispute between the both of you. So let me not get into it, one person sells a share to the other. So then you will say, okay, which person is ready to sell the share to the other? Each one will say, I'm not ready to sell, I'm not ready to sell. So when each one says, I'm not ready to sell, the court can say, okay, fine, I'm going to direct one person to sell. Now in this also, there are series of judgments which have held that usually the minority will be asked to sell to the majority. So when there is only one case which is of the Karnataka High Court, which is an appeal before the Supreme Court called GE NAMTEC. Now GE NAMTEC is a GE and a Namdari, sorry, I think this is the founder of BPL, they had a litigation between them and the division bench of the Karnataka High Court said that in that particular case, the minority has to purchase the shares from the majority because the majority did not have any presence and the minority was the one which was running the company doing everything in the company. So what happens if you want to see here, the reason why the court didn't is because assuming you ask the majority to take over, by the time majority comes and takes over, minority can do 101 things and ultimately the company will sell. So here the NCLT looks at what is in the best interest of the company. So the best interest of the company is that whoever is in control, let that person only remain in control. So typically what happens is when there is a dispute between two people and one person agrees to sell, there is always a dispute on valuation. So when there's a dispute on valuation, what the company law board used to do? His company law board will say, I will ask, we will suggest a particular system of valuation of shares. So regarding valuation of shares, there are a couple of judgments. One is a Morgan Stanley judgment of the Supreme Court and there's one more judgment called Rakha Sports of the Karnataka High Court. So these two judgments will give you an idea as to what are the different systems of valuations which are adopted by companies and courts are accepting them. Now what people do is in the agreement itself, they provide saying we will value the shares in XYZ manner. So what they do is they say, we will value the shares in three manners and three, I will take the average of the three. If I take the average of the three, then on the basis of that, I'll arrive at some valuation. So for example, just to give you a flavor of it, so there is something called as flip card, values itself on something called as gross merchandise value, which means the total number of goods that it sells on the basis of that, on the basis of that they are arriving at a value. That is a very unique type of valuation. It has no relation to the assets of the company. It has no relation to the loans of the company. It has no relation to the profit of the company. It has no relation to what IP is there and how they do any. You are just saying, I'm selling so many goods per year, so that is my valuation. On the basis of that, they arrived at a $16 billion valuation and they were purchased by Walmart. Now, there is something called as in IP companies, there are a lot of IP assets, intellectual property assets. On the valuation of the intellectual property assets, so how they value the intellectual property assets is, if I license it at a particular rate, what is the amount of royalty that I can get? What is the expected profit I can get? Then there is a concept of, these are all the assets which are there in the company. This is the total profit of the company. So 10 times the profit is the share value. In a publicly listed company, there is absolutely no difficulty. Whatever is the market value of the company, on that I will pay you 5 rupees more or I will pay you 2 rupees more, 10 rupees more and so on and so forth. So that is how valuation of shares is done. Now, the NCLT can direct to sell the shares in a particular value and even if you have entered into an agreement and in that agreement there is a particular way in which valuation has to be done. There are instances where the NCLT has said nothing doing, we will adopt something more than that because I feel that that system is not fair, that doesn't accurately reflect the value of the company. So that is another aspect. Now, the NCLT also has the power to terminate, set aside or modify any agreement between the director, managing director or manager and the company. This happens because of the reason that there is a remuneration clause. So what is the managing director saying? I will get 1 crore a year as a remuneration when the company's total sales itself is say 10 crores in a year, which means that 10% of the company's revenue is going towards 1% salary and that means that the company can't have enough reserves, the company cannot give out dividend to its shareholders, the company cannot pay back its loans, all of these things can happen. So that is the reason why the NCLT has the power to even modify these things. Now, what happens is that if the majority of the board of directors have approved it or the majority of the shareholders have approved this salary or remuneration, then it's very difficult for another group to challenge it and they will challenge it in this manner. Now, the NCLT can also set aside any transfer, delivery routes, payment, execution or any other act relating to property made or done against the company within three months from the date of the NCLT petition. So therefore, you have a time period and that time period is very critical because if you don't approach within that time period, then you acquiesce to it and acquiescence is one of the most sought after defenses in NCLT matters. It's a strategy which the defendants get into and I will come into that when I'm dealing with the defendant strategies. Now, the NCLT also has the power to remove a board of directors or to put another person and also recover any undue gains made by that person. It can even amend the articles to ensure that all of these things doesn't happen. So now the present trend is to capture the understanding of governance and shareholder elements in detail and also have an arbitration So what happens is once you have an arbitration clause, parties by order have excluded the excluded the ambit of NCLT. So if they've excluded the ambit of NCLT, then if they file an operation mismanagement proceeding, then the defendant will come and file a section eight application and in the section eight application, he will say these are his complaints, these are covered under these agreement clauses and this is the arbitration clause, he has to go to arbitration, he cannot come before NCLT. So NCLT will then look at the test which the NCLT adopts is, is there any statically complied complaints which are made and is there any complaint which is oppressive, which is not which is not covered under a right under an agreement. For example, in the agreement, it says that I must have a voting right in certain matters. Those voting rights have not been exercised by me for whatever reason, assuming that the voting rights have not been exercised by me for exercise by me or I have avoided exercising it in a particular manner or I have created some kind, I have not complied with some company's accurate requirements. In those situations, the NCLT will say, no, no, I will entertain it only insofar as these issues, other issues you can go to arbitration. So it is possible for the NCLT to say, no, no, I will entertain. But the trend generally is that because of the way we draft a petition, it becomes very difficult to avoid an arbitration clause because every single aspect of the governance of the company is captured under the agreement and any dispute relating to interpretation or any actions taken under the agreement has to go to arbitration. So therefore, it becomes very difficult to avoid an arbitration clause and that is resulting in a situation where the the NCLT is reducing its interference. And also another aspect which we need to know is that there is a very high threshold for oppression and mismanagement because there is a very high threshold for oppression and mismanagement where you have to show that the conduct is such that you cannot be in that company, that the company has reached a level of deadlock. And this is a very high standard. And if you see judgments, there are very few cases where the courts have arrived at a finding that yes, this is so oppressive that it reaches a level which is required under the statutory threshold which is required. And because it reaches that level, we want to interfere. So oppression and mismanagement, you will see that 90% of the petitions are typically dismissed because the court recognizes majority power. The court recognizes the fact that commercial aspects we cannot get into. The court recognizes the fact that we cannot go into detail in relation to so many aspects of how the company functions, question each decision. And here again, one of a very good decision to read is the very recent Ratan Tata versus Cyrus mystery judgment. So what happened in that case also was that all actions taken by Ratan Tata prior to mystery become managing that were all questioned by mystery group. So the court said, you were a director there. When you were a director there, you did not complain even one day. You did not say anything about it. You became a managing director. When you became a manager also, you did not reverse any of those things. And now you're coming in complaining saying those acts were oppressive. I will accept that those acts were oppressive. Those acts were not against the company. But why were you sitting side? Which means that acquisitions and acquisitions and it's an acquisition of convenience. Because now that I have been removed, I am raking up everything else to make a case because my removal is under the company's act. Once my removal is under the company's act, even if it is oppressive, it is not oppressive. It is not oppressive, call me as a shareholder. It may be oppressive for call me as a director. But tell me, are your dividends reduced? Is there any financial misappropriation? No. So it is an action which is taken in the best interest of the company and majority has a right to decide what is the best interest of the company. You cannot say that me being the director is in the best interest of the company. That argument is not available to you at any point in time. So just imagine a situation where I have been thrown out from a company or a situation where I am not a director and I have been removed as a director. Or I am not being appointed as a director despite various requests to dominate me. You cannot say I must be appointed as a director because I have a right to have a certain amount of shareholding unless those rights are built in your shareholder arrangement. Even if it is built in, if the NCLT feels that it needs to modify, it can modify. So these are the limitations in NCLT petitions and the strategies that you will adopt in NCLT matters. Next, we will get into filing a suit in company matters. Now, relating to filing a suit in company matters, there's a very recent judgment of the daily high court and that's, I think, a judgment against Delhi Gymkhana Private Limit. So what happened? There is a father died and the mother and the sons filed an application saying that you must consider us. And the father was a shareholder in the company holding the share. So therefore, they made a request that you must consider us. So here what happened is the other side filed an application under order 7 rule 11 of CPC for rejection of plaint and they said that look under 430 of the company's ad, civil court doesn't have jurisdiction in respect of matters which are covered under this court. So therefore, if you're saying that my conduct is oppressive to you, then you must and then you cannot maintain a suit. You have to go before the NCLT and you have only one share. So you cannot even go before the NCLT. So you are remedialist. The court said sorry, that's not the case at all. You can, assuming that you are seeking to enforce your individual right as a member, like as a member, as a shareholder, you have certain rights under the company's and those rights are being violated by what, that is, there's a breach of a statute or there's a breach of the articles. You can file a suit. There's nothing unless there's an arbitration clause, of course, but you can file a suit and that suit cannot be questioned. So the leading judgment on this point, one of the first judgments on this point was the judgment of the Karnataka High Court in Prakash Road, which is referred by the Delhi High Court. The Delhi High Court says as a shareholder, what right I have, that right is not taken away under 241 and 242 of the company's ad. So therefore, oppression and mismanagement stand on a separate footing and my rights as a member stand on a separate footing and for violation of my rights as a member, I can seek relief. And what are the kinds of relief I can seek are reliefs under the specifically fact, which is rectification of any document, declaration, injunction, etc. Now, insofar as suits are concerned, what are the strategies that you must adopt? And why suits may be a better idea than NCLT in certain situations? See, NCLT, you can do only if you are right as a shareholding group and you meet the threshold, you can ask for certain reliefs. So for example, if you've been removed as a director and you've not received a notice, then notice is a requirement under 169. I think 169 was under the old ad. So under the company's ad, there's a requirement for issuance of notice. There should be an explanatory memorandum and there must be, there are another series of requirements which need to be fulfilled. So all of those requirements were not fulfilled, you can file a suit. So these are the kind of reliefs which you will get and there's a very interesting hand-to-piece system novel, I forget the name. So what happened there is that, see, under the, in England under the older days, people would write letters to other shareholders saying that, look, this is the way in which the affairs of the company have been conducted is a very serious issue. We want your support to vote in this manner. So they would write letters. So these letters were confidential. So they would write privately. Now, what this fellow, what one person tries to do is he files a deformation suit against that person. He files a deformation suit against one of the shareholders saying that this fellow is defaming me in front of other shareholders. Now, the only defense in such a suit would be to produce those letters. But if he produces those letters, then the confidentiality of those letters are gone. So what that fellow does is he murders the fellow who's filed the deformation suit because deformation is a personal action. The suit will obviously fail. So then the whole novel is about deciphering as to who murdered, who, whether that person murdered, what happened and so on and so forth. So all of these things, like there are suits have strategic purposes because you can bring unrelated third parties into the picture. And you can see Kim Junction against third parties saying he's doing XYZ against the company. You can file a suit for thought. You can file a suit for contractual claims. So as a suit, your nature of lips are more broader. And as a shareholder, you can say that my right as a member is being affected by XYZ. And that is the first threshold. If you're able to show your local stand-eye, which is my right as a shareholder is being affected, my right as a member of the company is being affected by whatever action. Then on that basis, you can file a suit. Or you can just file a suit against the director without making a company apart. So you can file a suit against him for defamation. You can file a suit against him for not to interfere, not to write letters, so on and so forth. So people do a lot of things to protect themselves by filing suits. And these are beliefs that you will not get in the NCRT. Injunctive beliefs of these natures, like for defamatory content, etc., you will not get these. And that is becoming a very broader trend, which you're seeing that people are filing suits. The next set of things is relating to initiating arbitration. So arbitration is first and foremost, it's a slightly complicated mechanism when there are multiple agreements So what happens is here, again, you must understand the judgment of Rangarajan, which is a 1992 Supreme Court judgment. And that judgment effectively said that if any right as a shareholder is being violated as a private agreement, the private agreement doesn't bind the company. Because the private agreement doesn't bind the company, the company can still choose to disregard it. So this judgment has been diluted by two Pompeii court judgments, one by Justice Chandrachut in Bajaj, and then there was another judgment by Justice Khandelkar, both of whom are now in the Supreme Court. They basically said that there is no need to amend the articles. It's a right qua shareholders and right qua shareholders, even the company is not made a party, it's binding qua the shareholders. So therefore, the company cannot refuse to accept that. So this kind of things, what happens is, assuming that there are certain rights which are there in the shareholder segment, those rights, including rights of, you know, I explained in the previous session about Drag-A-Law rights, right, to right of first refusal, etc. All of these are contractual rights. So these contractual rights, you can enforce only by arbitration. It is more effective, more efficient to enforce it by arbitration because NCLT exercises an equitable jurisdiction and not necessarily a contractual jurisdiction. So therefore, the best way to enforce it is to by way of arbitration. Arbitration is a quick and easy way of doing it. So that is one of the things which you need to keep in mind when it comes to arbitration. Second thing is, if there are multiple agreements, what happens is there will be an agreement as a director, you don't have certain agreements. There will be an intellectual property assignment agreement with the company. There will be a franchise agreement, every four or five agreements. So if you're raising all the disputes in respect of all these agreements, you have to invoke separate arbitration.  So what happens is people will put different arbitration clauses. So in one, they will say ancestral model law. In another one, they will say ICC. In another one, they will say LCI. In another one, they will say Singapore. Then there are four arbitration clauses. All four are connected disputes. How do you merge them? Which arbitral institution do you go to? So these are the kind of things which are challenges when it comes to arbitration and shareholder disputes. But more or less, typically there's usually a share subscription agreement and everything relating to the shareholders are captured in that. And if it's captured in that, then it won't be a serious problem. You can invoke Section 9 for interim relief and you can invoke arbitration. You can move forward with the matter as early as possible. So now I come to the next and possibly the last question. What are the strategies that a defendant can adopt? First strategy is if you're a defendant and you're in the majority. And this is something my senior Mr. K.G. Raghavan always used to say. In any company litigation, the best position to be in is that of the defendant. Why? Because you don't have to create allegations out of thin air and fulfill the strict requirements of 397 at that time and 241 at this time. You don't need to work hard on that. Someone else will do it. All you need to do is you need to say, I am in the majority. I have done this for XYZ reasons. And if he makes allegations of fraud or if he makes allegations of misappropriation, then you bring in factual aspects and you say that these are aspects which have to go into fraud and fraud, et cetera, has to be gone into in a trial. Therefore, CLP at that point in time was not an appropriate jurisdiction to get into these aspects and so on and so forth. And you bring all of those differences. Second thing, what you do is you bring acquisitions into the picture. And you say that I have done these things. He has not questioned it. He has done these things. I have not questioned. So then where is the issue? So these are the kinds of things that you do. And third thing you do is you delay, delay, delay to the extent possible. And ultimately, the other side may also come forward and try to settle the matter if he doesn't get an expatriate. Stopping you from doing certain things. Then certain things are the other aspects. What you can do is you can show that these things are outside the operation of the company's act or that there is an arbitration clause and you must go only out of the arbitration clause. Don't go before the NCRT or even in an arbitration clause as a defendant, unfortunately or fortunately depending on which side you are on. With the amendments to the specific relief act which came in place in 2018, it is going to be extremely difficult for any person to really get away from a contractual obligation. Earlier, you could get away from a contractual obligation because you had to plead readiness and willingness and the court had a discretion. Because the court had a discretion, the arbitrator also had a discretion while exercising the power under the specific legal. So, but now the situation is that he has no discretion. The specific relief act has removed the discretion of the court. So, therefore, if there is a binding obligation and unless and until you have defences under the specific relief act that either the agreement is void or that the other side breached it and therefore I am not obliged to supply and so on and so forth, you are stuck. You cannot get away. You are bound to comply with it. So, as a defendant, if there is an arbitration clause, it is a difficult situation if you are in breach. But if the agreement clauses are in your favor, then really nothing much will happen. So, last question which I wanted to address and I'll just take two or three minutes on this is what happens at the end of every shareholder litigation? So, in the end of every shareholder litigation, one of three things will happen. Either the NCLT or if you are before the NCLT, either the NCLT will say, achha ki ke there's a deadlock between both of you, why don't one person sell out to the other and then with the nudging of the NCLT settlement will happen. Second thing what may happen is that the court will say, I'm going to dismiss your petition. Whatever are your remedies, take it outside. You deal with it separately because you have raised issues of oppression. You have not raised issues of purchase of shares. So, this happened in the Cyrus Mystery case as well. So, what happened in the Cyrus Mystery case is that the mystery group filed an application before the Supreme Court saying, direct them to purchase our shares at XYZ valuation. The Supreme Court said, sorry, I'm not going to get into it. I am the appellate court. You did not make this prayer before the NCLT. You are now making this prayer here. I am not going to consider it. There is a provision under the articles. You approach them under the articles, you do whatever is required and then the whole thing will come to an end there. So, this is another thing which the court will do. They'll say that achha ki ke you guys resolve it among us. Third thing that the court may do is the court will grant you everything that you ask for, remove the other side from the management or put in some terms, make some changes, etc. And this is a very drastic thing because see a court is very mindful that if it imposes changes on parties, it becomes a situation where it's outside the contractual realm.  It may have an impact on how the company functions and that is not something which the CMB or the NCLT would have fully understood. So, typically these kind of reliefs are not granted. And also because there's a very strict threshold for relief, most of the time the court will say no oppression is made out. But in the interest of both the parties to overcome the deadlock, I am going to pass an order of just an equitable ground. You please come and one person sell the share to this fellow at the stated closed station. So, this is basically what I've done is I have given you a complete broad strokes of how a shareholder litigation works. So, the idea here is that because many of us are not familiar with it. So, if you get a client and if you should not feel, how do I even start the process? What I've done is I've given you a beginner's outlook into what and all you can expect, what are the strategies you can adopt, etc. And then as you read more, you will get more and more nuanced aspects in it. Because in company law, there are very nuanced aspects on each issue. You can sit and debate for hours and hours on the interpretation of each issue. There are so many shareholder disputes which have taught so many lessons.  So, I've just tried to keep it very simple and try to get as, I mean, a layman's understanding of how company litigation works. And if anyone has any questions, I'll be most happy to answer all of them. Yeah, Mr. Ajay, I was muted. Sorry, hence I could not continue. I think there are not many questions, but there is one question in the YouTube I see. One Mr. Nilesh Patil says, the defendant tries to pull on the case. In such cases, what are the disadvantages of these tactics for the defendant? So that you try to pull on the case as a defendant in NCLT or anyway, so that the petitioner would somehow come forward for some type of settlement. What are the disadvantages for them by taking a delay? So how people do this is they file application after application. So they file application saying send it for forensic examination, send this account and send it here. Now, if you delay it, see if there is an interim order, sorry, if there's an interim order against you. So the interim order is that the board of directors cannot function. Let there be no board meeting. Then you are on the back foot. You need to really get into how exactly how to get out of this order, how to function the company. So therefore, you need to really work hard on getting the interim order abated. So in these situations delay doesn't help. But otherwise, just imagine the situation.  The advantage is more than disadvantage.  Company is running by itself. There is no interim order. So therefore, whatever he does in the company, the more number of days the company runs, like the court will say, okay, there's operation. The court gets more evidence to see that, yes, there is no operation, right? Because the functioning is happening normally. But as a see again, it depends on facts to facts. And if you feel that, yes, there's an interim order against me, then you should push hard. Or if you feel that this petition is going to create problems when it comes to valuation of the company, you want to sell the shares to somebody and that fellow is saying, I cannot buy your shares until the petition is disposed off. Then you need to really push hard and get things done. But otherwise, it's fine to let the petition be. I mean, this is my view. Yeah. Okay. There is one question. It looks like it is outside the purview of today's discussion. Anyway, this is Advocate Mangesh. He says, I was MD external member. It is at 5.44 PM. Yeah. I was MD external member, was removed by company, six months salary per car not paid. Company sent letter that paid you fees as an arbitrator. We will not pay salary. What is Remedy? The question may not be very clear. No, I think he's also asking another question. I was a sole arbitrator in one matter where the company was a respondent. So I think that's a contract solution. You're not a shareholder. So if you're not a shareholder, then your Remedy against the company is always by way of a suit for recovery. If you're an employee, you don't get a shareholder's right.  I am focusing on as a shareholder. I'm not getting it to as a company this month. So suit lies. You can buy a suit for recovery of money. We have a question from Advocate KV Subramanya at 5.44 PM again. Can a director shareholder make an application under section 130 to NCLT for reopening since the world's or any persons concerned used? Just one second. Let me just see what is section 130. I don't immediately remember. Yes. What happened is 10 years you practiced under the old companies. He says public notice inviting claims for creditors. So how does that work? I didn't follow as in like reopening and revision of accounts of companies. Okay, fine. Hello. Sorry, just one second. So I just saw your video. Can you hear me? So you can make an application for reopening provided the requirements are met. We can't see you. I think your video is off or something. No, the video is on. The video is back on. Can you see me? Let me just switch off and switch on the video. Can you see me now? Is it better? Yeah, the video is on. I've got a message saying that the video is on. Yes, I think it's back. Yeah, there are some disconnection issues. Okay. So I'll just tell you. So under 130 the statutory regulatory authority can make an application to the tribunal or the company can make an application, but not a shareholder. Under section 130, I think only the statutory authority can make an application. I think that's the language. So see, it is possible for the NCLT to look into the accounts of the company and to see if there is fraud or misapplication. In fact, NCLTs appoint expert committees and they appoint administrators who look into those aspects and give a report to the NCLT. These powers are available with the NCLT at any point in time. So that can be done. So the answer to your question is yes, that can be done. Yeah. Somebody's asking for that. You can know which Mr. Ajay referred during the... I will just try to find it and I'll give it because... I'll tell you the name of the author is Henry Sissel. Henry Sissel, H-E-N-R-Y and Sissel C-E-C-I-L. He's written a lot of legal novels, sisters in law, daughters in law and so on and so forth. So here's a lot of novels. One of those novels is this. I read it a long time back. It's there in our high court. So one of the... In Karnataka High Court... Yeah. Maybe another Samana before. I was in the high court during lunch hour and I read the novels. Many, many years before. That's nice. We have the next question. Yes. Ravi Kajgar. Is, sir, threshold limit only for oppression and mismanagement? Yeah, threshold minute. Yes, it's only for oppression and mismanagement. I think he's also asked another question saying, where can a share, retail shareholder approach if the shares are sold without his permission, without his knowledge. Now, see, your shares are now under the Companies Act. Most of the shares are held in DMAT form. So if they're held in DMAT form, then only you have control over your shares. Nobody can sell your shares without your permission except your broker. So assuming that your broker sells your shares or the person in a listed company. I'm talking about a listed company. If a broker sells your shares, then you can approach the NSE or NSE and NSE has a mechanism called as scores. So under that mechanism, you can approach and you can, you can request for action to be taken against that flow, including, you know, giving you the value of the shares or purchasing the shares back and all of those things.  If that other side doesn't agree and they don't do it, then, you know, you have an option of arbitration. So they have an arbitration panel and after the arbitration, there's an appellate arbitration. And then, of course, you can file your section 34 and you can work from it. So if you're a retail shareholder, your remedy is to approach the NSE under SEBI in respect of, you know, sale of unauthorized sale of shares, etc. Yes. I think quite a lot of people want to know the case laws which Mr. Ajay referred to. Like the Fali. Yeah. So Fali Nalimans is needle industries. It is 1982. And Hari Salvez is 1992 or 1993. It's bearer bonds case, bearer bonds case, P-E-A-R-E, a bearer bond case. I will do one thing. Just give me a couple of days. I will get you all the citations and I'll, and Vikas will post it on the WhatsApp. Yes, all the case laws which Mr. Ajay has cited today, if you can be shared, then I think it's going to be, just in a couple of days, I'll get it done. Yes. All right. I think we have come to the end of today's webinar. And this webinar was brought in association with Beyond CLC and Daksha Legal from Bangalore. Mr. Ajay, the talk was fantastic. It was quite, you know, knowledge. We have gained a lot of knowledge today out of this. And thank you so much. I'm sure that you know, we'll look forward for many more sessions like this from you. And I think someone called Arfa Zia has a question. Yes, please. Yes. Yes, she's unmuted. Yes. Yes, Arfa. Good evening, sir. Thank you for an amazing session. So I had a simple doubt but not relating to today's discussion. And I think I hope you'll be able to hear that. So my doubt was since we're talking about company law, if a company hires people on the basis of a contract, that is like a six months or a 12 month contract. And if there is a breach of contract where the employee can't continue, I would like to know about the consequences of what action the company can take against the employee. And also one more thing was, can employee work and more than one company simultaneously? See, these are contractual issues. So, you know, it will depend on what is the contract between both of you. And if there's breach of contract, then you go under section 73 of the contract and you can sue for breach. If the contract says that you must perform A, B, C obligation, you perform only A and B, you don't perform C, then non-performance of C is a breach of the contract. So I can either sue for specific performance or I can sue for damages. One of the two things as a company I can sue. But that's a civil issue and a contractual issue as a remedy lies in the civil court. So if you're a shareholder, then there are different things. Then these issues will come. But if you're only what do you call employee, then it's a contractual issue. So if you're an employee, then again, it's either a contractual issue or it's something for the labor court to go into that depends on if you're in a managerial capacity or if you're in a non-managerial capacity. So that is the answer to your question. Yeah, I think we have almost crossed one hour, five minutes as of now. So we will end the webinar today. And once again, Mr. Ajay, thank you so much. And I request all to wear mask, maintain social distance, as well as vaccinate yourself, as well as all your families if you have not already done. Thank you very much. Thank you.


TheBasementShop.com is the premier spot for the beefiest bases, acoustics, drum kits, even ukuleles, with a wide variety of new and used musical instruments and accessories from D-Drum, Luna, Dean, Specter, Warwick, Sadowski. Head over to TheBasementShop.com to find the gear you need to rock out. TheBasementShop.com. Pockville Creative Community in collaboration with Faith Fluff Market is hosting a chef showcase this Saturday, March 18th. We have so many talented home chefs. We are not tapping into the best that we can, the talent that is in Eastern Kentucky, in the Appalachian region. We really want to facilitate growth for those talents and show people that, you know, they can be successful. Not only does the chef showcase give locals the opportunity to display their cooking skills, but the Pockville Creative Community also aims to help those interested in boosting their passion. So we are working with the UK Extension Office and they are going to be providing gift baskets that are cooking themed for budding chefs, those who are wanting to possibly turn this into more than just their passion, maybe they're a business or potentially in the future working with FaceLife to provide food for here, lunches, that sort of thing. And we do have three categories, the best overall dish, best Appalachian food and best dessert. This will be the second chef showcase the Pockville Creative Community has hosted. So our last chef showcase which was held in October of 2022 was a huge success. We had fall themed foods, best fall theme and best dish overall. And it was, we had about 15 people who came out. Everybody brought their own food. Some people brought multiple dishes. It was absolutely phenomenal. They hope to have the same success at this showcase and future events. So if you still want to come, we do ask that you bring about 15 samples of food and let one of us know in the Pockville Creative Communities like, hey, I'm thinking about coming or I'll be there too. Just give us a little bit of a heads up and we will happily bring you in and you will be fellowshiping with great people and inclusive community as well as getting some great food. The event will be held Saturday March 18th from 5 to 7 30 p.m. at the Faith Bluff Market in downtown Pikeville. Really what we want to do is make sure that we don't lose the Appalachian and Eastern Kentucky culture. We want to make sure that we are fostering the growth of that culture in the community and inviting younger people to become part of that community by getting involved with our group. For more information join the Pockville Creative Community Group on Facebook. Reporting from Mountain Top News, I'm Ethan Miller.


So, well, my name is Federico Matulie from our town not far from here So it's it's a town near Modena and it's very nice to have a rope Python so close to my own town this year Yeah, I mean I'm I'm here to talk about a project I did with startup in London and It's one of the first project I did that was Very data focused So essentially like I'm here to talk about like some of the experience I had with data in the last seven eight months and Yeah, some of the tools are used and some of the choices That we made both in terms of by architecting the system and in terms of like using the tools So the talk is about is about Brashift which is a database and an airflow which is like a framework to Which I'm going to explain later So my background is is actually kind of web development and and I was done like a lot of DevOps in the past I've used mostly Django I've done another presentation at aro Python three years ago, and it was all about Ansible Which is a tool like I really I really enjoy and I encourage you to to have a look at it because it's quite nice But then like data pipelines arrived and Then I had to like we had to choose like a different stock. It was it was a project where like a lot of a Lot of data processing was happening There was no web component and essentially we decided to Choose a different stock and we use airflow, which is a Project that was kind of born within Airbnb, but then he got incubated by Apache and now it's like an Apache project And then we use like some proprietary tools like Amazon Rashift, which is like them kind of the big one and also S3 which is Like a like essentially like an infinite hard drive. It's like an object storage and it's very well known So we started from like Obviously we started from a product problem about like and and the product problem was about Tracking actually like the tendons of Conferences around the world like and we are focusing on technology So we wanted to understand who was going to what conferences in order to like present this data and attract sponsors like for conferences As I was like when interesting project But they're really like the technical question that we wanted to answer was Are we query and cross-reference like multiple external data sources? Because most of the data that we were working with Was not managed by us. It was external So we kind of needed to Bring the data in our control There was a lot of a lot of integration so it was multiple external data points and we just wanted the freedom to query and cross-reference of this all these data sets and Really the answer to this question is It's actually in principle. It's quite simple like you just have to download all the data feeds So you can you have access to the kind of raw data So you can do any sort of operation when you have the raw data Plus like you need to load them in a system which allows you to query the data in the way you want This system can be Can be anything can be Excel can be PostgreSQL but we decided to use Russia because Kind of our use case The kind of the type of queries that we wanted to run Were like like a good use case for a shift So yeah, I mean essentially those are the two things they have to do but Depending on the complexity of the project sometimes There are multiple outloaders the multiple databases and so essentially like you need to make sure you build a good system to manage To manage data and here we talk about data pipelines Which is a which is generic term and it just indicates like the the system that kind of supervises So the downloading or the loading in the in the database and all the kind of transformation that you do on the data And we work on this Pipelines the kind of following Like some principles like three or four print three principles first of all We Needed a system that was able to scale to any number of inputs We need the system that was generic enough to Be easy to adaptable to any sort of feed any sort of data coming in with any sort of mechanism and You can think of it as a as a mixer So like essentially you have a lot of inputs and then you just mix and match and the way you want it This is opposite to For example like a web app where this side like a plurality of outputs like different output for different users But here like it's kind of reversed. So you have many inputs and you have Like one output, which is kind of the database that in the structure that you want in the database and So it's very important like for data pipelines to do all the processing in stages because you know, you might actually have like quite a complex and Set of transformation transformations and so if you think in terms of in terms of stages It becomes very easy to Kind of state what sort of input you have and what sort of output You expect the stage to produce And I just build your pipeline In a way that each each stage does a particular thing that produce a type of process And then if you do it that way you know, you get You know, you get hopefully your usability of stages you get You can separate development stages like between different teams and so on and another Thing other principle that we use is that we should Archive everything especially the inputs of the system Because storage is cheap like, you know, you can store a lot of data on S3 and and you don't pay them much So it was very helpful for us to have like an historical record of everything that that was going in the system and The other purpose of it is that sometimes you you have bugs in your code and and For data pipelines you want the ability to kind of rerun your codes on data that was I Don't like a month old or two months old because you realize you have the bug that we're talking about has been in production for like two months and Then you want to You discover the bugger you want to you want the ability to go back and fix the outputs And this is something that you can only do like with data pipelines We can't really fix an HP 500 like in your kind of web application, but you can do this with data. So It's quite convenient that you have that possibility Okay, so the talk the tool we use is is a tool core airflow It's it's a project that is spinning cubator recently in the Apache sort of foundation It's a batch processing framework Opposed to like a streaming framework Like storm. I know yesterday was a talk about storm but here we talk about batches and And essentially the big difference is that Like with a streaming architecture everything is every transformation is Cadula the start and then data Goes like real time through the stages But with a batch processing Framework is different because each step is only scheduled When it's actually needed So yeah, it's kind of a different architecture like in my eyes, it's a bit simpler and it's also like them Probably the oldest type of architecture More sound Airflare is a big community and there's a lot of stars on GitHub and lots of companies using it But yeah, I mean really airflow allows you to kind of build this sort of network of Interconnected tasks that you run and you can be like very complex network and You can have things running parallel things run a sequentially. I mean this example. Yeah, are you Which is some like an example I found on the internet Essentially you get approval files and then you start three part of the scrapers that are scraping Different things, but then at the end of every scraper. That's an update which is specific to the scraper and With every you can build these sort of networks of any complexity like Some some quite complex and some a bit simpler and It's Python all the way down so like you it's written in Python and And you use it with Python But then you will say like why not using crown? I mean crown has been around for ages The problem with crown is that it's very simple and for our use case It was too simple like there's no way to define dependencies between jobs As in like only start job be if job base has been successful You can do that There's no retry mechanism and this very very simple arrow reporting So it was it was too simple for us So obviously we decided to use air airflow and So the way you stole it's very simple. You just peep install airflow as it's written in Python initialize a database and which is So effort is a very stateful application essentially tracks execution of every everything that you've kind of put in the system and And all these information is written the database soon. Yeah, you need it just needs the database And then you start a web server And then you have something like that so this is a UI of system kind of we have in production and Essentially, it's just lists all the workflows that you have Workflows is term that is roughly like a crown job So every every workflow has a name as a as an owner and as like the schedule if it's daily if it's hourly if it's You know, you can define it can be very flexible in defining one something needs to run And Yeah, I mean, it's actually quite simple and the UI is quite powerful. There's a lot of things you can do with the UI But I wanted to show you like how do you actually use airflow so airflow as I mentioned before it's written in Python and You essentially create these fires called dogs Doug is a is an airflow term which essentially is workflow means workflow and You create a like you instant you create a file you with Python coordinate which essentially instantiates a dog class with the class Kind of the workflow name And then you pass a few parameters the kind of the one the most important one is the schedule interval What do you want it daily when you already hourly and so on and then you start to compose your workflow by creating Tasks, which are instances of operators the operator is is the thing that Kind of tells airflow how to run this step and Yeah, I can mourn that in the next slide. So essentially we run true commands to bash commands in this case and one is to Generate a report because the workflow is about And kind of generating reports for the business team. It's just like a like an example use case and So the first step would be to generate a report and the last step would be to email the report Come to the business team The second task needs to always happen at the end of the first task and only if the first tax task succeeded So essentially that's the way you do it is just declare a dog You could declare the two steps and then at the end you just say like teach you set upstream T1 Which means that T2 is always executed after T1 Yeah, essentially I've become this very simple dog You put them the dog in the dog's folder or fair flow and then it just gets picked up automatically and I mean for this dog, it will have be executed hourly and then the at the end of every hour you have an execution For like this different types operators and you can lose bash commands you can lose Kind of Python functions That's an example there And this is like the the two most common things like that the kind of we used in the project But I know you can we can use like doc this locker operator that you can use to launch dog containers and there's also something called sensors which essentially is a Specific like a special type of operator that is waiting for an event to happen Which might be like an file uploaded to S3 and or any other Sort of thing that you need to wait for Everything is that templated in ginger so you can have for example like kind of Python files with you know Essentially variables there that can be substituted on the fly by airflow and all same for for bash scripts I mean this is like quite alpha for example if you want to pass Variables from from air for itself to your scripts Or alternatively you can use like you can pass as arguments to Python functions like like the example here So I want to kind of double be deeper into like how actually airflow works internally and So everything as I said before is visible through the UI and so you have Essentially and you can see every execution of of things In the past and the result of it So for example if you have a war for the runs daily You will have in the UI the possibility to see all the all the statuses all the results of Every execution of the script and going back from today to to the date that the script started running and Yeah, you can zoom in and you can see for example for every for every task There is a task instance, which is like a database construct which essentially stores the start time stores that time the duration and the state Whether it's been successful or not Yeah, it's very informative especially if if if like kind of one of the main things the company does is is data processing So how does airflow like runs all your tasks and so you can you can choose like mainly two types of scheduling one is kind of scale up using like a pre-fork model like Like what Apache 1 nginx that will all the eunuchs demon do essentially they just have a parent process which folks like four or five try processes and then the parent process and like pulls for new jobs and When you have a new job a new task the the try process will execute the task and track the result and write the result back in in the kind of our full database and and This works very well for like one server if you want if you have the need to scale to multiple server You can use kind of salary executor But I guess it's definitely more complex. You need to have a message queue. You need to Be more installed But you can definitely use it So regarding all this information that that the system is tracking and Yeah, like essentially like you have A lot of information and one which is the state So you want to you want to know when things are running you want to know when things Have finished running and you want to know whether they they were successfully run or they were they failed and if they failed Airflow as this kind of mechanism of like retry you can definitely specify like How many times you want the dog to be retried and You can also be more granular than that and you can specify like how many how many times do you want a specific task to be retried and If there is a retry mechanism, there's a couple of states one is retry and one is failed and Retries like especially means it failed one time, but like I'm going to retry in five minutes like a delay they can set Yeah, those are kind of the same machines the states So another concept I want to like introduce is that and it's something that and kind of differentiates airflow and crown for example is our airflow deals with time and specifically downtime so the default behavior is to backfill one like Where else we're supposed to run but did not and which essentially means If you have a crown job like a workflow that is meant to be run daily, but then your servers stays or flying for a week When the server comes back online essentially airflow Realizes that for the last seven days the job wasn't running. So we launched like seven copies of your script and the difference between all these executions that Essentially there's some variable a past to you to the workflow call execution date and This variable will contain the date of like seven days ago six five four three two one days ago And and this variable is meant to be used from your scripts to to limit the amount of data that you process I mean, this is like like a very good behavior for for example like can report generation Like for the business team because the business team doesn't care whether the server is up or not It's just wants to receive a report every day But it's actually quite bad for scrapers we are running like a lot of scrapers and We don't want to run like, you know seven scrapers at the same time. We just like First of all, we just kills our server it kills this ever and and we don't get any we get excited the same data So we started using an operator. We subtly was released released in the the latest version of airflow, I think it's called latest run only operator and Essentially skip so the past run is in all your runs there like the latest Copying Okay, so Yeah, that was about airflow like essentially the way we use the air flow is to to To do like extract load transform and more specifically Because of the tools we picked we have like a bit more of a general structure like a specific generic structure and So we started a generating best of these Because we want to track Every run of it and like our code And we want to see what is a specific execution what was sort of data a Specific execution is generating and and putting a redshift So we generate the batch ID we create an initial folder structure We run like kind of downloaders and structure like, you know, whatever we want to run And this is normally the stuff that takes the longest Now whatever comes out of that we compress it we upload it on street and and we load it in a shift That's yeah, that's essentially like the generic steps that we we used to follow and So I mentioned batch IDs and and for us was like I Mean generally it's quite important to to generate a batch ID because you want to track Essentially You want to be able to map back the data they generated to the specific run For debugging purposes or like if you're gonna fix a bug and go back and fix the data That this bug broke like you need to you know, you need to know what batch IDs were involved And so you can remove the old the best of these and you can regenerate the data and Another reason to have best ideas is that airflow may rerun some of the steps including loading a rush shift So it's very important to have To make this operation it important so it doesn't matter how many times you you do it The result would be always like once one and only one load in the table So we time stamp on the data again very useful for like debugging You want to know what time it was downloaded you want to know what time was written in a street Yeah, and so on so and so we did all this operation we got to you know, kind of run out our downloaders we got to and like We got some data on the hard drive. We have we compressed it. We sent it to S3 But then like Because we want to use Russia and it's quite important that we pick the format that Russia supports So there's two family of Formats in Russia one is like column based and the other one is row based I'm not going to talk much about column based first of all like it's a bit less common in the Python world And I know this parquet and this or see I think But the support in Python is not great is it's not as supported as row based formats and Also, like the row based formats are like generally more common So row based formats are Essentially three and one is CSV one is the other one is Jason lines, which he which is like a bunch of Jason objects separated by new lines and Last one and also like the most recent one is a format called Avro and which is like an Apache standardized format So CSV is very simple everyone knows what it is Unfortunately, it's sort of dependent. It's flat and it's quite hard to extend Unless you all you do is append data to the end of it Which is quite limiting and it's also typed So, yeah, it was a bit simple for us Jason lines again, it's very simple. It's everyone knows what Jason is It's easy to extend because you can just add like keys to the to the Jason object and and You should not that touristy work and So be verbose Unless you if you don't use compression, but like you can use compression. So we can remove that It's scheme less It doesn't enforce a key being there or key being there or specific type which might or might not be a problem for you and So the last the last format is Avro and it's not so common is It's it's crazy to extend and I Think with our this the schema so you can enforce keys being there. You can enforce some types Unfortunately, like some bits more ecosystem and in our project. We decided to use Jason lines So it's very simple and it was good enough for us So we got to the point that we Kind of save all this data in in a rush shift and then let's talk a bit about rush shift So rush shift is a is a product created by Amazon is no open source and Essentially what they did is they fought Bosco school and they made it work for all up workloads like analytical queries But they changed quite a lot they changed the query plan and they changed the storage engine and Essentially, it's like it's like buying a car and changing the engine. It was quite a big change and they made it Work well for huge volumes of data. Yes, very good like on the fire compression support But then it's like a column of database so which means For the kind of things that you would expect Like a row based database to be fast actually a right shift is quite slow Given the right volumes of data and and it's the opposite is also true for the things that You know, there's law on Bosco's they quite fast on rush shift For example aggregate on single columns Having like many values in that column is actually quite fast for rush shift but quite slow on Bosco's quite for example If you have if you do lots of like insert updates on single rows and Definitely is lower than post as well if you select a single row and That's all you want all the columns. That's quite slow your rush it and it's because Like the biggest difference is really like the storage model and the rush shift is a column disk Uses a column this layout and post cases as like a row this layout Which really means like when when you have a table like The way post is writing in a disk is like traversing each each column row by row like in kind of a horizontal way and Yeah, that's the result you get but like with rush shift the the traversal is actually Reversed so it traverses all the values of a column and now when you research the end it does the second column the third column and so on and I Mean this is pretty fundamental and that's that's why performance is reversed and And yeah, and that's that's yeah, that's that's why queries. There are slow I'm posting squalor fasting rush shift The other big difference is that the block size Is normally quite big So you can load a lot more data and memory at once while with post a squirrel you have You have a different different like many different cycles for like many different Loading steps and I mean considering that the database and Like the most critical part of a database is loading data from from from an artist to to the memory I mean, this is is quite big Okay, so that was redshift and like how do we actually use it from from our system and So a redshift has very good support for S3 and if you have the files on S3 of a format that Races supports. It's just a matter of like executing a square query Is the copy is a copy command you specify destination table you specify Where data should be read from I specify whether it's a JSON File or not. I mean in our case, it's a JSON. It's a JSON lines file and GCP if it's compressed and What this query does is like four things one is reading data from S3 Once it's read like if the compresses data on the fly and then it does something called like JSON path flattening Which I'm going to explain in in a second And then whatever comes out of this third operation is then appended to to an existing table So it's a loading loading this data in the table So Jason path flattening is essentially An operation that takes an S destructor like Jason You know with Jason you have like key values, but then a value can be another object So you have like another set of key values or can be an array and Essentially like You have a lot more nesting But then if you think about rush it to rush it is still like a relational database You have tables and tables are like a flat flat structure So like the way you I Mean the way we decided to do it is using Jason and Jason path which essentially When you apply this This file to a Jason lines object, it will generate Like a sort of CSV with five fields The first one being the value of of them of the key ID second one being the first element of the ray of the value of data one and then you have Subfield of data to and so on So at the end of this you have a faster today can just append to a table and that's that's the way we did it And I think what mentioning is that Like you know for for for any software project the schema of the database is quite important We wanted to have the schema kind of versioned and storing it like you probably would with any other Infrastructure code if using Ansible you want Ansible to be to be in your repository if you start form the same thing and The scheme is just another is not the one of those assets that you really should put in get an inversion So yeah, we definitely use a school alchemy And We don't rely on a squalemate too much to do or am operations because it's not the use case of fresh shift and I mean you can still Create queries using a school alchemy like we don't really use models in that way and The other benefit of having a school alchemy is that you can it's just nicely integrates with migration framework called a limbic which is quite complex and and quite kind of featureful But essentially like with a migration framework. It's really a true potential date that you tend to use One is a limbic revision which generates a migration files and And once you have these migration files you can Run this migration file on the current schema to upgrade the schema or downgrade the schema depending what kind of direction you want to go and To apply this fires is just a matter of running like a limbic upgrade And as I said, it's quite it's quite a complex framework and it's a possible multiple environments And how to generationally work sometime because reshift is definitely as a lot of as cases is a bit weird sometimes especially for example when you alter columns like You cannot really alter columns in a shift you have to drop columns and read them Which has a lot of consequences Which gets me into these annoyances and The ratio that's a lot of things which are quite annoying. For example, like the voucher length is expressed in bytes instead of characters While for proscuses is pressing characters So sometimes you have as cases where like you, you know kind of scrape sites with Japanese characters and then suddenly like the loading breaks because you know kind of the Japanese characters are mostly Using the unicode extension. So you have you probably have two bytes instead of one byte and that was really annoying for us You can all the column types as I said before Referential integrity is not really a thing in a rash shift so primary keys and foreign keys are not really enforced But that's okay because we don't we don't for our use case. We don't need it Columns are notable by default, which I think is different in postcards Is this system future proof? Yeah, I mean we resonate with it Russia's pattern came out which seems very interesting because it would essentially mean that we would We could potentially skip all the loading in rush shift Because spectrum reads data directly from S3 And This is like a couple of open source projects, which we might look at and one is called press to the B Which again is is able to run queries directly on S3 and With how you I mean to kind of injustice files in a database Which is quite nice and We don't stream to S3 which might be like a good thing to look at And there's another project which I want to mention. It's actually an extension to PostgreSQL called Cetus and it's done kind of by a company in in US and Like if you are found a PostgreSQL and you want to kind of use role Like the original PostgreSQL with all the extension that that you kind of learn to like You can use you can look at this company Cetus data is called Yeah, thanks a lot. I think that was that was it And I don't want to mention like I'm actually looking for work especially on kind of this sort of stuff because I really enjoyed it so if you have you know, if you have a project like that, you know kind of Talk about it. I'm happy to talk about it. And Yeah, I mean that's it. Thank you. Thank you very much for listening Now so any question to Federico and yeah, thanks for your talk. All right. Thank you