gateway - Resource scheduler program -
i've applied job , asked me write resource scheduler program. part of specs follows
current system
you working on system uses single, expensive, external/3rd party resource perform some, potentially time consuming, operations on messages send it. supplied gateway , message interfaces describing how interact external resource:
send messages processed calling gateway's send(message msg) method:
public interface gateway public void send(message msg)
when message has completed processing, completed() method called:
public interface message public void completed()
task
the number of these external resources has been increased allow more messages processed. however, these resources expensive, want make sure not idle when messages waiting processed. should implement class or classes that:
-can configured number of resources available
-receives messages (and queues them if cannot processed yet)
-as available resources permit (or become available), sends 'correct' message gateway
can please explain gateway means in context? suppose not client-server app i'm not sure meaning of gateway.
any appreciated!
i see there 2 answers online: https://github.com/sebing/jpmc/tree/master/resourcescheduler
Comments
Post a Comment