Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: CPG on heavy traffic site => lastup misses pics  (Read 4197 times)

0 Members and 1 Guest are viewing this topic.

GGallery

  • Contributor
  • Coppermine regular visitor
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 61
CPG on heavy traffic site => lastup misses pics
« on: June 08, 2004, 08:21:34 am »

Hi,

we just launched CPG on http://gallery.greatestjournal.com today and it rocks! (3k pics within a couple of hours)

The only major problem I found so far is that every couple of seconds a pic is getting uploaded - if then somebody clicks on one of the lastups on the frontpage he might (very, very often) actually get a pic or 2 pics newer than the selected one (because of pos=...) - Does anybody have a fix for that?

Also I am curious if anybody scaled CPG to a couple million pics and what to expect / how to tune, etc.

Also, are there any mobile blogging solutions already? (cellphone2coppermine)
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: CPG on heavy traffic site => lastup misses pics
« Reply #1 on: June 08, 2004, 08:37:51 am »

Only one question per thread please...
  • On heavy traffic sites it's recommended to remove the lastup section from the index page alltogether.
  • Nobody has a million pics in coppermine afaik, the biggest install known is the Student Union gallery of Taiwan's "National Chiao Tung University" run by Oasis with 250,000+ pics
  • There has been some discussion about cellphone add-ons - check the mods board
GauGau
Logged

GGallery

  • Contributor
  • Coppermine regular visitor
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 61
Re: CPG on heavy traffic site => lastup misses pics
« Reply #2 on: June 08, 2004, 06:52:15 pm »

hmmm sorry for asking for so many questions at once - I didn't want to spam the board... guess I'll have to build a modified lastup with a latest_uploads tables which gets purged every 10 minutes so it can scale, I'll submit that here once finalized.

As far as I can see the design itself should be able to scale very nicely(?) - one of the first things to do will be to put all the original pics on a cheap IDE raid1 on a different server mounted per nfs and have only the normal_ and thumb_ pics on SCSI/in cached RAM on the webserver... that should take me beyond 1M+
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: CPG on heavy traffic site => lastup misses pics
« Reply #3 on: June 08, 2004, 09:25:56 pm »

If you have users adding pics every few seconds, then the last uploads page will be out of date within seconds of opening it, and if you click one of the pics shown after another pic has been added, it will go to the wrong pic.

This is expected, as the link from the thumbnail is not to the individual pic, but to '/displayimage.php?album=lastup&cat=&pos=0' etc.  This url will point to a different pic every time someone adds a pic.
Logged
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

GGallery

  • Contributor
  • Coppermine regular visitor
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 61
Re: CPG on heavy traffic site => lastup misses pics
« Reply #4 on: June 09, 2004, 07:17:25 am »

yes, I figured that out... I am wondering how to 'fix' that since it makes CM a little bit less useful for bigger galleries (which would be a shame as I compared many and I think CM is the best)
I guess something like this could work:

add an additional "image_id" to the url, e.g.: &pos=n&image_id=xxxx

- once user clicks on a pic: check that pos in fact translates to image_id - if not then 'look' +- 20 postions "left and right" in the selected album and adjust position if neccessary.
Logged

Tarique Sani

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 2712
    • http://tariquesani.net
Re: CPG on heavy traffic site => lastup misses pics
« Reply #5 on: June 09, 2004, 07:34:24 am »

The simple fix is to pass the pid along with the URL and display picture based on this pid. Since the last upload position is not going to be valid anyways it will not tbe the same subsets which display in the filmstrip everytime, may be filmstrip can be disabled for all meta albums as in theory all these albums will change too fast for positions to be valid
Logged
SANIsoft PHP applications for E Biz

GGallery

  • Contributor
  • Coppermine regular visitor
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 61
Re: CPG on heavy traffic site => lastup misses pics
« Reply #6 on: June 10, 2004, 01:31:04 am »

OK, but how to I hack that into the code?

I am right now in function theme_display_thumbnails( in themes/max_ox_x/theme.php and it says on line 1320:
  '{LINK_TGT}' => "displayimage.php?album=$aid$cat_link&pos={$thumb['pos']}",

I tried a   '{LINK_TGT}' => "displayimage.php?album=$aid$cat_link&pos={$thumb['pos']}&pid={$thumb['pid']}",M
but there is no "pid" in thumb... somebody can enlighten me?
Logged

GGallery

  • Contributor
  • Coppermine regular visitor
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 61
Re: CPG on heavy traffic site => lastup misses pics
« Reply #7 on: June 10, 2004, 01:34:32 am »

actually coming from index.php/lastup the url should look like this:
http://gallery.greatestjournal.com/displayimage.php?pos=-8761

then the user always always sees the correct "lastup" and other images from this user which is really cool... (but I still don;t know how to put the pid in there)

(the whole concept with the relative 'pos=' is IMHO not a good idea... people just copy and paste what's in the browser's addressbar into emails and forums and all in a sudden people get completely different pics)
Logged
Pages: [1]   Go Up
 

Page created in 0.019 seconds with 15 queries.