Layer7 API Management

 View Only
  • 1.  XSLT vs Javascript

    Posted Aug 07, 2019 03:08 AM
    Hi,

    I would like to know which is the most reliable way to make a transformation. In my team we are looking forward to make JSON to JSON tranformations only. As per last 9.4 API Gateway we can achieve this using Javascript or transforming it to XML and apply XSL stylesheets. My question is about which way is more suitable in terms of performance? Because, from my perspective, Javascript is working over a Java layer which I think will not be very high performance but with XSLT you need to transform to XML, apply XSL and transform back. So which one would you use?

    Thank you in advance,

    Antonio


  • 2.  RE: XSLT vs Javascript
    Best Answer

    Posted Aug 12, 2019 11:03 AM
    Hi.

    The transformation from JSON to XML to JSON again seems heavier than transforming with javascript.
    But due the nature of tranformations involves a series of variables, you will only be sure making some tests and measuring the load on gateway.

    Follow some inputs from documentation:
    https://docops.ca.com/ca-api-gateway/9-4/en/learning-center/thinking-in-policy/policy-performance-optimization#PolicyPerformanceOptimization-DataTransformation

    ------------------------------
    Sr. Consultant Services
    HCL Enterprise Studio
    ------------------------------



  • 3.  RE: XSLT vs Javascript

    Posted Aug 13, 2019 02:31 AM
    Hi Leandro,

    Thanks for your reply, we'd probably go for Javascript but We will make some performance test to see the diference between them.

    Kind regards,

    Antonio