views:

36

answers:

2

Is there any way to access Redis data from relational databases, such as Oracle or SQL Server?

One use case I have in mind is ETL to a data warehouse.

A: 

Am trying to understand the question: You have data in a traditional RDBMs, and you want to extract information from here, and load into Redis? Or its the other way around?

Either way, since am not competent to talk about RDBMS, I would expect to create a program (Java in my case), which would extract information from Redis, and upload it to Oracle. There are options to interact with Redis using a Java Client library (JDBC Redis, and JRedis are examples)

You may get a better answer from the community, if you can elaborate on your question.

Kiran Subbaraman
A: 

Well, if you use server side Java object on your ORA (and they can make REST calls, in the very least, if not socket io (don't know)) then you can call Redis from your stored procedures in Oracle.

[edit]

Should add that if you can make socket connections, then just include JRedis jar in your Oracle server's lib so server-side object can create clients.

Should that not be possible -- I would seriously question a DB that lets SProcs and triggers to open generic TCP connections -- then you are left with consuming Web Services.

JRedis doesn't support web services, but nothing is stopping you from wrapping JRedis and exposing whatever command you need as a RESTFul resource. So here, you would run Redis on server R, a java web server (Jetty/Jettison would do fine) running JRedis on server R or R`. Since Redis is single threaded, it is perfectly fine to run it on the same multi-core box as a JVM; its just a matter of resources, and it they are sufficient then you are using the loopback on the connection between Redis and JRedis and that's guaranteed to be faster than traversing network boundaries! But if the loads you require preclude colocation of Redis and JRedis (proxy), then use a second server.

And of course, you are running your DB on server D. So D <=> R` <=> R. You will pay the second hop's latency costs, of course.