Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Async Nodejs

Async Nodejs

Scheduled Pinned Locked Moved The Lounge
javascriptsysadminxmlhelp
23 Posts 11 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Pete OHanlon

    Yes. I like it a lot.

    J Offline
    J Offline
    Jeremy Falcon
    wrote on last edited by
    #14

    I'll have to find an excuse to check it out then.

    Jeremy Falcon

    1 Reply Last reply
    0
    • M M dHatter

      Got my new custom async Nodejs webserver running. I tested it with Jmeter and it shows about 41,000 connections a second with no error. Seems pretty fast for a slow ass dev server. I notice the Jmeter is using 65% cpu and nodejs is about 15% to 30%. There is still room for improvement. I would like to get to the 100k connection level for one machine. One can only dream... :wtf: I'm actually impressed what this V8 engine can do.

                     .'\\   /\`.
                   .'.-.\`-'.-.\`.
              ...\_:   .-. .-.   :\_...
            .'    '-.(o ) (o ).-'    \`.
           :  \_    \_ \_\`~(\_)~\`\_ \_    \_  :
          :  /:   ' .-=\_   \_=-. \`   ;\\  :
          :   :|-..\_  '     \`  \_..-|:   :
           :   \`:| |\`:-:-.-:-:'| |:'   :
            \`.   \`.| | | | | | |.'   .'
              \`.   \`-:\_| | |\_:-'   .'
                \`-.\_   \`\`\`\`    \_.-'
                    \`\`-------'/xml>
      
      S Offline
      S Offline
      StatementTerminator
      wrote on last edited by
      #15

      M@dHatter wrote:

      I tested it with Jmeter and it shows about 41,000 connections a second with no error.

      It's all fun and games until you hit the database :sigh:

      1 Reply Last reply
      0
      • M M dHatter

        It's a whole new world of spaghetti goto code. But its fun :-\

                       .'\\   /\`.
                     .'.-.\`-'.-.\`.
                ...\_:   .-. .-.   :\_...
              .'    '-.(o ) (o ).-'    \`.
             :  \_    \_ \_\`~(\_)~\`\_ \_    \_  :
            :  /:   ' .-=\_   \_=-. \`   ;\\  :
            :   :|-..\_  '     \`  \_..-|:   :
             :   \`:| |\`:-:-.-:-:'| |:'   :
              \`.   \`.| | | | | | |.'   .'
                \`.   \`-:\_| | |\_:-'   .'
                  \`-.\_   \`\`\`\`    \_.-'
                      \`\`-------'/xml>
        
        P Offline
        P Offline
        Pete OHanlon
        wrote on last edited by
        #16

        Surely it's a whole new world of requires and module.exports.

        1 Reply Last reply
        0
        • M M dHatter

          Got my new custom async Nodejs webserver running. I tested it with Jmeter and it shows about 41,000 connections a second with no error. Seems pretty fast for a slow ass dev server. I notice the Jmeter is using 65% cpu and nodejs is about 15% to 30%. There is still room for improvement. I would like to get to the 100k connection level for one machine. One can only dream... :wtf: I'm actually impressed what this V8 engine can do.

                         .'\\   /\`.
                       .'.-.\`-'.-.\`.
                  ...\_:   .-. .-.   :\_...
                .'    '-.(o ) (o ).-'    \`.
               :  \_    \_ \_\`~(\_)~\`\_ \_    \_  :
              :  /:   ' .-=\_   \_=-. \`   ;\\  :
              :   :|-..\_  '     \`  \_..-|:   :
               :   \`:| |\`:-:-.-:-:'| |:'   :
                \`.   \`.| | | | | | |.'   .'
                  \`.   \`-:\_| | |\_:-'   .'
                    \`-.\_   \`\`\`\`    \_.-'
                        \`\`-------'/xml>
          
          A Offline
          A Offline
          Andy Brummer
          wrote on last edited by
          #17

          Whenever I've put it head to head with async asp.net on similar hardware asp.net has ended up with about twice the performance or more. It's much easier to just throw stuff together in node though, and meteor was pretty awesome the last time I played around with it.

          Curvature of the Mind now with 3D

          1 Reply Last reply
          0
          • M M dHatter

            Got my new custom async Nodejs webserver running. I tested it with Jmeter and it shows about 41,000 connections a second with no error. Seems pretty fast for a slow ass dev server. I notice the Jmeter is using 65% cpu and nodejs is about 15% to 30%. There is still room for improvement. I would like to get to the 100k connection level for one machine. One can only dream... :wtf: I'm actually impressed what this V8 engine can do.

                           .'\\   /\`.
                         .'.-.\`-'.-.\`.
                    ...\_:   .-. .-.   :\_...
                  .'    '-.(o ) (o ).-'    \`.
                 :  \_    \_ \_\`~(\_)~\`\_ \_    \_  :
                :  /:   ' .-=\_   \_=-. \`   ;\\  :
                :   :|-..\_  '     \`  \_..-|:   :
                 :   \`:| |\`:-:-.-:-:'| |:'   :
                  \`.   \`.| | | | | | |.'   .'
                    \`.   \`-:\_| | |\_:-'   .'
                      \`-.\_   \`\`\`\`    \_.-'
                          \`\`-------'/xml>
            
            S Offline
            S Offline
            Shuqian Ying
            wrote on last edited by
            #18

            We are building a production system for Nodejs relational data service (front) layers right now. From what we are getting, it seems to be good at present. Of course we haven't done any performence comparision yet.

            Find more in vertical search portal[^]. Email searcher Email Aggregation Manager[^].

            M 1 Reply Last reply
            0
            • S Shuqian Ying

              We are building a production system for Nodejs relational data service (front) layers right now. From what we are getting, it seems to be good at present. Of course we haven't done any performence comparision yet.

              Find more in vertical search portal[^]. Email searcher Email Aggregation Manager[^].

              M Offline
              M Offline
              M dHatter
              wrote on last edited by
              #19

              Our problem was using database drivers. Most are not designed to handle async event load. We switched to mongo, which seems to work better, but it's hard to say without large data to test with. If you want to bounce any ideas around message me. Latez :-D

                             .'\\   /\`.
                           .'.-.\`-'.-.\`.
                      ...\_:   .-. .-.   :\_...
                    .'    '-.(o ) (o ).-'    \`.
                   :  \_    \_ \_\`~(\_)~\`\_ \_    \_  :
                  :  /:   ' .-=\_   \_=-. \`   ;\\  :
                  :   :|-..\_  '     \`  \_..-|:   :
                   :   \`:| |\`:-:-.-:-:'| |:'   :
                    \`.   \`.| | | | | | |.'   .'
                      \`.   \`-:\_| | |\_:-'   .'
                        \`-.\_   \`\`\`\`    \_.-'
                            \`\`-------'/xml>
              
              S 1 Reply Last reply
              0
              • M M dHatter

                Got my new custom async Nodejs webserver running. I tested it with Jmeter and it shows about 41,000 connections a second with no error. Seems pretty fast for a slow ass dev server. I notice the Jmeter is using 65% cpu and nodejs is about 15% to 30%. There is still room for improvement. I would like to get to the 100k connection level for one machine. One can only dream... :wtf: I'm actually impressed what this V8 engine can do.

                               .'\\   /\`.
                             .'.-.\`-'.-.\`.
                        ...\_:   .-. .-.   :\_...
                      .'    '-.(o ) (o ).-'    \`.
                     :  \_    \_ \_\`~(\_)~\`\_ \_    \_  :
                    :  /:   ' .-=\_   \_=-. \`   ;\\  :
                    :   :|-..\_  '     \`  \_..-|:   :
                     :   \`:| |\`:-:-.-:-:'| |:'   :
                      \`.   \`.| | | | | | |.'   .'
                        \`.   \`-:\_| | |\_:-'   .'
                          \`-.\_   \`\`\`\`    \_.-'
                              \`\`-------'/xml>
                
                S Offline
                S Offline
                Super Lloyd
                wrote on last edited by
                #20

                just a silly question... why use nodejs when you can use webapi and such like? It's not a rhetorical question, I don't like JS.. :~ though I am getting used to it slowly.. but I couldn't fathom using it in place where there are perfectly working other solution, wondering what might cause other people to do the jump! Speaking of which, javascript joke, what is the value of this?

                My programming get away... The Blog... DirectX for WinRT/C# since 2013! Taking over the world since 1371!

                S M 2 Replies Last reply
                0
                • M M dHatter

                  Our problem was using database drivers. Most are not designed to handle async event load. We switched to mongo, which seems to work better, but it's hard to say without large data to test with. If you want to bounce any ideas around message me. Latez :-D

                                 .'\\   /\`.
                               .'.-.\`-'.-.\`.
                          ...\_:   .-. .-.   :\_...
                        .'    '-.(o ) (o ).-'    \`.
                       :  \_    \_ \_\`~(\_)~\`\_ \_    \_  :
                      :  /:   ' .-=\_   \_=-. \`   ;\\  :
                      :   :|-..\_  '     \`  \_..-|:   :
                       :   \`:| |\`:-:-.-:-:'| |:'   :
                        \`.   \`.| | | | | | |.'   .'
                          \`.   \`-:\_| | |\_:-'   .'
                            \`-.\_   \`\`\`\`    \_.-'
                                \`\`-------'/xml>
                  
                  S Offline
                  S Offline
                  Shuqian Ying
                  wrote on last edited by
                  #21

                  Our approach to utilize relational data sources is to have Nodejs to access back-end http services (WCF at present), custom built for a database of particular schema. Nodejs can handle this kind of service async calls well since they are nothing but http requests inside of the Nodejs server. This may imply a lot of work to create and maintain the system. However we have been automating the system generation process so that much of the work can be done by computers. Only some business logic and front-ends codez need to be handled by human developers. When it is done (Nodejs system) I could write an article about it here if I find time for it.

                  Find more in vertical search portal[^]. Email searcher Email Aggregation Manager[^].

                  1 Reply Last reply
                  0
                  • S Super Lloyd

                    just a silly question... why use nodejs when you can use webapi and such like? It's not a rhetorical question, I don't like JS.. :~ though I am getting used to it slowly.. but I couldn't fathom using it in place where there are perfectly working other solution, wondering what might cause other people to do the jump! Speaking of which, javascript joke, what is the value of this?

                    My programming get away... The Blog... DirectX for WinRT/C# since 2013! Taking over the world since 1371!

                    S Offline
                    S Offline
                    Shuqian Ying
                    wrote on last edited by
                    #22

                    Super Lloyd wrote:

                    why use nodejs when you can use webapi and such like?

                    At least, it is less expensive to use (linux, less than 1 GB of memory, etc. to support massive connections). The savings will add up when scaling out is needed. And secondly, from what was claimed, it can scale out more easily for interactive, event driven systems. Of couse this will eventually depends on if the application system is so designed to take advantage of the async IO nature of Nodejs. Web Api can support async ways of programming, but it (asynchrony) is based on thread pools, not on events so it is likely not as scalable as event based asynchrony. To be event driven, one need to use specialized web servers which are not available on Windows platform. If Web Api framework can be made support such servers, which I am not sure it is possible, it could take some efforts to create such kind of servers on ones own. However, it should not be used for servers that process computational intensive jobs. Of course what is said above is in principle, one still need to verify if they are really the case ...

                    Find more in vertical search portal[^]. Email searcher Email Aggregation Manager[^].

                    1 Reply Last reply
                    0
                    • S Super Lloyd

                      just a silly question... why use nodejs when you can use webapi and such like? It's not a rhetorical question, I don't like JS.. :~ though I am getting used to it slowly.. but I couldn't fathom using it in place where there are perfectly working other solution, wondering what might cause other people to do the jump! Speaking of which, javascript joke, what is the value of this?

                      My programming get away... The Blog... DirectX for WinRT/C# since 2013! Taking over the world since 1371!

                      M Offline
                      M Offline
                      M dHatter
                      wrote on last edited by
                      #23

                      1. Cost 2. Event / Stream driven 3. Deployment time 4. Scalability 5. Low Memory and CPU footprint 6. Great for Mobile Devices Above are some common reasons. JS is definitely a strange beast, but once you get use to it, you will come around. Also just a side not. If you want to see an example of how JS can really be used check out this video and learn FRP ( functional reactive programming ) Video Tutorial[^]

                                     .'\\   /\`.
                                   .'.-.\`-'.-.\`.
                              ...\_:   .-. .-.   :\_...
                            .'    '-.(o ) (o ).-'    \`.
                           :  \_    \_ \_\`~(\_)~\`\_ \_    \_  :
                          :  /:   ' .-=\_   \_=-. \`   ;\\  :
                          :   :|-..\_  '     \`  \_..-|:   :
                           :   \`:| |\`:-:-.-:-:'| |:'   :
                            \`.   \`.| | | | | | |.'   .'
                              \`.   \`-:\_| | |\_:-'   .'
                                \`-.\_   \`\`\`\`    \_.-'
                                    \`\`-------'/xml>
                      
                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups