Results 1 to 3 of 3
  1. #1
    thejavaman is offline Member
    Join Date
    Oct 2009
    Posts
    2
    Rep Power
    0

    Default How to design this System architecture

    Hi


    I am developing a java system [JEE5,JPA,EJB3,JSF,Richfaces,Mysql running on Jboss Seam] and I haven't found a good algorithm to do this I would like to know how do you do something like this:

    I want to send videos [7 daily for example] to users registered in the system, so i can send videos sequentially [first day 1-7 second day 8-15 for example] but if I have 700 videos only after 99 days the video number 700 will be seen,if I send them randomly then the video number 50 could be seen 100 times while video number 370 could be seen only 20 times, but the problem is that the database of videos is going to grow for example at the beginning the users could be 800 and 200 videos but the ciphers are going to change fo r example 22000 users and 13000 videos so the performance of the database is critic (the searches and comparisons) any ideas would be very helpful.

    thanks for your help and your time

  2. #2
    mrmatt1111's Avatar
    mrmatt1111 is offline Senior Member
    Join Date
    Aug 2009
    Location
    San Jose, CA, USA
    Posts
    320
    Rep Power
    5

    Default

    You could choose the video randomly and track what video was sent to which user by inserting a row into a tracking table, so as to not send them a video twice.

    Since it's random, the number of times a video is watched is more or less evenly distributed. Or, from the tracking table, you could choose the next videos by picking a video with the least views... but i think that would be overkill.

    Also it doesn't matter if the number of users or videos grows, you just query the number of videos and then use that to get a random number range.

    As far as performance, if you index the tracking table, it should be fast and it won't take up much resources.
    My Hobby Project: LegacyClone

  3. #3
    thejavaman is offline Member
    Join Date
    Oct 2009
    Posts
    2
    Rep Power
    0

    Default

    thank you very much. I'll build something like that and I'll do tests using your idea.

Similar Threads

  1. Identifying System Architecture-Urgent
    By Robert_85 in forum Advanced Java
    Replies: 2
    Last Post: 08-16-2009, 04:34 AM
  2. Architecture of Web Application
    By javaforumsuser in forum Web Frameworks
    Replies: 1
    Last Post: 03-02-2009, 09:36 AM
  3. database design for leave management system
    By anji4u_19 in forum JDBC
    Replies: 0
    Last Post: 08-26-2008, 11:27 AM
  4. Architecture Rules 2.1.0
    By Java Tip in forum Java Software
    Replies: 0
    Last Post: 07-05-2008, 06:18 PM
  5. Architecture of Any IDE...
    By vikki_pu in forum Other IDEs
    Replies: 5
    Last Post: 10-30-2007, 01:08 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •