Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tag: T_2_5_0_207

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

..
Octocat-spinner-32 CommentScoreReason
Octocat-spinner-32 Despam
Octocat-spinner-32 FHActivity
Octocat-spinner-32 FHEditorPop
Octocat-spinner-32 FHPopularity
Octocat-spinner-32 FHPopularity2
Octocat-spinner-32 FireHoseScores
Octocat-spinner-32 RecentTags
Octocat-spinner-32 TagCountUser
Octocat-spinner-32 Top
Octocat-spinner-32 Makefile
Octocat-spinner-32 README
README
Definition:  A tagbox monitors tag-related changes to a Slash site and
periodically emits updates to be applied to the database.

"Monitors tag-related changes":  the tagbox.pl task keeps track of
which tagboxes have been notified of which tags, tag changes, or
user-tag-related changes.  When new information is available for a
tagbox, the task executes a method in that tagbox's class, and
pushes the data returned onto the tagboxlog_feeder table.

"Periodically emits updates":  when a tagbox has sufficient entries
in the tagboxlog_feeder table to merit additional processing, its
run() method is executed and returns zero or more updates to apply
to tables in the Slash site's database.


Example:  the TagCountUser tagbox counts how many active tags each
user has applied.  The tagbox.pl task scans the tags table and the
tags_deactivated table;  when new entries in either are found, it
calls Slash::Tagbox::TagCountUser::feed_newtags or feed_deactivatedtags.
Those methods return data that tagbox.pl pushes onto the tagboxlog_feeder
table.  When there is accumulated data in that table that requires a
user's tag count to be rewritten, tagbox.pl collects it and calls
Slash::Tagbox::TagCountUser::run.  That method returns data that tagbox.pl
passes to setUser to write the new tag count for any affected users, and
then deletes the used rows from tagboxlog_feeder.


Purpose:

This solves the following problems in the following ways:

	Tags will be churning rapidly on our system and we want to see
	the results of processing that data within seconds or minutes.
	tagbox.pl's main loop sleeps only for about 15 seconds, with
	the rest of the time spent processing, and usually comes back
	to the loop to re-evaluate priorities every 45-60 seconds.

	It would require untenable resources to repeat all tagboxes'
	processing with every new tag, so processing is queued and
	prioritized.

	Tagboxes are inherently complicated, but a consistent API means
	a tagbox's class code is stripped-down, so most of its .pm file
	is algorithm, not window-dressing.


(...explanation of the tables and algorithms to be written here...)



Warning:

All tagbox code is extremely beta and the API is subject to
change in the weeks to come.  (2006-06-27)


Something went wrong with that request. Please try again.