You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/06/01 11:12:36 UTC

[GitHub] [pulsar] eolivelli commented on pull request #10697: [fix #9640] remove `pulsar-client-admin-api` dependency : `pulsar-common`

eolivelli commented on pull request #10697:
URL: https://github.com/apache/pulsar/pull/10697#issuecomment-852040257


   > 1. Actually, I do not get this point very clear, it would be great if you could give me more background about how you came up with this idea?
   
   You can try to write a simple client program that uses the new Admin API without using the "Impl" classes.
   If we model the POJOs/Beans with interfaces then the user may try to use a custom implementation of the interface.
   
   Having interfaces makes sense for the users who "read" data, actually the implementation will be provided by the runtime.
   But when you come to use APIs (like createCluster) that need an implementation of the interface then you are stuck in using something that is not part of the "public API".
   The Public API must be the only thing that you need in order to use the API.
   
   
   `createCluster` wants an implementation of `ClusterData` but you cannot provide it if you do not use the *Impl classes.
   I am assuming that the *Impl classes are "implementation details", and must not used explicitly but the client.
   otherwise we are not really splitting the API in some "API part" (public) and "Implementation part" (hidden, not usable directly)
   
   if we want to go this way we must provide builders or factories for all of the new interfaces, like we do with the Schema API (for instance Schema.AUTO_CONSUME());
   
   Apart from this problem, this is a big breaking change, that we should do with care, and probably it is not safe to do it for 2.8.0 and we have to postpone it to 2.9.0 (or even 3.0.0??)
   
   I believe the this is one of the cases where a PIP is a good way of working (the community meeting is informal and not everyone is able to attend)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org