Skip to content

Suggestion: generate rpc id from cuid instead of a int number #55

@huan

Description

@huan

Currently, we are using a very large negative number as the rpc id, and each time increase by one.

There's another way to generate unique id by using cuid: http://npmjs.com/package/cuid

Personally, I'm using cuid a lot, so I'd like to suggest we use cuid to generate our Peer rpc id too.

  • The good part of using cuid is that we will never get a conflict id of every rpc call.
  • The bad part of using cuid might be that we need to increase the size of the network package a bit(from a number to a string) for every rpc call.

If you agree to use cuid, I'll make it in my pull request.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions