Details

    • Type: New Feature New Feature
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.9.0
    • Fix Version/s: 2.10.0
    • Component/s: None
    • Labels:
    • Estimated Complexity:
      Unknown

      Description

      We have build an implementation of websockets in Apache Camel. In combination with the strengths of Apache Camel you can push events from all given components (file, ftp, hazelcast, queue, etc.) to your browser. This offers great possibilities e.g. in process tracking, process driven forms and others.

      It is fully bidirectional (in contrast to the AHC-component) and can therefore be used for producers and consumers.

      To get a better idea of what has been done so far, please have a look at:
      https://github.com/catify/camel-websocket

      1. camel-websocket2.jpg
        144 kB
        Babak Vahdat
      2. camel-websocket.jpg
        43 kB
        Babak Vahdat

        Activity

        Hide
        Christopher Köster added a comment -

        Please let me know if there is a general interest in a component capable of this.

        Show
        Christopher Köster added a comment - Please let me know if there is a general interest in a component capable of this.
        Hide
        Lauri Lehmijoki added a comment -

        WebSocket allow synchronous communication from A to B, where B sits behind a firewall.

        This means that B (who sits behind a firewall) doesn't have to poll for new messages from an endpoint. Neither does it have to send output data to a return address defined by A. As a result, latency decreases and the integration model becomes more simple. Another consequence of synchronous communication is that the integration system can be stateless, removing the need for message queues and aggregators in some cases.

        Show
        Lauri Lehmijoki added a comment - WebSocket allow synchronous communication from A to B, where B sits behind a firewall. This means that B (who sits behind a firewall) doesn't have to poll for new messages from an endpoint. Neither does it have to send output data to a return address defined by A. As a result, latency decreases and the integration model becomes more simple. Another consequence of synchronous communication is that the integration system can be stateless, removing the need for message queues and aggregators in some cases.
        Hide
        Hadrian Zbarcea added a comment -

        I took a very quick look and it's interesting. Dependencies look alright too. I'll try to spend a bit of time to review it in the coming days if nobody else has spare cycles. Thanks for the contribution.

        Show
        Hadrian Zbarcea added a comment - I took a very quick look and it's interesting. Dependencies look alright too. I'll try to spend a bit of time to review it in the coming days if nobody else has spare cycles. Thanks for the contribution.
        Hide
        Razvan Matei added a comment -

        Definitely interesting for us too as a mean to do firewall traversal in various integration cases. Upvoted!

        Show
        Razvan Matei added a comment - Definitely interesting for us too as a mean to do firewall traversal in various integration cases. Upvoted!
        Hide
        Claus Straube added a comment -

        Hi Hadrian,

        is there any chance to get this feature into 2.9.0? If yes pls. let me know - so we can provide a patch on the current SNAPSHOT + documentation.

        Best regards - Claus

        Show
        Claus Straube added a comment - Hi Hadrian, is there any chance to get this feature into 2.9.0? If yes pls. let me know - so we can provide a patch on the current SNAPSHOT + documentation. Best regards - Claus
        Hide
        Claus Ibsen added a comment -

        No, Camel 2.9.0 is being built right now as you can see on @dev mailing list.

        It can be added in the next release 2.10. Or possible in 2.9.1 since its a new component.
        Adding a new component takes time, as well we need to ensure licensing is okay, adequate quality, unit test coverage, osgi feature, osgi unit tests, documentation, etc.

        Show
        Claus Ibsen added a comment - No, Camel 2.9.0 is being built right now as you can see on @dev mailing list. It can be added in the next release 2.10. Or possible in 2.9.1 since its a new component. Adding a new component takes time, as well we need to ensure licensing is okay, adequate quality, unit test coverage, osgi feature, osgi unit tests, documentation, etc.
        Hide
        Claus Ibsen added a comment -

        Claus when the 2.9.0 is out of the door. Then we would certainly love this component to be donated to Apache.

        We have a guide for adding new components. Maybe you can check that and see if all the bullets are okay for your donation?
        http://camel.apache.org/add-new-component-guide.html

        In terms of OSGi you have dynamic import on the camel-websocket bundle? What's the reason for that?

        Show
        Claus Ibsen added a comment - Claus when the 2.9.0 is out of the door. Then we would certainly love this component to be donated to Apache. We have a guide for adding new components. Maybe you can check that and see if all the bullets are okay for your donation? http://camel.apache.org/add-new-component-guide.html In terms of OSGi you have dynamic import on the camel-websocket bundle? What's the reason for that?
        Hide
        Claus Straube added a comment -

        Hi Claus,

        yes I've seen that on the dev list...

        Ok. So we're trying to get into 2.9.1. We've got enough man power to provide what you need and I think we've a good state at all (except the OSGi stuff). But we need some quicker attention / feedback from the core team. Chris opened the issue end of Sept. (incl. code) and the first reaction was nearly two months later. That's a long time... I know you're all busy people, but we want to provide a high quality component and for that we need a little bit of your time

        Best regards - Claus

        Show
        Claus Straube added a comment - Hi Claus, yes I've seen that on the dev list... Ok. So we're trying to get into 2.9.1. We've got enough man power to provide what you need and I think we've a good state at all (except the OSGi stuff). But we need some quicker attention / feedback from the core team. Chris opened the issue end of Sept. (incl. code) and the first reaction was nearly two months later. That's a long time... I know you're all busy people, but we want to provide a high quality component and for that we need a little bit of your time Best regards - Claus
        Hide
        Claus Ibsen added a comment -

        Well you got my attention now.

        I wasn't aware of this donation. Charles Moulliard put me in this direction today, as he is planning on a Devoxx presentation on Camel with websocket, and he notice this JIRA.

        Knowing how big websocket is / going to be / I would loved if the core team reacted faster. So lets get it into the next release.
        We can help with the osgi pieces, after all there is people on the core team who love OSGi and eat it for breakfast.

        Show
        Claus Ibsen added a comment - Well you got my attention now. I wasn't aware of this donation. Charles Moulliard put me in this direction today, as he is planning on a Devoxx presentation on Camel with websocket, and he notice this JIRA. Knowing how big websocket is / going to be / I would loved if the core team reacted faster. So lets get it into the next release. We can help with the osgi pieces, after all there is people on the core team who love OSGi and eat it for breakfast.
        Hide
        Claus Straube added a comment -

        Great. The bullets for the donation are no problem, we had focused them from beginning (lessons learned from the hazelcast component We have to do stuff with OSGi (e.g. dynamic import) - if we need help, we'll come back to you.

        Show
        Claus Straube added a comment - Great. The bullets for the donation are no problem, we had focused them from beginning (lessons learned from the hazelcast component We have to do stuff with OSGi (e.g. dynamic import) - if we need help, we'll come back to you.
        Hide
        Babak Vahdat added a comment -

        >>> after all there is people on the core team who love OSGi and eat it for breakfast

        Since today morning I've got a really tough day so far but that joke of Claus made me deeply laugh & relax a bit. Thank you Claus
        So that the core message is (I assume) "Take it easy..."

        Show
        Babak Vahdat added a comment - >>> after all there is people on the core team who love OSGi and eat it for breakfast Since today morning I've got a really tough day so far but that joke of Claus made me deeply laugh & relax a bit. Thank you Claus So that the core message is (I assume) "Take it easy..."
        Hide
        Charles Moulliard added a comment -

        Code committed and tested with Jetty 7.5.

        Next steps :

        • Create wiki web page,
        • Add integration and OSGI tests,
        • Update features xml file,
        • Update camel pom and distribution
        Show
        Charles Moulliard added a comment - Code committed and tested with Jetty 7.5. Next steps : Create wiki web page, Add integration and OSGI tests, Update features xml file, Update camel pom and distribution
        Hide
        Charles Moulliard added a comment -

        -Add jetty-websocket dependency in features file of Karaf --> https://issues.apache.org/jira/browse/KARAF-1141

        • camel karaf feature file updates
        • module add to pom and distro

        Last step : WIKI page

        Show
        Charles Moulliard added a comment - -Add jetty-websocket dependency in features file of Karaf --> https://issues.apache.org/jira/browse/KARAF-1141 camel karaf feature file updates module add to pom and distro Last step : WIKI page
        Hide
        Babak Vahdat added a comment -

        @Charles,

        could you please update the svn:ignore accordingly, see the attached screenshot for details.

        Show
        Babak Vahdat added a comment - @Charles, could you please update the svn:ignore accordingly, see the attached screenshot for details.
        Hide
        Charles Moulliard added a comment -

        Strange to see those files as I don't use Eclipse but IntelliJ

        Show
        Charles Moulliard added a comment - Strange to see those files as I don't use Eclipse but IntelliJ
        Hide
        Charles Moulliard added a comment -

        They don't appear in my project and target dir was empty. Could it be possible that somebody else commit them ?

        Show
        Charles Moulliard added a comment - They don't appear in my project and target dir was empty. Could it be possible that somebody else commit them ?
        Hide
        Babak Vahdat added a comment -

        No nobody should commit them (as they all are the generated stuff) but you have to tell subversion to ignore them (svn:ignore) property. I assume IntelliJ has some similar functionality like Eclipse to allow that, such as "Add to svn:ignore" or the like.

        The best for you to see them all is just to go to the camel-websocket folder and do

        mvn clean install eclipse:clean eclipse:eclipse
        

        And then you would see them as well where you could add them to the svn:ignore, we already had a discussion [1] about it as well.

        As you're the one who commited this new component, I assume you should take care of the proper svn:ignore properties of this component as well.

        [1] http://camel.465427.n5.nabble.com/The-svn-ignore-property-isn-t-settled-down-on-trunk-td5035110.html

        Show
        Babak Vahdat added a comment - No nobody should commit them (as they all are the generated stuff ) but you have to tell subversion to ignore them (svn:ignore) property. I assume IntelliJ has some similar functionality like Eclipse to allow that, such as "Add to svn:ignore" or the like. The best for you to see them all is just to go to the camel-websocket folder and do mvn clean install eclipse:clean eclipse:eclipse And then you would see them as well where you could add them to the svn:ignore, we already had a discussion [1] about it as well. As you're the one who commited this new component, I assume you should take care of the proper svn:ignore properties of this component as well. [1] http://camel.465427.n5.nabble.com/The-svn-ignore-property-isn-t-settled-down-on-trunk-td5035110.html
        Hide
        Babak Vahdat added a comment -

        Using:

        mvn idea:idea
        

        Just realized that the IntelliJ project files are also not in the svn:ignore list, that is:

        • camel-websocket.iml
        • camel-websocket.ipr
        • camel-websocket.iws

        These are also to be "ignored" as well.

        Show
        Babak Vahdat added a comment - Using: mvn idea:idea Just realized that the IntelliJ project files are also not in the svn:ignore list, that is: camel-websocket.iml camel-websocket.ipr camel-websocket.iws These are also to be "ignored" as well.
        Hide
        Hadrian Zbarcea added a comment -

        @Babak,

        Second line in .gitignore:
        *.i??

        Show
        Hadrian Zbarcea added a comment - @Babak, Second line in .gitignore: *.i??
        Hide
        Babak Vahdat added a comment -

        @Hadrian,

        like Claus [1] and maybe many other (Camel) commiters I'm a pure svn user!

        [1] http://camel.465427.n5.nabble.com/The-big-svn-ignore-commit-tp5044135p5044508.html

        Show
        Babak Vahdat added a comment - @Hadrian, like Claus [1] and maybe many other (Camel) commiters I'm a pure svn user! [1] http://camel.465427.n5.nabble.com/The-big-svn-ignore-commit-tp5044135p5044508.html
        Hide
        Charles Moulliard added a comment -

        @Babak,

        I don't see any wrong files in the svn repo http://svn.apache.org/repos/asf/camel/trunk/components/camel-websocket/ like you suggest and my project is clean

        biker-chm:camel-websocket charlesmoulliard$ pwd
        /Users/charlesmoulliard/Apache/camel/components/camel-websocket
        biker-chm:camel-websocket charlesmoulliard$ svn status
         M      .
        M       pom.xml
        

        Regards,

        Charles

        Show
        Charles Moulliard added a comment - @Babak, I don't see any wrong files in the svn repo http://svn.apache.org/repos/asf/camel/trunk/components/camel-websocket/ like you suggest and my project is clean biker-chm:camel-websocket charlesmoulliard$ pwd /Users/charlesmoulliard/Apache/camel/components/camel-websocket biker-chm:camel-websocket charlesmoulliard$ svn status M . M pom.xml Regards, Charles
        Hide
        Babak Vahdat added a comment - - edited

        @Charles

        You're absolutely right! Nothing is wrong in the svn repo, The problem is the local workspace of me & yours.

        If you would do a

        mvn clean install eclipse:clean eclipse:eclipse idea:clean idea:idea
        

        And then again do the

        svn status
        

        You will see lots of outgoing changes, which should be ignored. If you add them to the svn ignore list (for example using your IDE) then the next 'svn status' call would ignore them while it compares your local workspace content with the repository content.

        Show
        Babak Vahdat added a comment - - edited @Charles You're absolutely right! Nothing is wrong in the svn repo, The problem is the local workspace of me & yours . If you would do a mvn clean install eclipse:clean eclipse:eclipse idea:clean idea:idea And then again do the svn status You will see lots of outgoing changes, which should be ignored . If you add them to the svn ignore list (for example using your IDE) then the next 'svn status' call would ignore them while it compares your local workspace content with the repository content.
        Hide
        Babak Vahdat added a comment -

        @Charles

        I ran exactly the same maven command I proposed you on my box (at the level of camel-websocket directory) and attached the outgoing changes what svn claims to be there. All those are to be ignored see the attachment camel-websocket2.jpg

        Thanks in advance!

        Show
        Babak Vahdat added a comment - @Charles I ran exactly the same maven command I proposed you on my box (at the level of camel-websocket directory) and attached the outgoing changes what svn claims to be there. All those are to be ignored see the attachment camel-websocket2.jpg Thanks in advance!
        Hide
        Brett Meyer added a comment -

        More specifically, can .project and org.maven.ide.eclipse.prefs be added to the svn:ignore list?

        Show
        Brett Meyer added a comment - More specifically, can .project and org.maven.ide.eclipse.prefs be added to the svn:ignore list?
        Hide
        Christian Müller added a comment -

        We should add the .classpath, .project and .settings to the svn:ignore.

        Another possibility is to "tune" your IDE:
        Eclipse: Preferences: Team -> Ignored Resources ->

        Show
        Christian Müller added a comment - We should add the .classpath, .project and .settings to the svn:ignore. Another possibility is to "tune" your IDE: Eclipse: Preferences: Team -> Ignored Resources ->
        Hide
        Christian Müller added a comment -

        I added .classpath, .project and .settings to svn:ignore

        Show
        Christian Müller added a comment - I added .classpath, .project and .settings to svn:ignore
        Hide
        Babak Vahdat added a comment -

        @Christian
        Do you remember the convention over the configuration rule in Camel?

        And what about the target folder?

        Show
        Babak Vahdat added a comment - @Christian Do you remember the convention over the configuration rule in Camel? And what about the target folder?
        Hide
        Christian Müller added a comment -

        Good catch.
        Done!

        I'm a Git user AND I "tuned" my IDE. Difficult to catch for me...

        Show
        Christian Müller added a comment - Good catch. Done! I'm a Git user AND I "tuned" my IDE. Difficult to catch for me...
        Hide
        Babak Vahdat added a comment -

        This component should be enlisted in [1] as otherwise it'll not be part of the distribution.

        [1] https://svn.apache.org/repos/asf/camel/trunk/apache-camel/pom.xml

        Show
        Babak Vahdat added a comment - This component should be enlisted in [1] as otherwise it'll not be part of the distribution. [1] https://svn.apache.org/repos/asf/camel/trunk/apache-camel/pom.xml
        Hide
        Claus Ibsen added a comment -

        Thanks for the donation.

        Show
        Claus Ibsen added a comment - Thanks for the donation.

          People

          • Assignee:
            Charles Moulliard
            Reporter:
            Christopher Köster
          • Votes:
            4 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development