Single shared object vs Multiple shared objects

I have a fairly straightforward conceptual question, regardless of the cost and purely on a scalability standpoint.

Is it preferable to have multiple shared objects, or a single one ?

I assume with Sui’s design, the more isolated we are, the faster and the less consensus we need. Having a single shared object which contains data for many users which they store themselves is simpler, but having a single shared object for each user seems more scalable as there will never be thousands of user interacting with the same object. What are your thoughts on this ?

2 Likes

Yes, this is broadly correct – if you can spread data across multiple isolated shared objects, you are less likely to get a hotspot on a particular object so it is better for consensus but note that if you need to access multiple different shared objects in one transaction, then that transaction will be bottlenecked by whichever shared object is hottest, so this optimisation requires that you don’t necessarily need to access data from many of these shared objects at once (in one transaction).

1 Like