Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[rest-dev] R: Proposal: Create a set of interface, api to standardize http client and Http ConnetionPool
  • From: Angelo Rubini <angelorubini@xxxxxxxxxx>
  • Date: Sat, 1 Mar 2025 10:57:46 +0000
  • Accept-language: it-IT, en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ErLGe5o3XJsROrA35RNr0ujwOuW0+JqC/nhswHf1ugU=; b=FsmTwH3agSs9e38HUjsJpR2KBo7pYzWPstLzh7eDnwo3KvyXRcjATzMNW3Tn6WQJmE/hN8aLgQh0AGLpNUjQXXNeX0o7uzUXzWt4/smoCrDQNXw9olc/u+o9KDw+q6O0Lw97wlbWie+pJ44uO9f5T1lUBnFHaUQOu48BFG2hJCXvQEDdqKugA0WsJSU2jyMM/Mnx9SFcBlIQuJ1HyiCttM27PIzTP6RRtpwwb8us9w4uLRHa8O3i8UosihIGAyHHkM+xA9EfJ5yVDHI+6UO5n5prPvg0Dqt16gxsi/6K8d/hhLVc5KCVTNb7RcOmXpNl1Jbkq8k4C3FraRTKwPjeFw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=aFV+u9PPpaXCyfum9zBf9f5L8syZBZPCW60w2ktyDJsZYx6EAYvUIQ5FVzzOnhkawLtgbMCXQsEk7d7YrRYifT1yn2Pp+0rQhxmrqpJnM+7GIMAi7KMR2F7J5btfpKthyruwNXrn5SjC5RhCxJCDq4la+klWJ+jT1PKHeSBRQLygt/XrGGv1G3H5/+VYZxvuh9TuP4uP4v5+rxzpFKD94IU3kgO/J8LuRDXL0lxI+F0Wu2uOb/l4MIC0MfJjArQqpT+lhuZfoDnXNcAXvDam+QRRDocKBahgJK7hfqQmnUNL/Uy5ZnI0XyT+bUNfq0ybv82+PfoPwFRaB+39tJn4TQ==
  • Delivered-to: rest-dev@xxxxxxxxxxx
  • List-archive: <https://www.eclipse.org/mailman/private/rest-dev/>
  • List-help: <mailto:rest-dev-request@eclipse.org?subject=help>
  • List-subscribe: <https://www.eclipse.org/mailman/listinfo/rest-dev>, <mailto:rest-dev-request@eclipse.org?subject=subscribe>
  • List-unsubscribe: <https://www.eclipse.org/mailman/options/rest-dev>, <mailto:rest-dev-request@eclipse.org?subject=unsubscribe>
  • Msip_labels:
  • Thread-index: AQHbiV1WFoQ+8A96U0aEs7TatUZ8N7Ncn1Z3gAA7qQCAAUO0Bw==
  • Thread-topic: [rest-dev] Proposal: Create a set of interface, api to standardize http client and Http ConnetionPool

Done

Thanks James....

Da: James Perkins <jperkins@xxxxxxxxxx>
Inviato: venerdì 28 febbraio 2025 16:38
A: Angelo Rubini <angelorubini@xxxxxxxxxx>
Cc: Jakarta Rest project developer discussions <rest-dev@xxxxxxxxxxx>
Oggetto: Re: [rest-dev] Proposal: Create a set of interface, api to standardize http client and Http ConnetionPool
 
FWIW you could do something like this already with CDI and have CDI producers to allow injecting the HTTP Client.

That said, this should be proposed as a new spec. There is a new spec proposal for a HTTP Server API specification this could potentially be part of https://github.com/jakartaee/platform/issues/673.


James R. Perkins

Principal Software Engineer

Red Hat



On Fri, Feb 28, 2025 at 4:18 AM Angelo Rubini <angelorubini@xxxxxxxxxx> wrote:
Hi James,

yes ok, but this setting is for all http connetion with the concept like that of the DataSource and the jdbc Connection, 
you could have a specific setting for each endpoint to which you want to make a request and create the same metadata also for http and https connections. 
By defining this datasource and connection pool of http connections on the application server, and the module that needs the connection requests it to the AS, which takes care of managing the connections, the pool and the authentication mechanisms.

Regards
Angelo Rubini


Da: rest-dev <rest-dev-bounces@xxxxxxxxxxx> per conto di James Perkins via rest-dev <rest-dev@xxxxxxxxxxx>
Inviato: giovedì 27 febbraio 2025 10:19
A: Jakarta Rest project developer discussions <rest-dev@xxxxxxxxxxx>
Cc: James Perkins <jperkins@xxxxxxxxxx>
Oggetto: Re: [rest-dev] Proposal: Create a set of interface, api to standardize http client and Http ConnetionPool
 
Is there a reason the JDK HTTP Client doesn't work for this? https://docs.oracle.com/en/java/javase/21/docs/api/java.net.http/module-summary.html

In either case, I don't think the Jakarta REST speci is a place to create an API like this. IMO if there was something wanted beyond the JDK HTTP Client, it should be a separate specification.


James R. Perkins

Principal Software Engineer

Red Hat



On Wed, Feb 26, 2025 at 5:11 AM Angelo Rubini via rest-dev <rest-dev@xxxxxxxxxxx> wrote:
Hello everyone,

I recently posted a proposal to standardize interface/api for http/https client implementations and the possible pooling mechanism.
Could it be a hook to leverage a standard API inside Jakarta RESTful Web Services that can also be leveraged by the standard MicroProfile Rest Client?

" into jdk-net channel
Proposal: Create a set of api,interface to standardize http clients (like internal jdk client, apache httpClient etc).
And also create, as done for jdbc, an example of an Interface as a DataSource: The DataSource interface is implemented by a driver vendor. There are three types of implementations:    1)Basic implementation -- produces a standard Connection object    2)Connection pooling implementation -- produces a Connection object that will automatically participate in connection pooling. This implementation works with a middle-tier connection pooling manager.        to also have a standard for the creation and management of http connection pools."
How do you think?

Regards
Angelo Rubini



Da: Angelo Rubini <angelorubini@xxxxxxxxxx>
Inviato: mercoledì 26 febbraio 2025 10:14
A: net-dev@xxxxxxxxxxx <net-dev@xxxxxxxxxxx>
Oggetto: Proposal: Create a set of interface,api to standardize http client and Http ConnetionPool
 
Hello everyone,

for a long time there have been various different implementations of clients to manage http and https connections as well as custom solutions,
to manage the connection pools of the same http/https connections.

Wouldn't it be a good idea to standardize a set of interfaces and APIs as done for database connections with jdbc and datasource?
It's nice to have an interface similar to https://docs.oracle.com/javase/8/docs/api/javax/sql/DataSource.html for Http Connection and  ConnectionPool.
Proposal: Create a set of api,interface to standardize http clients (like internal jdk client, apache httpClient etc).
And also create, as done for jdbc, an example of an Interface as a DataSource: The DataSource interface is implemented by a driver vendor. There are three types of implementations:    1)Basic implementation -- produces a standard Connection object    2)Connection pooling implementation -- produces a Connection object that will automatically participate in connection pooling. This implementation works with a middle-tier connection pooling manager.        to also have a standard for the creation and management of http connection pools.

How do you think?

Regards
Angelo Rubini

_______________________________________________
rest-dev mailing list
rest-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://accounts.eclipse.org

Back to the top