Questions tagged [singlethreadmodel]

9 questions
9
votes
2 answers

How vert.x is single threaded?

From my understanding, each vert.x instance will be assigned an event loop. Event loop handles all the request an other task for that particular instance. Event loop is a thread, I think. When there are multiple vert.x instance deployed, each…
4
votes
3 answers

Node JS multiple concurrent requests to backend API

This is my node js backend API method. apiRouter.route('/makeComment') .post((req, res) => { consoleLogger.info("Inside makeComment API.."); logger.info("Inside makeComment"); let timestamp = new…
DukeLover
  • 2,184
  • 2
  • 19
  • 27
2
votes
0 answers

Initializing the COM library in apartment threaded mode in a thread with no message loop

According to the documentation, if the COM library is initialized in "apartment threaded" mode, the thread must have a message loop. However, I found that using COM in a thread with no message loop works just fine. Here is a working example that…
Seth
  • 83
  • 7
2
votes
0 answers

How can .NET Core compare to Node.js when it still has the context switch overhead?

I read in several places, including on Stack Overflow posts, that it is no longer true that Node.js has better performance than .NET in the .NET Core era. I've read that part of the reason that Node.js had an advantage on the first place is that it…
1
vote
1 answer

How JBoss 4.2.3 implements SingleThreadModel (STM): 1 instance of a servlet OR multiple instances of a servlet?

I am working on an enterprise application which is deployed to JBoss 4.2.3. It is using Servlet 2.5 specs. The application has some JSPs which are using SingleThreadModel (STM) with this directive: <%@ page isThreadSafe="false" %> I want to know…
srh
  • 1,661
  • 4
  • 30
  • 57
1
vote
2 answers

How to create a STA (Single Threaded apartment) control in VS2010

I have a .NET 4.0 Windows Service that hosts components. Our project lead says that when calling methods on certain components, that performance is slow. He suspects that it may be an STA component that incurs this performance penalty. To test this…
Rick Hodder
  • 2,189
  • 3
  • 26
  • 54
1
vote
3 answers

(Servlets, Thread safety) Protecting the session and context state

Referring to: Head First Servlets & JSP, page 204, third question: Q. "The effect of implementing SingleThreadModel is virtually the same as synchronizing the service method. Both can bring a web app to its knees without protecting the session…
Akshat
  • 29
  • 5
0
votes
1 answer

SingleThreadModel is deprecated and does not guarantee thread safety, what is the best soluation/design approch to guarantee thread safety in Servlet?

I want to guarantee thread safety in one of my Servlet. SingleThreadModel is deprecated and does not guarantee thread safety. Instead of that I can use synchronized block inside my Servlet. Is thee an alternate way to guarantee thread safety in…
Bacteria
  • 8,406
  • 10
  • 50
  • 67
-1
votes
1 answer

How to set node server to run different requests simultaneously?

I was asked how to set node server to run different requests simultaneously. The question is like below: create a web server with only 1 route('/single'), in the controller run below code to imitate intensive CPU work: const obj = {}; for(let i = 0;…