Friday 15 August 2014

javascript - Asynchronous I/O - Java -


I am searching for details on Asynchronous I / O advantages in Java, especially application stack designing.

I node Experiences many examples of events-driven servers like JS, Tornado etc.

I have failed to understand that someone migrates to Java-based WebServer or Weblogic application server event-driven architecture.

Even these servers support non-blocking I / O. Yes, they are allocating a thread for each request, but with a Threadpool, what resources do good performance standards Will not be inside?

Please provide me some input with the following lines.

  1. A traditional Java EE architecture with Apache-Tomcat / Jabes / Weblogic considers one step for an event-driven architecture.
  2. Whether the event-driven architecture device-agnostic website / application.
  3. When designing an application on the cloud, do we go for an asynchronous I / O?
  4. Is the event driven presentation performance better than traditional Java EE architecture or is it a myth?

    The key concepts you have mentioned are:

    Yes, they are allocating a thread for each request

    This time it has been shown that there is a thread to request with an IO bound app Finally, remove your thread when your large number of goals are to support concurrent users. As it turns out, the structure you are talking about like node. JS, Ternado, etc., there are excellence in handling large number of concurrent users where your application is only waiting for something to happen and no CPU does all the binding functions In other words, these tools are designed to create real-time Apple Are great for such as online games, chatrooms, logging systems, notification systems, where the primary goal is with many users, the faster The possible passing as short message.

    In fact, these tools are very good with writing webcotter-based applications because it is really about real-time or user-real-time experience.

    Although it is true that many people are using these platforms, I think it is more common for companies with traditional stacks to provide an event-driven device Use When you go with things like node.js or tornado, you can leave a lot of built-in software on your own, depending on the side of rolling your own APs and drivers. Node.js have been around for a while, and actually have very good support for hooking up in databases, nosql platforms and build systems, but it took some time to get it there.

    As an experiment, try writing a simple TCP chat application that uses a thread per request and see how many users can support. After all, how many OS threads you spin Which are really expensive.

    Then see if you node. J to use only one thread, its default thread. You will find that you are able to support a large number of concurrent requests per second. It is known to scale in millions because it is not limited by threads, it is only memory, the number of file descriptors and then limited by the CPU

    Best to answer your questions I can:

    1. I do not think that it is just enough to eat your whole platform because you hear how great nodes are JS and Event -Devenen Architecture You really have to ask yourself, if you need to create a highly concurrent application of IO-bound. If so, why not use it to complement your existing stack?
    2. I'm not sure on your second question, what do you mean by the device?
    3. You can apply the application in the cloud based on a great traditional equipment only to the use of event-driven architecture, the fact that it can be a "cloud" application actually does not do anything with choosing the platform is.
    4. I would say that this is more about scale than performance. You can find that a node.js app runs slower or faster than the Java app running the same code. But which node JS is able to, it is allowing throughput of too much rate because it is not going to kill the threshold of the thread that I have mentioned, and it also shows that you have created a proper event driven application where you Do not block. If you block, you take the whole system down!

No comments:

Post a Comment