Wednesday, November 9, 2011

Response time for service:

  • Response time of a service will be decided by business and architect while designing the system.
  • While implementing, if a service response is greater than the decided response time. Following are the steps to resolve.
    • Identify the sql query's used.
    • Logical bugs, query that are executing in loops (query should run as batches).
    • Try to optimize the query.
    • If needed discuss with DBA to add indexes on table or further optimization of the query.
  • If still the response time is not improved.
    • Try to fragment the functionality.
    • or Get a buying from business as this is an exceptional scenario.


Every entity should be queried:
Just adding and manging data is not sufficient for a sucsesfull data design, it should also be flexible enough to logically query entity using there hierarchy.
Ex:
“I want to see all the students that come to engineering department for a maths class from MCA”.

“List all the users that logged into the system using a facebook login.”

To acheive this kind of functionality, entity should be linked properly using foreign key constraints.

Sequence on Table:

While designing API identity the tables that are commonly used to insert data. If u find any make sure the Id for the table should be generated using a sequence on that table.

The function that generate sequence number should be placed in the AbstractDAO class and all the DAOImpl should extend the abstract class.

No comments:

Post a Comment