Using Communication Objects > SharedObject object > Using shared object slots effectively |
![]() ![]() ![]() |
Using shared object slots effectively
The decision to encapsulate shared object data in a single slot (SharedObject.data
property) or to spread it among multiple slots depends partially on how your application posts changes to the object. For example, if your application needs to send an entire array of strings to all of the connected clients at specific intervals, you can store the entire array in a single slot.
On the other hand, if your application needs to send only information that has changed, then you should divide the data among multiple slots. This implementation reduces network traffic and thus enhances the performance of your application. It also minimizes the need for conflict resolution code, as multiple slots can be updated simultaneously without data collision.
![]() ![]() ![]() |