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

Separating IndexServer logic against client into two ports #146

Open
realcr opened this issue Jan 1, 2019 · 0 comments
Open

Separating IndexServer logic against client into two ports #146

realcr opened this issue Jan 1, 2019 · 0 comments
Labels
enhancement New feature or request

Comments

@realcr
Copy link
Member

realcr commented Jan 1, 2019

Currently the messages between IndexServer and IndexClient are as follows:

pub enum IndexServerToClient {
    TimeHash(HashResult),
    ResponseRoutes(ResponseRoutes),
}

pub enum IndexClientToServer {
    MutationsUpdate(MutationsUpdate),
    RequestRoutes(RequestRoutes),
}

This interface is used for two different functions:

  1. Requesting routes: (RequestRoutes, ResponseRoutes).
  2. Updating friends state (TimeHash, MutationsUpdate).

Those two parts are unrelated. It might be possible that some user of the server may only want to use one function out of the two. For example: a user might only want to request routes (RequestRoutes/ResponseRoutes). In this case the user still has to deal with incoming TimeHash messages.

Cons of this design change are that index servers will now have two ports instead of one port facing clients. (Note that there is a third port facing other index servers).

@realcr realcr added the enhancement New feature or request label Jan 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant