Uploaded image for project: 'RAML Module Builder'
  1. RAML Module Builder
  2. RMB-796

ClientGenerator: add new HttpClient constructor, explain "close"

    XMLWordPrintable

    Details

    • Template:
    • Sprint:
      CP: sprint 110, CP: sprint 111, CP: sprint 112
    • Story Points:
      2
    • Development Team:
      Core: Platform

      Description

      Vert.x best practice:
      To allow for pooling and pipelining one Verticle has exactly one HttpClient that is reused. Only when the Verticle stops (= terminates) the HttpClient is closed.
      The same applies to WebClient that is based on HttpClient.

      ClientGenerator creates clients with constructors that take a tenantId. The constructor creates a new WebClient which creates a new HttpClient for each tenantId. These constructors should be deprecated. Some RMB based modules might call the constructor for each request.

      Instead the constructors should take an HttpClient and the constructor should use https://vertx.io/docs/apidocs/io/vertx/ext/web/client/WebClient.html#wrap-io.vertx.core.http.HttpClient-io.vertx.ext.web.client.WebClientOptions- to create a WebClient based on an existing HttpClient. This will allow for pooling and pipelining and therefore will result in better performance and less memory usage.

      The generated constructors should have javadoc that explains how to use them according to Vert.x best practice.

        TestRail: Results

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                julianladisch Julian Ladisch
                Reporter:
                julianladisch Julian Ladisch
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:

                    TestRail: Runs

                      TestRail: Cases