Understanding and Using the ADAPA Web Services

Web Services (WS) are quickly becoming the method of choice for connecting systems with one another in a standardized way. By allowing information exchange and communication regardless of programming language or operating system, Web Services are proven to lower integration costs.

One of the main missions of ADAPA® is to turn predictive models into Web Services that can be easily integrated with business and industrial applications. All predictive models and business rules deployed in ADAPA® are automatically available to be invoked as Web Services and provide scores and decisions whenever and wherever necessary. For this reason, ADAPA offers three services for Predictive Models which are listed in more detail below.

  • Models Web Service: This web service allows client applications to remotely manage and apply predictive models with operations to import, export, describe, remove and apply one or more models against one or more data records.
  • RPC Web Service: This web service exposes each uploaded predictive model as a separate RPC (Remote Procedure Call) operation. The name of the model becomes the name of the operation, the input mining fields of the model becomes the operation's input parameters and the predicted mining field of the models becomes the output value.
  • REST Web Service: Manage and apply predictive models using RESTful API.

Models vs RPC: Differences between Web Services

The RPC Web Service was designed with tool integration in mind. The idea was to expose each available model as a simple web service operation. The requests and responses for these operations consist of primitive types (string, long, double, etc.) that do not require construction and parsing of more elaborate XML structures. This simplifies the wiring of models into application and flows for a wide gamut of integration platforms. Typically, data from some source (e.g. a database) needs to be pushed through a model to be enhanced with the necessary predictions. With the RPC service, the data fields in the data source can be easily linked to the model inputs using some sort of graphical integration and flow editor. Likewise, the result of the model can be easily linked to the appropriate data destination.

The Models Web Service on the other hand is a more generic service offering more operations, including those for model management. This web service allows not only scoring data but also allows the user to perform operations like import, delete and get model information. In addition, this web service offers more options in scoring. For example, it supports scoring one or more records against one or more models, as well as scoring of CSV files where data are provided as attached CSV files.

The question of speed

Regarding speed, if you were to score one record against one model using RPC and Models web service, you would not see much difference. However, when scoring large data sets the models web service would be a better option since the bulk scoring operations minimize the number of network operations and round trip calls.

Is summary, the choice between the two comes down to how would you want to interact with ADAPA using web service as well as the amount of data to be scored. If scoring one record at a time against one model is what you need, RPC Web Service is a good fit, especially when working in the context of an integration platform and a application flow. However, if you need to do more than that, i.e. perform model management operations or score multiple records or a CSV file against more than one model, Models Web Service is a good fit.


The WSDLs (Web Service Definition) for the Models and RPC Web Services are made available on the help page of the ADAPA® Console. The help page also contains the URL to the REST API. A snippet of the help page is shown below.


Article is closed for comments.
Powered by Zendesk