Skip to content

Collaborative Sobamail Applications

Now that we seem to have a convergent implementation, let's test the waters by creating a private instance that can be used across replicas of our mailbox.

It takes two distinct steps to ship a Sobamail application to end users:

  1. Deployment
  2. Instantiation

Lets cover each one in detail:

Deployment

Deployment (aka freezing) is the process of generating a structured message that contains the digest values of all components of a Sobamail application along with miscellanous metadata.

  • The digest values of the backend module and its imports are all computed separately. All JS modules from all apps are deployed to a common folder shared by all Sobamail applications.
  • As for the frontend assets, a zip file is created from the contents of the assets/ folder in the develroot which is used as input to digest computation.

    If you used a frontend framework, be sure to run a release build before performing the deployment operation.

Now let's do this for our Counter app:

  1. Navigate to the app develroot.
  2. Don't forget to abort the npm run dev-watch job if it's still running.
  3. Change to the ui/ folder and run npm run build. If all went according to plan, you should now have the release build of the app frontend in the assets/ folder in develroot.

Now launch Sobamail and open the Application Manager:

  1. Go to "Instances" screen and find your app. Ensure that it's the correct appinst value and also remember that it must be in in developer mode.
  2. Click the radio button next to your app and click the Deploy button at the top of the screen.

    • If all went well, you should see your app in the "Known Apps" screen.
    • If not, check Sobamail logs, fix the errors shown there and try again. Some common mistakes:

      • Ensure you have the correct hashes for imports
      • Ensure your version is greater than all deployed versions
      • Ensure the appid on the Mutator module matches the one on the "Instances" table.

Instantiation

Now that your Application is deployed, you can instantiate your application to use it.

While app deployment freezes the app, app instantiation assigns it a data store. and start using it. You can keep your app instances private or share it with as many Sobamail users as you like. It's also possible to add collaboratos to your app after instantiation.

However, currently apps can only be instantiated in private mode. Multi-mailbox app support is yet to be finalized. Stay tuned.