-1

I've applied for a job and they asked me to write a resource scheduler program. A part of the specs is as follows

Current System

You are working on a system which uses a single, very expensive, external/3rd party resource to perform some, potentially very time consuming, operations on messages that you send to it. You are supplied with the Gateway and Message interfaces describing how to interact with the external resource:

send messages to be processed by calling the Gateway's send(Message msg) method:

public interface Gateway

public void send(Message msg)

when a Message has completed processing, its completed() method will be called:

public interface Message

public void completed()

Task

The number of these external resources has just been increased to allow more messages to be processed. However, as these resources are very expensive, we want to make sure that they are not idle when messages are waiting to be processed. You should implement a class or classes that:

-can be configured with the number of resources available

-receives Messages (and queues them up if they cannot be processed yet)

-as available resources permit (or as they become available), sends the 'correct' message to the Gateway

Can anyone please explain what Gateway means in this context? I suppose this is not a client-server app so I'm not sure as to the meaning of Gateway.

Any help is much appreciated!

pcs
  • 1,864
  • 4
  • 25
  • 49
dsp_user
  • 2,061
  • 2
  • 16
  • 23
  • Why do people not look at the preview before they post the question? –  Apr 25 '15 at 11:04

1 Answers1