[EXT] Integration GO language into Freeradius
Arran Cudbard-Bell
a.cudbardb at freeradius.org
Mon Mar 21 22:49:34 UTC 2022
> On Mar 21, 2022, at 6:22 PM, Matthew Newton <mcn at freeradius.org> wrote:
>
> On 21/03/2022 21:49, Arran Cudbard-Bell wrote:
>>> On Mar 21, 2022, at 1:09 PM, Martin Gignac <martin.gignac at gmail.com> wrote:
>>>> As I can see there is no possibility to process/manipulate the whole
>>>> REQUEST ( in case the rlm_perl module is RLM_REQUEST ) attributes ( because
>>>> the module sends only a limited attribute set via uri ).
>
>> Not sure what the issue here is with Go... You can already write FreeRADIUS modules in Go
>> you just export the same symbols as one of the C modules.
>
> This sounds to me like another case of "just learn how to use unlang".
>
> In over a decade of building FreeRADIUS configs I have never used any of the scripting language modules. Unlang might not always be the prettiest, but it does work, and is pretty much going to be the fastest option.
>
> There may be a few unusual cases where something more flexible could possibly be justified (and unlang does fall slightly short in a few areas, occasionally requiring some "creative" config), but I've never found it hard enough to need to use something else.
>
> There's been too many cases where people have written configs in python or perl because that's what they're used to... and the result has been much simpler and faster once that's all ripped out and it's recreated in unlang. I really don't see adding yet another language much of a help.
Especially with async in v4. Doing blocking I/O in a dynamic language becomes the quickest way to kill the performance of the server.
If people really wanted to avoid REST it'd be fairly easy to make rlm_exec execute long running processes, especially since all the exec code in v4 is fully async (what a complete PITA that was). That'd avoid the overhead of starting up and shutting down processes every time a request came through. But then you need some awful hacked together pipe based FFI/CGI thing... and just... why... Every language has a lease one HTTP framework. Go probably has several hundred by this point.
The REST support in v4 is much better. It's got one of the new style argument based xlats that allows custom bodies to be sent, and a JSON module that allows custom encoding of request, and parsing of responses.
-Arran
Arran Cudbard-Bell <a.cudbardb at freeradius.org>
FreeRADIUS Development Team
FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Message signed with OpenPGP
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20220321/8d7d5429/attachment.sig>
More information about the Freeradius-Users
mailing list