On 02/05/2013 02:35 AM, Jens Ohlig wrote:
>> I'm wondering if some of the specialized functionality can be avoided by
>> fetching JSON data from wikibase / wikidata through a web API. This
>> would be more versatile, and could be used by alternative templating
>> systems.
> 
> This was actually my first idea! However, since the client (i.e.
> Wikipedia) currently must have access to the database at the repo (i.e.
> Wikidata) anyway, this would result in a huge performance loss without
> any obvious gain.

Jens,

I am not so sure about the potential performance loss. I am guessing
that you fear the overheads of JSON serialization, which tends to be
relatively low with current libraries. Moving or accessing PHP objects
to/from Lua involves some overheads too, which is avoided when directly
decoding in Lua.

Apart from making the data generally available, using a web API means
that the execution can be parallelized / distributed and potentially
cached. It also tends to lead to narrow interfaces with explicit
handling of state. Is direct DB access just needed because an API is
missing, or are there technical issues that are hard to handle in a web API?

Adding specialized Wikidata methods to Lua has a cost for users and
developers. Users probably need to learn larger and less general APIs.
Developers need to continue to support these methods once the content is
there, which can be difficult if the specialized methods don't cleanly
map to a future web API.

Gabriel

_______________________________________________
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to