Extension talk:SemanticDependencyUpdater
Add topic| This page used the Structured Discussions extension to give structured discussions. It has since been converted to wikitext, so the content and history here are only an approximation of what was actually displayed at the time these comments were made. |
How is this extension different from "Semantic Dependency"?
[edit]ref: Extension:Semantic Dependency Revansx (talk) 15:02, 23 October 2018 (UTC)
- 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. Cindy.cicalese (talk) 20:47, 23 October 2018 (UTC)
- Sounds like you're saying that new efforts should use SemanticDependencyUpdater over SemanticDependency. yes? Revansx (talk) 23:32, 23 October 2018 (UTC)
- 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. Cindy.cicalese (talk) 04:13, 24 October 2018 (UTC)
- right. sometimes the subtle differences make all the difference and it's nice to know what the pros are using. Revansx (talk) 13:13, 24 October 2018 (UTC)
- Well, indeed it sounds like Extension:SemanticDependency is a duplicate of SemanticDependencyUpdater (SDU). We use SDU in our enterprise Semantic MediaWiki distribution semantic::core since 2016. Never tried Extension:SemanticDependency. Planetenxin (talk) 16:48, 7 November 2018 (UTC)
- Extension:SemanticDependency was released in October 2014. But, it is a rather simple extension, so perhaps Extension: SemanticDependencyUpdater has more capabilities. Cindy.cicalese (talk) 16:56, 7 November 2018 (UTC)
- 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 (talk) 00:18, 8 November 2018 (UTC)
- 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? Revansx (talk) 00:19, 8 November 2018 (UTC)
- 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. Cindy.cicalese (talk) 15:29, 8 November 2018 (UTC)
Throwing an error on MW 1.30
[edit]Hi, I'm trying to get this running on my MW 1.30/SMW 2.5.6 Site and after performing the following steps:
- created the "Property:Semantic_Dependency" property as [[Has type::Text]]
- and then unzipping the extension archive to my extension folder
- 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 (talk) 23:45, 29 April 2019 (UTC)
- could this be a permissions problem with my /includes folder? Revansx (talk) 20:38, 1 May 2019 (UTC)
- did you check, if SDU is registered in LocalSettings after SMW? Planetenxin (talk) 09:46, 3 May 2019 (UTC)
- I'll do that today and let you know. More soon. Revansx (talk) 11:19, 3 May 2019 (UTC)
Works through templates?
[edit]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...) Tinss (talk) 06:14, 23 March 2020 (UTC)
- Make sure, a page
Property:Semantic_Dependencyexists with content[[Has type::Text]] - Make sure,
$wgSDUUseJobQueue = false; - Create a page
Awith
- Make sure, a page
[[Title::A]]- Create a page
Bwith
- Create a page
* [[Part Of::A| ]][[Title::{{#show:A|?Title}}.B]] * {{#show:{{FULLPAGENAME}}|?Title}}- Now, change page
Aas follows
- Now, change page
[[Title::XXX]]- As a result, on page
Byou should see - Planetenxin (talk) 13:07, 25 March 2020 (UTC)
- XXX.B - XXX.B
- If the above procedure works, it should also work in templates Planetenxin (talk) 13:13, 25 March 2020 (UTC)
Beware! This extension causes many bugs with more complex use of semantic properties.
[edit]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. 31.183.240.179 (talk) 02:36, 27 January 2021 (UTC)
- 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/ Planetenxin (talk) 16:17, 11 March 2021 (UTC)
- 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. SemanticPioneer (talk) 20:26, 26 June 2021 (UTC)
Loops are okay, "Be careful not to build loops" is wrong
[edit]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. 5.18.148.5 (talk) 22:34, 10 May 2021 (UTC)
Dependency bomb
[edit]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)
- Interesting! Revansx (talk) 21:20, 16 February 2023 (UTC)
Installation Tip
[edit]wfLoadExtension( 'SemanticDependencyUpdater' ); must be placed after wfLoadExtension( 'SemanticMediaWiki' ); in LocalSettings.php Paul LEMPERIERE (talk) 17:32, 19 June 2022 (UTC)
Update based on Property Data Age
[edit]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 Revansx (talk) 21:20, 16 February 2023 (UTC)