Topics…

  • What to keep in mind when developing server
  • When a function is:
    • thread safe?
    • synchronized?
  • When multiple requests are hit on the server, how is it handled
    • connection pool size
  • What are the database considerations while developing the server?
    • @Transaction??

Books and References

Concurrency Interview Questions

  • Design Bounded Blocking Queue
  • Multithreaded Web Crawler
  • Print Zero Even Odd
  • Fizz Buzz Multithreaded
  • The Dining Philosophers

Concurrency vs Parallel

Sync vs Async

  • An asynchronous method call is normally used for a process that needs to do work away from the current application and we don’t want to wait and block our application awaiting the response.
  • Nodejs is asynchronous in nature and JS is single threaded language

Multithread vs Multicore vs Hyperthreading

  • Thread is a software concept.
  • A core can run multiple threads concurrently which will appear to be running in parallel but in reality it is switching between multiple threads very fast.
  • Multicore is hardware concept. It refers to a processor that has more than one logical CPU core, and that can physically execute multiple instructions at the same time.
  • Hyperthreading is a hardware concept according to which it means that the core can run two parallel threads, as if there were two cores.
  • Hyperthreading increases the number of logical cores available
  • https://stackoverflow.com/questions/11835046/multithreading-and-multicore-differences

Concurrency Models