phurple - libpurple bindings for PHP

Anatol Belski ab at php.net
Thu Jan 9 14:58:03 EST 2014


Hi Peter,

On Thu, January 9, 2014 20:09, Peter Lawler wrote:
> On 09/01/14 22:06, Anatol Belski wrote:
>
>> - libpurple is still not thread safe
>>
> libpurple is NOT designed to be. I don't think there's ever been a
> promise, or a proposed patchest, to do so.
>
> Now it's true places such as Meebo managed to use libpurple in a way PHP
> bindings would provide (ie, IM over http), but given they managed to do it
> somehow without needing libpurple to be thread safe I'd humbly suggest
> it's not as needed as some people think it may be.
>
The base concept of libpurple is to serve an UI client. That means one
user per process. From that POV being non thread safe is "required and
adequate". Threaded comes if one needs some other application. Say in PHP
- there are threaded SAPI modules to work with Apache mpm_worker or
mpm_winnt. Or say on systems like windows where fork is not available.
Being threaded, libpurple could still work with a non thread safe UI
client, but were also suitable for other beyond things. Were it good for
libpurple - may be or not, but for the world for sure yes :)

> Yes, there are recipients on this list who know how to do it but they're
> probably still under NDA so I doubt we'll ever hear too much from them on
> this topic
>
The way to do that is more or less obvious. The question is more about man
hours, feasibility and willingness. As the patch would be gigantic. Plus,
all the external plugins have to be eventually adapted.

Regards

Anatol




More information about the Devel mailing list