Hi everyone,
My bot is fully functional. It does a number of things in a loop and
sleeps between each item in the loop, then at the end of the loop.
Yet, my bot is single-threaded. If it is desirable that some of these
items occur more frequently than others, then it seems appropriate to
break the task up into multiple threads. Yet, there are a few problems:
- Editing Wikipedia requires a login, edit token, and cookies, which
must be shared among the threads if multiple threads are able to edit.
- If the threads do not coordinate their accesses to Wikipedia, the bot
may communicate with Wikipedia in bursts, which does not play nicely.
- One can get logged out at any time, requiring that the thread login
again.
- The fragile nature of the Internet means that all kinds of spurious
errors are bound to occur.
Does anyone have any ideas about how to implement multithreading in a
Wikipedia bot in a robust way?
Richard
Hi all and TIA.
I usually run my bot with maxlag = 5 seconds.
When it attempts a
communication with Wikipedia, if it receives Error:maxlag or HTTP 503 ,
it retries up to 5 times with 10 seconds between each try. If it still
can't get through, it aborts. At the time I'm writing this, about 3pm
Friday afternoon in Australia, my bot is routinely aborting due to 5
maxlag or 503s in a row.
I am usually logged into #wikipedia and #wikipedia-en on Freenode, and
have noticed that many times I and other Australians will complain that
Wikipedia is very slow and timing out for human edits, when Americans
claim that they have no such problem at that time.
Currently I'm running the bot with maxlag = 10 seconds, and it's having
no problems now.
Is the maxlag parameter something that will change if I'm connecting
from Australia? May I be allowed some leniency for being on the other
side of the world, or does it not work like that? If maxlag > 5
seconds, does that mean I should stop wasting the server's time and run
my bot some other time?
Richard
Hi, gang.
#wikipedia-bag on Freenode is a little slow, so I think the list might
give me some more action.
I'm a 33 year old doctor obviously with too much spare time on his
hands. I've made about 15,000 edits to English Wikipedia manually.
Recently I had the idea of writing a bot to do a few things
automatically. I'm writing it in C (C99) on an Ubuntu machine. I've
been coding for 5 days and my bot ought to be making test edits within
a couple of days.
Is anyone else out there using C, or am I the only one crazy enough?
Richard