2
votes

Would it be technically possible to build a general purpose XSLT transform service (using the Saxon XSLT engine) delivered as an Amazon AWS Lambda function? How would you go about implementing it? Would there be a way to avoid initialising the Java VM each time the lambda function was called?

This is more of a brain-storming question. I am unlikely to attempt to implement it.

How would licensing work? There is no way for the developer to know on how many machines Saxon XSLT is installed. Probably, that is something that has to be negotiated with the vendor?

1
I've published my implementation: github.com/AtomGraph/XSLTTransform Note that this code is specifically for Kinesis Data Firehose Data Transformation, but should be easy enough to reuse for general lambdas as well.Martynas Jusevičius

1 Answers

3
votes

I can't see any intrinsic reason why it shouldn't work, but I have no idea about the implementation details.

Since Amazon support Java as the implementation language, one assumes they have a mechanism to avoid JVM initialization costs.

There's a distinction between having a Lambda that supports one particular defined transformation, and having one that executes an arbitrary user-defined stylesheet. I'm not sure that providing a service to execute untrusted code is ever a particularly good idea even if it's heavily sandboxed in terms of resource access.

As regards licensing, our general approach in Saxonica is that we try to ensure that licensing doesn't get in the way of doing something that makes technical sense. If there's value in doing it, we'll find a way of sharing the value that works for all parties.

If this is about executing one predefined stylesheet, as a spin-off from the Saxon-JS development we already have mechanisms that allow a developer to acquire a license that can be redistributed with the compiled stylesheet, meaning essentially that if you acquire the right kind of development license, the run-time is free.