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

Implement WebSocketServer Adapter #5866

Merged
merged 4 commits into from
Jul 30, 2019
Merged

Implement WebSocketServer Adapter #5866

merged 4 commits into from
Jul 30, 2019

Conversation

dplewis
Copy link
Member

@dplewis dplewis commented Jul 30, 2019

This PR allows users to implement their own WebSocketServer to use with Live Query Server.

Good for handling issues such as performance, dealing with faulty connections, handling authentication and authorization, or scalability.

I've added an interface for WSS Adapters. Let me know if anything should be changed or questions

I also created a gist of another WSSAdapter the uses uWebSocket.js.

@dplewis dplewis changed the title Implement WebSocketServerAdapter Implement WebSocketServer Adapter Jul 30, 2019
Copy link
Member

@davimacedo davimacedo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. LGTM!

@davimacedo
Copy link
Member

davimacedo commented Jul 30, 2019

I was supposing that the tests have passed. I've just noticed there are still some failing tests. Let me know if you need any help.

@davimacedo davimacedo self-requested a review July 30, 2019 02:05
@dplewis dplewis requested a review from TomWFox July 30, 2019 03:51
@dplewis
Copy link
Member Author

dplewis commented Jul 30, 2019

@davimacedo Can you give it another look?

@codecov
Copy link

codecov bot commented Jul 30, 2019

Codecov Report

Merging #5866 into master will increase coverage by 10.54%.
The diff coverage is 92%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master    #5866       +/-   ##
===========================================
+ Coverage   83.12%   93.67%   +10.54%     
===========================================
  Files         151      153        +2     
  Lines       10621    10636       +15     
===========================================
+ Hits         8829     9963     +1134     
+ Misses       1792      673     -1119
Impacted Files Coverage Δ
src/ParseServer.js 97.41% <ø> (ø) ⬆️
src/LiveQuery/ParseLiveQueryServer.js 90.06% <ø> (ø) ⬆️
src/Adapters/WebSocketServer/WSSAdapter.js 100% <100%> (ø)
src/Options/index.js 100% <100%> (ø) ⬆️
src/Adapters/WebSocketServer/WSAdapter.js 100% <100%> (ø)
src/Options/Definitions.js 100% <100%> (ø) ⬆️
src/LiveQuery/ParseWebSocketServer.js 82.6% <84.61%> (-12.13%) ⬇️
src/RestWrite.js 93.56% <0%> (ø) ⬆️
... and 4 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7c8e940...3b1edfd. Read the comment docs.

Copy link
Member

@davimacedo davimacedo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@dplewis dplewis merged commit 218c349 into master Jul 30, 2019
@dplewis dplewis deleted the wssAdapter branch July 30, 2019 14:05
@dplewis dplewis mentioned this pull request Jul 31, 2019
UnderratedDev pushed a commit to UnderratedDev/parse-server that referenced this pull request Mar 21, 2020
* Implement WebSocketServerAdapter

* lint

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

Successfully merging this pull request may close these issues.

2 participants