Producer consumerproblem

394 views

Published on

Published in: Self Improvement, Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
394
On SlideShare
0
From Embeds
0
Number of Embeds
5
Actions
Shares
0
Downloads
5
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Producer consumerproblem

  1. 1. (EN)Lightning!!! talk on Handling Producer – Consumer use cases in Java - Prasanna Twitter @prasonscalae-mail prassee.sathian at gmail dot com
  2. 2. What is Producer Consumer use case ??
  3. 3. How we handle it .....Threads Dedicate separate thread for producer & consumer Handle syncn Result in a code tedious to extend A traditional approach Producer Consumer <<Runnable>> <<Runnable>>
  4. 4. Queue A data structure Make use of existing classes in JDK Let the producer and consumer class rely on the queue (Broker) Queue Producer Consumer <<Runnable>> <<Runnable>>
  5. 5. Code Example !!!!
  6. 6. Small Sales Pitch Created a project implementing queue onhttps://github.com/prassee/concProdCons
  7. 7. Questions
  8. 8. Thank you

×