简体   繁体   中英

What is the main difference between using REST API instance App Server and normal HTTP WEB API server in Marklogic

With mlNoRestServer=true in gradle, we could disable creating REST api instance app server. Basically, we could set up a WEB API without using the recommended REST API instance app server.

I want to seek what is the advantage of using the REST API instance app server. My understanding is that once we use REST API instance app server, by default that app server will have those features . Am I right?

The feeling about recommended REST API instance approach is that all ML training demo projects using REST API instance app server. With REST API instance, one could extend its service via either REST API service approach or DS approach.

However, my current understanding is that we could implement exactly the same features with a normal HTTP server in ML without using REST API instance app server.

The REST API is an extensible REST application. It does alot for you. However, it comes at the cost of some layers of evaluation that you may not need. Nothing stops you from creating main modules on your own and doing direct execution.

In terms of "By Default, your application will have those features". Features available on port 8000, 8001, 8002 vary based on rewriters. The list you have is based on using the REST API itself to create a new REST instance and give a default set of endpoints. ML-Gradle is a separate project. Although it currently does appear to match the information on the docs since it uses the v1 rest-apis endpoint, that could always change.

Your approach may benefit from MarkLogic Data Services rather then extending the REST API. It is a lightweight config file pointing to your code. Here is the link to a page about Data Services Declarations including OpenAPI . I listed this because from that page, you can see additional links to Java and Node.js

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM