hackerwins / codepair-old

Real-time markdown editor for interviews, meetings and more...
https://codepair-old.yorkie.dev
Apache License 2.0
90 stars 29 forks source link

Redefine the worker and container roles #103

Closed ppeeou closed 3 years ago

ppeeou commented 3 years ago

What this PR does / why we need it?

Redefine the worker and container roles

Container

Worker

After the worker finishes the work, requests such as drawing on the canvas are transferred to the container by calling emit.

Why? In the existing state, it was difficult to expand the function.

Any background context you want to provide?

What are the relevant tickets?

Fixes #

Checklist

hackerwins commented 3 years ago

It would be nice to review this issue with other members. May I ask @dc7303 and @mojosoeun?

dc7303 commented 3 years ago

It would be nice to review this issue with other members. May I ask @dc7303 and @mojosoeun?

Of course. I will review this PR with interest. :D

mojosoeun commented 3 years ago

It would be nice to review this issue with other members. May I ask @dc7303 and @mojosoeun?

Sure 🙂

ppeeou commented 3 years ago

Thank you for your work.

Can you please tell us where is the code works asynchronously? I think it will help us to think about if we can get bugs caused by asynchronous logic.

When the scheduler.reserveTask function is executed, the scheduled function is periodically called asynchronously.

https://github.com/yorkie-team/yorkie-codepair/pull/103/files#diff-84d5700e7b4d79cf8ff79390c74179938bec166885c860f376f38deb4c834537R50

How about checking the bug in the next task??🤔

hackerwins commented 3 years ago

@ppeeou In this PR, I also fixed some parts I want to apply for, so I would like to receive approvals from @mojosoeun and @dc7303.