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

Show all clients on interface #19

Open
guilhermelawless opened this issue Dec 10, 2018 · 6 comments
Open

Show all clients on interface #19

guilhermelawless opened this issue Dec 10, 2018 · 6 comments

Comments

@guilhermelawless
Copy link
Contributor

guilhermelawless commented Dec 10, 2018

Currently the interface only shows connected clients, because we only send those. As it's a ranking, we should also show those who are not connected.

Furthermore, we shouldn't show the same account in different rankings. A better way would be to show a list of connected client types for each account, examples:

  • "On demand"
  • "Precache + Both"
  • "-" (if not connected)
@mitche50
Copy link

My proposal is to send back only 1 instance of each address with more descriptive information. For example, address 1 has 2 clients online, both precache, address 2 has 2 clients online, one of each, and address 3 has 0 clients online and address4 has an on demand and both client online:

   {  
      'client_precache_count':2708,
      'client_demand_count':577
      'client_address':'address1',
      'connected_precache':2,
      'connected_demand':0,
      'connected_both':0,
      'client_id':'address1',
   },
   {  
      'client_precache_count':2816,
      'client_demand_count':14
      'client_address':'address2',
      'connected_precache':1,
      'connected_demand':1,
      'connected_both':0,
      'client_id':'address2',
   },
   {  
   {  
      'client_precache_count':1625,
      'client_demand_count':998
      'client_address':'address3',
      'connected_precache':0,
      'connected_demand':0,
      'connected_both':0,
      'client_id':'address3',
   },
   {  
      'client_precache_count':10,
      'client_demand_count':12998
      'client_address':'address4',
      'connected_precache':0,
      'connected_demand':1,
      'connected_both':1,
      'client_id':'address4',
   }
]

This would be rendered:

Rank    Address                            Client Types                     Precache Work               On Demand Work
   1       address1                           Precache                          2708                    577
   2       address2                           Precache + On Demand              2816                    14
   3       address3                           None                              1625                    998
   4       address4                           On Demand + Both                  10                      12998

@guilhermelawless
Copy link
Contributor Author

@mitche50 Thanks.

I will also start using the id as a hash of the client's ip, then we can group them by IP and it shows up as different entries if the same account is used by different IPs. Is that ok?

@mitche50
Copy link

Works for me. Would you pass back the ID to the user so they could reference that? I think that would be more valuable than payout address to display, as it would be unique to IP and there would be no confusion.

@guilhermelawless
Copy link
Contributor Author

Why does the user need to know the id?

@mitche50
Copy link

The ID would be for reference on the client list. For example, you have 2 different IP addresses with the same payout address, how do I differentiate between the two?

@guilhermelawless
Copy link
Contributor Author

Yes i can either pass the ID or group them in lists, your call.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants