Thanks.

It is definitely meant for debugging applications that use memcached.  And
it shouldn't be turned on for production systems.  However, the same built
binary could be used for testing and production because the webconsole code
is not used or even initialized if the -w option isn't set.

I've been trying to integrate the code that was working on an older branch,
into the current master branch of dustin's repo, but the 'conn' object is
now more integrated, and when making those function calls through
webconsole, we dont have a conn object, so a few bits are broken.

I'll push the code back to my github fork so you can view the code if your
interested in how it works.  Even though it doesn't compile there at the
moment.
http://github.com/hyper/memcached/tree/webconsole

It works by using the evhttp stuff that is part of libevent that memcached
is already using.  It basically listens on a different port and processes
the http requests and makes callbacks for particular urls.   It has
callbacks for operations like 'list', 'get', 'set', 'incr', etc... and a
generic callback (for all other urls) that returns a webpage with all the
html, css and javascript that runs what you see.    So if -w option is not
set it does nothing.

I was able to do everything without making any code changes to other code in
memcached, but now that the 'conn' object is passed around a lot more for
thread stats, it makes it a bit more difficult.


On Sat, Mar 14, 2009 at 2:10 AM, Marc Bollinger <[email protected]>wrote:

> However, wouldn't it be simple enough to make a UI using PHP or
>> something that was totally portable and you could list multiple
>> servers and such? This says "built in" to memcached. Maybe that's what
>> scares me... is this actually bolted into memcached itself or am I
>> just getting stuck on the words :)
>>
>
> Just by briefly reading his email, it sounds like he's adding his own
> callbacks to libevent and intercepting events, then storing them for display
> via the in-process webserver. I'm guessing this was a performance
> consideration, but PHP really doesn't offer the sort of capability to hook
> in that way--you'd wind up at the same point we're currently at, where
> people complain about not being able to dump out the contents of memcached.
> I'm not saying don't be scared (though this shouldn't be going into
> production, anyway), though ;-)
>



-- 
"Be excellent to each other"

Reply via email to