1

Is there a way in Java to have the same functionality as SSLEngine but without a delegated task, because my program needs to handle a lot of connections and I wrote it in NIO with the purpose to use less ram, have more connections and have better performance, so if I use delegated tasks, it will defeat the purpose and my program will use even more ram as threads, in big quantities take quite a bit of space.

IRONALEKS
  • 50
  • 10

1 Answers1

1

In a word, no. There's no particular reason why you need 'big quantities' of threads of delegated tasks. One will do, if you accept the throughput implications.

user207421
  • 305,947
  • 44
  • 307
  • 483
  • There is a reason, better performance, if i have all delegated tasks run in one thread then as you said the throughput will be horrible, even worse if one connection is slow, and as i said i need good performance and i can't accept the throughput implications, but thanks for the answer :) – IRONALEKS Dec 27 '16 at 00:00
  • So you have to decide on your space-time trade off. You can't have both. You can use a thread pool to limit the number of threads to whatever you find acceptable. – user207421 Dec 27 '16 at 07:20