Redis and MongDB data sharing, redismongdb
Refer:
Http://blog.nosqlfan.com/html/3537.html redis Data Summary
Http://blog.nosqlfan.com/html/3548.html mongDB Data Summary
Problems with session sharing in redis
How did you create a JedisPool?
JedisPoolConfig config = new JedisPoolConfig (); // configure
Config. setMaxActive (iMaxActive );
Config. setMaxIdle (iMaxIdle );
Config. setMaxWait (lMaxWait );
Config. setTestOnBorrow (true );
JedisPool objJedisPool = new JedisPool (config, ip, port number, timeout );
I use this method, but it is okay in linux.
Check that configuration information such as IP address cannot be obtained before JedisPool is created.
If an exception occurs, paste the exception information.
Java: is it feasible to use redis for single-point logon? Let's take a look at my methods.
First, you need to understand that most of the session implementations are through cookies, so cross-domain sessions are impossible.
However, cross-origin authentication can still be implemented using methods such as OAuth. However, it is not recommended that the OAuth project be completed.
Second, although cross-origin is a little difficult, different projects in the same domain can share sessions, CAS is not complex, you can search for the redis-session project on github, there is only one source code file, which provides a nodejs Implementation of redis session, that is, setting redis timeout to simulate session Timeout.
Again, cross-origin is also possible, that is, using iframe, while logging on, write cookies under multiple domains at the same time, pay attention to browser differences.
In summary, your ideas are completely feasible.