Integration with Spring 3.1 + Azure

89 views
Skip to first unread message

Ash McConnell

unread,
Mar 12, 2013, 12:25:12 PM3/12/13
to simple-sprin...@googlegroups.com
Hi Folks,

I'm new to caching in general, SSM + Azure.  I just wanted to check if anyone has tried using all 3 together?  Is it possible? Is it sensible?

Azure say they have memcache support here: -


We are looking to use SSM to implement Spring Cache support to cache the result of long REST calls.

Any help / advice welcome.

Thanks
Ash 

Jakub Białek

unread,
Mar 12, 2013, 3:24:44 PM3/12/13
to simple-sprin...@googlegroups.com
Hi,

I've never used Azure but according to the documentation: http://msdn.microsoft.com/en-us/library/jj860467.aspx it is possible to connect to memcached instance on Azure using spymemcached client. If it possible with spymemcached it should also work with SSM (and spymemcached backend), just use the same port and server name as in spymemcached.

If you haven't seen the sample project that shows how to use SSM as Spring Cache backend please take a look at http://code.google.com/p/simple-spring-memcached/source/browse/#svn%2Ftrunk%2Fspring-cache-integration-test.

Best regards,
RaGnoR


Ash 

--
You received this message because you are subscribed to the Google Groups "simple-spring-memecached" group.
To unsubscribe from this group and stop receiving emails from it, send an email to simple-spring-meme...@googlegroups.com.
To post to this group, send email to simple-sprin...@googlegroups.com.
Visit this group at http://groups.google.com/group/simple-spring-memecached?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Ash McConnell

unread,
Mar 14, 2013, 3:47:33 AM3/14/13
to simple-sprin...@googlegroups.com
Thanks RaGnoR!  I was off yesterday (fatherly duties!), but I'll try and get SSM up and running today.  Thanks for the pointers!

All the best,
Ash


On Tuesday, 12 March 2013 19:24:44 UTC, ragnor84 wrote:
Hi,

I've never used Azure but according to the documentation: http://msdn.microsoft.com/en-us/library/jj860467.aspx it is possible to connect to memcached instance on Azure using spymemcached client. If it possible with spymemcached it should also work with SSM (and spymemcached backend), just use the same port and server name as in spymemcached.

If you haven't seen the sample project that shows how to use SSM as Spring Cache backend please take a look at http://code.google.com/p/simple-spring-memcached/source/browse/#svn%2Ftrunk%2Fspring-cache-integration-test.

Best regards,
RaGnoR


On 12 March 2013 17:25, Ash McConnell <ash.mc...@gmail.com> wrote:
Hi Folks,

I'm new to caching in general, SSM + Azure.  I just wanted to check if anyone has tried using all 3 together?  Is it possible? Is it sensible?

Azure say they have memcache support here: -


We are looking to use SSM to implement Spring Cache support to cache the result of long REST calls.

Any help / advice welcome.

Thanks
Ash 

--
You received this message because you are subscribed to the Google Groups "simple-spring-memecached" group.
To unsubscribe from this group and stop receiving emails from it, send an email to simple-spring-memecached+unsub...@googlegroups.com.

Ash McConnell

unread,
Mar 19, 2013, 12:42:34 PM3/19/13
to simple-sprin...@googlegroups.com
Hi RaGnoR,

Sorry to bother you again, but I'm having trouble getting the configuration to work (I am using @Configuration annotation).  My question is, how come the userCache is of type CacheFactory?  How does it work as a constructor argument to SSMCache (as it's expecting a Cache parameter).

Have I miss some subtlety here?

Thanks for your help
-Ash

On Tuesday, 12 March 2013 19:24:44 UTC, ragnor84 wrote:
Hi,

I've never used Azure but according to the documentation: http://msdn.microsoft.com/en-us/library/jj860467.aspx it is possible to connect to memcached instance on Azure using spymemcached client. If it possible with spymemcached it should also work with SSM (and spymemcached backend), just use the same port and server name as in spymemcached.

If you haven't seen the sample project that shows how to use SSM as Spring Cache backend please take a look at http://code.google.com/p/simple-spring-memcached/source/browse/#svn%2Ftrunk%2Fspring-cache-integration-test.

Best regards,
RaGnoR


On 12 March 2013 17:25, Ash McConnell <ash.mc...@gmail.com> wrote:
Hi Folks,

I'm new to caching in general, SSM + Azure.  I just wanted to check if anyone has tried using all 3 together?  Is it possible? Is it sensible?

Azure say they have memcache support here: -


We are looking to use SSM to implement Spring Cache support to cache the result of long REST calls.

Any help / advice welcome.

Thanks
Ash 

--
You received this message because you are subscribed to the Google Groups "simple-spring-memecached" group.
To unsubscribe from this group and stop receiving emails from it, send an email to simple-spring-memecached+unsub...@googlegroups.com.

Jakub Białek

unread,
Mar 19, 2013, 2:02:00 PM3/19/13
to simple-sprin...@googlegroups.com
Hi,

Don't hesitate to ask any questions :).
As you may see in this sample file: http://code.google.com/p/simple-spring-memcached/source/browse/trunk/spring-cache-integration-test/src/main/resources/application-context.xml, userCache bean is created by CacheFactory. The userCache bean is NOT of type CacheFactory. The com.google.code.ssm.CacheFactory class implements org.springframework.beans.factory.FactoryBean (http://static.springsource.org/spring/docs/3.1.4.RELEASE/spring-framework-reference/htmlsingle/spring-framework-reference.html#beans-factory-extension-factorybean). If you use it as a 'class' in <bean> element then created bean will be of type FactoryBean.getObject(). That's why the userCache bean is of type com.google.code.ssm.Cache and you can use it in SSMCache.
Does that answer your question?

Best regards,
-- Ragnor


To unsubscribe from this group and stop receiving emails from it, send an email to simple-spring-meme...@googlegroups.com.

Ash McConnell

unread,
Mar 19, 2013, 3:45:15 PM3/19/13
to simple-sprin...@googlegroups.com
Hi Ragnor,

Thanks, answers the question perfectly, I am glad to report it works well!  Currently to a local memcached server, but hopefully tomorrow I'll have a chance to try it with Azure and report back (if you are interested).

Thanks again!
All the best,
Ash
To unsubscribe from this group and stop receiving emails from it, send an email to simple-spring-memecached+unsubscr...@googlegroups.com.
To post to this group, send email to simple-sprin...@googlegroups.com.

Jakub Białek

unread,
Mar 20, 2013, 1:56:31 AM3/20/13
to simple-sprin...@googlegroups.com
Hi,

Yes, I'm interested, so please let me know how it works with Azure.
If it works without any issues I'll update documentation and add Azure.

Best regards,
-- Ragnor 

To unsubscribe from this group and stop receiving emails from it, send an email to simple-spring-meme...@googlegroups.com.

Ash McConnell

unread,
Mar 20, 2013, 6:09:09 AM3/20/13
to simple-sprin...@googlegroups.com
Hi Ragnor,

Is it possible to use authentication using "ACS"? 


It says: - On the Properties window, also note the value of the cache Authentication Token. This is an ACS key that secures access to your cache.

I tried just using the cache url, but it doesn't work.  I get: -

java.io.IOException: Broken pipe
at sun.nio.ch.FileDispatcher.write0(Native Method)
at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:29)
at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:69)
at sun.nio.ch.IOUtil.write(IOUtil.java:26)
at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:336)
at net.spy.memcached.protocol.TCPMemcachedNodeImpl.writeSome(TCPMemcachedNodeImpl.java:544)
at net.spy.memcached.MemcachedConnection.handleWrites(MemcachedConnection.java:422)
at net.spy.memcached.MemcachedConnection.handleIO(MemcachedConnection.java:383)
at net.spy.memcached.MemcachedConnection.handleIO(MemcachedConnection.java:242)
at net.spy.memcached.MemcachedConnection.run(MemcachedConnection.java:836)

Is there any way to specify this token?

Thanks for your help
All the best,
Ash

Jakub Białek

unread,
Mar 20, 2013, 6:17:29 AM3/20/13
to simple-sprin...@googlegroups.com
Hi Ash,

Could you explain me how exactly the ACS works? Is it only some extra query parameter that should be used while connecting to memcached instance?

Best regards,
-- Ragnor


To unsubscribe from this group and stop receiving emails from it, send an email to simple-spring-meme...@googlegroups.com.

Ash McConnell

unread,
Mar 20, 2013, 6:36:28 AM3/20/13
to simple-sprin...@googlegroups.com
Hi Ragnor,

I thought it was a standard memcached authentication method, but it seems to be a bespoke Azure thing.  I am going to investigate further: - http://msdn.microsoft.com/en-us/library/gg429775.aspx

All the best,
Ash
Reply all
Reply to author
Forward
0 new messages