Hey everyone,
As we have just introduced ourselves on wikidata-l, we are currently working on a PubSubHubbub [1] extension [2] to MediaWiki. Currently, the extension only works on MediaWiki articles, not on Wikibase objects. For those articles we are using the wiki markup as exchange format (using URLs with action=raw), but currently there is no equivalent in Wikibase. We heard there’s work on a common JSON format that – in contrast to the current JSON format – will be standardized and could thus be used for our purpose. Are there plans to implement the new format any time soon and is that format the way to go for us?
BR,
Alexander and Sebastian.
[1] http://code.google.com/p/pubsubhubbubhttp://code.google.com/p/pubsubhubbub//http://code.google.com/p/pubsubhubbub/ [2] http://www.mediawiki.org/wiki/Extension:PubSubHubbub
Hey,
We heard there’s work on a common JSON format that – in contrast to the
current JSON format – will be standardized and could thus be used for our purpose. Are there plans to implement the new format any time soon and is that format the way to go for us?
We have two formats at this point and are not planning on adding new ones. One format is our internal format, which we use in our data access layer (to store entity pages). You should never interact with this format. The second format is out external one, which is for usage in the web API and other parts of our presentation layer. Unfortunately the database dumps we currently provide and are used by a lot of people, contain the internal format. Since these are the only dumps we currently have, people are forced to deal with this internal format. This is what will change - we will provide dumps in the external format rather then the internal one.
This means you already are able to obtain entities in the external format from out web API. And if you are making an extension to Wikibase, you can get the entities as PHP objects, and not deal with their deserialization at all.
We are also working on moving our serialization and deserialization code for our DataModel into a Wikibase-independent component. This is in very early stages at this point and is likely not going to be done any time soon. https://github.com/wmde/WikibaseDataModelSerialization
Cheers
-- Jeroen De Dauw http://www.bn2vs.com Don't panic. Don't be evil. ~=[,,_,,]:3 --
Am 16.01.2014 17:18, schrieb Brueckner, Sebastian:
Hey everyone,
As we have just introduced ourselves on wikidata-l, we are currently working on a PubSubHubbub [1] extension [2] to MediaWiki. Currently, the extension only works on MediaWiki articles, not on Wikibase objects. For those articles we are using the wiki markup as exchange format (using URLs with action=raw), but currently there is no equivalent in Wikibase.
Jeroen already explained about the canonical JSON format. In the context I would like to add some information about the URI scheme we use for our linked data interface, which should also be used for PuSH, I think:
The canonical URI of the *description* of a Wikidata item has the form http://www.wikidata.org/wiki/Special:EntityData/Q64. This URI is format-agnostic, content negotiation is used to redirect to the appropriate concrete URL (in a web browser, the redirect will typically take you to the item's "nromal" page). A format can also be specified directly by giving a file extension, e.g. http://www.wikidata.org/wiki/Special:EntityData/Q64.json
In contrast, the canonical URI of the *concept* described by a Wikidata item follows the form https://www.wikidata.org/entity/Q64.
I suggest to use format-agnostic canonical *description* URI for PuSH notifications.
The URI scheme is described at https://meta.wikimedia.org/wiki/Wikidata/Notes/URI_scheme, but please note that that document was a working draft, and some aspects may be outdated.
Am 17.01.2014 08:39, schrieb Daniel Kinzler:
I suggest to use format-agnostic canonical *description* URI for PuSH notifications.
I just realized that this will not work well, since the hub will retrieve that data, and all clients would then receive the data in the format the hub (not the clients/subscribers) prefers.
To avoid this, a format-specific description URL can be used, e.g. http://www.wikidata.org/wiki/Special:EntityData/Q64.json
Am 16.01.2014 17:18, schrieb Brueckner, Sebastian:
For those articles we are using the wiki markup as exchange format (using URLs with action=raw), but currently there is no equivalent in Wikibase.
I'm actually not sure action=raw is a good choice for wikitext - it's an old, deprecated interface, and has several shortcomings. I'd suggest to use a canonical document URI - such as the plain article URL. The URI just identifies what was changed, the client may have (and even need) additional knowledge to retrieve the updated content in the desired form. At least that is my understanding on how PuSH works - if this is not the case, I see no good way to support multiple content formates.
wikidata-tech@lists.wikimedia.org