Complete authorize & accounting redis module

Manuel Guesdon ml.freeradius at oxymium.net
Sun Nov 13 13:54:39 CET 2011


On Sun, 13 Nov 2011 10:29:48 +0100
Alan DeKok <aland at deployingradius.com> wrote:

>| Manuel Guesdon wrote:
>| > I've adapted rlm_sql to REDIS (http://redis.io/) key-store database.
>| 
>|   That sounds good, but... the rlm_sql code is pretty bad.  I wouldn't
>| suggest adapting it.  Instead, start from scratch.  It will be simpler,
>| and do more.
>|   I see you've cleaned up a lot of the code, to be simpler than the SQL
>| module.  That's an important step, and very useful.

In fact, the choice was not easy: I've hesitated between using
existing rlm_redis or write it as a rlm_sql driver or write it from
scratch :-)

Write it as rlm_sql driver seems not easy because rlm_sql is very sql centric
(tests on queries begining with "SELECT " and using affected rows count) and
doesn't support multi-queries (which is important for using redis in
accounting).

As I'm new to radis, write it from scratch seems a little difficult.
So i've choose to write it as new module based on rlm_sql to keeps some common
mecanisms (like fetch_row) so it may later be converted as a sql driver in an
ehanced rtlm_sql or at least follow rlm_sql improvments more easily.

And as I've no experience on accounting in radius (my primary need is
authorize part) I've thank it was better to stay close to existing
stuff.

>|   I'll take a look in more detail later this week.

Thank you. Please tell me what can be improved or modified  !

Manuel

--
______________________________________________________________________
Manuel Guesdon - OXYMIUM



More information about the Freeradius-Devel mailing list