seleniumkit / gridrouter

Selenium-based solution to serve 1000+ browsers
Other
152 stars 36 forks source link

Calculate running sessions per user #19

Closed innokenty closed 8 years ago

innokenty commented 8 years ago

1. Calculate running sessions for each (user; browser; version)

Change the behavior of the /stats: accept only logged in users and return a json as the result which maps browser names to browser versions and then to the number of sessions that users has currently running. Like that:

$ curl http://user:password@gridrouter.host/stats

⬇︎

{
  "chrome" : {
    "45.0" : 1
  },
  "firefox" : {
    "33.0" : 2,
    "34.0" : 7
  }
}

The old sessions that are not updated are evicted from the map after the timeout that can be configured by property grid.router.evict.sessions.timeout.seconds with defaults to 2 minutes.

Providing a different session storage than default in-memory implementation should work in a distributed multi-headed Grid Router runtime if properly synchronized via any library chosen.

2. Provide hub error message to client

Respond to the client with the error message returned by the last hub tried, when unable to create new session on any hub. Instead of just responding with the default error message which does not help a lot.

innokenty commented 8 years ago

call @baev @eroshenkoam @smecsia

innokenty commented 8 years ago

Sonar finally noticed that we have a 100+ lines long method in RouteServlet :)

innokenty commented 8 years ago

And also it finally has noticed that all our @Autowired servlet fields are not @Serializable.

smecsia commented 8 years ago

@baev Sonar is right. Servlet fields must be Serializable, so it's a bad idea to autowire them.

innokenty commented 8 years ago

Despite these persisting Sonar issues PR is finally ready to merge.

innokenty commented 8 years ago

Test this please

innokenty commented 8 years ago

These quota reload tests again... >_<

innokenty commented 8 years ago

test this please

innokenty commented 8 years ago

test this please

innokenty commented 8 years ago

test this please

qatools-ci commented 8 years ago

SonarQube analysis reported 5 issues:

Watch the comments in this conversation to review them. Note: the following issues could not be reported as comments because they are located on lines that are not displayed in this pull request: