This repository was archived by the owner on Feb 27, 2023. It is now read-only.
feat: implement @dcl/rpc#308
Merged
Merged
Conversation
Contributor
Test this pull request
|
menduz
reviewed
May 25, 2022
menduz
reviewed
Jun 1, 2022
fix hasManyPermissions to get permissions in a unique request
clean code, remove eventChannel
19 tasks
menduz
reviewed
Jun 15, 2022
kuruk-mm
previously approved these changes
Jun 15, 2022
Member
kuruk-mm
left a comment
There was a problem hiding this comment.
Great work! I tested it on Desktop and Web, and it's working smoothly! Congrats!
menduz
approved these changes
Jun 15, 2022
kuruk-mm
approved these changes
Jun 15, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What?
decentraland/sdk#313
Replace the
decentraland-rpcusage with@dcl/rpcin scenes.Why?
decentraland-rpcdoesn't support binary messages, an important feature to optimize the protocol and to implement the new ECS7.How to test
It's possible to test in every environment, just add
&kernel-branch=feat/implement-@dcl-rpcin the URL. The behavior should be the same as if the query parameter isn't added.The overhead added (temporary) is:
Some environment examples:
You have two paths in each environment, as a guest and with a wallet.
How the code was changed
@dcl/rpc host implementation
Path:
packages/worldNow, the
SceneWorkercreates the context with all the data before starting the system. This context is passed in all service methods and it can be patched by accessing theSceneWorkerobject and modifying therpcContextmember.Scene runtime implementation
Path:
packages/scene-systemThe
SceneRuntime.tswas rewritten, now the scene runtime consumeseventfrom the EngineAPI with a pushable channel, instead of native on-emit messages from the worker (decentraland-rpc really).APIs
packages/shared/apisThe changed line counter is significant because of this.
.protoas RPC services.a. The event payloads now have JSON.stringify on the host-side and JSON.parse on the worker-side, this can introduce some delays
method,body, andheaders.Known issues (X indicates that it's solved)