DesignAndDeploy / dnd

Design and Deploy is a framework for developing applications for intelligent environments
Apache License 2.0
3 stars 0 forks source link

Migrate FunctionBlocks #32

Open Patagonicus opened 11 years ago

Patagonicus commented 11 years ago

As mentioned in #18 a way to migrate FunctionBlocks from one to another would be nice. This probably can't be done if the block isn't designed for it, but we could use a marker to let the programmer specify if it is possible. The general process to migrate a FunctionBlock should be:

Maybe having suspend()/resume() methods could be enough of a marker.

schnabeltrei commented 11 years ago

We could use parts of the BlockMessage interface. It already provides basic capabilities for starting a (de)serialized block. Maybe we can also use parts of the serialization code in deploy.

Patagonicus commented 11 years ago

Yes, we should be able to just use BlockMessage to move the Blocks between modules, but that may not work for all blocks, so having a way for them to react to a migration would be nice.