[PATCH] dlr retries

View: New views
6 Messages — Rating Filter:   Alert me  

[PATCH] dlr retries

by Alejandro Guerrieri-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

This patch implements an "sleep and retry" when calling dlr_get().  
This aims to solve the problem we were having with dlr's arriving  
before the row is inserted.

2 new core parameters are defined:

dlr-retry-count -> How many times do we attempt to fetch the dlr?  
Default: 1
dlr-retry-delay -> How many milliseconds do we sleep before retrying?  
Default: 0

So, if you don't set these parameters the behaviour remains as it was  
before patching. However, if you, for example, set:

dlr-retry-count = 3
dlr-retry-delay = 200

Kannel will try 3 times in total (the original one plus 2 more),  
pausing 200ms (0.2 seconds) before each attempt. If after the third  
attempt the DLR's still missing, Kannel will display a warning as usual.






Regards,
--
Alejandro Guerrieri
aguerrieri@...




kannel-dlr-retry.patch (3K) Download Attachment

[PATCH] dlr retries

by Alejandro Guerrieri-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Resubmitting this patch by popular demand ;)


Regards,
--
Alejandro Guerrieri



Begin forwarded message:

From: Alejandro Guerrieri <aguerrieri@...>
Date: 2 de mayo de 2009 14:48:19 GMT+02:00
To: Kannel Devel <devel@...>
Subject: [PATCH] dlr retries

Hi,

This patch implements an "sleep and retry" when calling dlr_get(). This aims to solve the problem we were having with dlr's arriving before the row is inserted.

2 new core parameters are defined:

dlr-retry-count -> How many times do we attempt to fetch the dlr? Default: 1
dlr-retry-delay -> How many milliseconds do we sleep before retrying? Default: 0

So, if you don't set these parameters the behaviour remains as it was before patching. However, if you, for example, set:

dlr-retry-count = 3
dlr-retry-delay = 200

Kannel will try 3 times in total (the original one plus 2 more), pausing 200ms (0.2 seconds) before each attempt. If after the third attempt the DLR's still missing, Kannel will display a warning as usual.






Regards,
--
Alejandro Guerrieri
aguerrieri@...





kannel-dlr-retry.patch (3K) Download Attachment

Re: [PATCH] dlr retries

by Nikos Balkanas-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
Well it introduces a performance delay, probably to all SMS, but it is configurable, and if you need it you've got to have it. Any chance to improve on it by putting the deliver_sm back into the queue instead of sleeping?
 
+1
 
BR,
Nikos
----- Original Message -----
Sent: Sunday, October 25, 2009 12:10 PM
Subject: [PATCH] dlr retries

Resubmitting this patch by popular demand ;)


Regards,
--
Alejandro Guerrieri



Begin forwarded message:

From: Alejandro Guerrieri <aguerrieri@...>
Date: 2 de mayo de 2009 14:48:19 GMT+02:00
To: Kannel Devel <devel@...>
Subject: [PATCH] dlr retries

Hi,

This patch implements an "sleep and retry" when calling dlr_get(). This aims to solve the problem we were having with dlr's arriving before the row is inserted.

2 new core parameters are defined:

dlr-retry-count -> How many times do we attempt to fetch the dlr? Default: 1
dlr-retry-delay -> How many milliseconds do we sleep before retrying? Default: 0

So, if you don't set these parameters the behaviour remains as it was before patching. However, if you, for example, set:

dlr-retry-count = 3
dlr-retry-delay = 200

Kannel will try 3 times in total (the original one plus 2 more), pausing 200ms (0.2 seconds) before each attempt. If after the third attempt the DLR's still missing, Kannel will display a warning as usual.





Regards,
--
Alejandro Guerrieri
aguerrieri@...





Resubmitting this patch by popular demand ;)

http://www.blogalex.com/archives/132

Regards,
--
Alejandro Guerrieri
aguerrieri@...



Begin forwarded message:

> From: Alejandro Guerrieri <aguerrieri@...>
> Date: 2 de mayo de 2009 14:48:19 GMT+02:00
> To: Kannel Devel <devel@...>
> Subject: [PATCH] dlr retries
>
> Hi,
>
> This patch implements an "sleep and retry" when calling dlr_get(). 
> This aims to solve the problem we were having with dlr's arriving 
> before the row is inserted.
>
> 2 new core parameters are defined:
>
> dlr-retry-count -> How many times do we attempt to fetch the dlr? 
> Default: 1
> dlr-retry-delay -> How many milliseconds do we sleep before 
> retrying? Default: 0
>
> So, if you don't set these parameters the behaviour remains as it 
> was before patching. However, if you, for example, set:
>
> dlr-retry-count = 3
> dlr-retry-delay = 200
>
> Kannel will try 3 times in total (the original one plus 2 more), 
> pausing 200ms (0.2 seconds) before each attempt. If after the third 
> attempt the DLR's still missing, Kannel will display a warning as 
> usual.
>
>
>
>
> Regards,
> --
> Alejandro Guerrieri
> aguerrieri@...
>
>
>


Re: [PATCH] dlr retries

by Alejandro Guerrieri-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I agree it's not the cleanest solution, but get the job done when needed.

Alex, do you think of a better way to handle it, architecturally speaking?
 
Regards,
--
Alejandro Guerrieri



On 25/10/2009, at 12:08, Nikos Balkanas wrote:

Well it introduces a performance delay, probably to all SMS, but it is configurable, and if you need it you've got to have it. Any chance to improve on it by putting the deliver_sm back into the queue instead of sleeping?
 
+1
 
BR,
Nikos
----- Original Message -----
Sent: Sunday, October 25, 2009 12:10 PM
Subject: [PATCH] dlr retries

Resubmitting this patch by popular demand ;)


Regards,
--
Alejandro Guerrieri



Begin forwarded message:

From: Alejandro Guerrieri <aguerrieri@...>
Date: 2 de mayo de 2009 14:48:19 GMT+02:00
To: Kannel Devel <devel@...>
Subject: [PATCH] dlr retries

Hi,

This patch implements an "sleep and retry" when calling dlr_get(). This aims to solve the problem we were having with dlr's arriving before the row is inserted.

2 new core parameters are defined:

dlr-retry-count -> How many times do we attempt to fetch the dlr? Default: 1
dlr-retry-delay -> How many milliseconds do we sleep before retrying? Default: 0

So, if you don't set these parameters the behaviour remains as it was before patching. However, if you, for example, set:

dlr-retry-count = 3
dlr-retry-delay = 200

Kannel will try 3 times in total (the original one plus 2 more), pausing 200ms (0.2 seconds) before each attempt. If after the third attempt the DLR's still missing, Kannel will display a warning as usual.







Regards,
--
Alejandro Guerrieri
aguerrieri@...







Resubmitting this patch by popular demand ;)

http://www.blogalex.com/archives/132

Regards,
--
Alejandro Guerrieri
aguerrieri@...



Begin forwarded message:

> From: Alejandro Guerrieri <aguerrieri@...>
> Date: 2 de mayo de 2009 14:48:19 GMT+02:00
> To: Kannel Devel <devel@...>
> Subject: [PATCH] dlr retries
>
> Hi,
>
> This patch implements an "sleep and retry" when calling dlr_get().  
> This aims to solve the problem we were having with dlr's arriving  
> before the row is inserted.
>
> 2 new core parameters are defined:
>
> dlr-retry-count -> How many times do we attempt to fetch the dlr?  
> Default: 1
> dlr-retry-delay -> How many milliseconds do we sleep before  
> retrying? Default: 0
>
> So, if you don't set these parameters the behaviour remains as it  
> was before patching. However, if you, for example, set:
>
> dlr-retry-count = 3
> dlr-retry-delay = 200
>
> Kannel will try 3 times in total (the original one plus 2 more),  
> pausing 200ms (0.2 seconds) before each attempt. If after the third  
> attempt the DLR's still missing, Kannel will display a warning as  
> usual.
>
>
>
>
> Regards,
> --
> Alejandro Guerrieri
> aguerrieri@...
>
>
>



Re: [PATCH] dlr retries

by Nikos Balkanas :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
Dear Alex,
 
Have you been able to check on this?
 
BR,
Nikos
----- Original Message -----
Sent: Sunday, October 25, 2009 2:42 PM
Subject: Re: [PATCH] dlr retries

I agree it's not the cleanest solution, but get the job done when needed.

Alex, do you think of a better way to handle it, architecturally speaking?
 
Regards,
--
Alejandro Guerrieri



On 25/10/2009, at 12:08, Nikos Balkanas wrote:

Well it introduces a performance delay, probably to all SMS, but it is configurable, and if you need it you've got to have it. Any chance to improve on it by putting the deliver_sm back into the queue instead of sleeping?
 
+1
 
BR,
Nikos
----- Original Message -----
Sent: Sunday, October 25, 2009 12:10 PM
Subject: [PATCH] dlr retries

Resubmitting this patch by popular demand ;)


Regards,
--
Alejandro Guerrieri



Begin forwarded message:

From: Alejandro Guerrieri <aguerrieri@...>
Date: 2 de mayo de 2009 14:48:19 GMT+02:00
To: Kannel Devel <devel@...>
Subject: [PATCH] dlr retries

Hi,

This patch implements an "sleep and retry" when calling dlr_get(). This aims to solve the problem we were having with dlr's arriving before the row is inserted.

2 new core parameters are defined:

dlr-retry-count -> How many times do we attempt to fetch the dlr? Default: 1
dlr-retry-delay -> How many milliseconds do we sleep before retrying? Default: 0

So, if you don't set these parameters the behaviour remains as it was before patching. However, if you, for example, set:

dlr-retry-count = 3
dlr-retry-delay = 200

Kannel will try 3 times in total (the original one plus 2 more), pausing 200ms (0.2 seconds) before each attempt. If after the third attempt the DLR's still missing, Kannel will display a warning as usual.







Regards,
--
Alejandro Guerrieri
aguerrieri@...







Resubmitting this patch by popular demand ;)

http://www.blogalex.com/archives/132

Regards,
--
Alejandro Guerrieri
aguerrieri@...



Begin forwarded message:

> From: Alejandro Guerrieri <aguerrieri@...>
> Date: 2 de mayo de 2009 14:48:19 GMT+02:00
> To: Kannel Devel <devel@...>
> Subject: [PATCH] dlr retries
>
> Hi,
>
> This patch implements an "sleep and retry" when calling dlr_get().  
> This aims to solve the problem we were having with dlr's arriving  
> before the row is inserted.
>
> 2 new core parameters are defined:
>
> dlr-retry-count -> How many times do we attempt to fetch the dlr?  
> Default: 1
> dlr-retry-delay -> How many milliseconds do we sleep before  
> retrying? Default: 0
>
> So, if you don't set these parameters the behaviour remains as it  
> was before patching. However, if you, for example, set:
>
> dlr-retry-count = 3
> dlr-retry-delay = 200
>
> Kannel will try 3 times in total (the original one plus 2 more),  
> pausing 200ms (0.2 seconds) before each attempt. If after the third  
> attempt the DLR's still missing, Kannel will display a warning as  
> usual.
>
>
>
>
> Regards,
> --
> Alejandro Guerrieri
> aguerrieri@...
>
>
>



Re: [PATCH] dlr retries

by Alejandro Guerrieri-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

He did on Oct 25 ;)

--
HI,

I think this is the only place to handle it but I don't like your patch.
- First as usual fix indentation.
- Please don't put retry variables into handle struct. This has nothing todo with handler because retry handled
  at the dlr abstraction layer
- please add config option like dlr-retry-smsc that take list of smsc-id that should be retried. So you can avoid
  slowdown for all connection if only one connection need retry

Thanks,
Alexander Malysh
--

I'm working on it BTW.

Regards,
--
Alejandro Guerrieri



On 30/10/2009, at 15:31, Nikos Balkanas wrote:

Dear Alex,
 
Have you been able to check on this?
 
BR,
Nikos
----- Original Message -----
Sent: Sunday, October 25, 2009 2:42 PM
Subject: Re: [PATCH] dlr retries

I agree it's not the cleanest solution, but get the job done when needed.

Alex, do you think of a better way to handle it, architecturally speaking?
 
Regards,
--
Alejandro Guerrieri



On 25/10/2009, at 12:08, Nikos Balkanas wrote:

Well it introduces a performance delay, probably to all SMS, but it is configurable, and if you need it you've got to have it. Any chance to improve on it by putting the deliver_sm back into the queue instead of sleeping?
 
+1
 
BR,
Nikos
----- Original Message -----
Sent: Sunday, October 25, 2009 12:10 PM
Subject: [PATCH] dlr retries

Resubmitting this patch by popular demand ;)


Regards,
--
Alejandro Guerrieri



Begin forwarded message:

From: Alejandro Guerrieri <aguerrieri@...>
Date: 2 de mayo de 2009 14:48:19 GMT+02:00
To: Kannel Devel <devel@...>
Subject: [PATCH] dlr retries

Hi,

This patch implements an "sleep and retry" when calling dlr_get(). This aims to solve the problem we were having with dlr's arriving before the row is inserted.

2 new core parameters are defined:

dlr-retry-count -> How many times do we attempt to fetch the dlr? Default: 1
dlr-retry-delay -> How many milliseconds do we sleep before retrying? Default: 0

So, if you don't set these parameters the behaviour remains as it was before patching. However, if you, for example, set:

dlr-retry-count = 3
dlr-retry-delay = 200

Kannel will try 3 times in total (the original one plus 2 more), pausing 200ms (0.2 seconds) before each attempt. If after the third attempt the DLR's still missing, Kannel will display a warning as usual.







Regards,
--
Alejandro Guerrieri
aguerrieri@...







Resubmitting this patch by popular demand ;)

http://www.blogalex.com/archives/132

Regards,
--
Alejandro Guerrieri
aguerrieri@...



Begin forwarded message:

> From: Alejandro Guerrieri <aguerrieri@...>
> Date: 2 de mayo de 2009 14:48:19 GMT+02:00
> To: Kannel Devel <devel@...>
> Subject: [PATCH] dlr retries
>
> Hi,
>
> This patch implements an "sleep and retry" when calling dlr_get().  
> This aims to solve the problem we were having with dlr's arriving  
> before the row is inserted.
>
> 2 new core parameters are defined:
>
> dlr-retry-count -> How many times do we attempt to fetch the dlr?  
> Default: 1
> dlr-retry-delay -> How many milliseconds do we sleep before  
> retrying? Default: 0
>
> So, if you don't set these parameters the behaviour remains as it  
> was before patching. However, if you, for example, set:
>
> dlr-retry-count = 3
> dlr-retry-delay = 200
>
> Kannel will try 3 times in total (the original one plus 2 more),  
> pausing 200ms (0.2 seconds) before each attempt. If after the third  
> attempt the DLR's still missing, Kannel will display a warning as  
> usual.
>
>
>
>
> Regards,
> --
> Alejandro Guerrieri
> aguerrieri@...
>
>
>