• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Tim Cooke
Sheriffs:
  • Rob Spoor
  • Liutauras Vilda
  • paul wheaton
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
  • Piet Souris
Bartenders:
  • Stephan van Hulst

Last visit date/time not equal in different computers [DONE]

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When I use defferent computers (home, office, etc) to access the forum the visit time seems to be associated to the computer, not the login.

Is it stored in a cookie? If so, my sugestion is that it should be stored in the database.
[originally posted on jforum.net by ferdez]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've seen this too.

And also the topics marked as unread are messed between stations. (I've seen a topic here and it's marked as read but at home the topic with no changes is marked as unread).

I had no time to go into the code but I believe that maybe some cache management is broken ....
[originally posted on jforum.net by smota]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hmm.. that's because I store data in cookies, and not in user's table.

I was trying to avoid some database access, but in this case there is no much to do, anyway.

Is not hard to fix, just a bit toilsome.

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hummm ... so no cache strategy?

Maybe something like: at the login you load this kind of data onto the user's session, after that just set/unset data in the session (that's on server's memory) and on session end you persist the data again on the database.
Avoid unecessary database hits and enable users to use multiple stations.
[originally posted on jforum.net by smota]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It will not work well, because the session-timeout value. If I let to update user info only when its session expires, it will have a delay of x minutes, depending of how many minutes are set to the session-timeout.

Well, jforum does some data manipulation when an user enters. Basically, the SessionFacade checks for the upcoming username in the session's entries and, if he found one, it means that the user was gone for a while, but returned before the session-timeout ( but anyway, he haves a new session id ).
So, the facade removes the old entry and updates the session id. In this momment I can update the values in user's table.

For the rest, eg, for the people who left the site and doesn't return soon, I can update the database in sessionDestroyed() event.

hhmm.. maybe it work :-D

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yeah maybe it'll work

But just to remember ... it's not necessary to hit the database when the user login before its session expires, just copy the data from the old session into the new one.

This way you'll hit the database only a few times when the session expires

[originally posted on jforum.net by smota]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Registered on JIRA as JF-7
[originally posted on jforum.net by smota]
 
No prison can hold Chairface Chippendale. And on a totally different topic ... my stuff:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic