CPG on heavy traffic site => lastup misses pics CPG on heavy traffic site => lastup misses pics
 

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]

Main Menu

CPG on heavy traffic site => lastup misses pics

Started by GGallery, June 08, 2004, 08:21:34 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

GGallery

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)

Joachim Müller

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

GGallery

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+

Casper

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.
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

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.

Tarique Sani

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
SANIsoft PHP applications for E Biz

GGallery

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?

GGallery

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)