microsoft / AMBROSIA

Robust Distributed Programming Made Easy and Efficient
https://microsoft.github.io/AMBROSIA/
Other
419 stars 49 forks source link

Refactor so shard / non-shard cases can use the same code #112

Open saj9191 opened 4 years ago

saj9191 commented 4 years ago

The shard / non-shard cases in CRA use different API. Ideally, we would have a base class for the common API and have the shard case inherit from the base class + either VertexBase or ShardedVertexBase. However, C# does not support multiple inheritence.

To get around this, we move the initialized methods into an non-shard case that calls the original Ambrosia initialize function. This way we can easily add the sharded case.

To make this cleaner and potentially easier to test, we move this logic into a different file.