microsoft / jacdac

Device and service catalogs for Jacdac.
https://aka.ms/jacdac
Creative Commons Attribution 4.0 International
66 stars 25 forks source link

robust handling of roles in the VM #426

Closed tballmsft closed 3 years ago

tballmsft commented 3 years ago

register read/write failing during handler

pelikhan commented 3 years ago

I think we just want to handle read/write. User may have logic to handle missing roles.

tballmsft commented 3 years ago

@pelikhan, @mmoskal - the question here is what we should do on failure of an instruction (because of absence of a role, or bus problem). Options

Note that if a handler works with two roles, one of which is not present and we keep executing the handler partially, at some point the state could get very much out of sync. So there is also the question of what to do with a handler that has failed. We could

  1. retire the handler from execution and restart when its roles become available
  2. retire the handler from execution for a period of time and then restart I prefer option 1. Should we do this whenever a handler fails? Or must it fail N times (for small N).
tballmsft commented 3 years ago

fixed by https://github.com/microsoft/jacdac-ts/commit/f0e7ba6e242308296f97c12f565c5228e9e1afc4.

I only restart a handler when all its roles are bound.