[ 
https://issues.apache.org/jira/browse/GEODE-7808?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17056491#comment-17056491
 ] 

ASF subversion and git services commented on GEODE-7808:
--------------------------------------------------------

Commit 1259b18045be7cf6116f3501fc57e928ac11c0c2 in geode's branch 
refs/heads/develop from Bruce Schuchardt
[ https://gitbox.apache.org/repos/asf?p=geode.git;h=1259b18 ]

GEODE-7808: standardize on use of HostAndPort for connection formation  (#4778)

* GEODE-7808: standardize on use of HostAndPort for connection formation

Adding two tests that limit the use of InetAddress and of
InetSocketAddress.getAddress().  Ideally we could whittle down the
list of exceptions currently being "sanctioned" by the InetAddress test.

I tried using the PMD tool that's already built into our gradle builds
to perform these restrictions but it fails with parsing errors.  Instead
I turned to the "decode" package that's used by
AnalyzeSerializablesTestBase and refactored that into a Rule that can be
used by any test to load its module's class files in partially
decompiled form.  I added a couple of query methods to CompiledClass to
search for uses of InetAddress and InetSocketAddress.getAddress().

The InetAddress test turned up 74 violations.  I removed some of these
by getting rid of unnecessary code or moving it to LocalHostUtil and
categorized the other violations and moved them into a "sanctioned" list
that we should work on making as small as possible.

* adding missing test and rule

* finished analyzing classes having InetAddress in method signatures

* modified the test to only restrict InetAddress lookup by name

* added another test to restrict use of Admin API's InetAddress utilities

> standardize on use of LocatorAddress/HostAddress for connection formation
> -------------------------------------------------------------------------
>
>                 Key: GEODE-7808
>                 URL: https://issues.apache.org/jira/browse/GEODE-7808
>             Project: Geode
>          Issue Type: Improvement
>          Components: membership, messaging
>            Reporter: Bruce J Schuchardt
>            Assignee: Bruce J Schuchardt
>            Priority: Major
>             Fix For: 1.13.0
>
>          Time Spent: 7h 40m
>  Remaining Estimate: 0h
>
> We currently use InetAddress and InetSocketAddress in many places to identify 
> locators, servers and peers.  Some work has been done in the past couple of 
> years to reduce the use of these in order to accommodate changes in IP 
> addresses due to various causes.  The class LocatorAddress was created to 
> help with this and it is able to hold a host name without resolving it until 
> that resolution is needed to form a tcp/ip connection.
> These days we are seeing more and more movement into cloud computing and the 
> need to accommodate IP address changes is becoming a bigger issue.  To that 
> end we would like to  change our primary client/server and WAN communication 
> interfaces to stop taking InetAddresses and InetSocketAddresses as arguments 
> and, instead, take something like a LocatorAddress that can hold an 
> unresolved hostname that our communication implementations will resolve when 
> needed.
> To that end we should also remove the hostname->inetaddress cache in 
> SocketCreator and rely on the operating system's DNS cache.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to