Results 1 to 6 of 6

Thread: Status of Atmosphere/WebSockets gateway

  1. #1

    Default Status of Atmosphere/WebSockets gateway

    I've been looking into using websockets in a Spring web app and noticed there was some early work in the SI sandbox done via AsynchHttpRequestHandlingMessagingGateway by Gunnar Hillert. I also noticed it's currently broken because a superclass method that it extends is marked final.

    Is there a plan to add this (or another WebSockets impl) to a future release of SI?

    I'm also curious why this is in the SI sandbox since a WebSockets implementation seems like a better fit for Spring MVC?

    Thanks,
    Shane Witbeck

  2. #2
    Join Date
    Aug 2005
    Location
    Atlanta
    Posts
    123

    Default

    Hi Shane,

    Thanks for inquiring about the AsyncHttp Adapter! Yes, I am currently working on it (http://git.springsource.org/spring-i...tion-asynchttp). Originally, Jeremy Grelle created a prototype (Comet Adapter) last year. I have taking on that original work and our plan is to make it part of Spring Integration 2.1. My intend is to base the AsyncHttpRequestHandlingMessagingGateway on the HttpRequestHandlingMessagingGateway (Plus Atmoshere supporting logic).

    Please keep in mind that there is currently also quite a bit of exploratory work involved in regards to integrating Atmosphere (It has some rough edges) with Spring Integration. For example an issue I hit a few days ago:

    The Spring Integration Http adapter uses HttpMessageConverters (org.springframework.http.converter.HttpMessageCon verter) to serialize messages. My thinking so far was to hook into Atmosphere's own Serializer support (org.atmosphere.cpr.Serializer) but it turns out that using Atmosphere serializers currently breaks Opera and IE8 suport (See the following Atmosphere Jira for details: http://java.net/jira/browse/ATMOSPHERE-141).

    Thus, things are still a bit in flux but I hope that I can work out the quirks very soon, as Atmosphere seems to be the best solution in the JVM space right now.

    In conjunction with the adapter I am also working on currently 2 examples that I presently host on Github:

    https://github.com/ghillert/spring-asynchttp-examples

    Both examples will also be accompanied by demo deployments to CloudFoundry. My goal is it to actually illustrate both use-cases, one for just plain Spring MVC integration (experimental) and the other one for using Spring Integration (more official). I believe there are use-cases for both scenarios with the Spring Integration approach being a bit more useful IMO. Thus, please watch that repository as well for further updates in the next couple of days.

    Additionally, I will continuously update my blog with details - I just published a blog entry yesterday regarding the state of websockets at: http://hillert.blogspot.com/2011/07/...evelopers.html

    Please let me know if you have further questions and or have other thoughts and feedback. I would love to make this a solid, easy-to-use and well-documented adapter ;-)

    Cheers,

    Gunnar

  3. #3

    Default

    Gunnar,

    Thanks for taking the time to give an update. You've confirmed what I suspected which is that much of this is still in flux. I will certainly keep watch on your blog and relevant repos for further updates. I'm looking forward to seeing seamless integration between the Spring stack and WebSockets.

    Thanks again,
    Shane

  4. #4
    Join Date
    Aug 2004
    Location
    London, UK
    Posts
    36

    Default

    What's the current status of this?

    There are very interesting samples here, but it has dependencies to a spring-integration-atmosphere artifact that doesn't seem to exist anywhere.
    The spring-integration-extensions repository which was announced a few weeks ago in the Springsource blog by Gunnar, contains a reference to an Atmosphere extension in its readme file, but the extension is not in the repository.

    I would really would like to experiment with this extension, as it would be extremely useful for an upcoming project in my company, is there anywhere where I can get this?
    Ale Sarco

  5. #5
    Join Date
    Aug 2005
    Location
    Atlanta
    Posts
    123

    Default

    Hi,

    I am sorry for the long delay on the Atmosphere adapter for Spring Integration. When I committed the samples last year, the actual SI adapter code used by the sample was still in an old sandbox Git repository and that version unfortunately required a minor modification to the SI HTTP Adapter and consequently lingered around a bit.

    That being said, I am in the process of resurrecting the code but discovered an error in my thinking when I implemented the original adapter. I will try to get a version to the extensions repo at https://github.com/SpringSource/spri...ion-extensions by the end of the week.

    In the meantime - Roughly a month ago, I have refurbished my Spring MVC - Atmosphere Sample. Please take a look at it at:

    https://github.com/ghillert/spring-a...osphere-sample

    (Once the actual Spring Integration Atmosphere adapter is committed I will also refurbish the Atmosphere sample itself)
    Furthermore, in preparation for my SpringOne talk (co-presenter) in a few weeks, I have just committed a sample illustrating the integration between the MtGox Bitcoin Exchange (https://mtgox.com/) using WebSockets and Atmosphere:

    https://github.com/cbeams/bitcoin-rt...ter/atmosphere

    Basically, the server connects to the Bitcoin Exchange via WebSockets (using Async Http Client) and browser clients connect (using Atmosphere) to the server. Therefore, remote Bitcoin trades are pushed in real-time from the exchange --> to the Server --> to the clients.

    I hope these 2 Atmosphere examples will give you some guidance in regards to integrating Atmosphere and Spring. As I said, the next step is to commit the Atmosphere adapter to the Spring Integration Extensions repo, which I plan on doing by the end of the week.

    I would certainly love to hear your feedback regarding the adapter!!

    Cheers,

    Gunnar
    Gunnar Hillert
    SpringSource/VMWare, Spring Integration team
    SpringSource Team - Spring Training, Consulting, and Support - "From the Source"
    http://twitter.com/ghillert
    http://blog.hillert.com/
    http://blog.springsource.com/author/ghillert/

  6. #6
    Join Date
    Aug 2004
    Location
    London, UK
    Posts
    36

    Default

    Gunnar, thanks for the response.
    I'm looking forward to get the adapter, and for sure I'll let you know how it goes once I start using it.
    Ale Sarco

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •