Skip to content

Refactor arkouda_server  #405

Closed
Closed

Description

@hokiegeek2

Following a design discussion with @mhmerrill and @reuster986, the following changes will be made to arkouda_server.chpl to simplify the message handling logic:

  1. decode each incoming message element once
  2. breakout the incoming message into two elements: (1) string binary containing the cmd, username, and token (the latter for when basic authentication) and (2) a payload element that will have be a space-delimited string binary containing the cmd parameters or a bytes object
  3. Push the decision and logic to decode the payload into *Msg functions such as segmentedIndexMsg, countReductionMsg, etc...
  4. Change *Msg function signature from (reqMsg, st) to (cmd : string, payload : bytes , st : SymTable)

Activity

  1. mhmerrill commented on Jul 1, 2020

    @mhmerrill
    Contributor

    I am not sure about 4) in you list, I think I would like all Msg processing routines to have the same function signature and then do decode inside the Msg processing routine... so that means all payload arguments are bytes. The rational for this is because we may want to have a function table approach in the future and I wouldn't want to make that harder.

  2. hokiegeek2 commented on Jul 1, 2020

    @hokiegeek2
    ContributorAuthor

    @mhmerrill yes, you are correct re: the payload type! I realized that a few minutes after I got started, :) I've updated the function signature above.

  3. mhmerrill commented on Jul 1, 2020

    @mhmerrill
    Contributor

    I also think this should be a seprate PR from the authentication work you are currently finishing up. Reasoning being that I would like change to be as incremental as is convenient to ease accepting, testing, and possible backing out thing that don't work or were not a good idea after further examination.

  4. hokiegeek2 commented on Jul 1, 2020

    @hokiegeek2
    ContributorAuthor

    @mhmerrill agreed, will be submitting #60 PR later this AM.

  5. hokiegeek2 commented on Jul 15, 2020

    @hokiegeek2
    ContributorAuthor

    work completed, pull request approved and merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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