[Asterisk-code-review] res_redisd: add REDIS support modules to send asterisk DeviceState up... (asterisk[master])

Sean Bright asteriskteam at digium.com
Mon Jul 25 08:01:03 CDT 2022


Attention is currently required from: Alec Davis, Joshua Colp, N A.
Sean Bright has posted comments on this change. ( https://gerrit.asterisk.org/c/asterisk/+/18829 )

Change subject: res_redisd: add REDIS support modules to send asterisk DeviceState updates to a REDIS server
......................................................................


Patch Set 9: Code-Review-2

(3 comments)

Commit Message:

https://gerrit.asterisk.org/c/asterisk/+/18829/comment/9ff9132c_5e35722a 
PS9, Line 7: add REDIS support modules to send asterisk DeviceState updates to a REDIS server
REDIS -> Redis (x2)


Patchset:

PS9: 
> Code based on res_statsd and res_chan_stats, thank you David M. Lee

> func_db_redis based directly off func_db.

> I thought I was doing it the same way as these listed below

> perhaps, but cdr/cdr_tds.c has it this way.

> I followed the res_statsd/res_chan_stats concept of split modules

> serves me right for copying statsd.conf

> func_db_redis dialplan functions copy and pasted from func_db added to review

I understand what you are trying to say/do here, but the fact that you copied existing code or concepts from other Asterisk modules does _not_ mean that the approach taken in _this_ review is the right one.

In my opinion, assuming that hiredis can be used from multiple threads safely, I would just use hiredis directly from your stats and func modules and drop the 'API' module entirely. It is not a good design for something that will need to be supported for a number of years.


File include/asterisk/redisd.h:

https://gerrit.asterisk.org/c/asterisk/+/18829/comment/29f103d2_56730cb1 
PS9, Line 48: AST_OPTIONAL_API(void, ast_redisd_command, (const char *command, const char *key_path, const char *key_value, char *return_buffer, size_t return_buffwe_len), {});
The same comments from before apply here.



-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/18829
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: Ifdf4d33d2a2a5fd044fac13b201c7437de34ba6a
Gerrit-Change-Number: 18829
Gerrit-PatchSet: 9
Gerrit-Owner: Alec Davis <alec at bdt.co.nz>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-Reviewer: N A <mail at interlinked.x10host.com>
Gerrit-Reviewer: Sean Bright <sean at seanbright.com>
Gerrit-Attention: Alec Davis <alec at bdt.co.nz>
Gerrit-Attention: Joshua Colp <jcolp at sangoma.com>
Gerrit-Attention: N A <mail at interlinked.x10host.com>
Gerrit-Comment-Date: Mon, 25 Jul 2022 13:01:03 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20220725/90857aa2/attachment-0001.html>


More information about the asterisk-code-review mailing list