5 Replies Latest reply on Oct 6, 2011 9:25 AM by Randall Hauch

    Modeshape and Teiid

    kotaris Newbie

      Hi,

       

      I am new to jboss data services and trying to learn and implement Modeshape and Teiid.

       

      I want to use Modeshape repository and connect to all my underlying databases and use it as a meta data repository. Can you please guide me in building this. I read that I can use connectors (I am assuming it is JDBC Metadata Connector). Should I create the configuration file and place it in jboss deploy folder? Will that be enough?

       

      Once I have the Modeshape repository, I want to use jboss devloper studio and import the metadata from JDBC database using the modeshape connection profile and then create VDB's on top of it.

       

      Thanks

        • 1. Re: Modeshape and Teiid
          Randall Hauch Master

          So IIUC, you want to create a repository of your database schemas, and then create a VDB that can query this repository?

           

          This is possible, using the JDBC Metadata Connector. Simply configure the ModeShape configuration to have a source for each of the DBMS users that MdoeShape should access. For example, if all of your databases are accessible via a single user, then you'd only need on source. However, if you have multiple DBMS instances and/or require different users for different databases, you'll need to configure multiple sources and use the federation connector to merge all of those into a single logical repository. Then make sure that you reindex the content if any of the databases is changed. You'll want to be aware of performance, since this JDBC Metadata Connector does not cache the metadata.

           

          This approach would allow the repository to reflect in real time the database schemas, but they do this by directly accessing the database metadata (the JDBC Metadata Connector does not cache the metadata). As such, you'll want to be aware of performance, and understand that the repository will be directly and frequently accessing the database metadata.

           

          Alternatively, you can use ModeShape as a repository for database metadata captured at design-time. This is often perfectly acceptable for most scenarios, because production databases and their schemas are controlled very tightly and often need to be coordinated with application deployments. This is perhaps the easiest way to integrate ModeShape and Teiid:

          1. Deploy ModeShape to JBoss AS using our kit, and set it up as a regular repository (e.g., with a single persistent store, as it won't be using the JDBC Metadata Connector), and be sure the Teiid VDB sequencer is configured
          2. Use Teiid Designer (within JBoss DevStudio) to import the databases as relational models
          3. Use the ModeShape plugin (with JBoss DevStudio) or use the WebDAV functionality to publish these models (and/or VDBs created from these models) into ModeShape
          4. Query the table, column, indexes, etc. metadata stored in the repository. You can even create a new VDB and use Teiid to query the metadata this way.

           

          There's a fair amount of integration required, but this is exactly what the JBoss Enterprise Data Services Platform enables out of the box. If you're interested in EDS, please contact Red Hat sales for more information.

          • 2. Re: Modeshape and Teiid
            kotaris Newbie

            Thanks Randall for the reply.

             

            We have JBOSS SOA platform in our organization. I was assigned the task to review JBOSS Enterprise Data Services platform and see how it can be used. Below are the steps I followed -

             

            1. Integrated EDS into Jboss SOA
            2. Using Jboss Developer Studio 4, created a Teiid Project
            3. import -> Teiid Designer - Metadata from JDBC Database, created a oracle connection profile with 'A' database and created a Teiid MetaData Model
            4. Following the same steps imported another Teiid Metadata Model with 'B' database
            5. Created   'C' Teiid Metadata Model with ModelClass as Relational and ModelType as ViewModel and created a child basetable and in the transformations fetched from tables from both A and B Teiid Metadata Models
            6. Created a new Teiid VDB and added the newly created C Teiid Metadata Model (which uses A and B models)
            7. Deployed and Executed it, working fine, when querying the child basetable created, it is fetching from both the databases.

             

            I showed all this but I was asked how does Modeshape fit into all this/ Instead of going to actual databases to create the A and B Teiid Metadata Models can we go to a Meta Data Repository and create the models as we donot need actual data at that time we just need tables and views.

             

            So I was thinking to try modeshape to fetch the tables and columns and create the virtual tables, but to give the actual data sources directly to fetch the data. In other words not use Modeshape to fetch the actual data but just use it for designing the A and B Metadata models.

             

            Can we use Modeshape like that, just as a metadata provider for designing? And when actually deploying the VDB I will enter the adtasource for A and B Metadata Models.

            • 3. Re: Modeshape and Teiid
              Randall Hauch Master

              Quickly, you can 'publish' VDBs and models to ModeShape and can then query the metadata, all without having to 'deploy' the VDBs for data access.

               

              However, questions about the SOA-P EDS platform is really not appropriate for this forum, which is focused on the ModeShape open source project. Instead, the best thing is for you to contact Red Hat support, who will definitely answer your questions. Plus, you'll have access to the entire knowledge base and will have a way to track your question(s). You're already paying for support, so you may as well use it!

               

              Best regards

              • 4. Re: Modeshape and Teiid
                kotaris Newbie

                Thanks. I will contact jboss support.

                 

                One more question about Modeshape, What is the main use of Modeshape is it to store and fetch metadata or fetch actual data in applications from the underlying database connections?

                • 5. Re: Modeshape and Teiid
                  Randall Hauch Master

                  It can do both, but in the context of SOA-P EDS it is primarily a metadata repository.