Peter Dunkley wrote:
On Thu, 2012-08-09 at 10:10 +0200, Martin Hoffmann
wrote:
I'd prefer if we could do this through config
and only enhance the C
APIs where needed. With the new include logics and whatnot, this can
come in the form of a config library.
You can do includes but you can't put complex functions with
parameters into a config library. So you would end up having to do it
as routes with pseudo-variables to pass data around.
Yes. Maybe we can fix that, too? Adding route arguments shouldn't be too
hard, if you do it shell style (just a list of arguments, accessible
inside the route through PVs $0, $1, etc.).
I think this
would be very messy for something as complex as Outbound - and there
is always the chance you might use a route-name or variable name that
someone else has (making it hard for them to add Outbound support to
an existing configuration).
I don't think outbound is all that complex. Pretty much the only change
that is really very fundamental is the serial routing lookup for
same-instance clients. The rest is pretty much there.
A lot of the business logic for Outbound will be done
in the
configuration anyway (failure-routes to generate/convert status to 430
and so on) mainly because this is right place for that stuff, but
surely a new module that has drop-in replacements for existing
functions (like record_route(), loose_route(), lookup() and so on) is
going to be easier for people to work with?
Assuming you can't fit outbound into the existing functions (which, I
think would only be the case with lookup()), I'd rather have new
functions within the existing modules.
Regards,
Martin