posted 9 years ago
Hello everybody.
I’ve a doubt about my solution that has taken me a lot of time and I have got go through it soon. Then I’d like to ask for your help =]
First of all, I’m assuming that get information from the database would be less expensive and prone to risk than get it from the service. (Isn’t it a reasonable way of think?)
I have two scenarios:
1) Periodically, my system has to consult another system about some information that is accumulative (as a log), insert into the database and associate these logs to a report.
2) In other functionality, the user can see the logs that aren’t associate to any report yet. In this case, the system has to consult the service for the logs and show to user.
I was thinking if it would be worth, during the execution of the second scenario, insert the logs into database (without associating to a report). Then, when the first (that will always execute) or the second scenario to occur, the system wouldn’t have to get all the data again, it could ask to the service only the log information since the last update and get the rest from database (that was inserted in the last time that the second scenario occurred).
Finally I can summarize in advantages and drawbacks.
Advantages:
1. Shorter xml messages to transport (reducing network traffic) and to process (reducing processor usage) in each call to service (inside the two scenarios)
Drawbacks:
1. Increase the solution’s complexity.
2. Increase diagrams’ complexity.
3. May leave the functionality (the second one) slower, by executing a query (to get when the last update was made), inserting the results in to database, and consulting the rest of period from database too.
Well, what do you think? Am I going too far in my thoughts? Should I ignore this kind of thing and do in a straighter and simpler way? I don’t know if I’m exaggerating.
If it was a real work. I’d go for the more complex solution, but not before do some POC and collect more information. In terms of certification I’m not sure about this, mainly for the risk of loose points in complex diagrams
Sorry for the too big text.
Thank in advance for your thoughts.
Java Developer
OCJP 5, OCEJWCD 5, OCPJBCD 5, OCEJWCD 6, OCMJEA 6