Huge Respect for Ravi Sir, He is genius Guy, With the help of him videos related to an iOS , I was selected in reputed company , and now I have around 2year of experience and salary package is also great . all credit to Ravi sir. Salute to this man bcz I was selected in covid time and also I supported to my family with my earning. Again Really thanks from my heart. :)))
Thank you so much 😀 Apeksha, I am glad these videos are being helpful. Please do feel free to ask questions and do share the channel with anyone who wants to learn swift or with your iOS group.
Thanks for this great explanation. I have heard about the concept but never used before because of my concept was not clear about this. But this is really amazing explanation. Keep posting such great work.
You were right.. we compare maine jo pdha h usme to aisa hota hai i thought i am the only one with this problem seems lots of people face this issues... but you explained very well... how threading work and all.
before this video my ans of difference between GCD vc Operation was GCD is new and operation is older one that's but after this video I got to know the actual difference, thanks Ravi bhai
Hey Dilip hope you are doing well. I am glad this video was helpful to you in knowing the right technical differences between them. Feel free to ask questions and do share the video with your iOS group
Thanks, Ravi for these beautifully explained tutorials. I have a question about GCD. What is a queue.cancel() , suspend() and resume()? As you told that we can't pause, resume and cancel (except using dispatchWorkItem) using GCD. Thanks in advance. Hope your viewers and subscriber grow with the growth of these beautiful contents. Wish you good luck.
Hey Hi.. Initially, I had the same question. and then I deep driving on it and find this line of code: operationQueue.progress.resume() operationQueue.progress.pause() operationQueue.progress.cancel() Happy Coding... :)
Hi Ravi, Thanks for the video, I have one question, what is quality of service, What are the different types of it and when to use each. Thank you in adavance.
Qos is a topic of it's own there are several types that can be used based on what you are doing. Will make a post or video about it. For now here's a developer documentation on the same. Hope that helps developer.apple.com/documentation/dispatch/dispatchqos
Great content Ravi!... have one question since it's on GCD and NSOperation, 1. How do you fetch millions of record from server. ex 10m users. 2. And How you gonna store it on to Realm/Core Data. 3 if user search something from millions of record what could be your approach to display it.
Hey Sanjay, good question, I wrote a lengthy reply so do grab popcorn before you read it 😆😆😆. To be honest, such questions are asked more in interviews just to check the analytical skills of a developer, and in my opinion, such large volumes of records should never ever be downloaded on the user's device, to begin with It all boils down to your application architecture design, which is what I am going to talk about before I even jump into the code. Let's do some math first, if you are calling an API, it won't give you 10 million records directly there's paging like per call you can get a max of 10,000 records, this number depends on your API developers they are free to send even more records not more than that because you don't want to choke the network. So to download 10,000,000 your code should loop around 1000 times to get all that data. 1000 API calls, per call containing 10,000 records...hmm... what could possibly go wrong. Let's go with the assumption that all this data is required for the functioning of your mobile application, then my friend comes the storage issue. You see it's a mobile device, not a SQL or MYSQL database on the cloud which you can scale accordingly so we have a limited storage size to deal with so my question back to you is are you sure that to make your mobile application work you need those 10m records? Again if it's yes then how do we plan to address the issue where the user is having a 64GB device and has only 2GB free and it downloads 5 million records from the server and its device storage runs out of space? Do we plan to connect an external hard disk to the iOS device if this happens? One of my major concerns here is, if you are downloading huge files/records then in that case not all your users are going to be on wifi, some of them are going to use mobile data, and downloading such humongous records on a mobile data is problematic because then your application is just eating mobile data of the user before even the user starts to use the app. Will you use such an app that finishes your data pack before even you use it? So what I am trying to say here is there are tons of complications with downloading a large set of data into the user's mobile device, and hence when you design your application you should consider all these complications before writing a single line of code. Storing the data in the database is easy, but then how much data you are downloading here raises an eyebrow coz 10million is way too much for a mobile app, but just for the sake of answering this question I will use operation queue for this because it has more features than plain GCD and for downloading such huge volume I could use GCD with super-powers so my answer is operation queue. Also searching a huge load of data will take time, even if you want to do a simple search no matter what database you use. If I am using Core Data I make sure to add indexes in the xcdataModel just to give a minor boost to my queries, I don't have much exposure on realm to be honest and I have not played with it much to give you an answer based on this complexity but if you really want to download this many records (which I strictly advise against), then you have delta syncs and other complications to deal as explained above so perhaps you may want to look into firebase as an option which handles not all but few complexities for us. let me know what you think about it or if you have any other questions I will be happy to answer them.
@@connectSanjayMali Thanks Sanjay that was a good question, smooth searching totally depends on the volume of data you need to search or filter from, in enterprise applications what should be done is only relevant data should be downloaded as master record rest other should be considered as irrelevant else we have already discussed the issues that can arise in the earlier comments
Thanks Ravi, very nice explanation. I got one question in my mind if Apple handles operations with default property then why max concurrent operation property is given? Always it can be handled by default property
Let me explain with an example as why priorities are needed your senior has given you 3 task, out of those 3 there must be one task which will be high priority even if the other two task are not completed it’s fine but this task must be completed today So you shift your attention from other two task to this one coz it’s super important or high priority task So the other two task has default priority but this one is super high All the task can be completed with default priority but there can be few task where higher attention is required. So with the high priority tag we are instructing the OS that this task which is tagged with high priority is important to us and we need you to complete this first Similarly in your module you must think wisely as which task should be tagged with high priority Hope that helps, if not then plz feel free to ask more questions I’ll be happy to answer them.
Very clear explanation that anyone can understand. I have one question... In one of my app I am uploading images to server using the operations and operation queues(creating separate operation for each image to upload and adding it to OperationQueue). And configured maxconcurrentOperations = 5. sometimes what happening is the operation it self is not started executing and it's state never setting to finished(and this operation exists forever in that operation queue), so how to handle this scenarios? Do you have any idea what might be the issue? Can you please give some idea why it's not preferrable to set QOS to operation as we are setting it to OperationQueue in this video. what happends if I set QOS to operation instead of Operation Queue. And in which scenarios do I need to set QOS to an operation? Also in this video it's good if you explain about QOS, which option to use when...
Qos is coming soon as well I didn’t want everything to be explained in one video else its going to be very much overwhelming. Apple recommends we should not be setting the max concurrent operation count as its handled by the framework itself as shown in the video but i would have to look at the code as what its doing to comment more on this one. I will take a random guess here, operation queue does some calculations within to see how busy the system is so maybe its taking time to figure out how busy the system is and maybe your system was busy and hence it was waiting for the system to be free so that it can launch 5 operations in one go and maybe that’s the reason why apple wants us to keep that value as default coz the operation queue waits for the system to be free to launch the exact number of operations specified in the max concurrent operation property. That being said welcome to the channel Monish and thank you for your comment 😊
@@CodeCat15 Thanks for your quick response. I got what you said and definitely I will revisit my code by setting the maxConcurrentOperations to default. Thanks Ravi.
@@CodeCat15 one more thing which I felt really good in the video is English subtitles. As few people like me who doesn't know hindi(toda toda aatha hein) they can understand through subtitles.
For that you may either use the new async await feature or you can use operation queue. It would totally depend on what you want to achieve like if its a nested api call or some calls in parallel or maybe something even more complex which would further need proofing so if you may describe your task or maybe send an email on it with some code that you already did that would put some light on what you want. There’s a video on serial api calls if that’s what you are looking for hope it helps Link: th-cam.com/video/II7bJmC64IY/w-d-xo.html
Thank you for your feedback. I appreciate your input. This channel primarily focuses on Hindi content, and sometimes I mix in English due to my background in Mumbai where this language blend is common. I apologize if it has caused any confusion. Feel free to ask questions about the topic, and I'll do my best to provide clarifications. Thank you for your understanding!
@@CodeCat15 thank you for the reply and sorry for comment if it made feel sad. As this is a big topic I found a playlist with 6 videos which have explaintion in detail.
Apologies for the inconvenience, but majority of the audience prefer Hindi so I’ll continue in Hindi. You may ask questions if the video was not clear or if you were stuck somewhere I’ll be happy to assist.
Huge Respect for Ravi Sir, He is genius Guy, With the help of him videos related to an iOS , I was selected in reputed company , and now I have around 2year of experience and salary package is also great . all credit to Ravi sir. Salute to this man bcz I was selected in covid time and also I supported to my family with my earning. Again Really thanks from my heart. :)))
Excellent Video Guruji🙇♂
Thank you Vyankatesh 🙏
I hear about operation queue for the first time from your video....thank you so much sir❤
I am hearing about operation queue for first time... Great video 👍 thanks for the video
Am glad you liked it, do share the video with your iOS group and always feel free to ask questions
super se Abhi upar ....perfect explanation
Glad this was helpful
Your explanation is Rock all the time .
Thank you I am glad you found this video helpful, feel free to ask questions and do share the channel with your iOS group.
@Code Cat - Ravi quotes at starting of every video is good n motivating and off course ... all videos are clear n easy to understand. Good Work !!
Thank you so much 😀 Apeksha, I am glad these videos are being helpful. Please do feel free to ask questions and do share the channel with anyone who wants to learn swift or with your iOS group.
Just Awesome. Your videos are making ur learning easier and clearer. Grateful and Appreciate your hardwork.
I am really confused before this video about queues.. now am good about gcd & Operation queues
glad this helped, please feel free to ask questions and do share the channel with your ios group.
Thanks for this great explanation. I have heard about the concept but never used before because of my concept was not clear about this. But this is really amazing explanation. Keep posting such great work.
You were right.. we compare maine jo pdha h usme to aisa hota hai i thought i am the only one with this problem seems lots of people face this issues... but you explained very well... how threading work and all.
Thank you pooja, i am glad the video was helpful
Thanks Ravi, very well explained when to use GCD and OperationQueue
Glad you liked it and thank you for your kind words Rakesh
I really want to say thanks for excellent explanation.
congratulations on 3k.. keep going..
Thank you Ankit 😊
Such a very helpful video and my confusion got cleared after watching this. You just opened my mind..Thanks buddy.
Thanks Aditya, am glad this video was helpful 👍
Great tutorial as always. Perfect and clear on point. 👌
Thanks Waseem, am glad this was helpful
Nice examples Ravi .... enjoying your Shwift tutorials. 😀
😊 glad it’s helpful
even though I don't understand Hindi, the english subtitles helped and this was a very thorough video and easy to understand
I am glad the content was helpful, writing subtitles takes a ton of manual work but I try.
Mind boggling explanation🤘
Thank you so much 😀
Thank you so much for explaining the topic so nicely..
glad it was helpful Debika :)
before this video my ans of difference between GCD vc Operation was GCD is new and operation is older one that's but after this video I got to know the actual difference, thanks Ravi bhai
Hey Dilip hope you are doing well. I am glad this video was helpful to you in knowing the right technical differences between them. Feel free to ask questions and do share the video with your iOS group
I think Operation queue is older than gcd..it was there before..now It works on top of gcd!!
Grear explanation. Amazing, thank you very much
Glad it was helpful!
Very informative . Good Work
Thanks a lot
Superb series.
GCD on steroids 🤣. Nice work code cat. Your videos are easy to grasp and retain for long since you give such good examples.
Welcome to the channel Palak, and am glad these videos are helpful
@@CodeCat15 :)
awesome explanation. thanks Ravi
I am glad this video was helpful Khushal :)
Well explained Ravi
Am glad this was helpful
Good explanation,waiting for next video on it.
Thanks Prashant, am glad this was helpful 😊
Very good explanation sir
Thanks Amit
THANKS FOR THIS VIDEO...I REQUESTED A FEW MONTHS AGO FOR THIS...
THIS IS VERY HELPFUL.
PLEASE SHARE A TUTORIAL ON DYNAMIC & STATIC DISPATCH
I knew i was missing something on threading thanks for reminding me Namita, will work on the video as soon as possible
Excellent , i Loved it Ravi
Nice explaination 🙏
Again brilliant content.
classy as always. lots of love
Thank you Polu :) do share this video with your iOS group too
Thanks a lot Sir , its help me lot.
Good explanation 👍
Thank you Raj, I am glad this was helpful
Thanks you very much sir.
Glad this video was helpful 👍
Thanks, Ravi for these beautifully explained tutorials. I have a question about GCD. What is a queue.cancel() , suspend() and resume()? As you told that we can't pause, resume and cancel (except using dispatchWorkItem) using GCD. Thanks in advance. Hope your viewers and subscriber grow with the growth of these beautiful contents. Wish you good luck.
Hey Hi.. Initially, I had the same question. and then I deep driving on it and find this line of code:
operationQueue.progress.resume()
operationQueue.progress.pause()
operationQueue.progress.cancel()
Happy Coding... :)
Hi Ravi, Thanks for the video, I have one question, what is quality of service, What are the different types of it and when to use each.
Thank you in adavance.
Qos is a topic of it's own there are several types that can be used based on what you are doing. Will make a post or video about it. For now here's a developer documentation on the same. Hope that helps
developer.apple.com/documentation/dispatch/dispatchqos
Great content Ravi!... have one question since it's on GCD and NSOperation,
1. How do you fetch millions of record from server. ex 10m users.
2. And How you gonna store it on to Realm/Core Data.
3 if user search something from millions of record what could be your approach to display it.
Hey Sanjay, good question, I wrote a lengthy reply so do grab popcorn before you read it 😆😆😆. To be honest, such questions are asked more in interviews just to check the analytical skills of a developer, and in my opinion, such large volumes of records should never ever be downloaded on the user's device, to begin with
It all boils down to your application architecture design, which is what I am going to talk about before I even jump into the code.
Let's do some math first, if you are calling an API, it won't give you 10 million records directly there's paging like per call you can get a max of 10,000 records, this number depends on your API developers they are free to send even more records not more than that because you don't want to choke the network. So to download 10,000,000 your code should loop around 1000 times to get all that data.
1000 API calls, per call containing 10,000 records...hmm... what could possibly go wrong.
Let's go with the assumption that all this data is required for the functioning of your mobile application, then my friend comes the storage issue. You see it's a mobile device, not a SQL or MYSQL database on the cloud which you can scale accordingly so we have a limited storage size to deal with so my question back to you is are you sure that to make your mobile application work you need those 10m records?
Again if it's yes then how do we plan to address the issue where the user is having a 64GB device and has only 2GB free and it downloads 5 million records from the server and its device storage runs out of space? Do we plan to connect an external hard disk to the iOS device if this happens?
One of my major concerns here is, if you are downloading huge files/records then in that case not all your users are going to be on wifi, some of them are going to use mobile data, and downloading such humongous records on a mobile data is problematic because then your application is just eating mobile data of the user before even the user starts to use the app.
Will you use such an app that finishes your data pack before even you use it?
So what I am trying to say here is there are tons of complications with downloading a large set of data into the user's mobile device, and hence when you design your application you should consider all these complications before writing a single line of code.
Storing the data in the database is easy, but then how much data you are downloading here raises an eyebrow coz 10million is way too much for a mobile app, but just for the sake of answering this question I will use operation queue for this because it has more features than plain GCD and for downloading such huge volume I could use GCD with super-powers so my answer is operation queue.
Also searching a huge load of data will take time, even if you want to do a simple search no matter what database you use. If I am using Core Data I make sure to add indexes in the xcdataModel just to give a minor boost to my queries,
I don't have much exposure on realm to be honest and I have not played with it much to give you an answer based on this complexity but if you really want to download this many records (which I strictly advise against), then you have delta syncs and other complications to deal as explained above so perhaps you may want to look into firebase as an option which handles not all but few complexities for us.
let me know what you think about it or if you have any other questions I will be happy to answer them.
@@CodeCat15 That was amazing explanation bro.
If the apps having tons of data and still their search functionality works smoothly.
@@connectSanjayMali Thanks Sanjay that was a good question, smooth searching totally depends on the volume of data you need to search or filter from, in enterprise applications what should be done is only relevant data should be downloaded as master record rest other should be considered as irrelevant else we have already discussed the issues that can arise in the earlier comments
@@CodeCat15 thank you so much , helping your guidence and content a lot.
@@CodeCat15 this is what I was looking for...
Thanks a lot for the video and answer. And keep it up.
clean explanation.
Thanks Ganesh do share the video with your iOS group and feel free to ask questions
Really helpful thank you
Glad it helped
Great Tutorial love your tutorial
Thank you Rehan
great videos ..thank you
Am glad these videos are helpful Soumitra
Thanks Ravi, very nice explanation. I got one question in my mind if Apple handles operations with default property then why max concurrent operation property is given?
Always it can be handled by default property
Let me explain with an example as why priorities are needed
your senior has given you 3 task, out of those 3 there must be one task which will be high priority
even if the other two task are not completed it’s fine but this task must be completed today
So you shift your attention from other two task to this one coz it’s super important or high priority task
So the other two task has default priority but this one is super high
All the task can be completed with default priority
but there can be few task where higher attention is required.
So with the high priority tag we are instructing the OS that this task which is tagged with high priority is important to us and we need you to complete this first
Similarly in your module you must think wisely as which task should be tagged with high priority
Hope that helps, if not then plz feel free to ask more questions I’ll be happy to answer them.
Can you please post a video on Different type of qualityOfService
Yes, I will surely do that thank you for suggesting the video Sumita and welcome to the channel
Very clear explanation that anyone can understand. I have one question... In one of my app I am uploading images to server using the operations and operation queues(creating separate operation for each image to upload and adding it to OperationQueue). And configured maxconcurrentOperations = 5. sometimes what happening is the operation it self is not started executing and it's state never setting to finished(and this operation exists forever in that operation queue), so how to handle this scenarios? Do you have any idea what might be the issue?
Can you please give some idea why it's not preferrable to set QOS to operation as we are setting it to OperationQueue in this video. what happends if I set QOS to operation instead of Operation Queue. And in which scenarios do I need to set QOS to an operation?
Also in this video it's good if you explain about QOS, which option to use when...
Qos is coming soon as well I didn’t want everything to be explained in one video else its going to be very much overwhelming.
Apple recommends we should not be setting the max concurrent operation count as its handled by the framework itself as shown in the video but i would have to look at the code as what its doing to comment more on this one.
I will take a random guess here, operation queue does some calculations within to see how busy the system is so maybe its taking time to figure out how busy the system is and maybe your system was busy and hence it was waiting for the system to be free so that it can launch 5 operations in one go and maybe that’s the reason why apple wants us to keep that value as default coz the operation queue waits for the system to be free to launch the exact number of operations specified in the max concurrent operation property.
That being said welcome to the channel Monish and thank you for your comment 😊
@@CodeCat15 Thanks for your quick response. I got what you said and definitely I will revisit my code by setting the maxConcurrentOperations to default. Thanks Ravi.
@@CodeCat15 one more thing which I felt really good in the video is English subtitles. As few people like me who doesn't know hindi(toda toda aatha hein) they can understand through subtitles.
Hi Ravi. Thank you for explanation. I have a question about gcd. Can we manage dependency in GCD. If yes then how?
For that you may either use the new async await feature or you can use operation queue. It would totally depend on what you want to achieve like if its a nested api call or some calls in parallel or maybe something even more complex which would further need proofing so if you may describe your task or maybe send an email on it with some code that you already did that would put some light on what you want.
There’s a video on serial api calls if that’s what you are looking for hope it helps
Link: th-cam.com/video/II7bJmC64IY/w-d-xo.html
Awesome
Rocks bro :)
Glad this was helpful brother
Bro is there code camp or online class you take i would live to join it
Hey Madhur, there’s just TH-cam at the moment. I am not sure if i will be going anywhere apart from TH-cam.
Good
What language was it? I've heard some English words.
Welcome to the channel, its in Hindi language which is spoken in India
Explain About Quality of services (QOS)
Hey Sachin after dependencies with API this will be the next video
I have a question:-
idk I have feeling that in terms of Control. Dispatchgroup is better than OperationQueue. especially if operation is like calling the api
Superb 👌
Starts with English and switches to Hindi, why 😢
Thank you for your feedback. I appreciate your input.
This channel primarily focuses on Hindi content, and sometimes I mix in English due to my background in Mumbai where this language blend is common.
I apologize if it has caused any confusion. Feel free to ask questions about the topic, and I'll do my best to provide clarifications.
Thank you for your understanding!
@@CodeCat15 thank you for the reply and sorry for comment if it made feel sad. As this is a big topic I found a playlist with 6 videos which have explaintion in detail.
Please upload videos in English.
Apologies for the inconvenience, but majority of the audience prefer Hindi so I’ll continue in Hindi. You may ask questions if the video was not clear or if you were stuck somewhere I’ll be happy to assist.