Persisting Decorations

I’m using the collab example to create some comment-like decorations.

I noticed in the example that the comment “events” were stored separately (as unsentEvents), and those events were sent to the server and persisted. I was originally considering serializing my DecorationSet class instead, and I was wondering what the best option would be to store decorations in a a database?

Thanks!