3. ACTIVATE API PROCESS (UPDATED)
• Here shows the latest work flow (already fixed prod issues);
• Thebox marked by purple color are different with SRS;
• Thebox marked by green color are from third parties;
4. I(ENHANCEMENT): TAKE CURRENT INDEX / ADJUST THIRD PARTIES
• Question:
The activate API service takes 10 seconds per time (some cases), it’s slow!
• Analysis
1. Accordingto the logfile, Thereare 1 SQL (twice)and a ID Servicewhichtooka
longtime(nearor great 3 secondsper time);
2. Thecount of ACTIVEusersin prod isabout 2M;
3. Thereare alreadytwo index for the condition:external_guid;
4. Fewfunctionsfrom thirdpartiesare not used or ineffectivein cwt project;
5. I(ENHANCEMENT): TAKE CURRENT INDEX
• Fix Process:
The first SQL(take the current index)
• Tips
1. Checking the table schema before writing the SQL: index/size;
2. Validating the query in Stg/prod;
6. I(ENHANCEMENT): ADJUST THIRD PARTIES
• Fix Process:
The Second SQL
(remove)
• Tips
1. Taking third/existing parties should save time and effort, But need to
validate the performance and functionality.
2. After change the flow of third party, must validate the key
attributes(Here the external_guid is missing);
7. I(ENHANCEMENT): ADJUST THIRD PARTIES
• Fix Process:
• Tips
1. Remove /override/modify the unused/ineffective blocks;
8. II(BUG): SINGLETON / MISSING REQS / POTENTIAL ISSUES
• Question:
Users failed to activate in some cases.
• Analysis
1. Allow users to continue to activate when he is already active but value of
fieldx is null (missing);
2. Allow users to continue to activate when the user return according to Key1
and Key2 are same, otherwise throw an error(potential);
3. Check if the call method of a service is singleton;
9. II(BUG): SINGLETON / MISSING REQS / POTENTIAL ISSUES
• Fix Process:
• Tips
1. That’s great if there is a doc to describe the common sense(case 1);
2. Ifa table design is complex, focus the relationship during keycolumns(case 2);
3. Do more testing under multi-threading(case3)
This work flow is from [PRJX_FunctionSpec_AppCloup_API_v1.1.docx].
This work flow is from [PRJx_FunctionSpec_AppCloup_API_v1.1.docx].
When the user is existing in PRJx_userstable not in users table, It will first migrate the user from PRJx_Usersto users then continue to the activate process. And this will take about 10 seconds to complete an activation process.
CREATE UNIQUE INDEX IDX_USERS_LWR_TGUID ON USERS(LOWER("EXTERNAL_GUID"))NOLOGGINGTABLESPACE DATPCTFREE 10INITRANS 2MAXTRANS 255STORAGE ( INITIAL 64K NEXT 1M MINEXTENTS 1 MAXEXTENTS UNLIMITED PCTINCREASE 0 BUFFER_POOL DEFAULT )NOPARALLEL;CREATE INDEX IDX_USERS_TGUID ON USERS(EXTERNAL_GUID)NOLOGGINGTABLESPACE DATPCTFREE 10INITRANS 2MAXTRANS 255STORAGE ( INITIAL 64K NEXT 1M MINEXTENTS 1 MAXEXTENTS UNLIMITED PCTINCREASE 0 BUFFER_POOL DEFAULT )NOPARALLEL;
Third parties may include product code, existing code from other projects(Here is from prj); open frameworks/sources;
Third parties may include product code, existing code from other projects(Here is from prjy); open frameworks/sources;How to re-use the third parties(example):{1. leverage existing functionality;2. re-use 'as-is' *;3. save time and effort;4. present layer(look and feel);5. web services;}