Store detected hosts in server memory (closes #37) #54
No reviewers
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
luca0N/lanbassador!54
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "dev_server_history"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Implement a history of detected hosts in the Lanbassador server, so that the client has a way of displaying hosts that were previously detected when the page is opened for the first time by an end user.
To enforce good client etiquette, the
QUERY_HISTORYcommand shall be requested only once during a connection, reducing the possibility of denial of service (DoS) attacks.QUERY_HISTORYpacket action for querying the server detected host historyLanbassadorDetectedHostso that it also includes information on the detection timestampRefactor the code(moved to #56)QUERY_HISTORYpacket action right after displaying the pageStore detected hosts in server memory (closes #37)to WIP: Store detected hosts in server memory (closes #37)Since the
LanbassadorDetectedHoststruct is being repurposed to store detected hosts in memory, I think it should be changed to include a new field that stores the detection timestamp. The reasoning behind this is that I am not sure whether iterating through that map will get us entries in the order they were assigned to the map. Regardless, the client still would not know the time at which the hosts were detected, so there would be no way of displaying that information when opening the host list.3b58923fa9toe77eead99dThe previous force-push changes the casing in the commit message in
e77eead99d. No other changes were made.I went ahead and added two new items to the checklist so that the server can provide clients with detection timestamps, and to refactor the affected server code.
I've been quite busy with IRL stuff as of late so this pacing is the best I can do for now.
WIP: Store detected hosts in server memory (closes #37)to Store detected hosts in server memory (closes #37)I went ahead and modified the checklist one more time to remove an entry about refactoring the server code. The refactoring that I have in mind will affect some other parts of the code, so I think it's best to keep it outside of this pull request.
As mentioned in commit
becebe192e, I am afraid that sorting the host list every time a new detection is received from the server will degrade the performance, specifically for very busy networks and servers with high availability.This problem is now being tracked on issue #57.
Another thing that I forgot to mention is that the client expects responses from the server with action
RET_SUCCESSto beQUERY_HISTORYresponses. Since there's not much back and forth between the client and the server, I figured assumption was appropriate in this case. Nonetheless, I added a class variable for keeping track of the last request (which will likely need some work due to the potential for concurrency).Should more actions be implemented in the future, then the code would have to be enhanced in this regard.