[metrics-bugs] #24028 [Metrics/Library]: Provide a modernized API for metrics-lib

Tor Bug Tracker & Wiki blackhole at torproject.org
Fri Oct 27 16:35:27 UTC 2017


#24028: Provide a modernized API for metrics-lib
---------------------------------+--------------------------
     Reporter:  iwakeh           |      Owner:  metrics-team
         Type:  enhancement      |     Status:  new
     Priority:  Medium           |  Milestone:
    Component:  Metrics/Library  |    Version:
     Severity:  Normal           |   Keywords:  metrics-2017
Actual Points:                   |  Parent ID:
       Points:                   |   Reviewer:
      Sponsor:                   |
---------------------------------+--------------------------
 In order to provide a more modern API in metrics-lib the interface
 hierarchy needs to be renewed/restructured/changed in backwards compatible
 ways.

 A separate discussion led to the following results:

 * The new interfaces will be placed in new packages, which allows for
 keeping good names and improving other w/o disturbing the existing
 classes.  Suggested packages:
   - org.torproject.metrics.descriptor
   - org.torproject.metrics.descriptor.impl
   - org.torproject.metrics.index
   - org.torproject.metrics.internal

 * Besides improving the general structure consider different return types
 for all time related values and use java.util.Optional for all optional
 values and other java 8 features (as mentioned in summary ticket #23752).


 Possible next steps:

 * Use a small, i.e., limited to few classes/interfaces, prototype example
 for finding the right approach to make these two interface hierarchies
 live beside each other and minimize additional implementation.
 * Use the working prototype approach to try new naming rules for methods.
 * Extend the found solution to the entire public API.
 * Choose first code base to use the new interface hierarchy.
 * Possibly improve new interface hierarchy.
 * Use new interfaces in all Metrics products.

 The other ticket related to an improved metrics-lib API is obsolete with
 this new approach; for reference: #19640.  There is a pending new
 interfaces, which should be only implemented with the new hierarchy (if
 demand permits): #17861.
 The work-in-progress interfaces (and implementations) for webstats could
 be moved into the new hierarchy already, but could also be easily moved
 later.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/24028>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the metrics-bugs mailing list