mmoreram / RSQueueBundle

RSQueueBundle, a redis-based queue system for your Symfony2 projects
MIT License
52 stars 12 forks source link

Create connections features #1

Closed mmoreram closed 10 years ago

mmoreram commented 11 years ago

Connections feature should be implemented, so several services should be created dynamically with all available connections.

Also default connection should be added, with configuration element.

snc commented 11 years ago

What about using the clients that my https://github.com/snc/SncRedisBundle provides?

mmoreram commented 11 years ago

Well, SncRedisBundle was my first real option, but my Bundle uses phpredis.

Yes, SncRedisBundle can actually work with phpredis, but loading one bundle just for using connections, is not from my point of view, the best option.

I'll think anyway :)

mmoreram commented 11 years ago

@snc Btw, what do you say about that? #Interested-in

snc commented 11 years ago

The main point of my bundle is to integrate redis into Symfony2 at a low level, it just lets you configure the clients (connections) and provides them as services. When configured you get some extra features like profiler logging and more. When using the simpler commands you can seemlessly switch between phpredis and Predis because the PHP code is the same. When using the bundle there should be no overhead.

mmoreram commented 11 years ago

So, the point is that users will need to configure, first of all, connections in sncredis configuration namespace, and then refer which connection use to all queue operations ( Using, by default, default one )...

Ok, seems logical... but I need someway to force user to use phpredis, because of the way of using some redis operations ( like subscribe )

snc commented 11 years ago

You could add a compiler pass which looks up the configured client type from the bundle configuration or the service definition.

mmoreram commented 11 years ago

Seems a good idea... I'll work on this today :)

Thanks Henrik