mcoffin / errybody

GNU General Public License v3.0
0 stars 0 forks source link

User should be able to query framework api for status info #2

Open mcoffin opened 7 years ago

mcoffin commented 7 years ago

User should be able to query a RESTful api to get the following information about task statuses.

Endpoint Method Info
/slaves GET List of task statuses by slave
/slaves/:id GET Task status for the given slave
mcoffin commented 7 years ago

This could be a little problematic given how the scheduler state is currently managed via a StateT monad transformer in the scheduler. With this approach, the scheduler will have to initiate the API, which isn't the end of the world, but certainly isn't ideal. It would be nicer if the API were initiated as a separate component, and the StateT SchedulerState monad transformation were moved to Main.

mcoffin commented 7 years ago

Likely, a good solution to this problem ^ will be to just have the Scheduler store it's state in an STRef at the end of each loop. That, or we could move the state management in to Main, but that's not super ideal.