python - Twisted and easy plugin development -
i'm creating application, , i'm thinking of using twisted communication users via xmpp(jabber, chat protocol), possibility of using other means of communication in future well. application designed support, or rather, rely on (independently developed) plugins. plugins spend of time doing i/o. ideally, plugins use deferreds i/o , return immediately(i.e. non-blocking), i'm concerned asking plugin-developers burden, , slow down , discourage plugin-development. blocking high-level libraries more common(think facebook or twitter-libraries), , asking possibly not-great coder read on deferreds before developing simple 10 loc twitter-library doesn't sound want do.
the twisted docs state maximum default size threadpool 10, , should "be careful understand threads , resource usage before drastically altering thread pool sizes", don't think (understand), giving each plugin thread of own doesn't seem idea either.
any suggestions?
thank help.
[edit] standalone(non-server)-version of application available. plugin-developers using standalone version. that's why i'm worried developers choose easy way out, , create blocking plugins.
don't use threads.
the best example of how make things easy people not familiar twisted way scrapy defines its plugin interfaces. never @ reactor or deferred or - define when pages scraped, callbacks.
alternately, don't worry much. there plenty of independently developed protocol support plugins use twisted apis directly; @ layer of implementing transport protocols, people can have no problem learning twisted.
Comments
Post a Comment