Extension talk:SemanticDependencyUpdater

About this board

Update based on Property Data Age

1
Revansx (talkcontribs)

Is it possible to have SDU perform a "null-edit" based on the time since that last null edit?


If not, would it be hard to get SDU to do such a thing? (in theory)

In addition to "Creation date" and "Modification date" I would like to propose a "Cache date" so that we could identify pages with property data based on ask statements and force a refresh on old/stale properties calculations.


Thanks!

/Rich

Reply to "Update based on Property Data Age"
Alex Mashin (talkcontribs)

What if a vandal creates a page with [[Semantic Dependency:::+]] and the purges it every second?
Alexander Mashin talk 06:58, 14 October 2021 (UTC)

Revansx (talkcontribs)

Interesting!

Reply to "Dependency bomb"
Paul LEMPERIERE (talkcontribs)

wfLoadExtension( 'SemanticDependencyUpdater' ); must be placed after wfLoadExtension( 'SemanticMediaWiki' ); in LocalSettings.php

Reply to "Installation Tip"

Beware! This extension causes many bugs with more complex use of semantic properties.

3
31.183.240.179 (talkcontribs)

I have wasted many hours trying to find the cause of my problems. If your wiki has stopped working, or you have memory leaks while executing maintenance scripts, check to see if this extension is the culprit.

My wiki statistic:

Page statistics
Content pages 330
Pages

(All pages in the wiki, including talk pages, redirects, etc.)

1,709
Uploaded files 218
Semantic statistics
Property values (total) 26,043
 -  Property values (improper annotations) 18
Properties (total) ⁱ 205
 -  Properties (used with at least one value) 162
 -  Properties (registered with a page) ⁱ 195
 -  Properties (assigned to a datatype) 87
Entities (total) ⁱ 4,905
 -  Outdated entities ⁱ 481
 -  Subobjects 0
 -  Concepts 0
 -  Queries (embedded, total) 2,671
   -  plainlist format 1,890
   -  count format 757
   -  list format 40
Datatypes 18

Errors:

  • Unable to use maintenance scripts: rebuildData.php - cause massive memory leak on pages.
  • Unable to use semantic annotations and templates on pages with SemanticDependencyUpdater.

All errors went gone when I disabled it.

Planetenxin (talkcontribs)

Sorry if this extension caused problems in your case. The above report is not very helpful without further information about which versions of MW and SMW you are using. Additionally your specific use case and configuration is required to find out what's going wrong. Feel free to open an issue at https://github.com/gesinn-it/SemanticDependencyUpdater/

SemanticPioneer (talkcontribs)

That was a long time ago, and I was using MW 1.34 at the time, but I was able to track down the causes. As far as I remember, it turned out that the problem was with cyclical dependencies. Additionally, the updates were too slow, so I quit and removed the extension.

Reply to "Beware! This extension causes many bugs with more complex use of semantic properties."

Loops are okay, "Be careful not to build loops" is wrong

1
5.18.148.5 (talkcontribs)

I would argue that loops in semantic dependencies are absolutely normal, and it is not a reasonable requirement to ask the user to avoid them. Even if loops are not allowed, they should be tracked automatically, not manually.

Reply to "Loops are okay, "Be careful not to build loops" is wrong"

Works through templates?

3
Tinss (talkcontribs)

Hello @Planetenxin, thanks for this extension. Does it work through templates?

On my wiki, most semantic properties are defined through templates and it seems I still need to do a manuel blank edit for everything to update event though a page defines Semantic_Dependency (through a template...)

Planetenxin (talkcontribs)
  • Make sure, a page Property:Semantic_Dependency exists with content [[Has type::Text]]
  • Make sure, $wgSDUUseJobQueue = false;
  • Create a page A with
[[Title::A]]
  • Create a page B with
* [[Part Of::A| ]][[Title::{{#show:A|?Title}}.B]]
* {{#show:{{FULLPAGENAME}}|?Title}}
  • Now, change page A as follows
[[Title::XXX]]

As a result, on pageB you should see

- XXX.B
- XXX.B
Planetenxin (talkcontribs)

If the above procedure works, it should also work in templates

Reply to "Works through templates?"

Throwing an error on MW 1.30

4
Revansx (talkcontribs)

Hi, I'm trying to get this running on my MW 1.30/SMW 2.5.6 Site and after performing the following steps:

  1. created the "Property:Semantic_Dependency" property as [[Has type::Text]]
  2. and then unzipping the extension archive to my extension folder
  3. adding "wfLoadExtension( 'SemanticDependencyUpdater' );" to "LocalSettings.php"

My 1.30 wiki threw the following exception:

Fatal error: Uncaught exception 'Exception' with message 'SemanticDependencyUpdater requires SemanticMediaWiki to be installed.' in /opt/htdocs/mediawiki/includes/registration/ExtensionRegistry.php:261 Stack trace: 
#0 /opt/htdocs/mediawiki/includes/registration/ExtensionRegistry.php(148): ExtensionRegistry->readFromQueue(Array) 
#1 /opt/htdocs/mediawiki/includes/Setup.php(40): ExtensionRegistry->loadFromQueue() 
#2 /opt/htdocs/mediawiki/includes/WebStart.php(114): require_once('/opt/htdocs/med...') 
#3 /opt/htdocs/mediawiki/index.php(40): require('/opt/htdocs/med...') 
#4 {main} thrown in /opt/htdocs/mediawiki/includes/registration/ExtensionRegistry.php on line 261

it's weird because SMW *is* installed (2.5.6) and it does work great.

Any ideas on why this error is occuring?

Revansx (talkcontribs)

could this be a permissions problem with my /includes folder?

Planetenxin (talkcontribs)

did you check, if SDU is registered in LocalSettings after SMW?

Revansx (talkcontribs)

I'll do that today and let you know. More soon.

Reply to "Throwing an error on MW 1.30"

How is this extension different from "Semantic Dependency"?

10
Revansx (talkcontribs)
Cindy.cicalese (talkcontribs)

Good question. I wrote Semantic Dependency several years ago when I had a specific need for it, but I'm not sure if it is still actively being used at this point. Perhaps, if Semantic Dependency Updated meets the same need and is in active use, Semantic Dependency should be archived.

Revansx (talkcontribs)

Sounds like you're saying that new efforts should use SemanticDependencyUpdater over SemanticDependency. yes?

Cindy.cicalese (talkcontribs)

If indeed they meet the same need. The names are similar, and a quick read of the extension page for SemanticDependencyUpdater seems similar, but I'd be interested to hear @Planetenxin's opinion on whether they serve the same purpose.

Revansx (talkcontribs)

right. sometimes the subtle differences make all the difference and it's nice to know what the pros are using.

Planetenxin (talkcontribs)
Cindy.cicalese (talkcontribs)
Revansx (talkcontribs)

sometimes simplicity is better, sometimes fancy features are best.. it would be nice to see a side-by-side comparison of features for these two apparently similar extensions.

Revansx (talkcontribs)

it seems to me the basic task of performing a null edit on pages with semantic dependencies *should* be a core part of SMW. does anyone know if this is on anyone's radar in the SMW team?

Cindy.cicalese (talkcontribs)

As far as I can tell, there are three major differences between the extensions.

1) SemanticDependency defines a page type property per namespace that, if it exists on a page in that namespace, points to other pages that depend upon the current page. SemanticDependencyUpdater defines a single text property that, if it exists on a page, holds a query that when executed will result in pages that depend upon the current page.

2) SemanticDependency uses SMWUpdateJob to update only the SMW data on the page. SemanticDependencyUpdater issues a null edit on the page.

3) SementicDependency has a threshold configuration variable. Refresh jobs will be executed immediately up to that threshold; additional jobs will be put on the job queue. SemanticDependencyUpdater has a configuration variable that indicates whether all jobs should be executed immediately or all jobs should be put on the job queue.

Other than that, SemanticDependency could use some love since it has not been updated to use extension registration. Also, IIRC there was a bug that showed up when running the refreshLinks maintenance script in some cases.

I don't know of any work to include this functionality in SMW. I did get some much appreciated advice from mwjames when implementing SemanticDependency, but I do not believe it was on his radar at that time to include this functionality directly in SMW. This is one of those features that needs to be used with care, as it can cause performance bottlenecks. SemanticDependency forbids having a page depend upon a page that depends upon another page to try to mitigate circular dependencies, but it can still cause quite a bit of update activity if the dependencies are not well designed.

Reply to "How is this extension different from "Semantic Dependency"?"
There are no older topics