turcsanyip commented on PR #10031:
URL: https://github.com/apache/nifi/pull/10031#issuecomment-3093937799

   @mark-bathori Thanks for putting this together!
   
   I checked the components and how to configure them and I would have a 
suggestion at high level:
   
   I feel a bit complex that two controller services and a processor need to be 
set up for a flow. Also, the bucket/scope/collection properties are configured 
in `Couchbase3ConnectionService` so a separate controller service is needed for 
each target collection. Bucket, scope and collection are lightweight objects so 
I do not think it is necessary to initialize them once and store them in the 
CS. The processor can pass the names to the service. Even more, they could come 
from FF attributes at runtime.
   
   So my idea would be:
   - `CouchbaseConnectionService` CS interface 
(`Couchbase3ConnectionService`implementation) with method:
   CouchbaseClient getClient(String bucket, String, scope, String collection, ?)
   - CouchbaseClient regular (non-CS) interface (`Couchbase3Client` 
implementation) with methods `getDocument()`, `putDocument()`, etc.
   
   I believe this fits better to the "Kafka pattern". In my opinion, 
`CouchbaseClientProviderService` name would be more appropriate for the CS 
(like in case of `SmbClientProviderService`) but `CouchbaseConnectionService` 
is also fine (like the Kafka service).
   
   What do you think?
   
   @exceptionfactory @pvillard31 Could you please share your thoughts as well?


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to