You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fortress@directory.apache.org by Jan Sindberg <js...@autorola.com> on 2015/12/01 10:41:40 UTC
Replacing Ehcache?
I was looking for a way of replacing Ehcache with another implementation. I have seen the Cache-interface. All managers in Fortress uses the same CacheFactory which is hardcoded to initiate a Ehcache implementation. Am I overlooking an extension point or some clever configuration?
Re: Replacing Ehcache?
Posted by Shawn McKinney <sm...@apache.org>.
> On Dec 3, 2015, at 9:02 AM, Shawn McKinney <sm...@apache.org> wrote:
>
> Fortunately permission checking is the fastest operation in this system. It requires one permission search (really a ‘read’ because it is an indexed search), and if you have enabled audit - one compare - to force the slapo access log to store the result. With Fortress core I recently benchmarked around 10K/second against OpenLDAP.
>
> If speed is paramount you might be interested in the accelerator, which was discussed at ldapcon a couple of weeks ago:
> http://ldapcon.org/2015/wp-content/uploads/2015/09/McKinney-Openldap-Accelerator-LdapCon-2015-v4.pdf
>
> Its measured benchmark is around 20K/second permission check ops.
With apacheds permission checks are fast too but there won’t be an audit trail. It’s been some time since I’ve run the benchmarks against apacheds but it somewhere on the order of 8K/second.
You can run these performance tests too, the test harness in the test package under jmeter. There is some info about it in README.txt:
___________________________________________________________________________________
###################################################################################
# SECTION 13. Instructions to performance test fortress core using maven loadtest profile and jmeter.
###################################################################################
To load test fortress createSession or checkAccess performance using jmeter:
a. Update .jmx located under FORTRESS_HOME/src/test/jmeter folder.
e.g. ftCheckAccess.jmx
b. Load the security policy and users required by the jmeter test routines:
# $M2_HOME/bin/mvn install -Dload.file=./ldap/setup/LoadTestUsers.xml
c. From FORTRESS_HOME folder, enter the following command from a system prompt:
# $M2_HOME/bin/mvn -Ploadtest-ftca jmeter:jmeter
Notes:
- the above maps to ftCheckAccess.jmx
- jmx files with prefex 'ac' call fortress accelerator functions (which requires special setup NOT covered by this document)
- jmx files with prefix 'ft' are for fortress functions (which are covered by this document)
Re: Replacing Ehcache?
Posted by Shawn McKinney <sm...@apache.org>.
> On Dec 3, 2015, at 2:31 AM, Jan Sindberg <js...@autorola.com> wrote:
>
> I will look into it. The interesting point for us is probably initialization . Since it is an extension point in the Fortress "framework", I think that it is as it should be ....
> Before I dive into this, could you take a look at my other question regarding Cache lifecycle? It seems to me that the cache has very little impact on system runtime performance of an RBAC guarded application. It might help Fortress Commander - but my concern is about the many permissions that is constantly checked in the application. I don't see any slowness but I might have to deal with network latency in real production environments.
Fortunately permission checking is the fastest operation in this system. It requires one permission search (really a ‘read’ because it is an indexed search), and if you have enabled audit - one compare - to force the slapo access log to store the result. With Fortress core I recently benchmarked around 10K/second against OpenLDAP.
If speed is paramount you might be interested in the accelerator, which was discussed at ldapcon a couple of weeks ago:
http://ldapcon.org/2015/wp-content/uploads/2015/09/McKinney-Openldap-Accelerator-LdapCon-2015-v4.pdf
Its measured benchmark is around 20K/second permission check ops.
As for the question is caching required for runtime (as opposed to administration time)? The answer is ‘yes’ if you are using hierarchical roles (RBAC1) or dynamic separation of duty (RBAC3) in your decisions. Both data structures are maintained in the cache for performance reasons. There is an option to turn off caching for DSD but that would hurt performance as the system would have to repeatedly look up those data structs in the directory. Perhaps there is a happy medium. We’ll need to think about that.
SV: Replacing Ehcache?
Posted by Jan Sindberg <js...@autorola.com>.
From: Shawn McKinney [mailto:smckinney@apache.org]
> 1. december 2015 16:33
>
> > On Dec 1, 2015, at 8:11 AM, Jan Sindberg <js...@autorola.com> wrote:
> >
> > We have our own library shared across our applications. [...]
> > [...] So my goal was to follow our enterprise decision and use our library
> > which our developers and operations should already know how to configure,
> > monitor, operate, etc.
>
> Do you think the existing cache manager interface is sufficient?
>
> If answer is ‘yes’, we would then change (fix) the cache manager
> infrastructure to allow external plug-in. This means you would build a new
> cache manager impl for your existing infrastructure and plug it in using the
> cache factory. Should be easy.
>
> If the answer is ‘no’, we can discuss what’s missing and go from there.
>
> Shawn
I will look into it. The interesting point for us is probably initialization . Since it is an extension point in the Fortress "framework", I think that it is as it should be ....
Before I dive into this, could you take a look at my other question regarding Cache lifecycle? It seems to me that the cache has very little impact on system runtime performance of an RBAC guarded application. It might help Fortress Commander - but my concern is about the many permissions that is constantly checked in the application. I don't see any slowness but I might have to deal with network latency in real production environments.
Re: Replacing Ehcache?
Posted by Shawn McKinney <sm...@apache.org>.
> On Dec 1, 2015, at 8:11 AM, Jan Sindberg <js...@autorola.com> wrote:
>
> We have our own library shared across our applications. Our library is mainly a wrapper or decorator with features such as event-bus integration and features for operations. I think we currently use Guava for the actual cache. So my goal was to follow our enterprise decision and use our library which our developers and operations should already know how to configure, monitor, operate, etc.
Do you think the existing cache manager interface is sufficient?
If answer is ‘yes’, we would then change (fix) the cache manager infrastructure to allow external plug-in. This means you would build a new cache manager impl for your existing infrastructure and plug it in using the cache factory. Should be easy.
If the answer is ‘no’, we can discuss what’s missing and go from there.
Shawn
SV: Replacing Ehcache?
Posted by Jan Sindberg <js...@autorola.com>.
From: Shawn McKinney [mailto:smckinney@apache.org]
1. december 2015 14:53
> > On Dec 1, 2015, at 3:41 AM, Jan Sindberg <js...@autorola.com> wrote:
> >
> > I was looking for a way of replacing Ehcache with another implementation. I
> have seen the Cache-interface. All managers in Fortress uses the same
> CacheFactory which is hardcoded to initiate a Ehcache implementation. Am I
> overlooking an extension point or some clever configuration?
>
> You are correct. Which cache are you wanting to use - hazlecast? I have
> been considering a change as well.
>
> Thanks,
>
> Shawn
We have our own library shared across our applications. Our library is mainly a wrapper or decorator with features such as event-bus integration and features for operations. I think we currently use Guava for the actual cache. So my goal was to follow our enterprise decision and use our library which our developers and operations should already know how to configure, monitor, operate, etc.
Re: Replacing Ehcache?
Posted by Shawn McKinney <sm...@apache.org>.
> On Dec 1, 2015, at 3:41 AM, Jan Sindberg <js...@autorola.com> wrote:
>
> I was looking for a way of replacing Ehcache with another implementation. I have seen the Cache-interface. All managers in Fortress uses the same CacheFactory which is hardcoded to initiate a Ehcache implementation. Am I overlooking an extension point or some clever configuration?
You are correct. Which cache are you wanting to use - hazlecast? I have been considering a change as well.
Thanks,
Shawn