1 2 3 Previous Next 35 Replies Latest reply on Jun 30, 2010 11:31 PM by dan.j.allen

    Courting Fakereplace to JBoss.org

    alrubinger

      Had a nice chat with swd847 on #jbosstesting the other night.  He's started up "fakereplace"[1] a hotswapping instrumentation library which aims to overcome the limitation of "no changed schemas".

       

      I think this has some potential to become a valued tool in our expanding arsenal, and I'd like to see how well it incubates.

       

      Excerpt:

       

      (07:37:43 PM) ALR@Freenode: stuartdouglas: Of course we should be courting you under the JBoss community umbrella.
      (07:37:50 PM) stuartdouglas: It stil has a long way to go
      (07:37:55 PM) ALR@Freenode: That's fine.
      (07:38:08 PM) ALR@Freenode: I've been incubating ShrinkWrap here for awhile.
      (07:38:15 PM) stuartdouglas: I would be happy to put it under the jboss umbrella
      (07:38:33 PM) ALR@Freenode: stuartdouglas: Would you like me to set you up with the relevant stuff?  SVN account, JIRA, etc?
      (07:39:24 PM) stuartdouglas: That would be good

       

      One thing Stuart mentioned is that he'd like to come up with a new project name.  So, given that the JBoss Community is about more than projects conceived by Red Hat employees, I think we should help Stuart to:

       

      1) Get a new name (and approve through legal, etc)

      2) Do code analysis on the working prototypes currently in place

      3) File the requisite tickets with the .org guys to fire up graphics, SVN, JIRA, etc.

       

      A second to the motion?

       

      S,

      ALR

       

      [1] http://code.google.com/p/fakereplace/

        • 1. Re: Courting Fakereplace to JBoss.org
          jaikiran

          Andrew Rubinger wrote:

           


           

          A second to the motion?

           


          +1

          • 2. Re: Courting Fakereplace to JBoss.org
            aslak

            sure, sounds interesting

            • 3. Re: Courting Fakereplace to JBoss.org
              lightguard

              +1

              • 4. Re: Courting Fakereplace to JBoss.org
                swd847

                On the subject of names I originally wanted to call it cheetah, because it cheats at replacing classes and it makes development fast, but there is already a python templating library called cheetah (and a java profiling library called jcheetah).

                 

                Other than that I don't really have any idea.

                • 5. Re: Courting Fakereplace to JBoss.org
                  dan.j.allen

                  Andrew Rubinger wrote:

                   

                  Had a nice chat with Stuart Douglas on #jbosstesting the other night.  He's started up "fakereplace"[1] a hotswapping instrumentation library which aims to overcome the limitation of "no changed schemas".

                   

                  I think this has some potential to become a valued tool in our expanding arsenal, and I'd like to see how well it incubates.

                   

                  I absolutely agree with you that fakereplace (or whatever title we end up with) is definitely a critical piece in improving the overall developer experience, following along the same thread for how Arquillian improves the testing experience.

                   

                  In addition to the fakereplace project [1], I'll also cite Stuart's blog introducing the tool:

                   

                   

                  and an initial post that Stuart made in the forums when he was beginning to prototype the project:

                   

                   

                  There's no doubt about it, there is definitely interest, as evidenced by the many forum threads on seamframework.org that discuss the prospect of an incremental class replacement tool. (We know that Arbi especially likes it).

                   

                   

                  JRebel is a fairly comprehensive solution, but an open source tool would be better (and is necessary for bundling with any JBoss developer package).

                   

                  I also want to mention that the kindling of this discussion from Stuart's JBoss Community blog entry is exactly why it's important to have seamframework.org part of this community. There's no way to predict how a project will intersect with the broad range of skill sets at work in this community. If an idea is stuck inside the glass cieling of seamframework.org, it could be missing out on potential opportunity to become a top-level JBoss project. It's all about connectedness.

                   

                  One thing Stuart mentioned is that he'd like to come up with a new project name.  So, given that the JBoss Community is about more than projects conceived by Red Hat employees, I think we should help Stuart to:

                   

                  1) Get a new name (and approve through legal, etc)

                  2) Do code analysis on the working prototypes currently in place

                  3) File the requisite tickets with the .org guys to fire up graphics, SVN, JIRA, etc.

                   

                  I'll absolutely raise my coffee mug to that.

                   

                  Name ideas:

                   

                  • fakie - In snowboarding/skating, it's the mirror of a trick. It also implies fakeness.
                  • retrofit - Fitting new parts onto an old structure (since the deployment itself is not being changed, just the contents)
                    • Available and I like it
                  • retrojit or retrokit?
                  • cafe retro (a play on CAFE BABE)
                  • retro babe (a play on CAFE BABE)

                   

                  [1] http://code.google.com/p/fakereplace/

                  • 6. Re: Courting Fakereplace to JBoss.org
                    dan.j.allen

                    I also want to add that while it was a cute trick, the hot deployment in Seam 2 feel well short of expectations. Seam 2 would load classes which were not EJBs or Java beans into a URL classloader. When one of those classes changed, the classloader would be discarded and those components reloaded. Stuart cites reasons why this doesn't scale well for developers at the beginning of his blog post. We need to dig deeper for a solution that is going to make developers happy in the long run.

                    • 7. Re: Courting Fakereplace to JBoss.org
                      swd847

                      Something else that might be of interest is weblogic fastswap:

                       

                      http://download.oracle.com/docs/cd/E12840_01/wls/docs103/deployment/deployunits.html#wp1053872

                       

                      As far as I can tell from the description it works in a similar manner to fakereplace, however without the reflection instrumentation. This means that their added methods are visible through the reflection API and it is not possible to change annotation's.

                      • 8. Re: Courting Fakereplace to JBoss.org
                        maxandersen

                        Sounds like a great idea and the fact it is simply "installed" by using a javaagent makes life so much simpler for tools - no magical folders, and easy to enable/disable even without explicit tool support.

                         

                        Ideas for names:

                        SmoothSwap

                        SwapAid

                        SpeedInABox

                        Swappy

                        SwapSnap

                        Kiwango (swahili word for speed)

                        • 9. Re: Courting Fakereplace to JBoss.org
                          swd847

                          In case anyone was wondering this is what fakereplace can currently do:

                           

                          - Replace annotations:

                          As far as I know this is fully implemented

                           

                          - Add / Remove static fields

                          Mostly Implemented*

                           

                          - Add / Remove instance fields

                          Mostly Implemented*

                           

                          - Add / Remove static methods

                          Mostly Implemented*

                           

                          - Add / Remove constructors

                          Mostly Implemented*

                           

                          *The 'Mostly Implemented' comes from the fact that there are a few corner cases that do not work properly, the most obvious of these is if you change a method / fields modifiers (e.g. try and make a private field pubilc) it will not work. I know how to work around all these, but many of them are fairly complex so it is not high priority at the moment.

                           

                          - Add / Remove virtual methods

                           

                          These are getting there. Adding new methods that do not override superclass methods works fine, if you add a new method that overrides a superclass method it may not always behave as expected (sometimes it will), but this should be fixed in the next week or two.

                           

                          - Changing superclass

                          I don't think that this will be possible

                           

                          - Removing interfaces

                          I don't think that this will be possible

                           

                          -Adding interfaces

                          This may be possible, but it is not on the cards for the 1.0 release

                           

                          - Changing enums

                          Not implemented yet, but should be possible

                           

                           

                          It also has seam integration, so it should be able to re-read the annotations from seam components and generate new proxies for them.

                          • 10. Re: Courting Fakereplace to JBoss.org
                            swd847

                            I quite like Kiwango.

                            • 11. Re: Courting Fakereplace to JBoss.org
                              alrubinger

                              The "discarding the ClassLoader" trick also has problems for managed resources like EJBs.  To really discard the CL you also need to deference all objects referencing it, so in EJB this means killing all sessions and flushing all pools.  Which, as Stuart and I discussed yesterday, kinda kills the point.  By then you have what amounts to an undeploy/deploy cycle.

                               

                              S,

                              ALR

                              • 12. Re: Courting Fakereplace to JBoss.org
                                alrubinger

                                I personally never understood the allure to non-English words.  Not just because I'm an arrogant American, but I doubt most of our target audience speaks Swahili, or is gonna remember it.  If we want the project to be sexy we could consider something French, or insist it's pronounced with an Australian accent.


                                Same applies to made-up stuff, like "Teiid", our awesome data federation project.  No offense, but WTF is a Teiid?  Even writing this post I had to look it up and correct my spelling from "Teeid".  Is it like a Toureag?  (All hypothetical questions; yes it's a lizard.  And yes, the acronym "EII" is in there).

                                 

                                S,

                                ALR

                                • 13. Re: Courting Fakereplace to JBoss.org
                                  lightguard

                                  Operation Reload

                                  BitSwapper

                                   

                                  I'm bad with names too

                                  • 14. Re: Courting Fakereplace to JBoss.org
                                    alrubinger
                                    1 2 3 Previous Next