Bug 196624 - [dstore][api] dstore miner IDs should be String constants rather than dynamic lookup
Summary: [dstore][api] dstore miner IDs should be String constants rather than dynamic...
Status: RESOLVED FIXED
Alias: None
Product: Target Management
Classification: Tools
Component: RSE (show other bugs)
Version: 2.0   Edit
Hardware: All All
: P5 enhancement (vote)
Target Milestone: 3.0 M4   Edit
Assignee: David McKnight CLA
QA Contact: Martin Oberhuber CLA
URL:
Whiteboard:
Keywords: api
Depends on: 159092
Blocks:
  Show dependency tree
 
Reported: 2007-07-16 06:33 EDT by Martin Oberhuber CLA
Modified: 2007-12-03 12:09 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Oberhuber CLA 2007-07-16 06:33:20 EDT
+++ This bug was initially created as a clone of Bug #159092 +++

DStore currently creates miner ID's on the client by dynamic lookup through MinerClass.getClass().getName().

I think that essentially, the miner ID is already API because if we went and refactored the miner into a different package for 3.0, then a 2.x client would not work against a 3.0 server (unless we provided a compatibility package). Also, the Miner is a server-side item and we should not force client-side dependencies on it.

So what I'm saying is:
- the miner ID is already API and cannot be changed/refactored without notice
- therefore it should also be made explicit
- therefore I'd recommend having it in a String constant rather than implicit
  through MinerClass.getClass().getName().

For instance,
Comment 1 Martin Oberhuber CLA 2007-07-16 06:40:20 EDT
For instance,

UniversalProcessMiner.MINER_ID = UniversalProcessMiner.getClass().getName();

UniversalProcessMiner.MINER_ID is the only item from UniversalProcessMiner that's referenced by the client. When that field was moved into a different class or interface (for instance into IUniversalDataStoreConstants), then there were no need to
- have the UniversalProcessMiner be public API
- load the UniversalProcessMiner class on the client
thus saving unnecessary class-loading on the client.

The request is not a very important one though.
Comment 2 Martin Oberhuber CLA 2007-07-16 06:42:16 EDT
See also bug 159092 comment 2
Comment 3 David McKnight CLA 2007-12-03 12:09:54 EST
I've made and committed the changes to cvs.