You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@karaf.apache.org by "Michael Van Geertruy (JIRA)" <ji...@apache.org> on 2011/01/26 00:05:43 UTC

[jira] Created: (KARAF-418) Allow configurations (from ./etc) to be placed in a database.

Allow configurations (from ./etc) to be placed in a database.
-------------------------------------------------------------

                 Key: KARAF-418
                 URL: https://issues.apache.org/jira/browse/KARAF-418
             Project: Karaf
          Issue Type: Brainstorming
            Reporter: Michael Van Geertruy


There's been an ongoing dialogue on the dev's mailing list to discuss whether or not to allow configurations to be placed in a database instead of in the ./etc directory.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] [Commented] (KARAF-418) Allow configurations (from ./etc) to be placed in a database.

Posted by "Andreas Pieber (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/KARAF-418?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13064206#comment-13064206 ] 

Andreas Pieber commented on KARAF-418:
--------------------------------------

Just to attach Achims question from IRC here:

(12:23:23 AM) anierbeck: pieber: btw. do we still need this one? https://issues.apache.org/jira/browse/KARAF-418

Good question. I would rather say no. Cellar should does most of the requirements defined here. @Mike: what do you think?

> Allow configurations (from ./etc) to be placed in a database.
> -------------------------------------------------------------
>
>                 Key: KARAF-418
>                 URL: https://issues.apache.org/jira/browse/KARAF-418
>             Project: Karaf
>          Issue Type: Brainstorming
>          Components: karaf-config
>            Reporter: Michael Van Geertruy
>             Fix For: 3.1.0
>
>
> There's been an ongoing dialogue on the dev's mailing list to discuss whether or not to allow configurations to be placed in a database instead of in the ./etc directory.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (KARAF-418) Allow configurations (from ./etc) to be placed in a database.

Posted by "Jean-Baptiste Onofré (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/KARAF-418?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jean-Baptiste Onofré updated KARAF-418:
---------------------------------------

    Component/s:     (was: karaf-core)
                 karaf-config

> Allow configurations (from ./etc) to be placed in a database.
> -------------------------------------------------------------
>
>                 Key: KARAF-418
>                 URL: https://issues.apache.org/jira/browse/KARAF-418
>             Project: Karaf
>          Issue Type: Brainstorming
>          Components: karaf-config
>            Reporter: Michael Van Geertruy
>             Fix For: 3.1.0
>
>
> There's been an ongoing dialogue on the dev's mailing list to discuss whether or not to allow configurations to be placed in a database instead of in the ./etc directory.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Updated] (KARAF-418) Allow configurations (from ./etc) to be placed in a database.

Posted by "Jean-Baptiste Onofré (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/KARAF-418?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jean-Baptiste Onofré updated KARAF-418:
---------------------------------------

      Component/s: runtime
    Fix Version/s: 3.1.0

> Allow configurations (from ./etc) to be placed in a database.
> -------------------------------------------------------------
>
>                 Key: KARAF-418
>                 URL: https://issues.apache.org/jira/browse/KARAF-418
>             Project: Karaf
>          Issue Type: Brainstorming
>          Components: runtime
>            Reporter: Michael Van Geertruy
>             Fix For: 3.1.0
>
>
> There's been an ongoing dialogue on the dev's mailing list to discuss whether or not to allow configurations to be placed in a database instead of in the ./etc directory.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] Commented: (KARAF-418) Allow configurations (from ./etc) to be placed in a database.

Posted by "Michael Van Geertruy (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/KARAF-418?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12986750#action_12986750 ] 

Michael Van Geertruy commented on KARAF-418:
--------------------------------------------

Guillaume's reply:

Unless I misunderstood, the idea is just to have the configurations 
stored in a DB right ? 
If so the scope is limited to ConfigAdmin and there are two ways to 
solve the problem: 
  * implement a back-end for the Felix ConfigAdmin (the service will 
read the data once when starting and store any change back in the DB) 
  * write a bundle that polls the DB and push data into ConfigAdmin 
My experience tells me that the second way is better, but I wouldn't 
mandate JPA for such a simple thing imho, as the schema is very simple 
and the bundle would only have to read, so it's basically a single 
SELECT operation. 



> Allow configurations (from ./etc) to be placed in a database.
> -------------------------------------------------------------
>
>                 Key: KARAF-418
>                 URL: https://issues.apache.org/jira/browse/KARAF-418
>             Project: Karaf
>          Issue Type: Brainstorming
>            Reporter: Michael Van Geertruy
>
> There's been an ongoing dialogue on the dev's mailing list to discuss whether or not to allow configurations to be placed in a database instead of in the ./etc directory.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (KARAF-418) Allow configurations (from ./etc) to be placed in a database.

Posted by "Michael Van Geertruy (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/KARAF-418?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12986749#action_12986749 ] 

Michael Van Geertruy commented on KARAF-418:
--------------------------------------------

>From Pieber on the mailing list:

To avoid hooking jamies thread here an answer one point to karafman's point in a 
different thread: 

I would like to have default option for databasing :) BUT, I don't like that 
karaf uses jdbc directly. Since most of my projects are based on aries-jpa it 
would be cool to somehow integrate this into the JPA infrastructure. I'm not 
completely sure how this could be done (requrired bundles, startup order, ...) 
but it would be quite cool to not e.g. autogenerate the schema for the tables. 

Any ideas according to this topic? 

kind regards, 
andreas 



> Allow configurations (from ./etc) to be placed in a database.
> -------------------------------------------------------------
>
>                 Key: KARAF-418
>                 URL: https://issues.apache.org/jira/browse/KARAF-418
>             Project: Karaf
>          Issue Type: Brainstorming
>            Reporter: Michael Van Geertruy
>
> There's been an ongoing dialogue on the dev's mailing list to discuss whether or not to allow configurations to be placed in a database instead of in the ./etc directory.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (KARAF-418) Allow configurations (from ./etc) to be placed in a database.

Posted by "Michael Van Geertruy (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/KARAF-418?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12986751#action_12986751 ] 

Michael Van Geertruy commented on KARAF-418:
--------------------------------------------

My comment:

Thanks for re-addressing this. 

Some other items to consider are: 
1) Do we use a lightweight database inside of Karaf to initially hold configuration information and if so, which one?  The selection criteria should be that the database have a small footprint, and its license should be the same as the Karaf license.  If we go this route, we will want to mandate the database, schema, etc.  Also, do we want an internal database to be relational or nosql?  Nosql would definately provide a lightweight database as we would only be fetching name-value pairs, but would make it less accessable to users as there are more users familiar with relational aspects than nosql. 
2) At what point should Karaf go to the database for information? Should the trigger be the existance (or non-existance) of the ./etc directory? 
3) How do we put configurations into the database?  For example, if someone wants to use an external database to hold thier configurations, do we create a config:database command that allows them to enter connection information, schema, table name, etc at runtime? 
4) How much do we want to leverage the internal database?  For example, do we want to push all the ./etc configurations into the internal database and then have the configAdmin service read from that? 
5) What changes need to be made to the configAdmin service to preserve Karaf's dynamic configuration feature when using a backend database? 
6) What changes would need to be made to the console to allow the editing of configurations stored in an external database from within Karaf?  Are any changes necessary, can we assume the user will be using a tool from their database to make changes to configurations? 

In my original proposal I suggested an all-or-nothing approach which may not be what everone would like.  In that proposal I suggested using a small OSGi friendly database (like H2) inside of Karaf. On startup if the ./etc file was missing, Karaf would attempt to load configurations from the database.  If the internal database were empty, Karaf would prompt the user to indicate the location of ./etc configurations (assuming they are in files somewhere), load them into the internal database, and then continue starting up the system.  If the user wanted to use an external database already populated with configurations, Karaf would allow them to enter the database connection information on startup, put it into the internal database, and would use that connection information to obtain configurations from the external database. Karaf would also need to initially look for the existance of connection information in the internal database. The database schema would be very simple:  numeric key | configuration property name | configuration property value. 

I agree with Guillaume that we should not mandate the use of an ORM like JPA, as this would unnecessarily complicate the implementation. 

Regarding Guillaume's suggested implementations: 
Implementing a backend for felix configAdmin would be a difficult thing to do.  After looking at the configAdmin code, this would by no be means simple. 

Writing a bundle that polls the db and pushes data into config admin seems like the better approach; however, this would need to regularly poll the database to allow dynamic configurations to be possible. 

> Allow configurations (from ./etc) to be placed in a database.
> -------------------------------------------------------------
>
>                 Key: KARAF-418
>                 URL: https://issues.apache.org/jira/browse/KARAF-418
>             Project: Karaf
>          Issue Type: Brainstorming
>            Reporter: Michael Van Geertruy
>
> There's been an ongoing dialogue on the dev's mailing list to discuss whether or not to allow configurations to be placed in a database instead of in the ./etc directory.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] [Commented] (KARAF-418) Allow configurations (from ./etc) to be placed in a database.

Posted by "Michael Van Geertruy (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/KARAF-418?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13066126#comment-13066126 ] 

Michael Van Geertruy commented on KARAF-418:
--------------------------------------------

Pieber:

As long as Cellar's implementation allows the configurations to be held in a manner that is not easily accessed on the file-system, it will  work.  

> Allow configurations (from ./etc) to be placed in a database.
> -------------------------------------------------------------
>
>                 Key: KARAF-418
>                 URL: https://issues.apache.org/jira/browse/KARAF-418
>             Project: Karaf
>          Issue Type: Brainstorming
>          Components: karaf-config
>            Reporter: Michael Van Geertruy
>             Fix For: 3.1.0
>
>
> There's been an ongoing dialogue on the dev's mailing list to discuss whether or not to allow configurations to be placed in a database instead of in the ./etc directory.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira