You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directmemory.apache.org by "Simone Tripodi (Created) (JIRA)" <ji...@apache.org> on 2012/02/26 21:42:48 UTC
[jira] [Created] (DIRECTMEMORY-75) Create a CacheService builder to
simplify the bootstrap process
Create a CacheService builder to simplify the bootstrap process
---------------------------------------------------------------
Key: DIRECTMEMORY-75
URL: https://issues.apache.org/jira/browse/DIRECTMEMORY-75
Project: Apache DirectMemory
Issue Type: Improvement
Components: core
Affects Versions: 0.6.0
Reporter: Simone Tripodi
Assignee: Simone Tripodi
Fix For: 0.6.0
This is kind of simplified yet powerful version of DIRECTMEMORY-62 that I marked as a won't fix.
Olivier suggested in ML a Configuration/Factory pattern, with the builder we can achieve both.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (DIRECTMEMORY-75) Create a CacheService builder
to simplify the bootstrap process
Posted by "Simone Tripodi (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DIRECTMEMORY-75?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13216852#comment-13216852 ]
Simone Tripodi commented on DIRECTMEMORY-75:
--------------------------------------------
the builder can be extended/used to read the configuration file you just exposes, I have a quick reply for your need: using the Digester :P
That's because it already supports a mechanism to interpolate properties (they can be bound from java system properties and environment variables)
Anyway, I would implement it in a dedicated module, not in the core APIs, to maintain the required dependencies as lesser as possible.
If you have already a format in mind, please fill an issue describing the requirements and I can quickly provide you the working impl.
Just a suggestion for the server - you can still get configuration parameters from the servlet parameters... :P
{code}
<web-app>
<servlet>
<servlet-name>DirectMemoryServlet</servlet-name>
<servlet-class>org.apache.directmemory.server.services.DirectMemoryServlet</servlet-class>
<init-param>
<param-name>buffers</param-name>
<param-value>1000</param-value>
</init-param>
<init-param>
<param-name>serializer</param-name>
<param-value>org.apache.directmemory.serialization.msgpack.MessagePackSerializer</param-value>
</init-param>
...
</servlet>
...
</web-app>
{code}
> Create a CacheService builder to simplify the bootstrap process
> ---------------------------------------------------------------
>
> Key: DIRECTMEMORY-75
> URL: https://issues.apache.org/jira/browse/DIRECTMEMORY-75
> Project: Apache DirectMemory
> Issue Type: Improvement
> Components: core
> Affects Versions: 0.6.0
> Reporter: Simone Tripodi
> Assignee: Simone Tripodi
> Fix For: 0.6.0
>
>
> This is kind of simplified yet powerful version of DIRECTMEMORY-62 that I marked as a won't fix.
> Olivier suggested in ML a Configuration/Factory pattern, with the builder we can achieve both.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (DIRECTMEMORY-75) Create a CacheService builder
to simplify the bootstrap process
Posted by "Hudson (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DIRECTMEMORY-75?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13216839#comment-13216839 ]
Hudson commented on DIRECTMEMORY-75:
------------------------------------
Integrated in directmemory-windows #8 (See [https://builds.apache.org/job/directmemory-windows/8/])
[DIRECTMEMORY-75] Create a CacheService builder to simplify the bootstrap process (Revision 1293931)
Result = FAILURE
simonetripodi :
Files :
* /incubator/directmemory/trunk/directmemory-cache/src/main/java/org/apache/directmemory/DirectMemory.java
* /incubator/directmemory/trunk/directmemory-cache/src/main/java/org/apache/directmemory/cache/Cache.java
* /incubator/directmemory/trunk/directmemory-cache/src/main/java/org/apache/directmemory/cache/CacheService.java
* /incubator/directmemory/trunk/directmemory-cache/src/main/java/org/apache/directmemory/cache/CacheServiceImpl.java
* /incubator/directmemory/trunk/directmemory-cache/src/main/java/org/apache/directmemory/package-info.java
* /incubator/directmemory/trunk/directmemory-cache/src/test/java/org/apache/directmemory/cache/CacheServiceImplTest.java
* /incubator/directmemory/trunk/integrations
* /incubator/directmemory/trunk/integrations/ehcache/src/main/java/org/apache/directmemory/ehcache/DirectMemoryCache.java
* /incubator/directmemory/trunk/integrations/solr/src/main/java/org/apache/directmemory/examples/solr/SolrOffHeapCache.java
* /incubator/directmemory/trunk/server/directmemory-server/src/main/java/org/apache/directmemory/server/services/DirectMemoryServlet.java
> Create a CacheService builder to simplify the bootstrap process
> ---------------------------------------------------------------
>
> Key: DIRECTMEMORY-75
> URL: https://issues.apache.org/jira/browse/DIRECTMEMORY-75
> Project: Apache DirectMemory
> Issue Type: Improvement
> Components: core
> Affects Versions: 0.6.0
> Reporter: Simone Tripodi
> Assignee: Simone Tripodi
> Fix For: 0.6.0
>
>
> This is kind of simplified yet powerful version of DIRECTMEMORY-62 that I marked as a won't fix.
> Olivier suggested in ML a Configuration/Factory pattern, with the builder we can achieve both.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (DIRECTMEMORY-75) Create a CacheService builder
to simplify the bootstrap process
Posted by "Benoit Perroud (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DIRECTMEMORY-75?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13216828#comment-13216828 ]
Benoit Perroud commented on DIRECTMEMORY-75:
--------------------------------------------
+1 for a builder pattern !
> Create a CacheService builder to simplify the bootstrap process
> ---------------------------------------------------------------
>
> Key: DIRECTMEMORY-75
> URL: https://issues.apache.org/jira/browse/DIRECTMEMORY-75
> Project: Apache DirectMemory
> Issue Type: Improvement
> Components: core
> Affects Versions: 0.6.0
> Reporter: Simone Tripodi
> Assignee: Simone Tripodi
> Fix For: 0.6.0
>
>
> This is kind of simplified yet powerful version of DIRECTMEMORY-62 that I marked as a won't fix.
> Olivier suggested in ML a Configuration/Factory pattern, with the builder we can achieve both.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (DIRECTMEMORY-75) Create a CacheService builder
to simplify the bootstrap process
Posted by "Simone Tripodi (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DIRECTMEMORY-75?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13216835#comment-13216835 ]
Simone Tripodi commented on DIRECTMEMORY-75:
--------------------------------------------
JSR107 final version has been far to be completed from ages and, even if will be supported as a separated module (you are more than welcome on contributing it), won't be part of the core DM APIs.
What I added ATM is a simple builder to support *pure DM* core bootstrap, avoiding the tricky {{init()}} methods.
> Create a CacheService builder to simplify the bootstrap process
> ---------------------------------------------------------------
>
> Key: DIRECTMEMORY-75
> URL: https://issues.apache.org/jira/browse/DIRECTMEMORY-75
> Project: Apache DirectMemory
> Issue Type: Improvement
> Components: core
> Affects Versions: 0.6.0
> Reporter: Simone Tripodi
> Assignee: Simone Tripodi
> Fix For: 0.6.0
>
>
> This is kind of simplified yet powerful version of DIRECTMEMORY-62 that I marked as a won't fix.
> Olivier suggested in ML a Configuration/Factory pattern, with the builder we can achieve both.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (DIRECTMEMORY-75) Create a CacheService builder
to simplify the bootstrap process
Posted by "Michael André Pearce (Commented JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DIRECTMEMORY-75?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13216829#comment-13216829 ]
Michael André Pearce commented on DIRECTMEMORY-75:
--------------------------------------------------
Can i suggest taking inspiration from proposed JSR107?
> Create a CacheService builder to simplify the bootstrap process
> ---------------------------------------------------------------
>
> Key: DIRECTMEMORY-75
> URL: https://issues.apache.org/jira/browse/DIRECTMEMORY-75
> Project: Apache DirectMemory
> Issue Type: Improvement
> Components: core
> Affects Versions: 0.6.0
> Reporter: Simone Tripodi
> Assignee: Simone Tripodi
> Fix For: 0.6.0
>
>
> This is kind of simplified yet powerful version of DIRECTMEMORY-62 that I marked as a won't fix.
> Olivier suggested in ML a Configuration/Factory pattern, with the builder we can achieve both.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (DIRECTMEMORY-75) Create a CacheService builder
to simplify the bootstrap process
Posted by "Simone Tripodi (Resolved) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DIRECTMEMORY-75?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Simone Tripodi resolved DIRECTMEMORY-75.
----------------------------------------
Resolution: Fixed
added on r1293931 - I modified the solr, ehcache and server as well to adopt new APIs.
> Create a CacheService builder to simplify the bootstrap process
> ---------------------------------------------------------------
>
> Key: DIRECTMEMORY-75
> URL: https://issues.apache.org/jira/browse/DIRECTMEMORY-75
> Project: Apache DirectMemory
> Issue Type: Improvement
> Components: core
> Affects Versions: 0.6.0
> Reporter: Simone Tripodi
> Assignee: Simone Tripodi
> Fix For: 0.6.0
>
>
> This is kind of simplified yet powerful version of DIRECTMEMORY-62 that I marked as a won't fix.
> Olivier suggested in ML a Configuration/Factory pattern, with the builder we can achieve both.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (DIRECTMEMORY-75) Create a CacheService builder
to simplify the bootstrap process
Posted by "Olivier Lamy (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DIRECTMEMORY-75?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13216837#comment-13216837 ]
Olivier Lamy commented on DIRECTMEMORY-75:
------------------------------------------
agree on builder pattern.
Perso I'd like we have too a configuration from file mechanism.
Sample (too improve :-) )
<direct-memory>
<defaultRegion expiresIn="100" etc....>
<region name="foo" expiresIn="100" etc....>
</direct-memory>
I imagine the builder using a file path and a builder using file path from a sys props.
-DdirectMemory.configuration=path....
BTW the -DdirectMemory.configuration must support "interpolation" from sys props and env var to be able to do:
-DdirectMemory.configuration=${user.home}/blabla or -DdirectMemory.configuration=${CATALINA_BASE}/conf/blabla
> Create a CacheService builder to simplify the bootstrap process
> ---------------------------------------------------------------
>
> Key: DIRECTMEMORY-75
> URL: https://issues.apache.org/jira/browse/DIRECTMEMORY-75
> Project: Apache DirectMemory
> Issue Type: Improvement
> Components: core
> Affects Versions: 0.6.0
> Reporter: Simone Tripodi
> Assignee: Simone Tripodi
> Fix For: 0.6.0
>
>
> This is kind of simplified yet powerful version of DIRECTMEMORY-62 that I marked as a won't fix.
> Olivier suggested in ML a Configuration/Factory pattern, with the builder we can achieve both.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (DIRECTMEMORY-75) Create a CacheService builder
to simplify the bootstrap process
Posted by "Hudson (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DIRECTMEMORY-75?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13216847#comment-13216847 ]
Hudson commented on DIRECTMEMORY-75:
------------------------------------
Integrated in directmemory-trunk #146 (See [https://builds.apache.org/job/directmemory-trunk/146/])
[DIRECTMEMORY-75] Create a CacheService builder to simplify the bootstrap process (Revision 1293931)
Result = FAILURE
simonetripodi :
Files :
* /incubator/directmemory/trunk/directmemory-cache/src/main/java/org/apache/directmemory/DirectMemory.java
* /incubator/directmemory/trunk/directmemory-cache/src/main/java/org/apache/directmemory/cache/Cache.java
* /incubator/directmemory/trunk/directmemory-cache/src/main/java/org/apache/directmemory/cache/CacheService.java
* /incubator/directmemory/trunk/directmemory-cache/src/main/java/org/apache/directmemory/cache/CacheServiceImpl.java
* /incubator/directmemory/trunk/directmemory-cache/src/main/java/org/apache/directmemory/package-info.java
* /incubator/directmemory/trunk/directmemory-cache/src/test/java/org/apache/directmemory/cache/CacheServiceImplTest.java
* /incubator/directmemory/trunk/integrations
* /incubator/directmemory/trunk/integrations/ehcache/src/main/java/org/apache/directmemory/ehcache/DirectMemoryCache.java
* /incubator/directmemory/trunk/integrations/solr/src/main/java/org/apache/directmemory/examples/solr/SolrOffHeapCache.java
* /incubator/directmemory/trunk/server/directmemory-server/src/main/java/org/apache/directmemory/server/services/DirectMemoryServlet.java
> Create a CacheService builder to simplify the bootstrap process
> ---------------------------------------------------------------
>
> Key: DIRECTMEMORY-75
> URL: https://issues.apache.org/jira/browse/DIRECTMEMORY-75
> Project: Apache DirectMemory
> Issue Type: Improvement
> Components: core
> Affects Versions: 0.6.0
> Reporter: Simone Tripodi
> Assignee: Simone Tripodi
> Fix For: 0.6.0
>
>
> This is kind of simplified yet powerful version of DIRECTMEMORY-62 that I marked as a won't fix.
> Olivier suggested in ML a Configuration/Factory pattern, with the builder we can achieve both.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira