Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Planning issue: Synchronous Editing #609

Open
4 tasks
divyabaid16 opened this issue May 15, 2019 · 19 comments
Open
4 tasks

Planning issue: Synchronous Editing #609

divyabaid16 opened this issue May 15, 2019 · 19 comments

Comments

@divyabaid16
Copy link
Contributor

divyabaid16 commented May 15, 2019

I would like to complete the following task in Synchronous editing as part of my GSoC

  • Real-time multi-user image placement
  • Low latency API using sockets
  • Testing
  • Documentations

@ViditChitkara I would like to discuss it with you too. I'm aware about your exams but tagging you here so that you have a look once you're done with your exams.

@divyabaid16
Copy link
Contributor Author

@jywarren @SidharthBansal @gauravano how do I get the label and edit rights here?
And should we create a different project for Synchronous editing?

@SidharthBansal
Copy link
Member

Yeah, It will be great to have a project too. @jywarren please give her rights. i don't have permissions to distribute permissions.

@SidharthBansal
Copy link
Member

You can remove FTO from the checklist. FTOs are complimentary.

@divyabaid16
Copy link
Contributor Author

I have updated it 😄

@SidharthBansal
Copy link
Member

  • Real-time multi-user image placement
  • Low latency API using sockets

Can you please divide this further so that we can have much more modularity in reviewing the tasks?

@SidharthBansal
Copy link
Member

SidharthBansal commented May 21, 2019 via email

@grvsachdeva
Copy link
Member

Hi @divyabaid16, yes it's better to create a separate project for Synchronous editing. Also, try to label issues of mapknitter now, I think @jywarren added mapknitter to access the list of SoC. Let us know if you're still having problem with editing/labeling issues.

Also, I saw that you have shown interest in Image management in #608. So, would you be working on both Image Management and Synchronous editing in parallel? Thanks!

@divyabaid16
Copy link
Contributor Author

I think @jywarren added mapknitter to access the list of SoC. Let us know if you're still having problem with editing/labeling issues.

I checked it just now again and I still don't have the privileges.

Also, I saw that you have shown interest in Image management in #608. So, would you be working on both Image Management and Synchronous editing in parallel? Thanks!

I was planning to first finish up with the task of Image Management and then go with Synchronous Editing.
But if needed at a later stage, I may start up with Synchronous Editing early before finishing the Image Management Part.

Thanks!

@grvsachdeva
Copy link
Member

As @ViditChitkara has only proposed for Synchronous editing, so maybe we can let him start with it first and you can start with Image management. After completing Image management, you can join Synchronous editing? What do you think @divyabaid16?

@grvsachdeva
Copy link
Member

@jywarren the labeling rights are still not in place. Maybe, try changing the access to write type - https://github.com/orgs/publiclab/teams/soc/repositories here? Thanks!

@ViditChitkara
Copy link
Member

Hi @divyabaid16 , @gauravano , we may discuss the synchronous editing part here like how shall we approach it. Then we may split the tasks among us. Does that make sense?
Thanks

@divyabaid16
Copy link
Contributor Author

That's great @ViditChitkara
Thanks!

@ViditChitkara
Copy link
Member

Hi @divyabaid16 @jywarren Circling back to this, I think:-

  1. We'll be requiring action cable(implemented in plots2) to have real time updation of the image placement on map.
  2. Everytime an image is placed or the dimensions are saved for the placed image, all the information related to the image(url, dimensions, position, etc.) will be sent to the action cable server which will be broadcasted to the users connected to a particular room.
  3. Hence for this, we'll be needing an API in plots2 project which will receive the image changes in a particular format and will be communicating with action cable.

Thoughts on this? I think we need more detailed steps implementation.
Thanks

@jainaman224
Copy link

Looks good to me. 👍

@ViditChitkara
Copy link
Member

Left some comments on #685 . Will start with the action cable part on the rails 5 upgrade branch

@jywarren
Copy link
Member

jywarren commented Jul 2, 2019

Thanks, all! And, perhaps we would need to begin developing some event handlers/listeners for events in Leaflet.DistortableImage, and planning out what those are, like updatePosition, createImage, deleteImage as well as figuring out whether there are image.setPosition() methods so that we can connect those events to ActionCable in JS? https://github.com/publiclab/Leaflet.DistortableImage/

And deciding on the syntax for such updates to be made - some kind of JSON syntax like:

{
  'image_id': 1241251,
  'corners': [
    {...}
  ]
}

Perhaps it could be based around this format, but would we be sending a JSON collection of all updated images, or one at a time? I think all at once, in an array, esp. if multiple images are being moved at once:

https://github.com/publiclab/Leaflet.DistortableImage/blob/d9347144917d60c3cd81694c3f38131dc33f0902/src/DistortableCollection.js#L314-L344

Finally, what are the possible responses: success rejected (meaning another edit happened while this was being transmitted?) etc -- and how do we handle such responses (would reject contain a new image position from the server?)

This all can occupy us quite a bit while Rails 5 and ActionCable come online, and we can develop careful spec (and tests) for these possibilities. How does that sound? And, please feel free to link to relevant sections of your proposals to plan this out. Thanks all!

@ViditChitkara
Copy link
Member

Yes, I think we should send json of all images (which are updated at once). We could freeze the image being placed by a particular user in all other systems. Maybe the reject function will tell the browser to freeze editing of that particular image. This way there won't be conflicting versions of an image.

I found an article based on building collaborative editors. However, this is for text only and our requirement is image editing and placements. However the algorithm used here can still be handy. This is based on Operational transformation used by google docs.

So, are we good to go with action cable then? Will make a pr for it. @jywarren @jainaman224 @divyabaid16
Along with the action cable part, I'll start with writing all the events and handlers as well in Leaflet. DistortableImage.

Seems good?

@jywarren
Copy link
Member

jywarren commented Jul 2, 2019 via email

@ViditChitkara
Copy link
Member

Left some comments on #805 . Any help here would be appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants