1.2.1 Oracle Machine Learning for R Architecture for Oracle AI Database

OML4R has a client/server architecture based on Oracle AI Database and Oracle Client.

R engines run on the server computer and on each client computer. OML4R supports three key capabilities:

  • R Transparency

    OML4R packages on the client support R transparency, which enables Oracle tables to appear "transparently" as native R objects. OML4R packages provide transparent access to Oracle AI Database tables and views, enabling users to call standard R functions, which are translated into SQL transparently to the user for in-database execution.

  • Predictive Analytics and Machine Learning

    OML4R supports a wide range of parallel and distributed algorithms supporting predictive analytics and machine learning. This enables both scalability and improved performance, while leveraging a convenient R interface to in-database and database server-side algorithms.

  • Embedded R Execution

    OML4R packages, libraries, and R and SQL APIs on the server support the execution of user-defined R functions within SQL queries and PL/SQL statements. Embedded R execution spawns R engines that can run in parallel, for data-parallel and task-parallel execution. With embedded R execution, you can run user-defined R functions, possibly leveraging third-party packages. With facilities like the DBMS_SCHEDULER database package, you can schedule the execution of user-defined R functions for lights-out processing.

Figure 1-1 OML4R Client Server Architecture



The client and the server communication can take place through an OML4R SQL API. For example, SQL Developer. It can also be a configured OML4R R client.

The OML4R engines spawned from the database are R contained inside an external procedure managed by theOracle AI Database. The external procedure is a C program called by the database. It acts as a bridge to trigger the R engine and return the results back to the database.