| Issue 177: | Sending messages with respect to gateway's assigned priority | |
| 1 person starred this issue and may be notified of changes. | Back to list |
Hi. I here is my dump of thoughts on managing message delivery process :) Device Priority List (DPL) consists of gateways with associated priorities of delivery attempts. Acronym for Gateway Priority List (GPL) seems to be a little misleading :) DPL is created by the following rules: 1. Message may override default gateway's priority to alter it's DPL creation 2. if gateway1.priority > gateway2.priority, then gateway1 is closer to the head of the DPL that gateway2 3. if gateway1.priority = gateway2.priority, then their relative position in the list is undetermined (i.e. gateway1 may precede gateway2 and gateway2 may precede gateway1) Message delivery process: 1. The message is considered as undeliverable when its DPL becomes empty 2. If the message is failed to be sent by the gateway - this gateway is removed from DPL of the message 3. On every message delivery attempt gateway with highest priority in DPL and in 'RUNNING' state is selected ?4.a If DPL of the message contains gateway which status hasn't changed to 'RUNNING' in timeout since message entered Service, then gateway is removed from this message's DPL OR ?4.b If timeout passed since message's DPL contains only not 'RUNNING' gateways, and none of them has became 'RUNNING' in this period, then message is considered undeliverable I see this logic is very similar to 'routers', but may prove to be more useful. Any ideas? |
|
,
Jan 30, 2009
Hi Allati, My answer is based on the new (3.4) development. In case you have missed the latest changes ( I suspect you didn't, since you seem to keep yourself always up to date :) ), the gateway queues are now "joined" in a central, Service level queue. What you are describing seems like an extension to the current central queue logic. Currently, the queue pushes on the first available (via routers) gateway. If this fails, it will requeue the message a couple of times, but it will probably not try all gateways. I guess you want to apply some logic in order to try other (or all) gateways as well before deciding that the message indeed fails. It seems to me like a good idea, especially for those managing multiple gateways. I don't understand one thing, though (I may be missing something): Your idea of DPL is quite dynamic, i.e. can be a per-message setting, etc. I guess that you have already thought about a "static" alternative - something like "always try all gateways before deciding the fate of a message". Why did you rule out this alternative?
Status: Feedback
|
|
,
Jan 30, 2009
Actually, "central queue" was the reason why I thought described changes can be made
relatively painless. Previously with gateway queues it was way much harder. But even
with this central queue Service does not handle message "switching" from one gateway
to another (Router will return the same gateways set all the time and Balancer will
select one from them, maybe the same one from the set every time).
The dpl was one way to handle message routing a little differently and more
effectively. Now I see that I missed balancing part. Maybe it should be used when
there are several gateways with the same priority (round-robin balancing seems to be
the best choice for this task). However balancing should function outside of DPL and
be service-global. Should think about it a little more.
About static/dynamic DPL:
All gateways are assigned priority when created. However message can provide
different priority for specific gateway, so frankly it looks something like this:
public int getGatewayPriority( Message msg, Gateway gtw )
{
if (msg.hasPriorityForGateway( gtw ))
return msg.getPriorityForGateway( gtw );
else
return gtw.getPriority();
}
In the end, if message does not provide "override" list, it will be associated with
default DPL. And default DPL will contain all defined gateways. To remove gateways
from DPL for the specific message, "override" list with negative priorities can be
used (or message can provide something like "ignore" list).
Hope I answered the question you asked :)
|
|
,
Apr 04, 2009
(No comment was entered for this change.)
Owner: ad...@smslib.org
|
|
,
Apr 21, 2009
(No comment was entered for this change.)
Owner: T.Delenikas
|
|
|
|