and the powers under section 156.3 under the criminal procedure of code is a topic which we quite often day in and day out even for a common public while we read on the social media as well as on the print and otherwise see that there are a lot of aspects being discussed under section 156.3. What are the facets? What are the dimensions? How there is a legal journey and what are the paths given to the magistrate and what are the paths with the common man who is aggrieved of the action and inaction of the police? Are there certain fronts wherein we would be having the insights from a renowned lawyer Mr. Manishankaran and we are also thankful to Aparna who was the connecting point to help us connect with him and despite his busy schedule but his passion to take things forward is what made us connect together. There is a demand for the sharing of the PPT. We have shared it on the WhatsApp group but we are again sharing on the chat box and I request those who have missed our previous webinars they can stay connected with the Beyond Law CLC YouTube channel they can connect with that and with that I would request Mr. Manishankaran to take things forward. Over to you sir. Thank you Vikas and one thing positive in this pandemic situation is it has brought all of us together from the nook and corner of our country. See from the 2020 onwards we have seen a rise in these webinars, the webinars itself I think a term coined for this pandemic and it is so useful not only for the seniors but also to the young budding lawyers and also mostly law students. We have so many law students who take part in this or who are interested in these webinars and therefore we basically start from the first principles and these webinars are quite happening from now we are in the second year. Here also we have very regular webinars in fact we have one Madras tax bar which deals with this taxation issues from 2020 onwards and they are nearing now 150th webinar. Previously they used to be very frequent on almost on a day-to-day basis then weekly now after the courts have started functioning and also normalcy is slowly returning. We are keeping it every month. Now to go back to this today's topic though elementary as you suggested in your introductory speech but it is a very important provision which is dealt with by the lawyers who practice on the criminal side from the trial courts. These petitions are being filed by those lawyers day in and day out again to borrow your expression. This 1563 is a provision where a person presents a petition to the magistrate and the magistrate if he deems fit makes an endorsement and then directs the police to investigate. Now we are going to discuss what are the powers of the magistrate before issuing an order under section 1563. Before discussing the provisions are the power under 1563 which is the provision which sets the law in motion. We may have to also see the initial provisions under the criminal procedure court namely section 2d which deals with the complaint. Complaint you may be aware is made orally or in writing before a magistrate and if it is made orally then the magistrate puts it records it in writing and then he endorses it for the police. Then police commences the investigation under section 2h for collection of evidence. Then it is done by the officer in charge of the police station which is also defined under section 2o of the CRPC. For criminal law to be set in motion and for the officer to register an FIR which is a subject matter of today's discussion. Section 154 will be the relevant provision to start with because it deals with cognizable offence. If the offence discloses which is cognizable in nature then the officer in charge of the police station has no other go than to register an FIR. Suppose if the offence or if the complaint does not disclose an cognizable offence if it is only found to be a non-cognizable then the procedure is as contemplated under section 155 and as per clause 2 of section 155 the magistrate permission will have to be obtained to even conduct the investigation. Then 156 deals with the powers of the police to investigate a cognizable offence. Then the other thing is section 190 where a person appears before the magistrate and presents a complaint and the magistrate based on the agreements made in the complaint decides to take cognizance under section 191A or B or C which I will briefly touch upon a little later. Then there is the final thing of taking the complaint on file is what we generally call a complaint where under section 200 CRPC it which a captioned as examination of the complainant. These are all private complaints and once the magistrate sees that there is a prima facie case made out he examines the complainant on both and also the other witnesses who are present at the time he also examines them and by conducting and he can conduct an inquiry as contemplated under section 202. After conducting or recording the evidences of the statement of the complainant and the witnesses if the magistrate comes to the conclusion that no criminal offence is made out then as per section 203 he dismisses the complaint then that puts an end to the part culminates or terminates the criminal proceedings. However if the magistrate decides to proceed with the case then he issues summons under section 204 then it takes its own course then it goes for supply service of summons then recording of evidences cross examination etc. The origin of this 1563 CRPC initially we could get back to 1882 chapter 14 however this provision of 156 is not has not been provided. The first time as per our this research it was found in the 1889 court however there is nothing available to show what made the authorities or the lawmakers to introduce this section. However in 1898 this CRPC part 5 chapter 15 this was 1563 finds that place subsequently it has also been carried over in the 1973 court. Chapter 12 of the CRPC deals with police power and sections 154 to 176 are dealt with there. Chapter 14 of the CRPC provides for the conditions requisite for initiation of proceedings under section 190 to section 199. Chapter 15 as I mentioned earlier are complaints to the magistrate which are dealt with under section 200 to 203 of the CRPC. The setting of the criminal law in motion starts by presenting a complaint firstly the informant as he is generally referred to are a person aggrieved or a complainant or even a third party can set the criminal law in motion. What is required to do he will first file a complaint. It can be oral or in writing if it is in oral the officer in charge of the in charge of the police station can either record it himself or he can debut the writer of the police station to make a record of it. After recording it he gives it to the informant to verify after verification he is required to sign it. After perusal of the complaint if the officer in charge of the police station comes to the conclusion that it makes out a cognizable offense then he has no other go to accept register FIR. This is what is settled by the Honorable Supreme Court of India in the Lalitakumari's case which is also reported in 2014 volume 1 SCC page number one. This is a judgment by the constitution bench of the Honorable Supreme Court of India. Now the next question arises do the police register all the complaints all of us know the answer is a big no. Then what happens there is something provide it is also provided in the in the section itself that if the police officer in charge of the police refuses to register the case then the informant or the complainant has an option to send the complaint to the senior officer who is usually the district superintendent of police as contemplated under section practices of the CRP. Then what is he required to do superintendent of police again goes through the complaint and he himself can record it or he can debut the officer in charge of the police station. Being a district superintendent of police he is deemed to be the officer in charge of the police station for all the police station in his district then the criminal law is set in motion. Now there is also a third category of cases which may be the subject matter of today's discussion is that what if the even the SPA doesn't take care or show care or he simply ignores it or puts it in the file then what is the remedy open to the person agree then he has to then this 156 class 3 comes into picture he presents a petition before the learned Jurisdictionary Magistrate by appearing before him and the Jurisdictionary Magistrate is called upon to go through the amendments made in the complaint and if the complaint makes out an offense then he can endorse it for investigation by the police. For that the Magistrate is required to apply his mind there are any number of judgments which say that Magistrate cannot act like a post office and that he is not merely endorsing the the complaint to the police to investigate in fact there is one reported judgment which I will also refer to a little later wherein the Honorable Supreme Court says on perusal of the endorsement made by the Magistrate he simply endorses it as per application that is the only endorsement made based on which the police was required to commence the investigation that order was challenged however the Supreme Court held that the Magistrate is performing a judicial function the Magistrate is required to go through the provisions or the the amendments made in the complaint and if the complaint makes out a cognizable offense then he is bound to at least show application of mind and then endorse it to the police once the endorsement is made the police has to register an FIR then commands the investigation even for issuance of someone's madrassai court has held in more than one case that a mere someone's issue to the person concerned to appear if it does not bear the crime number which is the FIR number then that is bad in law and they have crushed the summons therefore the authority with the police or which gives the legal sanction is the registration of the FIR it is a different matter for the police even after the merely because the because the Magistrate has made an endorsement directed the police to register the FIR does not necessarily make the police to file a positive report police based on the investigations made based on recording of statements collection of material either by a documentary evidence or oral statements or a seizure of material objects what we call as MOs then if it comes to the conclusion that there is no offense or cognizable case is made out they can file a final report or a negative report to the magistrate and again the magistrate is empowered either to accept it reject it or direct the police to do a further investigation or Suomoto can reopen and direct the police to further investigate the matter this is how the criminal law is set in motion once this section 156-3 is set in motion this deals with information to the police and the power to investigate I have already brought out or referred to the various sections earlier starting from complaint investigation and officer in charge of the police station now coming back to section 154 which is and information in cognizable cases then what is the contents of those information is prescribed the conditions what are the conditions to record an FIR it has also been categorized the information given to the police officer must be must not be vague but must be definite for the police to start the investigation or to take or initiate any action or to initiate or set the criminal law into motion you may have come across cases whether a telephonic information can be recorded as an FIR the answer is again twofold yes and no why yes yes for the reason if it discloses or if it is definite it is not vague if it gives the particulars then the police can take it as an FIR otherwise if there is a phone call received by the officer inside the police station stating that there is a dead body lying here so and so place then the connection goes off then that is not a definite information because it could have been caused by an accident it could have been murder or it could have the person would have smoothed and fallen off therefore it is for the police officer to go to the place of occurrence and then decide then on the collection of evidence or recording of statements from the witnesses who are present in the nearby places then he registers an FIR suppose if it the information reveals that so-and-so and if we see some bodily injuries which could have been fatal then he can register straight away as a case and cannot do and it is also important to note it is not always required for the police to know who committed the offense even for the magistrate he only takes cognitions of the offense and not the offender we have seen in so many FIRs like so-and-so and various other persons so-and-so and various other unknown persons and so-and-so versus 50 unknown persons all these are permitted because it is only an FIR FIR is not an encyclopedia all it has to record is only the gist the definite information which the police officer receives and once he discloses a cognizable offense then he proceeds to investigate then if it is only an oral information then what is what the police officer is required to do he is required to register it by in the sense that he used to record it he can himself record it or he can ask the writer to record it and read it over to the complainant or the informant and ask him to verify and after fixing his signature then the then it must be entered in a book kept separately for that purpose his state government has come so as prescribed the form in which the FIRs are now to be recorded which contains all the particulars as far as our state of Tamil Nadu is concerned all these forms and the FIRs are now you can give a complaint online to the commission of police and you get the acknowledgement almost in depending on the nature of case in 24 hours then you can access the FIR from the website of the commission of police it's a greater Chennai cooperation or greater Chennai as far as Chennai is concerned similarly it has been extended to the districts in Tamil Nadu also the object is to set the criminal law in motion these are all in respect of a cognizable case if in case if the offense is not a cognizable one if it is only a non-cognizable one then the police must keep their hands off the police is required to approach the magistrate the magistrate on seeing the contents of the complaint passes an order under clause 2 of section 155 based on missed investigation commences because there is a bar in commencing the investigation if it is a non-cognizable case then what determines if the report is an FIR or not as I had mentioned already the information must be definite and not vague and the information can be given by anyone the information need not even name an offender or other witnesses it is only an information to set the law in motion based on which the police registers the case and starts the investigation then there are also occasions which you might have come across there may be a complaint there may be a counter complaint these two are different aspects if a complaint is registered initially if another complaint is given again it should not be construed as a second FIR second FIR is back is what the supreme court says from DT Antoni's case in that too in respect of the same offense suppose if the second FIR discloses any other offense in respect of any other person in respect of any other occurrence then it is permitted if it is a case of case and counter then the counter case given by that informant if it also relates to an incident giving a rival version it will though it will be styled as two FIRs the police is still bound to register that FIR and can take up the investigation together the general idea of section 156 is the police officers power to investigate a cognizable case as the section stipulates the police officers power to investigate a cognizable offense under subsection 3 of section 156 any magistrate who has jurisdiction under section 190 of the CRPC can take cognizance of the offenses which is captioned as cognizance of offenses by magistrates to order such an investigation has contemplated under section 150 plus one the magistrate again as I said indicated earlier has three options A accept the report as it is and take cognizance of the offense in which case he proceeds in the in the case suppose on perusal of this complaint of this petition if he comes to the conclusion that there is no offense made out he can disagree with the petition and close the case there may also be some cases where there may be some gaps in the petition or the magistrate may have some doubts in his mind then he can direct the police to further investigation and file the report under section 156 class 3 of the CRPC it is also important to note at this juncture that the accused has absolutely no right to intervene in these proceedings to have his say there are any number of judgments the law is well settled as far as this aspect is concerned however if the case goes by way of revision assuming so suppose if the magistrate refuses to take cognizance magistrate disagrees with the report and even after a further report is filed the police magistrate says does not feel that it makes out a cognizable case he closes the petition or dismisses the petition then that order becomes a judicial order and the judicial order is subject matter of challenge by way of a revision to the jurisdictional superior court when that happens then the other party becomes an agreed party then he has a right to intervene and justify the order of the magistrate it is only at the initial stage at the original complaint stage where a person appears before the magistrate and gives a complaint and that the magistrate is in the process of examining the complaint the person accused of that offense has no say in that matter and he has no right to be heard the once they magistrate again there are two things the petition simply says it is therefore most respectfully prayed that this honorable court may direct the police to investigate as per class 3 of 156 of the CRPC and thus rendered justice if that is the prayer and the petition supreme court has held that if that is the case you cannot take cognizance of the case you have to necessarily direct the police to investigate on the other hand if it only says take the complaint on file and deal with the accused in accordance with law then there the magistrate has an option he can peruse the complaint he is since he is not called upon to enter into an investigation by himself he can direct the police to investigate and file a report on the other hand on the face of it if the petition makes out a case then it becomes the complaint and the magistrate jurisdiction magistrate invoking the the powers and as per as contemplated under section 190 of this CRPC takes cognizance of the case if he takes cognizance of the case at this stage it is provided under section 1 class k suppose if it is through the police it comes under section 190 class 1 class b where the police after investigation files a report before the magistrate he takes cognizance under 191 b third case is 191 c are in two parts one after filing of the police report the magistrate can direct the police that this is not sufficient i would want you or i direct you to make a further investigation and file a report then the second part deals with the sewer motor powers of the magistrate the magistrate sewer motor can take cognizance that is what is provided under section 190 one c as i had in the preamble introductory i have made clear that this since section 156 3 is a judicial order the magistrate is called upon to see for the limited purpose whether the petition or the complaint makes out an offense and then makes an endorsement directing the police to file a report merely because there is a direction by the magistrate to investigate the police after investigation comes to the conclusion that no offense is made out they are fully empowered to file a negative report then again the negative report can be accepted or need not be accepted by the magistrate he can either take cognizance or he may direct the police to further investigate and then even after further investigation if the complaint is closed then the magistrate is required as mandated in law to give notice to the person who is the informant or the person agreed once that notice goes to the person he is fully within his powers to file a petition what we generally call a protest petition before the magistrate in the protest petition it is dealt with as a petition like any other petition where the de facto complainant or the informant or the complaint complainant is heard and he is well within his rights to justify that the complaint is made out and notice is issued to the other person the accused to call upon him to answer the governments made the protest petition a detailed hearing is heard then the magistrate can either accept the protest petition in which case he will issue someone to the accused and proceed with the criminal case or he may dismiss the protest petition if he dismisses the protest petition the person the de facto complainant or the informant has a right to approach the superior court maybe the district court or the high court as the case may be that depends on the order passed by the magistrate or the session judge or the special judge once the revision is filed then the then as per the basic principles or requirements of a natural justice notice if the revision is found to be entirely is found is is prima facie found to be made out then notice is issued to the person to the other respondent then it is heard and the matter can be proceeded up to the supreme court the third after the third stage or the other alternate we open to the complainant is to appear before the magistrate by way of a private complaint under section 200 CRPC and at the time he is given an option either he must be heard his statement is recorded what we call as one statement by the magistrate and if he has got any other witnesses to support his case they can also appear on that appointed date and this one statements are recorded by the magistrate this exemption is given provided the complainant is a public servant they are exempted and the petition given by them is taken the complaint given by them based on the prima facie material disclosed in the complaint summons is issued and process is issued to the persons accused of the offense under section 204 these are cases where you might have come across on the economic offenses side like a customs prosecution income tax prosecution or central excise prosecution those cases you will find only that the person who is authorized to file the complaint by his superiors presents the complaint before the jurisdiction magistrate and the jurisdiction magistrates based on the government's issues issues the process in fact in Chennai city we have two quotes economic offenses quote one and two where exclusively for these type of cases are being dealt with by them if the magistrate proceeds to hear some more witnesses he can direct the complainant to produce more witnesses to examine this is what is inquired as per section 202 of the CRPC if the as per 202 of the CRPC after conducting an inquiry with the magistrate comes to the conclusion that the offense is made up then you should notice on the other hand if he comes to the conclusion that no offense is made up no criminal case is made up therefore there is no worth proceeding this matter criminal criminally sometimes it may disclose it may appear to be a civil case and you should not permit a civil case to be give a criminal color to the civil case and proceed in a criminal court if he comes to that conclusion he simply dismisses the complaint under section 203 therefore section 156 is always at the pre cognizance stage and 202 is a post cognizance stage there are a couple of judgments which I will refer to a little later in this now dealing with this section 156-3 CRPC there are judgments various judgments few important judgments which were delivered by the Honourable Supreme Court of India recently is the one relating to Winobai Haribai Malaguya versus state of Ujarat which is reported in 2019 volume 17 SCC page one this is by a larger bench of three judges penned on by his lordship justice Roenton Felinelliman the point which was involved in this case whether after taking cognizance of the offense whether magistrate whether he can order further investigation further investigation is permitted at any stage from the point of view of the investigating officer even after filing a chart sheet under 173 clause 2 if some further material surfaces at a later point of time notwithstanding the fact that a complaint was presented before the learned magistrate and cognizance has also been taken whether the magist the police or the magistrate can order further investigation or the police can file a petition under 173 clause 8 for a further investigation the Supreme Court said yes there are there were some judgments earlier taking a different note to the to the effect that once the magistrate takes cognizance then it was little doubtful whether he can take up or entertain an application however way back in 1977 Narang Ramlal Narang's case the Supreme Court has settled this position wherein that it is entirely in the realm of the investigation officer who is in charge of that case if he comes to know of certain important fact which was not available with him at the time of filing the chart sheet then he can make an application before the magistrate for further investigation though yeah it is not mandatory but however to uphold the majesty of law the investigating officer is suggest it is it was suggested to uphold the majesty to make an application which is to inform the magistrate of the further material which emanated later based on which the proceed the police wanted to proceed further but at the same time where a case which I am now doing there there has been an instance that the application filed for further investigation was dismissed by the magistrate for various reasons that is also once you file an application notwithstanding the fact that it is only a formal application the magistrate is fully within his powers to examine that 173 petition and sees it is not a tool to harass the person or to rope in some other person or to implicate some other person on a false charge further he must have to he may have to examine the petition filed under 173 clause 8 on going through that and he will have to necessarily see what are the documents what are the statements which were originally accompanied the charge sheet under 173 clause 2 in another case where the it was verbatim the same but except for the reason for some further material surfaced at later point of time there was nothing provided in the petition the magistrate on examining the governments made in the petition and they accompanying documents came to the categorical conclusion this is nothing but you are trying to reinvestigate the case you are trying to implicate someone for your ulterior motive therefore this I cannot permit therefore the magistrate is also well within his rights to dismiss that 173.8 petition filed by the police therefore it is not automatic it is a different matter that the any order passed by the magistrate or the special yet or the district yet is some amount of international jurisdiction to the High Court that is a different aspect altogether now in this vinubai coming back to this vinubai's case the honorable Supreme Court said let us the powers given to the magistrate under section 156 clause 3 is why it is not restricted but there they had made a caveat or there was a suggestion that this can happen only till the trial goes on but it was also interpreted therein trial means till judgment is delivered therefore at any point of time it is well within the realm of the magistrate invoking the powers under section 156 clause 3 of the CRPC to direct the police to further investigate into the matter and therefore merely because he has taken cognizance of the matter does not restrict his powers to invoke a clause 3 of 156 in another case which is related which is a case of Madhubala versus Shuresh Kumar and others reported in 1997 volume 8 SCC 476 again it categorically says police must register a cognizable case and if it is not so the magistrate can direct the police to register the case and merely because and in this case the magistrate has also taken liberty based on the report he has directed the officer in the rank of an assistant commission of police to investigate that was challenged the High Court accepted the contention that the magistrate is not empowered to change the investigator officer or direct somebody else to investigate the case Supreme Court said no the ongoing with the materials available on record on going through the initial investigation conducted by the investigation officer at the first instance and the order passed by the magistrate the circumstances taken by the magistrate which prompted the learned magistrate to appoint an officer in the level of an assistant commission of police to investigate the matter cannot be phone faulted with therefore the magistrate the order was upheld but at the same time there is a caveat to this suppose if it is a case of which is investigated by the local police or the CCB or a CCB the magistrate cannot direct change of investigation the change of investigation is always with the constitutional courts namely the High Court and the Supreme Court in one case where the magistrate said I am not very happy with the investigation conducted therefore I will transfer the investigation to the CBA Supreme Court said no you have no powers to change the investigation if at all there is a person I agree it is the person I agree who can approach the court for the change of investigation for various reasons the agency that the officer is biased and is deliberately writing off the accused person he is daringly he is only deliberately setting some innocent persons just to show some case or to fill up the statistics in those cases and those are all those are all beyond the purview or the powers of the magistrate it is only the High Court which has power under either under article 226 or under section 482 of the CRPC to deal with such cases therefore change of investigation is out of the realms of the out of the realm of the magistrate therefore a magistrate in working powers under section plus 3 of section 156 does not have any power to change the investigation then they are in the similar was the case of B. Jairaman versus Anandarajan another 2015 volume 15 SCC 758 there the the Honorable Supreme Court quotes an earlier judgment of three judges bench in the case of Bhagwan Singh versus Commissioner of Police reported in 1985 volume 2 SCC 537 wherein it stipulates what are the conditions which the magistrate has to follow when a complaint is present when a report is present in the volume accept the report and take cognizance disagree with the report and drop the proceedings direct further investigation under section 156 plus 3 the only requirement is while accepting a negative report from the investigation officer magistrate cannot file it or return the complaint or assign it to the records but as I mentioned earlier notice will have to go to the de facto complainant or the person I agree or the informant she has to be heard otherwise the order becomes the order can be successfully challenged before the high court and there are judgments which say that the magistrate's failure to issue notice to the de facto complainant is bad in law and therefore is directed to issue notice take the protest petition on file and dispose of the matter in accordance with law there was what is the form in which the petition under 1563 is required to be filed previously all of us who are been practicing in the trial court before the magistrate's court all we mentioned is petition under section 1563 and drop it or present it for the magistrate but in the case of Priyanka Srivatsava was a state of UP which is reported in 2015 volume 6 SCC 287 when the case reaches the supreme court supreme court was shocked to note that by merely making a petition under section 156 class 3 they were able to have FRs registered that was a case where the bank officials initiated proceedings against the borrowers when they committed default and they were also involved the permissions of the surface and started to attach started attachment proceedings some of the accused persons the thought of a novel idea then they gave police complaints to the jurisdictional police complaining against the officers and also presented 1563 petitions before the magistrate in which the magistrate merely made an endorsement register and investigate that case went up to the supreme court supreme court was shocked to note that merely because some action was taken by the bank officials against these persons just as a counter blast you cannot you cannot misuse the criminal law like this it is a clear case of abuse of process of court and there is nothing wrong with the bank as in attachment of property will not amount to breach of trust or calling upon you to make the payment will not amount to cheating or misappropriation or any such thing therefore supreme court passed made a strong observation against these things and made and made it mandatory to file an affidavit by the person whoever makes an application under section 1563 must be supported by an affidavit if it is that is just to make him accountable so that he can be prosecuted for making for filing a false affidavit we have also come across where summons was issued even to the president of India these are all the instances which made the honorable supreme court to pass a direction that unless an affidavit is accompanied by the petition in support of this 1563 you cannot take that application on the file then in the case of Sakiri Vasu versus setup UP they laid down what are the stages in which can you directly approach the high court under 482 suppose if you give a police complaint and the police officer refuses to register the complaint then can you directly challenge that as an order come to the high court directly by way of a direction petition under section 482 recently our division bench has also held and also following the judgments passed by the honorable supreme court of India if a police officer refuses to register the FIR then it is open to the person to approach this superintendent of police then go to the magistrate if all these three things fail come to the high court otherwise you cannot straight straight away rest to the high court by filing a petition under 482 otherwise there were tons of petitions filed before that before the high court invoking the power under section 482 because 482 cannot be entertained in near of an presence of an effective alternate remedy under 156 class 3 or under class 2 where he can approach the district superintendent of police so this was laid down in Sakiri Vasu's case and therefore it was categorically held either article 226 or 482 is not the proper remedy to approach the high court when a complaint is refused to be registered by the police officer in charge of the police station then we come to the taking of cognizance which I have already discussed earlier that the conditions requested for initiation of proceedings is contemplated under section 190 of the CRPC which deals with cognizance of offenses by magistrate I have already categorized the three 191A, 191B and 191C and the circumstances in which they are taken cognizance by the magistrate there is one more aspect as for while dealing with 156 class 3 would be whether the magistrate here the magistrate you can also take into account either the special judge or the district judge because they are also now empowered under the some special some special enactments like the PCA to take organisms a person can appear before the special court and present a complaint if the if such a complaint is presented before the magistrate if it if it is under the PCA whether 1563 can be involved the answer is twofold first of all PCA cases are to be filed under section three of the C is the three and six of the act only before the special court and it is preceded over by a district judge or a designated judge therefore magistrate cannot touch the PCA cases now coming back to the jurisdictional court whether the person who is empowered to deal with these PCA cases can straight away in by invoking the powers of section 156 class 3 direct the police to investigate a PC act of funds which requires a sanction sanction is again two two sanctions one as contemplated in 197 CRPC and section 19 of the PC act both say no court shall take cognizance of an offense unless the sanction is obtained now an interesting question arose before the courts which landed up again in the hunt of the spirit of India to say whether the magistrate exercising powers under section 156 class 3 when it is said that he is not taken cognizance can he take up or direct the police to investigate investigate into an offense which requires a sanction at the time of filing with the charge sheet as this are the cases which will in a case of L. Narayana Swami was a state of Karnataka reported in 2016 9 SCC 598 this exactly came up for consideration the Honorable Supreme Court while discussing an earlier case of Anil Kumar versus MK Iyappa reported in 2013 10 SCC 705 it was held and order directing and investigation in the 156 class 3 cannot be passed without obtaining a valid sanction however there were also judgments while dealing with section 187 wherein 156 3 was liberally used in one case which landed up in the Supreme Court in the case of Manjushar Surana versus Anil Arora reported in 2018 volume 5 SCC 557 the Honorable Supreme Court after taking note of these judgments and also the other judgments says whether two parameters can be taken or stipulated when sanction is required to take cognizance under the PCA and without which even an investigation cannot commence whether the same sanction in respect of the same public servant under 197 can it be stated that it is not required therefore in this Manjushar Surana they formulated these points and referred it to the larger bench we have examined the position even with the Supreme Court website and till now at the time of this webinar I don't think the Supreme Court has decided this issue it is still pending with the Honorable Supreme Court but in the meantime one matter is the Calcutta High Court and by a recent judgment of the Calcutta High Court which was rendered on 25th of January 2022 in the case of Dr. Nazrul Islam versus Basudev Banerjee reported in 2022 SCC online Calcutta 183 the Honorable High Court of Calcutta after taking note of these two judgments are used came to the conclusion when this is the position it has been the consistent stand of the courts to take the last reported judgment therefore following the latest or the last judgment killed that sanction is required therefore this is the position as far as requirement of a sanction why invoking the powers of the magistrate under section 156 clause 3 therefore this matter is not free from doubt telling the Honorable Supreme Court decides this issue feel how to keep our fingers crossed it depends on the jurisdictional high courts either to follow the Calcutta High Court or in either high court it can come to its own conclusion or defer the decision till the Honorable Supreme Court decides the matter the comparison between 156 clause 3 and section 1202 is only this as I had mentioned earlier 156 clause 3 is in chapter 12 which deals with information to the police under power to investigate 202 is placed in chapter in chapter 15 where the complaints are made to the magistrate then as per 156 clause 3 investigation is directed to be is is directed by the magistrate under chapter 12 which is a precognizant cognizance stage whereas the inquiry as ordered by the magistrate under 202 is the post cognizance because he examines the complainant by taking cognizance of the private complaint and examining the witness as present then proceeds under section 202 to inquire into the matter therefore this is the difference between 156 clause 3 and section 202 this has been held so by the Honorable Supreme Court of India in the case of Ramesh Bhai Ponderaw head you as a state of Gujarat reported in 2010 volume 4 SCC page 185 185 where they distinguish between 156 clause 3 and 202 and as I had already mentioned earlier magistrate cannot direct the CBA to register an FIR and investigate the judgment is Central Bureau of Investigation was a state of Rajasthan and another reported in 2001 volume 3 SCC page triple 3 wherein they say that no such directions can be given by the magistrate it is only left to the constitutional courts to decide at these issues with that I think I have taken my allotted time Mr. Vikas. In fact it was going so seamlessly one never realized that all the time went thank you it's other way round this is by I have asked my junior to share the PowerPoint presentation we have shared it on the WhatsApp groups coupled with on the this platform also all right then great yeah I was seeing that in fact I had read it before the session was going to go live I found that it has a bird eye view yeah what we call in the youtube to create the shots so it's not a shot in the youtube fan fashion but at least in this it's in the pdf right where one can have the entire gist of that sorry no if you want to want it as a word also I can ask them to send it to your email it's fine it's fine yeah or I will ask your associate to do it Amit Sharma says she can do it yeah one note yeah Amit Sharma says I have filed an application under section 156.3 of CRPC it was dismissed by the CGM after four years it will not even take up as as a complaint under section 200 what is the law regarding the same and do I have a remedy certainly you have a remedy in fact you need not have waited for four years you could have made an application to the magistrate or straight away sought a direction under 482 from the high court because 482 is in three parts to enforce the orders passed give directions then for securing the ends of justice to prevent abuse across of court now here is a case magistrate cannot is not at all justified in keeping a petition for four years and then dismissing it then if he had not availed or approached the high court earlier that order can be challenged as I said even in this speech that it is amenable to revisional jurisdiction he could you can approach the high court under 397 or 401 of the CRPC order can be challenged but that that time lag of four years if he has to justify yeah that because he can say only from the dead of the order he will not have for the filing thing it will be numbered yeah because you go only from the order 90 days it is high court will definitely ask him what are you doing all these years whether anything survives the complaint at all after four years that will depend on the nature of the offense suppose if the offense itself is a time zone it has to be filed within three years and the first is to create a CRPC so we have to also be vigilant he can be waiting for four years vigilant of us non-dormant to us yes complaint filed under section 156-3 was dismissed and proceeded under section 200 200 CRPC for pre-summoning evidence order was challenged before the sessions for revision under section 397 but order passed by the magistrate was withheld can both the orders be challenged before the high court under section 482 or is it a bar under section 397 no there is only what is the order passed I didn't get you clear see one is a 156-3 petition and it is treated as a 200 complaint yes and then talking distance taken and someone's issue that can be challenged that is only one order what is the other order order was challenged before the session for revision under 397 but order passed by magistrate was withheld see the even the magistrate see that is why even in this thing I had indicated if the petition says take cognizance or that deal with the accused in accordance with law the magistrate is fully within his powers to treat it as a private complaint issue summons that is permissible there is one judgment of the Supreme Court which says that if the prayer itself is only for 156-3 and if it requires some investigation to be done by the police the magistrate is not empowered to investigate therefore he cannot take cognizance and therefore he is necessarily bound to direct the police to investigate this is will a red petition under article 226 be maintainable at the high court as a remedy to complainant once 156-3 and complain at a section 200 has failed to get the FIR registered see it is it depends on the high court madras high court does not entertain 226 it entertains 482 you can file a 482 petition seeking a direction provided you had followed those three stages you have a complaint to the police sending it to the superintendent of police then the third is 156-3 once you fail in all these things then only it can be entertained recently supreme court our madras high court that is a division bench after there was a difference of opinion between two learned single judges they went into great detail about this they now laid down that unless these three remedies contemplated are exhausted you cannot directly approach the high court under 482 generally madras high court does not entertain repetitions in criminal matters unless only off late they have started entertaining which is stated as a criminal 226 and it is posted before the 482 judge not before the 226 judge based on the prayer made in the petition so you can approach the high court only after exhausting the remedy not directly and not by way of a red petition only banter 482 as far as madras high court is I think that Pepsi judgment would come into play yes yes and otherwise we have done a session by some each order uh who are the state council in that jail ita's case you can watch that webinar on interplay between 482 and 226 yes it is interplay only yeah now we have a session by Sandeep Chhota who was a special prosecutor in that uh jail ita's case in karnataka I appealed for the I appealed for sasigala in that case okay that's why your knowledge is quite you can explain things thread bear once you go deeper into the such sessions as a practicing lawyer then you can understand the nitty gritties this is by Parian magistrate ordered the police to conduct an inquiry and file a report by exercising the bars under section 156 3 police conducted the inquiry and closed the complaint and produced negative report as it the complaint is filed is the procedure correct this is by whom I'm I'm seeing on my screen uh gkp you're he's a lawyer from your place for the yeah one second second that is at 645 yeah 646 yes yes magistrate ordered the police to conduct inquiry and file a report by exercising section 156 3 police conducted inquiry and closed the complaint and produced produced negative report as if the complaint is filed see this is the case where when a negative report is filed the magistrate on accepting that report is bound to issue notice to the de facto complaint the de facto complainant on if the de facto complainant on his own comes to know that the police has filed a negative report he can approach the magistrate and file a protest petition if a protest petition is filed that has been treated as a complaint then it has to be agitated by the magistrate and pass an order he cannot simply take the negative report and direct the compare and the complainant is not uh remedialist he has to hear the complaint this is by paul the inaction of the forest officials resulted in the death by the wild animals and medical injury a complaint was filed against the forest officer at the local police station however no action was taken by the complaint or on the complaint could the complaint be filed under section 156 3 see there if it is a forest officer then the question of sanction will come under 197 sanction must be obtained so magistrate is not empowered to take cognizance he can watch one of the webinars on sanction by Mr. P. S. Raja Gopal a senior advocate on a youtube channel yeah okay yeah uh advocate Suman I have given a written complaint to the police however they transferred on the wrong reasons of jurisdiction again where they have transferred the police against takes a written statement and just registers only what is the remedy see supreme court in uh uh on a case decided I think in way back in 2008 police cannot refuse to register a complaint they have to register a complaint if it comes to their knowledge that they don't have jurisdiction then they will have to send that complaint lock stock and brought up to the jurisdiction police station then it is for the jurisdiction police station to conduct the investigation very because of various aspects including territorial jurisdiction but if the if it is going backwards and forwards like this he can approach the high court this is uh 156 3 petition ordered on receipt of specific direction from the jurisdiction magistrate the magistrate without registration of the FIR inquiry was conducted and closed is that the right procedure see again it is based on the facts we do not know what the complaint disclosed magistrate is well within his right even before ordering access in power under 126 class 3 direct in the police to register the case he must be satisfied that it makes out the cognizable offense what is the magistrate comes to the conclusion that no cognizable offense is made up then he has to only close it if he closes it he is not remedy less he can challenge it before the high court or the district court under 39 to some CRP this is by prior eddy how long one has to wait for the magistrate to come back with either of the decision accepting or rejecting under section 156 3 see you know it says only reasonable time reasonable time as far as the my state is concerned in respect of these matters cannot go beyond one week unless he has to record reasons otherwise he can approach the high court under 482 giving a direction to be taking a direction to the magistrate to dispose of your application check it on the youtube the amount of questions are pouring up it shows that the people are watching it very in a lively manner to understand things can this is by Konal Agarwal can magistrate direct the police to investigate the matter and also order for the incriminating evidence and also order for the incriminating evidence no no see once the direction is given to the investigating officer then it passes the realm from the magistrate to the investigating officer it is for the investigating officer to investigate the case in accordance with law there is no question of giving any direction to get incriminating evidence if such an order is passed then the magistrate is preconceived that that will be struck down magistrate can only order direct the police to investigate and finally this is Akshay Kumar is the order of police custody and interlockery order doesn't no this is not with the session so we will not take it is it necessary to join the accused as a party in an application to section 153 this is by Aniket Satkote see 1563 petition if it is presented before court as practicing lawyers would know you will give the name of the accused also otherwise if it is even in the complaint unless it is not known the person who has committed the offence then you say this is only an offence which has been committed then the magistrate take cognizance of the offence 190 or if the complaint necks out their cognizable offence he endorses it to the police police will register this as an FIR making note of the name of the complainant and some unknown persons then he proceeds to the spot to investigate then he includes the accused at the time of filing the final report yeah this is by Ravi is part of the magistrate to ask questions for status report of investigation come under section 1563 and can status report be demanded from police only on the basis of complaint given to the police of information of a non-cognizable offence to police when FIR is not being registered see there are two things which is clubbed into one see non-cognizable cases stand on a completely different footing that is that has to be dealt with under 155 clause 2 if it is a cognizable offence the magistrate after making an endorsement to the police he is well within his powers to seek for a status report yeah the questions are there i'm just wrapping it off with the tomorrow's session so it is in fact in tandem with today's tomorrow we will be having a session on trial by magistrate pre cognizance cognizance and inquiry so that is by murthi naik a senior advocate from karnataka bar association so do stay connected with us tomorrow at 6 p.m and thank you mr manishankar thank you thank you it was a pleasure connecting with you the way and the ease with which you have explained things it's uh fantastic and and the way it has been latched up on the youtube it shows that people have actually loved it thank you everyone stay safe thank you my pleasure thank you thank you


Hello and welcome to the launch of the Nobel Laureate Festival. I'm Diya De Law and it gives me great pleasure to remind the world that St. Lucia has two Nobel Laureates. So William Arthur Lewis received the Nobel Prize for Economics in 1979 and Sir Derek Alton Walcott received the Nobel Prize for Literature in 1992. In their honour, the Nobel Laureate Festival Committee produces a number of events around the island and now, because of the beauty of the internet, they can be seen all around the world. To tell us more about the events and the Nobel Laureate Festival and its meaning to St. Lucia and the world, here's our Chair, Her Excellency Dame Palette-Louise Governor-General Emerita. Ladies and gentlemen, it's January once again, the start of a new year with its promise of the fulfilment of aspirations and dreams at the personal, community and national levels. For the past 31 years, the month of January has held special significance for St. Lucia as we have been celebrating the achievements and contributions of two of our eminent and distinguished nationals. The Nobel Laureate, Sir William Arthur Lewis and Sir Derek Alton Walcott, both of whose birthdays, as everyone knows by now, fall on January 23rd. Yes, indeed, the Nobel Laureate Festival held in their honour has earned pride of place on the national calendar of events and rightly so. So what better way to start a new year than by celebrating our achievements as a people, as a nation, and using these achievements as a springboard for even greater and more lasting successes? This year is no exception. We have chosen as the theme for the 2024 Festival this challenge to the nation. We have written excellence, inspiring our collective imagination, fostering national pride. We invite everyone to take some time during the Festival to fully appreciate the input and the impact of the achievements and contributions, not only of our two Nobel Laureates, but of all our distinguished as well as aspiring nationals at home and abroad and the many ways these have shaped the world we live in today. We speak, for example, of Sir Arthur Lewis as the father of development economics. But to be really realized that his pioneering work in that field has benefited not only St. Lucia in his homeland, but the whole world. Collectively, St. Lucia nurtured him, developed his potential, and then gifted this brilliant mind to the rest of the world. This has to be for us a source of immense national pride. Fellow St. Lucians, let's not hide our lights on the bushes. Let's place them with pride on our mountaintops, on our pitons, our jimmies, so that all the world can see what potential resides in us, what we have to offer as a people. As Sir Derek himself urged us, let us not make tiptoeing representations of ourselves. After all, we are a people of style, of grandeur, of large gestures. Sir Arthur and Sir Derek sadly have both left this temporal world. But they have not left us offence. Let us therefore show the world the legacy they have bequiffed us. I know we cannot all assemble in one physical space to celebrate, but we can use the virtual world to do so. I therefore invite all who can to post on the international social media platforms and on our festivals Facebook page during the month of January the name of at least one St. Lucia Luminary, whose life, successes, achievements and contributions we and the rest of the world should celebrate. Let their work inspire our collective imagination and so foster pride in our people and our nation. On behalf of the members of the Nobel Laureate Festival Committee, I take this opportunity to thank the government of St. Lucia, the Bank of St. Lucia, the St. Lucia Tourism Authority, the Library Cooperative Credit Union and all event coordinators and their sponsors for the continued support of this, our national festival. Ladies and gentlemen, remember the theme. Let it inspire you. Let it be seen in everything you do, in every facet of your life. Celebrating excellence, inspiring our collective imagination, fostering national pride. Thank you. Thank you to the Nobel Laureate Festival Committee Chair, Her Excellency Dane Palette-Louise. Before we tell you some more about the festival, we hope that you stay with us because we're actually going to show you highlights of some of the events. And of course, without yourselves who have helped this festival grow from one day to now over a month-long event, we continue to thank you and we continue to hope that you will join us during the month of January. But our sponsors, of course, this cannot be possible. And we have one of our sponsors who have joined us recently over the last year to inspire you to be part of our festival and also to encourage and engage other people outside of St. Lucia to come and join us in our beautiful island. So I'd like to welcome Ms. Doreen Georges from the St. Lucia Tourism Authority. Ladies and gentlemen, I stand here today proud to represent the St. Lucia Tourism Authority, who for a second year has come on board to support the Nobel Laureate Festival. Of course, we acknowledge the great work of two men who, ironically, shared the same booth day and has emerged from this beautiful gem St. Lucia. And of course, their contributions in economics and literature, we see the value from not just the tertiary level, which they're contributing to globally, but we also see the impact that it's having even at the infant level. And so the St. Lucia Tourism Authority will continue to support Nobel Laureate Month and the festival. And we will do that through our LucianLinks program, which continues to honor first, the second and third generation St. Lucians. Additionally, our social media strategists stand ready to share and promote the content that is related to the festival. And in order to win what it is that we're giving away for Nobel Laureate Festival, our social media strategists will be sharing a five-night stay for two at the Landings Resort and Spa, as well as a five-night stay for two at Bay Gardens Marina Haven. This will be supported with airfare and transportation fully sponsored by the St. Lucia Tourism Authority. So we look forward to your participation. We look forward to everyone embracing and honoring the theme for the 2024 Nobel Laureate Festival. And of course, the St. Lucia Tourism Authority stands ready to ensure that everyone is engaged and the information is shared in the global market place. Labric Redition is indeed happy to be associated with the activities of Nobel Laureate Week for the year 2024. We think the whole concept of excellence, not just at this time, at all times, is significant and important for a country like St. Lucia. We at Labric Redition have the view that excellence is not a skill. Accidents is behavioural. Excellence is an attribute that we think espouses or radiates or permeates through all what one does. And so we are saying that our Nobel Laureates with the epitome of excellence and we think we need to come up with some mechanism, probably even going beyond the program of activities for Nobel Laureate Week to ensure that more St. Lucia's, particularly our younger ones, are socialized to the whole concept of excellence. And when we talk about excellence, we could probably look at it from two approaches, from a quantitative approach. For instance, we are saying that, let us say from an examination results, if we say 90 to 100 is excellent, so then we are given a kind of quantitative definition to excellence. But then there's the qualitative definition of excellence, that at all times you want to be the best, you want to give of your most. And giving of your most means that your knowledge base, there have to be continuous improvement that your repertoire, your knowledge on the subject matter has to be current, has to be at the top of the class. And I think that is what we in St. Lucia must aspire. And from, even from a parenting point of view, how we socialize our child, from washing the dishes, to vacuuming the floor, to sweeping the floor, do we ensure that we espouse excellence, that we socialize our child, our children, that whatever we do, we do it to the best of our abilities. Excellence brings with it the right to even collect a premium.  Because it is what I would probably call a palaisart. And so as we go about celebrating Nobel laureate week, I think the emphasis has to be on excellence and how we go about developing a trans, what I would probably call a transmission mechanism through a process of socialization, where our young people in particular could, let us say, cultivate that culture of excellence and let it be reflected in all what we do as sentrysants. We are trying to inspire you to attend the events. And perhaps you don't know when you go to the social media, you don't know what questions are going to be asked there yet. So make sure you follow the social media handles for the St Lucia Tourism Authority and the Facebook page for the Nobel Laureate Festival St Lucia and encourage your family, your friends, everyone at home and abroad to share those links so that they can all come to St Lucia, what wonderful prizes. And how else can we entice you? Stay tuned because we have the highlights of some of the events, not only in the north of the island, but the south of the island. An annual church service starts the Nobel Laureate Festival activities followed by a sumptuous breakfast catered by the Benedictine sisters of the Abbey. Celebrating excellence is a series of four-minute videos where guests Kurt Harris, Darryl Raymond, Cantilio Louie and Matthew Emmanuel discuss the impact of St Lucia's Nobel Laureate on economics and the creative arts. An exhibition of photographs by St Lucia photographer Chester Williams will be displayed in three sections based on the motto of St Lucia, the land, the people, the light. It will comprise images photographed over several years as well as a small selection of special images. The 2023 Queens Commonwealth Essay Competition award ceremony announces the winners and recognizes the students who took part in the 2023 Queens Commonwealth Essay Competition. Labry's annual Plen Air painting event for people of all ages and levels of experience will paint together while enjoying the outdoors as a group with a focus on people painting in the midst of traditional activities in the beautiful village of Labry. This year, there will be a demonstration on the basics of figure painting followed by a question and answer session lasting 30 minutes before participants begin their own paintings. Participants should bring art supplies they wish to use. Free return transportation from castries to Labry will be available. Using the metaphor, giving up is not an option. St Lucia-born US-based fashion designer and entrepreneur Miriam Belas tells host Delia De Law that her mother, a professional seamstress, taught her how to sew when she was a child and how she continues to draw inspiration from her mother and her Caribbean roots with her designs. This is Derrick Walcott Memorial Lecture, what the twilight keeps saying, following the gaze of Derrick Walcott. Will be presented by Dr. Travis Weeks, who is a poet, playwright and current theater arts lecturer at the University of the West Indies, St. Augustine Campus in Trinidad and Tobago. His discourse examines Walcott's repeated use of the twilight in his poetry, a device he employs to highlight a vision for his people and country. The National Archives Authority of St. Lucia will hold a traveling exhibition to highlight the lives of our noble orates. In addition, the various services the National Archives offers to the public shall also be displayed. The exhibition will start at the Castry City Hall on Wednesday, 24th January, 2024, at 10 a.m. The exhibition will then travel to various districts around St. Lucia. Navigating the future, applying the teachings of Sir William Arthur Lewis to St. Lucia's 21st Century Development Challenges, that's the title of the Sir Arthur Lewis Memorial Lecture delivered by Dr. James Fletcher, who explores the enduring relevance of Sir William Arthur Lewis's theories and philosophies to the multifaceted development challenges facing St. Lucia. In an era marked by rapid technological change, environmental threats and social upheavals, Sir Arthur's insights provide a valuable framework for devising strategies to address these issues. The Reef Laying Ceremony honours the legacies of Sir Arthur Lewis and Sir Derek Walcott, both of whom are buried on the college grounds. During the ceremony, reefs will be laid at their gravesites. Members of their families, specially invited guests, and members of the college community will celebrate the remarkable works of the two laureates. The event will feature a keynote speech delivered by Honourable Monsignor Patrick Papa Anthony, SLC. The Sir Arthur Lewis Community College Day of Excellence displays the extraordinary talents possessed by faculty and students. Outdoor spaces will be transformed into art galleries, highlighting paintings and digital artwork. Literary talents will be displayed through poetry readings and storytelling sessions, while photos of outstanding sports teams, men and women will be presented around the campus. Budding entrepreneurs on campus also have the opportunity to exhibit and sell their merchandise on site. The Walking Tree is a captivating play about two adventurous Samarians who find themselves lost and trapped in the mystical, enchanted forest, courtesy of Papa Bois. As they navigate this other, worldly realm, they become entangled in the midst of a complex family feud among the forest inhabitants. Atipawol Quayol features an open-air spoken-word suare of original pieces from artists showcasing both their oral and written skills in the Quayol language. Awards for Best Submitted Written Peace and Best Performance will be presented. Join the Nobel Laureate Festival for the FRC Book Launch of Icons, a book of new and selected poems by John Robert Lee, featuring readings of chosen poems from the text. There will also be a book signing by Mr. Lee. We hope we have enticed you to attend the Nobel Laureate Festival. There is an event there for everyone. They take place throughout the island, and many of the events are free. We'd like to thank our sponsors once again, the Government of St. Lucia, the Bank of St. Lucia, the Labry Cooperative Credit Union, Flow, the St. Lucia Tourism Authority, and DD Media Relations for their continued support. And of course, thank you because, as I said earlier, you have helped us to grow from a day of events to over 30 days of events. You can request a program at the Facebook page, St. Lucia Nobel Laureate Festival. You can email info at noballaureatefestivalsentluxia.com or you can text 284-4111. Simply say program, and we will ensure that we send it to you. And of course, please share, share, share, help us to grow, help people to come into our beautiful island, that is St. Lucia. We hope to see you at the festival. Until then, I'm Di-li-di-lo. Goodbye.


We are going to have the next session now, which is going to be Adinata, I hope I pronounced the name correctly from pocket gems talking about how to utilize serverless technology to optimize and parallelize unit tests. Hi everyone. Welcome to my talk. I assume you can see the XKCD comic on your screen. Please interrupt me if you don't. This comic is a classic that it might not relevant with Python community, you know, because we don't usually compile our Python code. If you work at a larger company, you might encounter the pain of waiting your changes to be deployed. It's pretty common in large company deployment can take more than 30 minutes. Today, I want to discuss a similar yet different pain. In my company, running full test suite can take more than 25 minutes. Here is a screenshot of our unit test when being run locally using NOS test. It run with four processes. If you look at the user time, it almost 6000 seconds or 100 minutes, roughly four times of the 25 minutes running time. This unit test being run in parallel with four processes, which make it four time faster. There is a great talk from Jin Huiyong yesterday in Parotrack that explain about speeding up data processing with multi processes. You can watch the talk to understand more how the multi processing work. And the thing is, the unit test already run on top of the line MacBook Pro. I'm going to share how we decrease 85% of time to fully run the unit test suite from 25 minutes to be under five minutes. My name is Adinata. I've been writing code professionally for six years. I work at startups in real estate gaming company and finance. Most of my works are in the backend or DevOps. I can do some front-end development, but my design skill is not up to par with my coding skill. Please say hi to me in my Twitter. Give feedback about my talk. Trust me send anything to me. Your feedback is very valuable. My talk is based on my work while I was working at PocketGems. PocketGems is a game company. We use Python for our backend and the backend run on top of Google App Engine to serve our players. It's highly scalable and you can focus on developing features rather than scaling the infrastructure. The company has been around for more than 10 years and has accumulated more than 4,000 unit tests in NOS tests. Previously, I was explaining this talk only using NOS tests, but it's overwhelmingly underfunded, so I added PyTest material thanks to everyone who participated in my survey. Our topic today is how PocketGems run the unit tests in serverless infrastructure. I will share with you about our decision making, how did we solve this issue, and how we were able to complete the full test suite in four minutes. I know this comic is an anecdote, but how do you really feel when you have to wait half an hour before you can do your job? For me, it's very frustrating. Apparently it also frustrates others, so we set to fix the problem. Let's try to understand what the problem is. Running full unit tests is slow. Is it worth solving? If we make the unit tests complete faster, we improve developer productivity and happiness. If developers are happy, they can produce more values. We always run full unit test suite before deployment. If we make deployment speed faster, we can deliver values to our players faster. It sounds like this is a good problem to solve. So we set to fix it. How do we make the test suite complete faster? If we have reworked things to run, we will need less time. We can even skip running unit tests and it will be blazingly fast. Of course, this is not scalable. Unsafe, please don't think I'm serious. I am joking. We need to go through all unit tests. The only way to go faster is to fight and conquer. Each unit test is independent. We can split the unit tests and run them individually. Instead of a single process running the whole test suite, we can have multiple process running it. How do we parallelize test executions? We already had a glimpse at the beginning that we can run unit tests in parallel in a single machine with multiple CPUs. The limitation is it limits you to how many CPU cores your workstation has. It can also parallelize your ability to work because of the CPU consumption while running the test suite. The second approach is running it in multiple remote machines. With the era of cloud computing, you can have an unlimited number of CPUs. You are still limited by money, but in theory it's infinite. The drawback is you have to maintain those machines. You need to do health checks, security checks, monitoring, alerting, auto scaling. There is also a warm up time associated with auto scaling that can significantly add more time to complete. In the last approach, we can try to run it in a serverless infrastructure. If we can do this, we will also have an unlimited CPU, but without the need to maintain the work or not. And because the pricing model is only paying what we use, it will be cheaper compared to using remote machines. Let's go into detail for each approach. Local runner. Test runner usually have the options to configure the number of processes to run the test suite. For example, PyTest has the XDS plugin, which accepts test and options, and NOS tests with the test-test processes options. The way it works is first, the parent process will spawn processes based on the given configuration. The worker processes collect all the tests, and the manager then validate the collected tests. Manager then schedule tests to each worker. For PyTest, all the communication between worker and manager happens via the exact net channel. NOS tests use multiprocessing.q to communicate. Next, multi-machine. PyTest also have the capability to run in remote net with the same plugin, XDS, or probably cross this. The flow is mostly the same. The only difference is it arsings the necessary source to a remote machine. There is also Ruby alternative called knapsackpro. The basic idea is very similar. You have a queue, each processes in this CI machine, send this to the knapsackpro, the manager, and knapsackpro validate it and schedule the test to worker. Worker letters send the result into the server. There is also fallback mode, which will run the test by splitting test by file name in case of the API time out and failure in reconnect. It also use some kind of dynamic queue to ensure the time of completion around the same between all the nodes. One main difference is each worker can start their part without arcing. Usually triggered with git commit or git push. This is helpful if your CI solutions manage the worker for you and you cannot use SSH to the remote machine, which is what the PyTest cross this depends on. Example of such CI solution is CircleCI and also GitHub Action. Now let's try to design our solution. As a mobile game company, package gems focus on delivering value to the players and creating new innovative games. It means we won't have engineering resources to manage the worker full time. If we use a worker machine, we will have more things to do, which can be a full time job for a team from monitoring health check security dependency to ensure the CI CD work continuously. Of course, we can invest in the beginning to make the system more robust, require less handouts, less maintenance. If we look into how package gems backend works, we can see opportunities. First, because we run on Google App Engine, all the tests don't have external features. And also the backend code is 100% Python code and aren't using many binary dependencies. Those situations raise opportunities for us to consider using serverless. So we decide to use AWS Lambda to remove the necessity of managing worker machines. Here is how we decided. First, we upload the code package or deploy it. We create a Lambda function that can run the whole unit test. It includes all the package dependency, including the binary dependencies. Then we decide how many workers we want. Let's say 10 workers. In the local machines, we start the unit test based on the number of workers. If we have 500 unit tests and 10 worker, each worker will execute 50 unit tests. Let me show you the next slide. Here is my best illustration to show you what I mean. In this case, we have 12 tests numbered from 0 to 11. It's a simple module functions, modulo by number of charts. And if your test ID is the same with your chart ID, we take that test as part of the groups. We created a NOS test plugin that has a custom selector. And here is the logic where which unit test will be run for a given node and the node total. We then create multiple threads that send HTTP requests that invoke the AWS Lambda functions. For each HTTP request, it will communicate with a single function or container. Because we are using serverless, each container doesn't know what is worker ID. Hence, we send the thread index and the number of charts as part of the request. Those HTTP requests are asynchronous so we can send all of the requests without waiting for them to complete. Lambda functions will then run the unit test, select it based on the thread index and the number of charts. And meanwhile, our local machines will be blocking to wait for the result to complete. It's cheap to run hundreds or thousands of threads at the same time in this case. Because all the thread is doing is waiting for IO. When the Lambda function completed, the HTTP request returned the test output to our local machines. And when all the HTTP requests complete, the local render parse the output, show it to the developer. This approach works well for our use case. Of course, with some Goja. Here are what we have learned. When developing, we encounter the code limit of 50 megamits for AWS Lambda. So the local render when uploading the source code need to exclude everything in Git folder. Exclude all the PYC files, documentation files, dependencies, dependency tests, I mean. And yeah, basically making sure that we only upload what is necessary for the test to run. In the system design, we deploy the code base as a Lambda function. Now imagine two different machines, two different user running the test at the same time, which means we upload the code at around the same time. How will the unit test behave? While one of the unit tests with running, someone else uploading a different code from a different range. It probably won't work and probably won't be saved. So we handle this by letting each machine have its own name functions or deployment. So each user have different deployment to different Lambda function. The third is it also depends on your network bandwidth. Is your network fast enough to upload 50 megabyte? If you are currently traveling and have a slow network, this might be less useful. It's because for every test execution, we upload the whole source code to AWS Lambda. The four minute times that I showed you before, one minute and 30 seconds was used to upload the source code. So it's actually only required two minutes, 30 seconds to run the whole test suite. In theory, we can use 1000 parallel executions. But the battle network changed into the longest running unit test. If you have one test that is particularly slow, then we will need to wait for that test to complete before the whole test suite completed. Serverless is excellent, but with its limitation. You cannot log in to compute instance. You have limited time out. You also cannot customize the runtime. If you depend on binary dependencies, you cannot install it beforehand into your runtimes. That means you need to upload your binary dependencies together with your source. Nowadays, I think this is a solvable problems. For example, we can use GitHub actions. The next pro that I showed you before actually support running on top of GitHub actions. We can create a Docker container that will be used to execute the test runner. There is also several learning that we encounter. The intern had developed it for roughly four weeks. And we have been using it for the last two years. Running the test suite not completed in four minutes. That's 21 minutes being saved on every execution. And we have more than 1000 executions each month. We translate that into engineering hours. The 21 minutes before multiplied by 1000, divided by 60 minutes. We have more than 350 engineering hours each month being saved. So assuming when engineering hour costs $50 in Bay Area, we are saving $17,500 each month. Now let's talk about the cost of operation. In average, the system costs around $120 each month based on the AWS report. So this is very cheap compared to the engineering hours being saved. And if we look at the initial investment, it was four engineering weeks. That is less than $10,000. The break-even point is less than a month. And we have more than 70 engineers happier using the tools. If we go back to the beginning, we are just frustrated. If we look around our daily life, we might be able to see stuff that makes us frustrated. Others might have the same frustration with you. Are you able to proactively figure out how to make it less frustrating to you? You might solve everyone's problem. That is the end of my sessions. I think I talk faster than what I train. If you have an equation, feel free to ask. Indeed. Thank you very much. So let me play the applause just a second. Thank you very much for your talk. That was very impressive, really. It's not only money that you saved. I think it's lifetime that you saved, the developer's lifetime. Just sitting in front of the screen and waiting for stuff, which is often very frustrating. When I think about it, Python development has this problem as well. It takes ages to run the test suite for the Python source code. It's basically running unit tests as well. I believe that most of those unit tests are actually independent of each other. It would be easy to parallelize everything by uploading everything x times and scaling up that way. That's actually something that we might want to consider. I think it's also with the GitHub actions, it was very easy to parallelize things a lot. The Knapsack Pro that I showed you before actually allowed us to use GitHub actions to parallelize the unit test executions. What do you have to have? You have to have GitHub actions. The code has to be on GitHub, I suppose. That's for Python code development, that's a given. We're using actions as well. The only thing that is missing is setting up the AWS, I guess. If you use GitHub actions, you don't actually need AWS because GitHub actions actually run in a container, so you can run the unit test in that container. You would have to parallelize the GitHub actions. Yes, in the Knapsack Pro, I haven't read it by myself, but in the Knapsack Pro, it used the metrics, I believe, the metrics to parallelize it. So you can have the same system, for example, Linux, Debian, to run five or ten different executions. Right, that's very interesting. One question about your use of AWS Lambda. What you're doing with AWS is essentially for every single, let's say, unit test or set of unit test, you upload the whole source code ball to AWS Lambda. And then you run into these issues with the code size limitation. Would it help to put the code on S3, for example, and then load it from there? Or is this a, let's say, a container limitation that AWS Lambda has? It's the AWS Lambda limitations. At the time of the development, the GitHub actions, I believe, doesn't exist before. So we tried to use AWS Lambda, and Google doesn't, even though our infrastructure run on Google, Google at that time doesn't have Python as the serverless. So we use Lambda because it's already support Python. I think we will already support Python now for the serverless. I haven't used Google Cloud in a long time. I know that AWS supports Python and has been for, I don't know, how many years. So I've used that quite a bit. So I'm familiar with it. So yeah, thank you very much.