When and when not to use Node.js - Node.js Basics [06] - Java Brains

Поделиться
HTML-код
  • Опубликовано: 23 мар 2020
  • Have you seen the new Java Brains? Check out www.javabrains.io now for awesome courses and content!
    Understand the core problems that Node.js was meant to solve and why it is a good choice for certain applications and not for some others! Learn the strengths and weaknesses of the Node.js platform.
    Java Brains website: javabrains.io
    Access the full course playlist here:
    • NodeJS Basics
    #JavaBrains #Node.js #JavaScript #Tutorial

Комментарии • 422

  • @femaledeer
    @femaledeer 4 года назад +298

    Having an explanation of the technology before diving into the code is extremely useful. A lot of youtube channels don't explain anything.

    • @raymrash
      @raymrash 4 года назад +1

      absolutely

    • @SirajAhmed-zn8eh
      @SirajAhmed-zn8eh 4 года назад +2

      Get "Learn and understand NodeJS" by Anthony Alicea on Udemy. It's a gem. Takes apart NodeJS and explains its basic behaviors.

    • @YouilAushana
      @YouilAushana 11 месяцев назад

      Others can be, Unapologetically greedy.

  • @brunobernard86
    @brunobernard86 4 года назад +344

    Hey, you need to do a series on "When and when not to use".
    Very interesting :)

  • @carlosbarbier2401
    @carlosbarbier2401 4 года назад +25

    I have been working with node js for a while but this tutorial is one of the best tutorials out there. Thanks for sharing your knowledge

  • @mykola5669
    @mykola5669 4 года назад +7

    That's the best "how, why and when" video about programming languages I saw by this day. Well done!

  • @ayanSaha13291
    @ayanSaha13291 4 года назад +5

    Dear Koushik, You are outstanding as always. I could not find a single person who speaks technology as simply as you do. I have been following you for more than 7 years now. I truly appreciate your efforts. Thank you.

  • @karthik-ex4dm
    @karthik-ex4dm 4 года назад +23

    One of best explanations of event driven model of Node.js
    Eagerly waiting for the next video

  • @ibrahim47
    @ibrahim47 4 года назад +18

    Great video, one thing to add is it's commonly used in distributed systems. thanks to its non-blocking ability and asynchronous behavior.
    this is why is it called node after all. because a nodeJs server is just a node among other nodes.

  • @liamsmith-yp3xh
    @liamsmith-yp3xh 4 года назад +75

    when to use: "do this then this, then this, then this"
    when not to use: "generate every prime number up to 100000000000000000000000000000000000000000000000"

  • @simomed5002
    @simomed5002 4 года назад +4

    wow being more than 10 years in web development... I like how simply you explain the details! keep moving bro, I'm definitely following your tutorials and moving to node js from the programming language I'm using right now, also I subscribed to your channel :)

  • @alexisaddicted
    @alexisaddicted 4 года назад +2

    I think that for this video is great at explaining basic concepts in a simple way. Good job!

  • @SachinKumarSahu
    @SachinKumarSahu 2 года назад

    Having experience of working in Node for last couple of years, but some info in this tutorials are complete GOLD

  • @shaileshsingh5664
    @shaileshsingh5664 4 года назад +8

    NICE lets make this lockdown a little educational and knowledgeable

  • @jeronimoolivavelez1299
    @jeronimoolivavelez1299 3 года назад

    Great Explanation. It is important, not only to know the code language but also learn which code is better to put in use depending the context of the app you are going to develop.

  • @David-kg5nn
    @David-kg5nn 4 года назад

    Thanks for this. I really enjoy the long form, in-depth discussion on one topic.

  • @aakashggujju
    @aakashggujju 3 года назад +1

    Man you are the best and let me tell you that listening to you is always blissful and let me tell you that you are an awesome teacher and always make things simple and cool for listener's. Thanks. 🙏

  • @devdylan6152
    @devdylan6152 4 года назад +1

    you covered this SO WELL... like you hit all the proper keys and put it all in a easy to digest manner, I will be using this to explain this to people D:

  • @Manana7016
    @Manana7016 2 года назад +2

    I really appreciate your explanation! I’d love to hear your take on comparing node.js to other options like python, php, etc. But thank you again for this video.

  • @MrSidMan
    @MrSidMan 4 года назад +441

    When NOT to use Node.JS:
    When your client insists you use PHP.

    • @ask4funs_solution
      @ask4funs_solution 4 года назад +5

      hahahaha

    • @TheDesvendador
      @TheDesvendador 4 года назад +19

      i bet you "work" with wordpress

    • @dayvie9517
      @dayvie9517 4 года назад +6

      When your client insists that you should "destroy an already existing wordpress solution"

    • @leimococ
      @leimococ 4 года назад +1

      so true

    • @nexovec
      @nexovec 4 года назад +2

      LOL

  • @keshavrastogi5005
    @keshavrastogi5005 4 года назад +2

    that was really great. I was confused whether to use node.js or not, but now I am clear :) Thanks! :)

  • @jenishvadodaria2888
    @jenishvadodaria2888 3 года назад

    You are a gem for Providing us with this example. Thank you!!

  • @armaandhanji2112
    @armaandhanji2112 4 года назад +6

    Thank you for talking about Node.js. I would love if you get into some of the advanced capabilities of Node.js! Thank you.

  • @Jbdoster
    @Jbdoster 4 года назад

    Been following this guy since I started, spot on
    And nice touch on the c/c++ node backend

  • @sreerup_dhrino
    @sreerup_dhrino 4 года назад

    Simple loved it... Clear explanations with proper examples

  • @imanueljodi1201
    @imanueljodi1201 4 года назад

    A great explanation that i've been looking for,awesome!

  • @gokulraja2006
    @gokulraja2006 4 года назад

    This is the best tutorial I have ever seen.

  • @seanb9949
    @seanb9949 20 дней назад

    Very clear explanation sir. I loved every minute of this video and walked away feeling like an expert.

  • @headlights-go-up
    @headlights-go-up 2 года назад

    As someone new, you explained this so well. Thank you!

  • @kaleemullahnizamani7436
    @kaleemullahnizamani7436 4 года назад +19

    Loving you since your first video of servlets. You shine 😎

  • @eny1103
    @eny1103 4 года назад +2

    Thank you for this video! It was very informative!

  • @sytranvn
    @sytranvn 4 года назад +13

    In fact node can use multiple cores if needed. But it is hidden from the developer's view and taken care of by libuv.

  • @sumathisreebaskarrao1547
    @sumathisreebaskarrao1547 2 года назад

    You are a life saviour Mr.Koushik !

  • @wontonfuton
    @wontonfuton 4 года назад +1

    Would I be correct in saying that NodeJS handles jobs equivalently as using SelectionKey and Selector in java?

  • @codeblueocean3520
    @codeblueocean3520 3 года назад

    I learnt mern from online courses but understood the core architecture/logic from this video.thankyou very much

  • @alexandertarasenko3038
    @alexandertarasenko3038 4 года назад +1

    It is pleasant to find Java devleoper who doesn't just blame javascript) Thank you for this movie!

  • @MultiMtech
    @MultiMtech Год назад

    I was also Java Programmer and loved to write java programs... But since I started learning NodeJS, I really get in love with Node.Js specially with Nest.JS Framework...

  • @flyingleaves5480
    @flyingleaves5480 3 года назад

    Most informative I've seen so far...
    Thank you

  • @abdelmalek8045
    @abdelmalek8045 4 года назад

    What i retain is that Node is well designed for I/O intensive systems, certainly the reason of its success in widely used microservices architecures. Gonna learn it. Thanks!

  • @sneak9407
    @sneak9407 2 года назад +1

    You deserve more likes and views for the great analysis on node in this video.

  • @szeredaiakos
    @szeredaiakos 4 года назад

    Can someone link the time where he talks about mutual execution, conditionals and shared memory?

  • @AlbertBrucelee
    @AlbertBrucelee 4 года назад

    Thank you for sharing! Very helpful! God bless you!

  • @dawah7556
    @dawah7556 4 года назад

    i was searching for this and found your video.. that's great

  • @iliyasmohammed6192
    @iliyasmohammed6192 2 года назад

    Thanks a lot for the explanation. Its really needed when diving into it.

  • @estessaouira1900
    @estessaouira1900 4 года назад +30

    compute intensive is no more problem for nodeJs due to Worker Threads on node 10.5.0 .

    • @manikanth2166
      @manikanth2166 4 года назад +2

      Still it carries the javascript overhead which is quite negated with io bound concurrency. And 70% of the real world business require that io bound concurrency.

    • @johndoe-gt4rx
      @johndoe-gt4rx 3 года назад

      @@manikanth2166 yeah it really depends on the size of the project/business as well. Node is so quick and painless to develop for that it's worth using for almost any app that will have a small userbase.
      I've even just gone and created microservices with GO that sit on the same box and communicate with the main node web server through a REST api.

  • @MrJonathandsouza
    @MrJonathandsouza Год назад +4

    You can always use process manager like pm2 to spawn multiple instances of your node app and then act like a load balancer.

    • @Dev-Siri
      @Dev-Siri 11 месяцев назад

      this is a good enough approach, although processes are heavier than real multi-threading. Worker threads solve this well but they have a funny api.

  • @mechenzyhammah3001
    @mechenzyhammah3001 4 года назад +1

    You are the best teacher online. Like 👍

  • @ernestmolner18
    @ernestmolner18 3 года назад +1

    You can make node multi thread if you want to. It is not usually that way but there are modules that make it as multi thread as you want it to be.

  • @akashnag3879
    @akashnag3879 4 года назад

    extremely great explanation. thank you very much.

  • @budi0580
    @budi0580 4 года назад

    Hi, what do you think if compare to multithread + async ability for example asp.net core ?

  • @yassine_klilich
    @yassine_klilich 3 года назад

    i really enjoyed this explanation, love it

  • @0the0ambient0
    @0the0ambient0 4 года назад

    Great explanation. Thank you!

  • @megazord5696
    @megazord5696 4 года назад +1

    Thanks for sharing!! Amazing Job! Could you do a video about front-end architecture and when to use it? :)

  • @Another0neTime
    @Another0neTime 4 года назад

    Awesome job as always!

  • @nicktheritter
    @nicktheritter 2 года назад

    Really well done video. Easy to follow. You're interesting to watch. Useful information. Thank you.

  • @RAVIKUMAR-hl3ik
    @RAVIKUMAR-hl3ik 2 года назад

    Thank you very much it really gave me clarity

  • @ankitkalavagunta8951
    @ankitkalavagunta8951 Год назад

    Very well explained!

  • @deadchannel-x2m
    @deadchannel-x2m 3 года назад

    It was really helpful! Thank you!

  • @user-yw6ru1iy9j
    @user-yw6ru1iy9j 5 месяцев назад

    very good explanation! Thanks.

  • @fisnik8965
    @fisnik8965 4 года назад +1

    Very useful explanation ... This video should be used also to explain Single Vs Multi-threaded systems, not only for Node Js.
    Great Job (Y)

  • @hyperborean72
    @hyperborean72 4 года назад +2

    How nice that the color of your jacket is the same as the color of the font and the frame in your presentation

  • @alfredoeleazarorozcoquesad2988
    @alfredoeleazarorozcoquesad2988 4 года назад

    Great! Very clear! thank you.

  • @linqcodmax8965
    @linqcodmax8965 4 года назад +6

    Good work! Can u make this kind of video about Django framework?

  • @thanasisathanasi4965
    @thanasisathanasi4965 4 года назад

    Just want to ask, if I run 2 files with Nodejs. e.g. $ nodejs myserver1.js and $nodejs myserver2.js simultaneously, does it run each file on its own thread? e.g if I perform intensive computations on running myserver1.js they will will not affect the running file myserver2.js ????? THanks!!

  • @ragingpahadi
    @ragingpahadi 4 года назад

    i like this series when and when not ! :D "Just because you can do it doesn't mean you should do it"

  • @user-to9gg1wm7v
    @user-to9gg1wm7v 2 года назад

    Thanks and I really like you work...keep it up .

  • @RamKumar-rg3gr
    @RamKumar-rg3gr 4 года назад +1

    Sir then
    Os internally allocates threads to multiple callbacks.

  • @cruzortiz5233
    @cruzortiz5233 4 года назад +1

    Hi excellent resource, i have a question. When talking about node and that computing intesive task, are things that node isn´t good for, i was wondering, about promises ?. If we wrap that computing intesive process into a promise, we wont block the main thread and we can still be able to build those types of app ?

    • @Samuel-ql7tq
      @Samuel-ql7tq 4 года назад +2

      Cruz Ortiz No, promises are nothing but a syntactic sugar on top of callbacks so it basically means whatever computation heavy task you wrapped inside promises still have to be executed by node’s main thread only

  • @NileshAkhade
    @NileshAkhade 4 года назад

    I'm with you since you uploaded first springboot video.
    Waiting to learn Promises and Streams from you.

  • @ManiKandan-wv6sx
    @ManiKandan-wv6sx 4 года назад +1

    Can yu do a video on springboot multitenancy with oracle or mysql db..

  • @erinmcgowan7980
    @erinmcgowan7980 3 года назад

    The ammount of info in here is amazing =)

  • @VladBurlutsky
    @VladBurlutsky 4 года назад

    Cool video, thanks man!

  • @saikatbairagi4046
    @saikatbairagi4046 4 года назад

    Sir can you please tell me why we use node.js where we have so many options like java . Net.

  • @sumitdas-kr6fe
    @sumitdas-kr6fe 3 года назад

    Very good explanation.

  • @shikharchaudhary6984
    @shikharchaudhary6984 4 года назад

    Thanks you so much for this video.

  • @Akshhacks
    @Akshhacks 4 года назад

    You teach really good, thanks

  • @mpdcuk
    @mpdcuk 4 года назад

    I like how your hoodie colour matches the purple of the border and font.

  • @tsunekakou1275
    @tsunekakou1275 4 года назад +65

    you got one mistake there, asynchronous doesn't have anything to do with multi-threading. it is possible to do asynchronous calls in a thread pool. you can have threads execute mutiple event loops, process non-blocking i/o calls, and no thread have to wait for IO (unless you call synchronous/blocking operation).
    asynchronous i/o operations are offered by the operation system, there is no rule dictate you need to use single thread model or muti-thread model to use these async API.

    • @piotrgoabek6166
      @piotrgoabek6166 4 года назад +1

      But, I guess, it's often put like this - if you have a multhithreaded framework, go ahead and use the luxury of a blocking model. The resulting code is more clean and decoupled.

    • @tsunekakou1275
      @tsunekakou1275 4 года назад +5

      ​@@piotrgoabek6166 .net support non-blocking i/o api out of the box with async/await (sort of like coroutine). the benefits of coroutine is that you have a nice synchronous-like control flow, look really clean, easy to reason about even in multithreaded environment. other example is boost::asio in C++ support coroutine, callbacks, proactor model, blocking and non-blocking operations and possible to decouple with template.
      it's often like this, if you have a multhithreaded framework, go ahead and use the luxury support of non-blocking api, the resulting code might be efficient, might be clean if you know what are you doing.
      the point here is multithreading with asynchronous is possible, there are framework support these thing.
      to be honest, i think people that write multithreaded program will use non-blocking i/o if they can, their concern is performance. you can write clean, decoupled asynchronous code in multithreaded, because again these things aren't really relate.

    • @gravy1770
      @gravy1770 4 года назад +3

      He did not conflate the two though. He used examples of typical situations where synchronous calls are used with multi threading and asynchronous calls are used with single threading. His diagram of a thread pool even shows an asynchronous call being made

    • @jesuslovespee
      @jesuslovespee 4 года назад

      when exactly did he claim this?

    • @tsunekakou1275
      @tsunekakou1275 4 года назад +1

      @@jesuslovespee 6:50 , 7:17 "it has to wait".
      he did mention at 7:26 "thread pool with `synchronous` execution has that kind of behavior". he tried too hard on selling nodejs's singlethread model by compare it with a very inefficient multithread model and failed mention about multithread with asynchronous.
      yes, he didn't claim mutlthread models can't do asynchronous. I won't discuss this anymore, he didn't even bother to comment, so it's a negetive-sum game.

  • @alon.galperin
    @alon.galperin 4 года назад

    Great video, thank you! small request - can you please create playlist of Node.js Basics so it will be easier to follow?
    Thnaks

  • @asifmahmood9358
    @asifmahmood9358 4 года назад

    This channel should be renamed as tea with java brain... Ur doing awesome work love from Pakistan

  • @sarahchohan6583
    @sarahchohan6583 3 года назад

    Very well explained. After watching this video had subscribed to that channel for upcoming videos.

  • @gibranmohammadkhan6216
    @gibranmohammadkhan6216 4 года назад +2

    Please do a series on Design Patterns, if possible. Thanks

  • @LunarcomplexMain
    @LunarcomplexMain 4 года назад +1

    So for an MMO, Node isn't / wouldn't be such a bad idea as long as keeping track of requests, responses, and other such actions (loops through any relevant entity like players, enemies, etc) are only done with small calculations?

  • @TP_Raks
    @TP_Raks 4 года назад

    The Hero we need but don't deserve. 😢Thank you so much good Sir. Great explanation

  • @bryanescobar2251
    @bryanescobar2251 2 года назад

    You are the best man!

  • @FG-qs8uj
    @FG-qs8uj 4 года назад

    You could use node js for blocking operations if you create copies of the node process, is that right?

  • @ramshankarkumar4222
    @ramshankarkumar4222 Год назад +2

    this content is awesome!!🎉 Thank you so much 😀
    Just one question --
    In multi threaded programming language, how number of thread pool is defined? Is it predefined by language or is configured by developer only?
    In any case, what could be the maximum number of thread pool can be created? Is there any parameters for it?
    Please answer if possible. Thanks

  • @rezmed1144
    @rezmed1144 4 года назад

    you have the art of explaining

  • @utkarshgupta2943
    @utkarshgupta2943 3 года назад

    This content is really good

  • @chigozie_jesse
    @chigozie_jesse 4 года назад +1

    What if you wrap the calculation intensive operation in async function?
    What about languages that can multi-threads with async functionalities?

    • @deepak3303
      @deepak3303 4 года назад

      It queues up async functions. The best thing you can do it offload the work to host OS with worker threads.

  • @montenague
    @montenague 4 года назад

    Very Helpful!

  • @thanasisathanasi4965
    @thanasisathanasi4965 4 года назад +1

    You have a very cool personality and style that I like !!!

  • @mkhalidumer
    @mkhalidumer 4 года назад

    can you please suggest, what should be used Where nodejs is not a good option ?

  • @blisteredoutlaw1993
    @blisteredoutlaw1993 4 года назад

    Thanks to RUclips algorithm for suggesting your channel to me!

  • @sivakumarg98
    @sivakumarg98 2 года назад

    hey nice explanation dude, specifically when not to use, lovely :)

  • @lifedatatech6917
    @lifedatatech6917 3 года назад

    Great explanation!

  • @VMEcycle6
    @VMEcycle6 4 года назад

    perfect explanation.

  • @FedJimSmith
    @FedJimSmith 4 года назад

    very nice explanation

  • @rguntu9
    @rguntu9 4 года назад

    Great info Thanks.

  • @JuanPablodelaTorre
    @JuanPablodelaTorre 4 года назад

    You know you can fork new threads for processing intensive tasks in node.js, right? There's also wasm to turbo mode your processing if you need it.

  • @jfpinero
    @jfpinero 4 года назад

    Just curious on your thoughts of using node.js these days over netcore 3+?

  • @FG-qs8uj
    @FG-qs8uj 4 года назад

    I don't understand the for loop example. Wouldn't that be single threaded on any language? When you say a thread is that the same thread that CPUs mention in their specs?