cph-cachet / carp.core-kotlin

Infrastructure-agnostic framework for distributed data collection.
https://carp.cachet.dk/core/
MIT License
21 stars 3 forks source link

Better abstractions for current concrete tasks and measures: `ConcurrentTask`, `PhoneSensorMeasure`. #211

Closed Whathecode closed 3 years ago

Whathecode commented 3 years ago

The current concrete classes for TaskDescriptor and Measure (ConcurrentMeasure and PhoneSensorMeasure) were introduced very early on. We have since learned a lot, and are in the process of adding new measures and tasks. This makes it a good time to re-evaluate whether we like the current concrete abstractions.

ConcurrentTask:

PhoneSensorMeasure:

ActiveTask (working title):

Changing our current concrete tasks and measures accordingly will make code on client runtimes more reusable. They can act upon these common abstractions in a uniform manner.

Whathecode commented 3 years ago

@ltj I finally wrote up the refactoring requirements here for the upcoming WebTask as part of our technical meeting. Could you please have a proofread and see whether I am missing anything we discussed?

bardram commented 3 years ago

The ActiveTask is what i called a AppTask in CAMS.

Whathecode commented 3 years ago

I will omit the ActiveTask, which we ended up deciding to call InteractiveTask from this issue. It might still be needed, but it is unknown which members are common to these tasks at this time, and thus whether an intermediate abstract type is necessary.