views:

26

answers:

1

Hey All,

What type of pattern would you recommend for a "multiple input, single output" situation. In other words, I have many different methods that I would like to call to send messages along a single serial port. What are the various patterns available to me and what are the tradeoffs involved in each. I know this is short on specifics, but I'm sure that you will all educate me and I will be able to add to the discussion as it continues. Thanks!!

A: 

Don't try to apply a design pattern to everything. This is just a producer/consumer scenario, with multiple producers and one consumer. A simple implementation is a synchronous blocking queue, like Java's BlockingQueue/ArrayBlockingQueue.

Mark Peters