Migration

Application evolution in a  distributed environment creates some significant challenges.  The agent-centric approach used through Holochain's design and implementation gives us some some useful tools to meet those challenges.

A core capacity built into Holochain is the ability to migrate an application, that is to mark it is as closed and point to the new application and identity that activity has moved to for this agent.

There are at least three usecases we have in mind for migration:

  • transient app management: tracking data across short-lived apps (e.g. a chat room channel)
  • the "traditional" app migration: massage the shape of data to align with code changes
  • "in situ" data management: janitorial tasks for chains (e.g. log rotation)

Here's an article about our progress using migration.

migrate(type,DNAHash,key,data)

Commits a system type migration entry to the local chain with given migration type (HC.Migrate.Open or HC.Migrate.Close) as well as the DNA and identity hashes that identify the app migrated from or to, along with an unspecified user data block.

type: enum: HC.Migrate.Close | HC.Migrate.Open 

DNAHash: hash-string

Key: hash-string

data: string | object

Returns: hash-string