Xyna x Python
Xyna Bulletin #19
Dear friends, partners and customers of Xyna,
Today we are happy about a particularly nice topic - Xyna Factory is likely to win many new friends. Because with the current version of Xyna (10.1, available since October 4th) we support Python!
Calling Python scripts outside the factory has always been possible; this time, however, we are talking about fully integrated modules that can access all factory features, as has always been the case with Java.
You will also find an overview of the current supported base (system infrastructure) of Xyna at the end of the newsletter.
Enjoy reading!
Kind regards from Mainz,
Alexander & Philipp
Xyna GmbH
Dr. Alexander Ebbes & Philipp Dominitzki
::
Xyna x Python
Our Xyna Factory is implemented in Java, the most popular programming language in the world in the long term. Therefore, the programming of the so-called coded services is also done in Java. But of course we always keep our finger on the pulse: Coming from the field of data science and AI, Python is currently the hottest programming language for new developments. Python is valued for its ease of learning and its effective expression options.
That's why we are offering support for Python from Xyna Factory 10.1 onwards to develop coded services. These Python modules offer the full integration that you are used to from Java, such as access to variables in the workflow context. The original Python language scope is offered and any packages can be loaded and used. For example, the libraries from the Cisco Developer Network or the Automation Scripts from Juniper. There are almost no limits to the developer's imagination.
When implementing, we saw two major alternatives: Either we use Jython, a Python virtual machine implemented in Java, which essentially turns Python into a language executed by a JVM, like Scala or Kotlin. Or we use JEP, where CPython is used to run a "real" PVM alongside the JVM and the objects used together are exchanged in serialized form via JNI between both VMs. - We have chosen the second option. The first option was closer in integration, in particular there were no copied objects. But Jython still only supports the language scope of Python 2.7, which is no longer considered "alternative" but rather outdated. With JEP we can always use the latest leading Python implementation (currently 3.13) and are therefore always up to date.
So that Python programmers feel really at home in Xyna Factory, we have not slaughtered one of the "sacred cows" of the Java community, but have made it optional: the getter and setter methods. Java programmers consider these to be an almost mandatory criterion for good style. In Python, people rely on the shorter dot notation and consider this to be pragmatic and concise. We understand both approaches and their respective motivations. Therefore, Xyna Factory views these different programming cultures liberally and would like to welcome all Python programmers as first class citizens. To this end, we have implemented their native dot notation as an alternative syntax and added it to the JEP functionality. In this way, we enable every programmer to express themselves according to their own principles.
As always: if you want to find out more, contact us.
::
Xyna Supported Base / Autumn 24
Over time, Xyna's Supported Base is continuously updated. Driven by technical developments and new releases from manufacturers, as well as new requirements from our customers.
The current Supported Base (Xyna 10.1) is as follows: