Need a framework for a notification/dashboard system?

16,477

Solution 1

I guess what you are looking for is something similar to Amazon Simple Notification Service (SNS). But first let's set some things straight:

  • You're trying to send Email/SMS - and both require Infrastructure, not just frameworks/libraries. I guess your client (or any client for that matter) would have an Email server running somewhere, so you won't have a direct cost impact. But sending SMS does incur an infrastructure overhead.
  • You won't have an out-of-the-box solution. Since you'll be having additional infrastructure, you will end up at least writing a good level of integration with this infrastructure.

Keeping all that in mind, here are the options, listed in order of difficulty:

  • Use Amazon SNS
  • Use Cloud Message Bus (CMB) - an open-source clone of Amazon SNS. It has the same API format as Amazon SNS, so you'll use this the same way you use Amazon SNS
  • Use Apache Camel with its various Email/SMS Components. Apache Camel is an enterprise routing framework. It has a Message Queue where developers can push messages into, and then it has various routers which take these messages and send them elsewhere. It has routers for sending Email/SMS out-of-the-box. You would first create a topic to which you post messages. Then when a user registers for email notifications, you would add an email endpoint for him/her. And when they opt-out of Email, you will remove that endpoint. Basically its very close to designing your own solution - except you don't have to write code for sending SMS/Email, it has out-of-the-box components for doing that, and you just have to write integration code to add those endpoints as and when the user subscribes for notifications.
  • Roll your own. Your solution would end up being very similar to the Apache Camel approach. You will have a message queue, you will have topics and listeners. Except you'll be writing your own code to send all the emails/SMS.

Edit: Minor clarifications

Solution 2

It looks like your requirement is some sort of live data in a browser based web application. If that is correct, there have been great strides in some of the HTML 5 apis, specifically web sockets.

Websockets are an extension of the HTTP protocol that allow for bi channel communication between client and server. There is a downside however. Believe it or not, browser support is still pretty scarce, and some complications arise with http proxies in the wild.

Typically, to circumvent the lack of widely accepted support, there have been quite a few javascript/server side frameworks that have surfaced that seem really promising. These frameworks typcially take care of fallback support when websockets aren't supported. Some fall back technologies include server sent events, jsonp, long polling, short polling etc.

2 excellent open source projects come to mind:

1). Atmoshphere: https://github.com/Atmosphere/atmosphere

2). Socket-io - http://socket.io/

Share:
16,477

Related videos on Youtube

Shawn D.
Author by

Shawn D.

Updated on June 04, 2022

Comments

  • Shawn D.
    Shawn D. almost 2 years

    I've been asked to implement a notification system in a Cloud Java application. The premise is that administrators or components of the application can send either specific messages to individual users, or broadcast announcements to all users.

    Notifications would be categorized by severity, type (outages, new services, etc.), and corresponding component.

    Users would be able to select types and components they're interested in, and how they'd like to receive those notifications (by e-mail, just shown on dashboard, SMS, etc.). Users could acknowledge or delete notifications, so they won't show up for that user anymore.

    Although I'm sure this would be interesting to implement from scratch, it just feels like there should be an existing system, Apache project, commercial project, etc. that does just this and would avoid me having to reinvent the wheel.

    My question is: Can anyone recommend a framework for notification tracking that could be integrated into an existing application and automatically handle all the back end stuff? Commercial or open source are fine, as long as the licensing terms are commercial friendly (no GPL or LGPL, please).

  • Subhas
    Subhas almost 11 years
    No the question is not about live data in a browser. OP wants users to be able to consume notifications via email, SMS and displayed directly in website.
  • Shawn D.
    Shawn D. almost 11 years
    Thanks. So far, what you've written is largely the conclusion I've come to after a few days of investigation. These were all the components I was looking at as well. It sounds like I'm probably on the hook for more integration work than I was hoping for. I don't mind doing it, but I just didn't want to redo something that's already been done better just because it 'wasn't written here'.