PolyProcessInterface / ppi

2 stars 2 forks source link

Maybe try to convert NodeProcess into an Interface for easier implementation #76

Open n-peugnet opened 4 years ago

n-peugnet commented 4 years ago

I am not sure yet if this will be better with an interface than with an abstract class but we can try.

n-peugnet commented 4 years ago

After some thinking, we should

  1. add two interfaces:
    • Infrastructure
    • NodeProcess
  2. rename the current Infrastructure and NodeProcess into AbstractInfrastructure and AbstractNodeProcess
  3. finally try to remove AbstractNodeProcess by removing the infra property and accessing the current Infrasctructure through a static method in Ppi (e.g. Ppi.infra())

The problem with (3.) is that, currently, I think (but not sure) PeersimInfrastructure is cloned so that each NodeProcess has its own instance. Anyway this could be changed as it could work with only one instance of PeersimInfrastructure