(String: {%- set hs_blog_post_body -%} {%- set in_blog_post_body = true -%} <span id="hs_cos_wrapper_post_body" class="hs_cos_wrapper hs_cos_wrapper_meta_field hs_cos_wrapper_type_rich_text" style="" data-hs-cos-general-type="meta_field" data-hs-cos-type="rich_text"> <div class="blog-post__lead h2"> <p style="font-weight: bold;">We’ve just built Ember Socket Guru, a package for Ember.js, which enables easy integration with WebSockets services and implementations such as Pusher.js, ActionCable, Socket.io and Phoenix Channels.</p> </div></span>)

How We Built Ember Socket Guru - a Websockets Integration (Case Study)

Photo of Jacek Bandura

Jacek Bandura

Updated Jun 16, 2023 • 2 min read

We’ve just built Ember Socket Guru, a package for Ember.js, which enables easy integration with WebSockets services and implementations such as Pusher.js, ActionCable, Socket.io and Phoenix Channels.

WebSockets is a technology that enables to open an interactive communication session between the user's browser and a server. With this API, you can send messages to the server and receive event-driven responses without having to poll for a reply. We have leveraged Websockets in numerous projects, therefore we decided to make the integration with Ember easier. How did it go?

Our Challenge

Every time we needed to use Websockets in our web apps, we had to write the code from scratch. The setup was not really difficult, however it would always add some extra development time. We lacked an add-on that would make switching between WebSockets implementations painless. To make matters worse, those implementations had different APIs. We decided to expose a consistent interface across all implementations and hide the discrepancies from the users.

Solution

As Ember is an open source JavaScript web framework that we use and love at Netguru, we decided to give back to the community by creating an addon that will integrate WebSockets with various implementations. We have also made it easy to extend - you can roll your own solution quickly and effortlessly.

Result

Since everything is conveniently placed in one package, you can easily switch between those implementations or even use more than one of them at the time - you will avoid the hassle of having to set it up yourself. By providing a common API,it ensures that once you get started with one technology, you can get others working in no time - without knowing obscure setup details for each one.

Photo of Jacek Bandura

More posts by this author

Jacek Bandura

Jacek loves developing things for the modern web: Whether it’s backend, frontend or graphic design...
How to build products fast?  We've just answered the question in our Digital Acceleration Editorial  Sign up to get access

We're Netguru!

At Netguru we specialize in designing, building, shipping and scaling beautiful, usable products with blazing-fast efficiency
Let's talk business!

Trusted by: