I have some content management related
entities:
EContent, EPublication, WLink,
WCategory
EContent stores various contents, can be dynamic wo
pages or static contents, even web references.
EPublication adds business settings to EContents:
WCategory defines the site navigation structure
(a forest of 'web folders') and WLink present the
associations between EPublications and WCategories,
it also defines the corresponding web
links.
EContent can have quite complex sub structures,
that's not what my model problem about. My model
problem is about the accessCount attribute in
EPublication.
(1) how to count access. currently I used
session access: accessCount will increase by 1 and only 1
if within a session the
publication been requested. any use cases that need more smart
counting?
(2) the updating of accessCount can be a headache:
there may be multiple sessions request the publication
at the sametime. Also, how
to schedule the access count updating?, there may be some eo
changes
within a session
editingContext which are not intend to commit or not ready to commit yet, while
the
accessCount needs to be
increased no matter what happened.
(3) There may be a need to show the current access
count besides the web link referencing the publication
so it better to update
itself as soon as possible
(4) There may be a business rule that after
accessCount reaches a value, the access policy will change.
So what''s a reliable way to deal with counting
problems?
Thanks
|