If you are using the Atmosphere framework for developing an Asynchronous Application, you end up using a broadcaster for delivering messages to its subscribed Atmosphere resources (clients). An application can subscribe to one or more Broadcasters to get notified about events from the server. A Broadcaster implements the publish/subscribe paradigm.
Losing Messages ?
Atmosphere fails to publish messages when there is a burst of activity. When the client is processing the first message the lookup returns null. Putting a pause/retry with some timeout (say 100 ms) only results in the client-finding it on the 2nd attempt.
One can also lose messages under the following scenarios:
- When a connection gets closed (by a proxy, a timeout, the browser, the server), the Broadcaster.broadcast operation might still be in the process of delivering a message to that connection. Since that connection is closed, the message will be lost.
- When a Browser reconnects, during the reconnection process messages can always be broadcasted and may not be delivered to that connection properly.
Broadcaster Cache comes to the rescue
Atmosphere provides cache mechanism for broadcast messages to cache them for a configured time to connected clients. It guarantees delivery of messages even when the client is disconnected for a short time during a communication glitch.
Acknowledging Delivery ensuring 100% Delivery
While the Cache mechanism reduces the chances of messages getting lost, there could still be scenarios where even after the message has been successfully written the client fails to receive it. When a websocket or fallback transport delivers a message, the send operation does not complete successfully until the message is safely stored in the sender’s data store. But if message is deleted from one datastore before it is successfully forwarded to and stored in the next data store then the message will be lost.
To ensure 100% delivery the Neova team implemented a Guaranteed Delivery system (GDS) on top of the Cache mechanism. GDS does this by having the client acknowledge the request back to the server. In case of a failure, the list of non acknowledged messages are re-sent until the client acknowledges them.
Neova has experienced Java Developers that have used Atmosphere framework comprehensively for a mission critical IoT Application.
While Web and Mobile accessibility guidelines had been published by most government agencies for decades, some recent federal cases have put focus back on businesses to treat compliance with utmost seriousness.
On June 13, 2017 in the first trial of its kind under the Americans with Disabilities Act (ADA) a federal judge in Florida ruled that Winn Dixie had to make its website accessible. Four other businesses including restaurant chains, online shopping sites also lost similar cases.
With more and more businesses moving online, it’s imperative that they don’t leave behind approximately 12.6% of the US population that have some form of disability. In addition to eCommerce businesses, sites like recommendation engines, online booking of services like cabs, food, electricians/plumbers, news portals, mapping sites, airline/hotel/temporary accommodation bookings, etc. are all required to make their sites/apps accessible.
The actual cost of making Websites and Mobile Applications accessible is very small and here are the steps we recommend that businesses follow towards achieving compliance:
- Understand the requirements. These are well documented and part of the guidelines published by most government agencies.
- Implement changes to make the sites/application compliant.
- Test for compliance. A regular audit is recommended.
- Make this part of your Development and Testing cycles .
Neova offers an Accessibility Testing Service where our experienced Quality Assurance Engineers go through all aspects of accessibility testing and provide a comprehensive report that companies can take to their Engineering teams to achieve this much-needed compliance.
Let regulation not be the only reason, but let’s make this our social and moral responsibility to not leave behind a segment of the population that could significantly benefit from this online revolution.
Time travel is probably one of the most intriguing and fascinating thoughts out there. Einstein’s theories say, it might actually be possible to travel time. Though, as of now it does not seem like happening anytime soon.
Anyway, in the world of programming, a given application is a universe – U, that holds states and these states change over time. This application universe U necessarily is ordered, and nonchaotic. These states or at least those that are relevant, may be captured and replayed or recreated, by traveling back and forth in time. This time travel is made possible and coherent for our application universe U, by using tools like Redux!
Redux makes this possible by following 3 principles:
- Single source of truth – the state of your whole application is stored in an object tree within a single store
- State is read-only – the only way to change the state is to emit an action, an object describing what happened
- Changes are made with pure functions – to specify how the state tree is transformed by actions, you write pure reducers.
If you are into frontend technologies and find time travel interesting, redux might draw your attention, might even capture your imagination. Redux directly attacks one of the extremely subtle to fix programming bugs caused by – side effects! This in itself is huge. State changes occur only via reducer actions that execute pure functions. Hence whoever has subscribed to the action, is notified, once a state has changed. Changed state, is a new object, though old state held by not yet updated subscribers, still hold valid value or old object, till updated. This ensures coherence, even while change is being propagated through your app. Function purity guarantees predictability, ensuring time travel yielding the same state of the Universe at any particular point in time, though traveled again and again.
Finally, as all states of your application are available at any instant of time, it is a great boon for debugging and testing the application. Redux seems to be a great tool that can be used not just for the front-end development but can also be equally useful and usable for the back-end as well.