You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Following a design discussion with @mhmerrill and @reuster986, the following changes will be made to arkouda_server.chpl to simplify the message handling logic:
decode each incoming message element once
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
Push the decision and logic to decode the payload into *Msg functions such as segmentedIndexMsg, countReductionMsg, etc...
Change *Msg function signature from (reqMsg, st) to (cmd : string, payload : bytes , st : SymTable)
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.
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.
Activity
mhmerrill commentedon Jul 1, 2020
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
payloadarguments 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.hokiegeek2 commentedon Jul 1, 2020
@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.
mhmerrill commentedon Jul 1, 2020
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.
hokiegeek2 commentedon Jul 1, 2020
@mhmerrill agreed, will be submitting #60 PR later this AM.
changed function params to handle cmd and payload, updated arkouda_se…
Changes per successful integration testing Bears-R-Us#405
cleared out unneeded if..else statements, enhanced error handling and…
added more comments to arkouda_server, fixed chapel unit test errors …
added more chpl comments, removed tab that caused lint task to fail o…
removed unneeded writeln statement Bears-R-Us#405
Changes per successful integration testing Bears-R-Us#405
hokiegeek2 commentedon Jul 15, 2020
work completed, pull request approved and merged.