Session

MLE FFI - When PL/SQL is the foreigner in Oracle database

We all know PL/SQL as the prime first-class citizen native procedural language inside the Oracle database - when doing procedural development you just can't get any closer to the data than working with the PL/SQL engine.

In the innovation release 21c a new engine was introduced inside the database: the Multilingual Engine - MLE for short. The idea is to support multiple languages for creating stored procedures within Oracle. Currently MLE is basically Unilingual as it supports Javascript only, but the engine may be expanded to support other languages in the future.

So now we can write stored procedures in Javascript where we may take advantage of an alternative language that for some use-cases may be easier to work with than PL/SQL. All is fine, right?

Well, when we work in Javascript context, PL/SQL is suddenly "the foreigner". It can easily be a somewhat convoluted way to call a PL/SQL stored procedure from inside our Java stored procedure (or at least lengthy and verbose code). This does not lead the developer to want to seamlessly blend Javascript and PL/SQL in a project.

Enter the new kid in Oracle Database 23ai release 23.7: the Foreign Function Interface - FFI for short. FFI's are interfaces in one programming language to enable using a foreign programming language in an easy way that makes it appear like the foreign functions are part of the host programming language. In this case, PL/SQL is the foreigner in Javascript, and the mle-js-plsql-ffi API enables you to call PL/SQL much more seamlessly from your Javascript code in your MLE Javascript stored procedure than before release 23.7.

This session showcases MLE FFI, comparing it to how you would call PL/SQL from Javascript before release 23.7, demonstrating some use-cases where blending Javascript and PL/SQL can make sense.

Kim Berg Hansen

Lead Software Developer, Cegal Danmark A/S | #Oracle #SQL #PLSQL #SYM42

Middelfart, Denmark

Actions

Please note that Sessionize is not responsible for the accuracy or validity of the data provided by speakers. If you suspect this profile to be fake or spam, please let us know.

Jump to top