Functional specifications
At the moment all reporting is done directly on the ics files. This leads to a serious efficiency problem due to network lag and processing the ical files each time. One option would be to support caldav but that doesn't seem ready atm. However, since the reports are generated over fairly static historical data it is no problem to read all the files into a cache before queriing. The idea is to update the cache
Technical interpretation
The timesheet reporting needs to be rebuild. the process at the moment is (on each request):
- Select which ical files to parse based on the incoming constraints
- Parse the files
- Loop over the Components in a SAXSource and add them if they match the constraints
- Transform and return
The idea is as follows:
- All calendars are retrieved,parsed and stored in a database once a nigth or when the user explicitly requests this
- On a report request:
- A hiberate query is built requesting the rigth events
- The events are passed to a saxsource
- Transform and return
So the following must be created:
- Hibernate configuration in spring
- Add a base test setup for the database
- An Event object with hibernate mapping
- An Calendar object with hibernate mapping
- A type conversion between ical types and domain types
- A Dao for the Calendars
- A method to store one Calendar
- A method to store a list of calendars
- A method to retrieve all calendars
- A method to delete all calendars
- A dao for the events
- A method to query the database given some constraints
- A method to store new Event objects
- A SAXSource that includes a List of Events in the output
- An additional webservice method to refresh the cache database state
- Refactor the getTimesheet webservice method to look in the database
Budget/Hours
| task |
hours |
todo |
spent |
developer |
Add the hibernate configuration |
1 |
0 |
1 |
Ivo |
Base testcase |
1 |
0 |
1 |
Ivo |
| Type conversion |
1 |
1 |
0 |
Ivo |
CalendarDao |
3 |
0 |
3 |
Ivo |
EventDao |
6 |
0 |
5 |
Ivo |
| SAXSource |
2 |
2 |
0 |
Ivo |
| refreshTimesheetCache webservice |
1 |
1 |
0 |
Ivo |
| Refactor the getTimesheet webservice |
3 |
3 |
0 |
Ivo |
| Total |
18 |
7 |
10 |
Discussion
Notes
Links
--
IvoVanDongen - 20 Mar 2007