Re: Online chat with memcached

2011-01-04 Thread Geoffrey Hoffman
It's logical sure but your problem has nothing to do with Memcached I don't think. What causes client(s) to get new message(s)? On Tue, Jan 4, 2011 at 12:05 PM, - - wrote: > hello, > I'm trying to write a chat server with memcached. I decided to use memcache > because of > > Faster than using H

Re: memcached for a video intensive website

2011-01-05 Thread Geoffrey Hoffman
I would look at Amazon AWS CloudFront or similar services from RackSpaceCloud or VPS.net. Hosting what you hope to become popular videos on one server is almost guaranteed to fail or run up serious bandwidth charges or both. On Wed, Jan 5, 2011 at 11:38 AM, JTSM wrote: > ... my thought is the m

Re: Problems when one of the memcached server down

2011-03-07 Thread Geoffrey Hoffman
I couldn't easily find any memcache .net documentation, but a user contributed note on the php memcache doc page says: http://php.net/manual/en/book.memcache.php The memcache changelog for 3.0.5 has the comment: "Added method MemcachePool::findServer(key) which returns the server a key hashes to"

Re: Implementation of CHECK command for memcached

2011-03-18 Thread Geoffrey Hoffman
On Fri, Mar 18, 2011 at 1:12 PM, Oleg Romanenko wrote: > Hi. > >>How could this be put to use?  i.e. when is knowing that >> something exists at some point in an ephemeral store useful to an >> application? > > This command provides support for lazy read operation. You can read > the value of the

Re: php_memcached.dll for PHP 5.3.5

2011-03-20 Thread Geoffrey Hoffman
On Sat, Mar 19, 2011 at 12:39 AM, DavidProw wrote: > Hi! > > I don't know if I'm on right place, but I'd lost hope to found it, > then I'm trying everything! hehe > > Well, I don't know how I can compile Memcached, I have tried, but > without success :( > > I want know if someone can do it for me?

Re: about Proposal Tag Support

2011-03-30 Thread Geoffrey Hoffman
Hi Hernán, I'm curious... I'm neither a memcache expert nor a C programmer, but having read your proposal, can you not store the keys of the related items in another set? Is that how you're doing it now and want to avoid two round trips to get & deserialize? Just trying to understand your use case

Re: Memcachd with httpd to cache user stickyness to a datacenter

2011-04-04 Thread Geoffrey Hoffman
It's not even a network problem, it's an application design problem. Even if all you wanted to do was load balance a user session (user ID & some other text-based info) across data centers, it's not that trivial, particularly if you didn't plan for that up front. At the bare minimum all you need i

Re: Memcachd with httpd to cache user stickyness to a datacenter

2011-04-06 Thread Geoffrey Hoffman
Use CPAN Geo-IP and cache the info for 24 hours. On Wed, Apr 6, 2011 at 11:49 AM, dormando wrote: > > > On Wed, 6 Apr 2011, Mohit Anchlia wrote: > >> Thanks! These points are on my list but none of them are useful. The >> reason is I think I mentioned before that most of these servers that >> ar

Re: Can't Connect to Memcache via PHP on CentOS

2011-04-24 Thread Geoffrey Hoffman
What us the error you are getting from PHP and are you using/trying 'memcache' or 'memcached' php class? What version of php? Are you running memcache daemon on same server where LAMP is running? If other server open port 11211 with iptables. Sent from my iPhone On Apr 23, 2011, at 9:40 PM, Ro

Re: Can't Connect to Memcache via PHP on CentOS

2011-04-24 Thread Geoffrey Hoffman
mcached > > I am running PHP 5.1.6. As for running, I tried /etc/init.d/memcached start > ... for persistence, I opted for chkconfig --add memcached ... > > Now, I have actually done this several times int he past. I have never had > a problem before. > > > On Sun, Ap

Re: Can't Connect to Memcache via PHP on CentOS

2011-04-24 Thread Geoffrey Hoffman
memcache memcache support enabled Active persistent connections 0 > Version2.2.6Revision$Revision: 303962 $ > Directive Local Value Master Value memcache.allow_failover 1 > 1memcache.chunk_size81928192memcache.default_port112211memcache.default_timeout_ms10001000memcache.hash_functioncrc32crc32memcache.hash_strategystandardstandardmemcache.max_fail

Re: Can't Connect to Memcache via PHP on CentOS

2011-04-24 Thread Geoffrey Hoffman
Sorry, I see you provided error output. Connection refused, eh? Are you connecting to localhost or another server running memcached? Try opening port 11211 with iptables (if CentOS - did you say what distro you are using?)

Re: reading data from php client

2011-06-06 Thread Geoffrey Hoffman
It's unclear from your code sample how you are instantiating the memcache class instance. Meaning, $memcache isn't set? Try this: $memcache = new Memcache; $memcache->connect('127.0.0.1', 11212); $memcache->set('sample3',2); $foo = $memcache->get('sample3'); print_r( $foo ); On Sun, Jun 5, 201

Re: How to determine if memcache is full

2011-06-09 Thread Geoffrey Hoffman
PK - Just a side point here, but: > memcached -d -m 96 -n 10 -c 4096 -f 1.05 -l 127.0.0.1 -p 11211 *-m *Use MB memory max to use for object storage; the default is 64 megabytes. *-c *Use max simultaneous connections; the default is 1024. So, my question is, you're starting memcached on a ser

Re: Is `get key` the only way to check if a key exists?

2011-08-20 Thread Geoffrey Hoffman
On Sat, Aug 20, 2011 at 11:56 AM, dormando wrote: > > The main reason I ask is, I was wondering if there is any smarter way > > to check if a key exists, because, I'm just thinking that it would be > > advantageous to be able to differentiate a "get_miss" for a reason > > different than the key w

Re: Memcached Values not there after page refresh

2011-08-23 Thread Geoffrey Hoffman
Check the memcache_set PHP docs - give it a NULL flag and specify your $timeout (as a unix timestamp in the future) explicitly - or pass a timeout of 0 for (never expire). It may be that its expiring the moment its set. On Tue, Aug 23, 2011 at 12:29 AM, 1989moni1989 wrote: > Hello! > > I have a

Re: Need Help related to memcached

2012-06-09 Thread Geoffrey Hoffman
You should first just build itfollowing the examples online and try some tutorials . On Sat, Jun 9, 2012 at 10:19 AM, Sourabh Chandak wrote

Re: php-memcached advice

2012-06-29 Thread Geoffrey Hoffman
Aaron, Can you set and get values from telnet? Can you get a value you set in Telnet, from PHP using the same key, with only a GET? What do you see when issuing a `stats` command from telnet? (is there at least 1 key? do you see any misses?) Double check that you really want *PHP-Mecached* (wit

Re: php-memcached advice

2012-06-29 Thread Geoffrey Hoffman
> I have generally heard that php-memcached is better though? Basically if you need/want to be able to do anything on the list that says YES only in the Memcached column, then yes, it's better. I suppose it depends on your definition of better. It may be better to have older code that a lot more p

Re: php-memcached advice

2012-06-29 Thread Geoffrey Hoffman
If you stop and start memcached, then run your code once, does the output of stats show two cmd_set operations? (before) STAT cmd_set 0 (after) STAT cmd_set 1 ? If it says 2, then there is indeed something strange going on. Is your code inside of a (web) page with other stuff (and you're runnin

Re: php-memcached advice

2012-06-29 Thread Geoffrey Hoffman
You're not insane and you're doing everything I would do if I saw the same thing you're seeing. Having said that, I do not have a good explanation for you, either. Didn't you say you have Wireshark running? Maybe port scanning/sniffing is doing something weird? Did you build against a particular

Re: Storage Engines?

2012-07-05 Thread Geoffrey Hoffman
On Thu, Jul 5, 2012 at 3:38 PM, Les Mikesell wrote: > On Thu, Jul 5, 2012 at 5:00 PM, Brian Moon wrote: > > I have tried running cluster. It is not a simple system to run. It > requires > > a lot of hand holding. > > > > So you want a multi-node db with replication that is as fast as a > cache,

Re: Open Source NoSQL ORM(ish)

2012-07-23 Thread Geoffrey Hoffman
Evan, On Mon, Jul 23, 2012 at 6:00 PM, Evan Buswell wrote: > Apologies for cross posting. > It only takes 2 minutes longer to post a relevant message specific to memcached and avoid cross posting. That said, your stuff seems pretty cool. I wondered WTH Tokyo Tyrant was and went to their page, w

Re: Synchronize memcache object with database

2012-07-27 Thread Geoffrey Hoffman
Some new features of MySQL InnoDB 5.6, MySQL Cluster 7.2 can be set up this way. http://blogs.innodb.com/wp/2011/04/nosql-to-innodb-with-memcached/ http://dev.mysql.com/tech-resources/articles/mysql-cluster-7.2-ga.html On the other hand, depending on your business layer language, you can extend

Re: Can't Connect to Memcache via PHP on CentOS

2012-08-23 Thread Geoffrey Hoffman
wall would be a problem. Maybe this is the reason? >>> > Also, is there a way that I can be sure to remove everything so that I >>> can >>> > start from scratch? I probably installed one too many (or 3 too many) >>> > modules, some may be conflicting. For examp

Re: Can't Connect to Memcache via PHP on CentOS

2012-08-23 Thread Geoffrey Hoffman
Xun, thanks for follow up. > setenforce 0 Oh yeah, good one. I haven't used CentOS in awhile. Glad it's working!

Re: I need help setting up memcached

2012-09-24 Thread Geoffrey Hoffman
Aaron, It's not something you just upload to your web files. Memcached (the daemon) has to be built from source and run from the command line like so sudo /usr/bin/memcached -u nobody -m 64 -l 127.0.0.1 -p 11211 You then have to compile and install the extension for PHP. Read more here: http:/

Re: Memcached cluster

2013-03-14 Thread Geoffrey Hoffman
I realize this is a Memcached list, and this isn't to suggest that Memcached isn't a rock solid cache. However it ought to be noted that other tools/services offer in-memory replication features while working as a drop-in replacement for building your own scalable Memcached architecture. Redis has

Re: Does the SASL support is necessary if I just host only one website on my VPS?

2013-04-09 Thread Geoffrey Hoffman
No. Just need memcached to be running and not blocked on port 11211. Sent from my iPhone On Apr 9, 2013, at 9:26 PM, xiexin1...@gmail.com wrote: > Hi, I have a question: I purchased a VPS, I just config only one website with > memcache on this VPS, does the SASL is necessary ? > > Best regards

Re: Memcache Timeout issue

2013-07-18 Thread Geoffrey Hoffman
Is there a path from your application to the memcached server (is the port open?), and is the memcached daemon running on the remote server? On Thu, Jul 18, 2013 at 11:40 PM, Krishnavel Lakshmanan wrote: > Hi, > > We are using spy memcache provided by google in our application. When we > are ru

Re: Issue in consistent hash algoritham while allocating the nodes in consistent circle

2013-09-03 Thread Geoffrey Hoffman
Try it as the integer modulo 1000 ( % 1000) -1 = ringnum On Sep 3, 2013, at 2:25 AM, indrajith m wrote: > Hi, > > I am working on consistent hashing am getting the problem while generating > the consistent Id in consistent circle am following these method > > My consistent circle lower limi

Re: need step by step tutorial

2013-10-18 Thread Geoffrey Hoffman
// page 1 $foo = 'bar'; $data = array('foo'=>$foo); $baz = json_encode($data); $mc = new Memcache; $mc->connect('127.0.0.1','11211'); $mc->set('key', $baz); // page 2 $mc = new Memcache; $mc->connect('127.0.0.1','11211'); $data = json_decode( $mc->get('key') ); var_dump($data); {'foo':'bar'} O

Re: scale out php aplication with memcached

2015-06-16 Thread Geoffrey Hoffman
Use one memcached server for all sessions. Or something like Repcached http://repcached.lab.klab.org/ On Tue, Jun 16, 2015 at 2:50 PM, MaxP wrote: > Hello. > > > will like to know how memcached manage cache for php sessions i mean. I > would like to design a php app that scale out and in each

Re: Can memcached be used for true clustering...still unclear...

2015-10-26 Thread Geoffrey Hoffman
Not like you're wanting, probably. I'm pretty sure it's up to you (in your app code) to write to all your nodes. Best, Geoff > On Oct 26, 2015, at 06:35, Jonas Steinberg wrote: > > I've been reading the web for an hour now and I'm still unclear as to whether > memcached can actually be used t