Mark Henderson | 2 May 2008 19:17
Picon

API Implementation - Critique

I need some help - I've implemented the API using CodeIgniter for a 
clients site and everything works on the site except for the wiki pages, 
which are sluggish.

Here is my controller which lists the function calls being made and in 
what order:
http://pastebin.com/m4021c1a7

And here is my model where the actual API calls are made:
http://pastebin.com/dd7c504c

The api.php file exists on the same server that is making the calls, so 
it should be instant but the pages are so very slow, and only in the 
instance of using the MW API.

Any help or insight anybody could give would be MUCH appreciated.

- Mark
Roan Kattouw | 2 May 2008 19:49
Picon
Favicon

Re: API Implementation - Critique

Mark Henderson schreef:
> I need some help - I've implemented the API using CodeIgniter for a 
> clients site and everything works on the site except for the wiki pages, 
> which are sluggish.
>
> Here is my controller which lists the function calls being made and in 
> what order:
> http://pastebin.com/m4021c1a7
>
> And here is my model where the actual API calls are made:
> http://pastebin.com/dd7c504c
>
> The api.php file exists on the same server that is making the calls, so 
> it should be instant but the pages are so very slow, and only in the 
> instance of using the MW API.
>
> Any help or insight anybody could give would be MUCH appreciated.
>
>
>   
If you could tweak your code to log all the API requests it makes, (see 
example below) that would help a lot. For example:

api.php?action=login&lgname=Catrope&lgpassword=123ABC
api.php?action=query&meta=userinfo&uiprop=rights|hastalk
api.php?action=query&prop=info|revisions&rvtoken=rollback&titles=Foo
api.php?action=rollback&token=123abc%2B\&title=Foo

Roan Kattouw (Catrope)
(Continue reading)

Mark Henderson | 4 May 2008 18:23
Picon

Re: API Implementation - Critique


Roan Kattouw wrote:
> 
> Mark Henderson schreef:
>> I need some help - I've implemented the API using CodeIgniter for a 
>> clients site and everything works on the site except for the wiki pages, 
>> which are sluggish.
>>
>> Here is my controller which lists the function calls being made and in 
>> what order:
>> http://pastebin.com/m4021c1a7
>>
>> And here is my model where the actual API calls are made:
>> http://pastebin.com/dd7c504c
>>
>> The api.php file exists on the same server that is making the calls, so 
>> it should be instant but the pages are so very slow, and only in the 
>> instance of using the MW API.
>>
>> Any help or insight anybody could give would be MUCH appreciated.
>>
>>
>>   
> If you could tweak your code to log all the API requests it makes, (see 
> example below) that would help a lot. For example:
> 
> api.php?action=login&lgname=Catrope&lgpassword=123ABC
> api.php?action=query&meta=userinfo&uiprop=rights|hastalk
> api.php?action=query&prop=info|revisions&rvtoken=rollback&titles=Foo
> api.php?action=rollback&token=123abc%2B\&title=Foo
(Continue reading)

Jim R. Wilson | 5 May 2008 17:55
Picon
Gravatar

Re: API Implementation - Critique

Mark said:
> Roan, I'm not sure I understand. Does this have to do with caching? Your
> example just looked like a list of API URLs..

Roan is suggesting that you alter your code to log the actual API
calls being executed so that you can post them as part of the problem
statement.  If we know what requests are being made, we may be better
able to judge what the problem is/isn't ;)

-- Jim R. Wilson (jimbojw)

On Sun, May 4, 2008 at 11:23 AM, Mark Henderson
<henderson.mark@...> wrote:
>
>
>
>
>  Roan Kattouw wrote:
>  >
>  > Mark Henderson schreef:
>  >> I need some help - I've implemented the API using CodeIgniter for a
>  >> clients site and everything works on the site except for the wiki pages,
>  >> which are sluggish.
>  >>
>  >> Here is my controller which lists the function calls being made and in
>  >> what order:
>  >> http://pastebin.com/m4021c1a7
>  >>
>  >> And here is my model where the actual API calls are made:
>  >> http://pastebin.com/dd7c504c
(Continue reading)

Scott Wheeler | 7 May 2008 17:41
Picon
Favicon

acceptable usage policy?

Hi folks --

I'm building a proof-of-concept application that does some work on the 
Wikipedia data set.  I was excited to see the announcement of the new 
API since it would much simplify things for me.

However, as one recent poster pointed out, what is and isn't acceptable 
usage isn't particularly clear.  I'd expect once I put up announce the 
demo that things might hit (complete guesstimation) in the ballpark of 
10k hits per day for a couple days and then probably dropping off to a 
few hundred a day.  Given that Wikipedia averages 30-50k requests per 
second, it seems that such usage would probably be rounding error 
compared to Wikipedia's load.  I'd cache requests that had already come 
across on my server for speed / load reasons.

But what I'd like to avoid is building this nifty demo, announcing it a 
few places and then getting the plug pulled on it.  In the case of you 
know it accidentally becoming The Next Big Thing, I'd naturally move 
over to a DB dump hosted elsewhere.  For clarity, my project doesn't 
have the goal of being a Wikipedia mirror, the demo is just to show how 
the software works on a big data set.

What would even be fine from my side would be just a heads up from 
somebody at WP if we're pissing them off, so that we could rework things 
within a couple days to use a dump.

Is there a policy on acceptable usage anywhere?  I get the feeling from 
a similar question this week that this may be a frequent question.

Cheers,
(Continue reading)

MinuteElectron | 7 May 2008 17:55

Re: acceptable usage policy?

Forwarded to Wikitech-l, that is this Wikimedia server discussion list,
please reply all when replying to this.

Scott Wheeler wrote:
> Hi folks --
>
> I'm building a proof-of-concept application that does some work on the 
> Wikipedia data set.  I was excited to see the announcement of the new 
> API since it would much simplify things for me.
>
> However, as one recent poster pointed out, what is and isn't acceptable 
> usage isn't particularly clear.  I'd expect once I put up announce the 
> demo that things might hit (complete guesstimation) in the ballpark of 
> 10k hits per day for a couple days and then probably dropping off to a 
> few hundred a day.  Given that Wikipedia averages 30-50k requests per 
> second, it seems that such usage would probably be rounding error 
> compared to Wikipedia's load.  I'd cache requests that had already come 
> across on my server for speed / load reasons.
>
> But what I'd like to avoid is building this nifty demo, announcing it a 
> few places and then getting the plug pulled on it.  In the case of you 
> know it accidentally becoming The Next Big Thing, I'd naturally move 
> over to a DB dump hosted elsewhere.  For clarity, my project doesn't 
> have the goal of being a Wikipedia mirror, the demo is just to show how 
> the software works on a big data set.
>
> What would even be fine from my side would be just a heads up from 
> somebody at WP if we're pissing them off, so that we could rework things 
> within a couple days to use a dump.
>
(Continue reading)

Roan Kattouw | 9 May 2008 16:53
Picon
Favicon

BREAKING CHANGE: list=backlinks, embeddedin, imageusage no longer support titles=

When the backlinks module was introduced, it used the following syntax:

api.php?action=query&list=backlinks&titles=Foo

In July 2007, this was changed [1] to:

api.php?action=query&list=backlinks&bltitle=Foo

The first version was still supported for backwards compatibility, but 
threw a warning saying support would be removed soon. The 'soon' part 
wasn't exactly true (the warning was introduced 10 months ago), but it's 
really gonna happen now: titles= support for backlinks, embeddedin and 
imageusage has been discontinued as of r34518 [2]. This revision will go 
live on Wikimedia wikis some time in the next few days, and will be part 
of 1.13 and all later versions. Any client programs still relying on the 
old behavior should've been fixed a long time ago.

Roan Kattouw (Catrope)

[1] http://svn.wikimedia.org/viewvc/mediawiki?view=rev&revision=23774
[2] http://svn.wikimedia.org/viewvc/mediawiki?view=rev&revision=34518
Mark Henderson | 11 May 2008 05:06
Mark Henderson | 11 May 2008 05:10
Picon

Re: API Implementation - Critique


Sorry, not sure I replied to the right message. Also my version is: 1.13alpha
(r33497)
--

-- 
View this message in context: http://www.nabble.com/API-Implementation---Critique-tp17023962p17169643.html
Sent from the WikiMedia API mailing list archive at Nabble.com.
Manos Batsis | 11 May 2008 19:03

MediaWiki to (X)HTML


Hello,

Wiki fragments returned by the API (in JSON or XML) format contain HTML 
markup. When converting the wiki markup to XHTML, is it safe to *not* 
escape characters '<' and '>'? Does that apply to other characters, i.e. 
all five predefined XML entities or more?

Cheers,

Manos

Gmane