You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by GitBox <gi...@apache.org> on 2021/11/23 14:48:48 UTC

[GitHub] [ignite-3] ptupitsyn commented on a change in pull request #466: IGNITE-15307 Thin 3.0: Reuse Netty infrastructure from network module

ptupitsyn commented on a change in pull request #466:
URL: https://github.com/apache/ignite-3/pull/466#discussion_r755198597



##########
File path: modules/network-api/src/main/java/org/apache/ignite/network/ClusterServiceFactory.java
##########
@@ -1,37 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.network;
-
-import org.apache.ignite.configuration.schemas.network.NetworkConfiguration;
-
-/**
- * Cluster service factory.
- */
-public interface ClusterServiceFactory {

Review comment:
       1. It is kind of related to the original problem, because the interface is affected, and now depends on Netty. I'm in doubt regarding introducing a dependency on Netty in ignite-network-api.
   
   2. No code depends on this interface. It is not passed anywhere as a parameter or anything else. An interface is useful when you can pass a different implementation somewhere, but this is not the case here. As you can see, we have removed the interface easily and everything still works as is, including tests which use a different implementation (`TestScaleCubeClusterServiceFactory`).
   
   In fact, it is harmful because it makes the code harder to understand. You look at it and think "it must have a purpose", but it does not have any.




-- 
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: notifications-unsubscribe@ignite.apache.org

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