8 Replies Latest reply on Dec 17, 2014 11:38 AM by magick93

    OSGi - is it possible with Errai?

    magick93

      Hi all

       

      I would be very interested in hearing from anyone who has actually created an Errai OSGi application, though that is unlikely.

       

      Theoreticaly, is it possible?

       

      As our app gets more complex, modularity makes more sense. Before we put time into this, it would be good to know if this is possible, if, due to the client side javascript, if the client will get dupliate javascript files/methods, if the errai services could be registered with OSGi.

       

      Thanks

      Anton

        • 1. Re: OSGi - is it possible with Errai?
          magick93

          I noticed that with vaadin it is possible to develop a OSGi app (http://www.perplentropy.com/2010/02/in-bed-with-vaadin-and-osgi.html).

           

          In the above link the author says:

           

          Most importantly for me was the fact that converting the Java to HTML/JS was a build step, and not done at runtime. As a result, it is impossible to create modular applications with GWT...

          Is this how Errai works, and if yes, does that mean we cannot use OSGi?

          • 2. Re: OSGi - is it possible with Errai?
            edewit

            Hi Anton,

             

            Yes, Errai does not differ from GWT in this regard the javascript is generated at build time. I know that Vaadin is generating everything on the server side so maybe this could also be done for Errai. Another question would be, why would you want to use OSGI? If it's for updating the UI at runtime maybe you could fetch the templates from a CMS. Or even better make your release process faster

             

            Cheers,

                 Erik Jan

            • 3. Re: OSGi - is it possible with Errai?
              magick93

              Hi Erik

               

              That is an interesting idea about fetching templates from a CMS.

               

              The interest in using OSGi is of course to make a modular application. Ours is growing, and it will continue to do so for sometime. Modularity makes a lot of sense for many reasons - development, testing, deployment - and there is the possiblity that our app will have user specific installations - that it will be installed in some customers servers. So, they would get a specific build.

               

              And, as OSGi is the standard for modular java applications, it would be our preference if we can use this.

              • 4. Re: OSGi - is it possible with Errai?
                edewit

                Hi Anton,

                 

                So if you are 'only' interested in the modularisation of your application, you could also use maven modules instead of OSGI bundles. If you don't need to deploy new versions at runtime or the automatic discovery of services, then maven modules would suffice. And if you want to you could still use OSGI on the server.

                 

                Cheers,

                     Erik Jan

                • 5. Re: OSGi - is it possible with Errai?
                  magick93

                  We do need to deploy at runtime.

                   

                  Ive been exploring alternatives, but as yet have not found any alternatives.

                   

                  If we where to undertake customization of Errai to make it OSGi friendly, where would we start?

                  • 6. Re: OSGi - is it possible with Errai?
                    jfuerth

                    I think it would be best to start with a clear statement of your use case:

                     

                    • what is the problem you are trying to solve?
                    • why can't it be solved by Errai in its current state?
                      • how would the problem have to be changed so it could be solved by Errai? Why is this change bad?
                    • how would you solve the problem if OSGi was available in Errai?
                    • what alternative technologies might instead be able to solve the problem?

                     

                    From there, people following this thread should have enough context to help answer your implementation questions and offer advice that guides you in the right direction.

                     

                    -Jonathan

                    • 7. Re: OSGi - is it possible with Errai?
                      dominik.brandl

                      Hi Anton,

                       

                      I'm interested if you could make any advance on this topic? If so, could you please share your results?

                       

                      Cheers

                      Dominik

                      • 8. Re: OSGi - is it possible with Errai?
                        magick93

                        HI Dominik

                         

                        Unfortunately I have not been able to work on this. To be honest, this task is above my skill level.

                         

                        That said, I think it would be a really great feature!

                         

                        Br