Skip to content

Separating IndexServer logic against client into two ports #146

@realcr

Description

@realcr

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions