Reputation: 847
As I was developing a php app I realised that my app is slow in terms of processing large sets of data in the catche. Decided to do something about it and went on to google to find some sort of solution or at least suggestions.
I came across Redis, after reading about it I would realy like to give it a go and test it out as it looks promising,
But I also stumbled into predis and phpredis, and thats when I begun to get confused. From what I understand i need predis or phpredis with my php app, but then where do I use Redis....? how should I build my stack...?
Redis->predis->php
Do I have to install both Redis and Predis/phpredis within my PHP directory in eg. lib dir..?
Also is there any significant difference between Redis and Phpredis
Upvotes: 0
Views: 1169
Reputation: 50102
Redis is a server that runs independently from your application (i.e. PHP) code. You can download it from here.
To talk to Redis, your application can do one of the following:
Most people go for option 2, which in PHP's case your options would be predis, phpredis or any of the other clients in the clients page or others that are unlisted by you can find in GitHub.
Upvotes: 1
Reputation: 341
Redis is a standalone caching application: http://redis.io/ (plenty of documentation on how to install)
predis is a library for interacting with a running Redis application easily from within php. Phpredis is similar but requires compiling.
You can think of it like MySql and PHP. MySql is it's own application that you are able to communicate with via a PHP extension, MySql itself is not a part of PHP.
Your stack could be (apache / php5.3 / mysql / redis) with just the predis library.
You can run redis either on the same server or a different server, it's up to you.
Upvotes: 1