clicketyclackety / Crash

A multi-user implementation of Rhino3d
MIT License
37 stars 5 forks source link

Crash does not check existing geometry for Speck IDs #16

Open clicketyclackety opened 1 year ago

clicketyclackety commented 1 year ago

Describe the bug If a project is opened with existing geometry, crash will download and add new specks over the top of existing ones, even if there is pre-existing data with speck IDs.

To Reproduce Steps to reproduce the behavior:

  1. Create a server, add geometry
  2. release or don't release.
  3. Save the project locally
  4. Close the server
  5. Re-open the model
  6. Connect to the server

Expected behavior There should be no duplicate items

Version Info (please complete the following information):

Additional context How this bug is solved is up for grabs. There's quite a few different solutions available;

  1. Crash checks for existing specks before downloading any new ones and handles duplicates there.
  2. Crash checks on the AddItem event to prevent duplicates.

In either case. Branch needs to reconnect the existing items and the ones on the server.

cwensley commented 1 year ago

Here's a question, should connecting to a server create a new document? My thought would be yes otherwise there will be tons of additional geometry that you can see that others do not.. unless there's a scenario where that makes sense?

karimi commented 1 year ago

I agree with Curtis at least as the short term solution. The whole offline workflow and syncing up changes need a lot of thinking and I think Curtis’s suggestion circumvents that. That way “startShare” means more like “start shared session” as opposed to “make this a shared model” But obviously I think the end goal should be to handle offline changes and be able to have a truly shared model.

On Sun, Nov 13, 2022 at 12:08 PM Curtis Wensley @.***> wrote:

Here's a question, should connecting to a server create a new document? My thought would be yes otherwise there will be tons of additional geometry that you can see that others do not.. unless there's a scenario where that makes sense?

— Reply to this email directly, view it on GitHub https://github.com/clicketyclackety/Crash/issues/16#issuecomment-1312810493, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAVEBTNFF6LQLZLJNQZXOOTWIFDFTANCNFSM6AAAAAAR5ZI3HA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

clicketyclackety commented 1 year ago

Appreciate the feedback @cwensley & @karimi . I can't think of many scenarios where you'd want to have geometry no one else can see.

I suggest then that a message asking the user if they want to include existing geometry or start an empty document would be a good solution.

It'd be quite easy to offer a command line option and a method to take all the existing geometry and add it all to the databse similar to how we add new items 😊