Saxon-JS use cases
I have a few questions regarding how Saxon-JS could be used.
- Is it true that Saxon-JS is meant as an alternative to the server running java with saxon, and that it isn't needed if the server has those things?
- Would saxon-JS be a way to offload some of the resources-intensive work in putting the runtime load on the client? Or is a microservices approach likely still probably better for that sort of thing.
- Would Saxon-JS make it any easier to test against different versions of saxon (with something like XSpec)? I'm guessing this wouldn't work since the compile and runtime phases would need to share the version of saxon?
RE: Saxon-JS use cases - Added by Michael Kay almost 3 years ago
(1) Saxon-JS can run either in the browser or on node.js
On node.js, it performs the same role as Saxon on Java, i.e. server-side processing, but on a different platform; so it's there primarily for people who are already committed to the node.js platform.
(2) Offloading compute-time from the server to the browser is a potential scenario but I'm not sure the need arises that often. Network latency is usually a more important factor these days. If you're doing something like creating an SVG graphical rendition of an XML data set, then there's certainly a performance argument for doing it client-side, and Saxon-JS can help with that. As soon as the visualisation becomes interactive (e.g. with ability to zoom in on detail) then doing it client-side gives a much better user experience.
(3) Not really sure what you have in mind here. If you want to test with a particular version of Saxon, then you have to use that version.
Please register to reply