Intel® oneAPI Threading Building Blocks
Ask questions and share information about adding parallelism to your applications when using this threading library.

multithreaded server application

Syl_S_
Beginner
208 Views

Hello,

I'm a new user of TBB and I'm looking for some hints about the use of TBB in this context :

[cpp]        -> Session(id:1) -> Task1(Type:1)

                         -> Task2(Type:2)

                         -> Task3(Type:3)

Network -> Session(id:2) -> Task4(Type:3)

                         -> Task5(Type:2)

                         -> Task6(Type:1)

        -> Session(id:3) -> Task7(Type:2)

                         -> Task8(Type:3)

                         -> Task9(Type:1)[/cpp]

  • It is a server application.
  • Each Session (client) produces Tasks (packet).
  • Tasks for a Session have to be always sequentially executed (Example : Task1 -> Task2 -> Task3)
  • Tasks of some Type have to be sequentially executed too (Example : Task1 -> Task6 -> Task9)
  • But not all Types (Example : Type3 don't need to be sequentially executed : Task4 -> Task8 -> Task3)
  • Sessions number could reach about 5000
  • Packets number shouldn't go over 10/second
  • Most of the tasks (in quantity) should be a non-sequential Type.

What features would you use to implements something like this ? (I'm just looking for the right feature choice, not a complete solution)

 PS : as a non-English-speaker, by sequentially I mean : tasks have to wait the end of execution of the previous one to be executed.

 

Thanks for reading

0 Kudos
2 Replies
Syl_S_
Beginner
208 Views

I should add that I already have the system (async boost:asio server) which can fill the task queue. My question is more about the multithreaded handling / queueing of these tasks.

0 Kudos
Vladimir_P_1234567890
208 Views

Hello 

maybe "network router simulator" sample might help in your case 
http://software.intel.com/en-us/articles/using-intel-tbb-in-network-applications-network-router-emulator

--Vladimir 

0 Kudos
Reply