I am having thoughts about building PLR to have a universal api between machines.
We rarely benefit from this:
- machines are often not exactly the same, so the abstraction is necessarily leaky or you hurt power over machines
- changing out the physical hardware is already some amount of work
- claude can easily rewrite the code to use a new api, this is essentially 0 effort (esp compared to (2))
where it does help:
- some machines like heater shakers are like exactly the same
- for plate readers, you probably want to have a standard data format. similar for other analytical machines. (but this can be loose rather than rigid)
- for plate definitions and the resource model in general, sharing that is actually useful
- certain features like volume tracking are best shared?
- we are starting to have different liquid handling devices, like echo/idot/mantis etc. which are liquid handlers but do not use the liquid handling capabilities. It is already the case that we have multiple
dispensefunctions. I haven’t figured out how to make them nicely share this call, so wondering if it’s the right abstraction
- we are starting to have different liquid handling devices, like echo/idot/mantis etc. which are liquid handlers but do not use the liquid handling capabilities. It is already the case that we have multiple
- the io layer is pretty nice to share
obviously we do benefit from sharing code between machines.
However, it hurts the user API if we enforce universal apis. For example, it introduces complexities like “backend kwargs” (v0) or “params” (v1).
In the past when writing code was more manual and annoying, it made sense to want to switch out backends. Nowadays this doesn’t really hold up anymore. Claude/etc. is probably our #1 user so we might as well design the API for them
Higher level: is the driver layer (essentially what PLR is) is the right place for abstraction among devices? it might be something for the protocol layer/scientific intent.