Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Here's a start at listing the modules and their dependencies.

PlantUML
@startuml

package WAN {
}

package CacheServer {
}

package Client {
}


package Regions {
 
}

package Querying {
}

package Persistence {
}

package Statistics {
}

package Messaging {
}

package FunctionService {
}

package Advisors {
}

package Serialization {
}

package PDX {
}



WAN --> CacheServer
WAN --> Client
WAN --> Regions
CacheServerRegions --> CacheServer
Regions
Client -->Regions> Client
Regions-->Persistence
Regions-->Statistics
Advisors-->Messaging
Regions-->Advisors
Querying-->Regions
Regions->Messaging
FunctionService --> Regions
FunctionService --> Messaging
Messaging -> Serialization
PDX -> Serialization
PDX -> Regions
 

Each module should have at least it's own package(s), if not be in a separate gemfire- gradle module. Anything that is not part of the API for that module should only be package visible. Each module should have a clearly defined API, with tests for that module that cover the API. For example, if there is a method in the Region module to receive an event from the WAN, that should be part of the InternalRegion API and that API should be tested in the Region module.

 

Here Below is a high level view of the interfaces for each module and some of the changes that need to be made.

Statistics

Package:internal.statistics?

API interfaces/classes: Statistics, StatisticsFactory, StatisticsManager

Required changes: Move into a separate package. Pull the code out of InternalDistributedSystem (it currently implements StatisticsFactory) into a separate class. 

Messaging

Package:distributed.internal ?

API interfaces/classes: InternalDistributedMember, DM, InternalDistributedSystem, MembershipListener

Required Changes: InternalDistributedMember and InternalDistributedSystem should be interfaces, not concrete classes. They should only have the methods that are required by the rest of the system. The concrete classes like DistributionManager, the old InternalDistributedSystem class, etc. should not be referenced outside this package.

 

Advisors

Package: distributed.internal.advisor

API interfaces/classes: DistributionAdvisor, DistributionAdvisee

Persistence

Package: internal.cache.persistence

...

Required Changes: InternalDiskStore is new interface for DiskStoreImpl.

 

Regions

Package: internal.cache.region

API interfaces/classes: Cache, Region, InternalCache, InternalRegion,

Required Changes: InternalRegion is new interface for LocalRegion. GemfireCacheImpl, LocalRegion, etc. should not be used outside this package.

 

WAN

Package: internal.cache.wan

API interfaces/classes: AsyncEventQueue, GatewaySender

Required Changes: Region code should be refactored to not have direct dependencies on this package. For example, WAN should be notified through a listener installed on the region. The listener interface will be part of the region package.

 

FunctionService

Package: internal.cache.execute

API interfaces/classes: FunctionService, Execution, Function

Required changes: Region code should be refactored to not have direct dependencies on this package. For example, LocalRegion should not have function execution code in it.

 

Server

Package:internal.cache.tier.sockets (change this?)

API interfaces/classes: CacheServer, CommandInitializer, BaseCommand

Required Changes: Commands (the server side code for a client-> server message) for other modules (eg WAN) should be moved to their respective packages and registered with CommandInitializer.

 

Client

Package: internal.cache.client

API interfaces/classes: AbstractOp, ExecutablePool

Required Changes: Operations (The client side code for client-> server messages) for other modules should be moved to their respective packages.