J U ST- IN-T IME R EM INDE R...

advertisement
JUST-IN-TIME REMINDERS
Service monitoring !amework with mobile notifications
CS8803: Advanced Internet Application Development
Spring 2008
Class Project
Team:
Gautam Arora {gautamsarora@gatech.edu}
Gaurav Mullick {gaurav.mullick@gatech.edu}
JIT Reminders
1
TABLE OF CONTENTS
1. Abstract
3
2. Introduction
3
3. Motivation
4
4. System Architecture, Design and Implementation
5
5. Example: Google Calendar Tracker with Ca# notification
9
6. Contributions
10
7. Learnings
11
8. Future Work
11
9. Conclusion
12
10. References
13
JIT Reminders
2
1. Abstract
In this project we develop a framework for tracking personalized user services and
registering mobile notifications using the SIP protocol. The framework architecture is based
on a job scheduling mechanism and can be managed using a dedicated web frontend for the
administrator. Each user once registered into the system can install reminders using a web
console for services like Calendars, Location etc and will be alerted with his desired
notification type like Call, Conference, Video Message etc. Our architecture can be
considered as a prime example of a converged application that brings together the power of
HTTP and SIP communication over the Internet.
2. Introduction
In today’s world VOIP technology is becoming ever more popular thus allowing users not to
be dependent on telecom providers and enable the development of next generation
applications. With the emergence of SIP and SIP enabled phones tighter integration of
phones with Web Applications is natural. We wish to use this emergence of the VOIP
platform and its seamless integration with Web to solve the problems associated with
setting up, managing, remembering and automating calls/reminders. The novelty of our
solution lies in the aspect that we integrate our software that manages calls with calendaring
applications.
Our objective in this project was to create a system that allows a user to set up calls at
certain times by making entries in their calendar. That is, the user will insert an entry into
their calendar to set up a call and/or reminder based on time or the location of either
person. This would be tracked and scheduled by out software which would set up the call as
and when appropriate.
This goal is slightly different from our initial proposal which was a more specific scenario
that envisioned the tracking of Calendar service and setting up of a Conference call between
multiple users. As such it was one dimensional in that it solved this single use case and
nothing else. Our current system is a framework into which additional modules (trackers)
may be added to increase its functionality. At the current time we have implemented
trackers for location and time (based on entries in Google Calendars), future work may
include such trackers as one for Facebook or Weather. Thus the project in its current
manifestation is more modular and flexible in its design allowing for easier extensibility and
more functionality than was originally planned.
JIT Reminders
3
3. Motivation
Even though Conference Managers are fairly common and are very important in any
corporate setting (Asterisk [1] being a shining example in this regard) there has been very
little previous work in this area of integrating call managers and calendaring application. It
may be argued that tools like Skype [2] allow home/casual users to setup calls/conference
calls be they between family members or between members in an open source initiative
working on a collaborative project. Also there exists solutions such as by Zimbra [3] which
try to integrate their Collaboration Suite along with Asterisk but there has not been a
solution that tries the complete integration between Calendars and a call manager allowing
users to set up calls and/or reminders more flexibly and painlessly and allowing the user to
schedule them optimally. We aim to provide this by integrating our software with the users
calendaring application.
Another key goal of our project that came into focus as the project evolved over the
duration of its development, was to make the project akin to a modular framework into
which more components could be added with ease to extend the functionality of the system.
Hence a major driving force during the development of our project was to allow additional
trackers to be added into it so that calls/reminders to be set up based a variety the
requirement of the user.
JIT Reminders
4
4. System Architecture, Design and Implementation
While the original project goal of JIT Reminders envisioned to solve a single use case of
tracking Calendar service and setting up of Conference Calls, however during the design
phase of the software we transitioned are efforts towards a more generic framework that can
be extended to solve multiple use cases both in terms of tracking services as well as
notifying users.
System Architecture
The framework utilizes a job scheduling-based architecture using the JEE Quartz[4]
framework for monitoring the services. Using this we were able to setup a master tracker
that would enable/disable service trackers that are accessible through the Administrator and
User Web consoles. Services are monitored using standard APIs provided for 3rd parties
which makes our approach completely compliant to the Terms and Conditions of the
providers. To implement mobile notifications, we used SIP as the underlying protocol for
JIT Reminders
5
device communication and implemented this using Java SIP Servlets [5] on SIP Application
Servers [6]. Following is a more detailed discussion regarding the functionality and
technical implementation for each of the architectural components.
a. Master Tracker - This is the central point of the framework which begins all the main
threads of processing for tracking services. When program execution begins, the master
tracker, which is the server process, sets up multiple cron jobs for the service trackers.
These cron jobs trigger the individual trackers after a pre-configured amount of time.
class. Using the Administration Web Console, the administrator can enable/disable service
trackers, add more notifications and start/stop the system.
b. Service Trackers - To abstract away each of the service that can be monitored using a 3rd
party API, we developed the concept of individual trackers. A tracker that has been
enabled by the master tracker, ‘pulls information’ from a service using the API and based
on the condition for meeting the event, it ‘pushes an action’ to the associated notification.
Each tracker class implements the Job interface and overrides the execute() method
a. Google Calendar(GCal) [7] Tracker - Consider the case of the GCal service that we
wish to track. In this case, we successfully developed a tracker which checks for
the state of the users calendar after a pre-configured amount of time. The GCal
Service tracker using the GData, GClient and GCalendar APIs that are provided
by Google. As the fetched event needs to be parsed in a deterministic manner, we
developed a mapping which would enable us to be able to reliably understand the
event.
In the case of a 2-way call, What => Notification Type(Call), Where => Caller,
Description => Callee. This mapping is in sync with the creation of the event using
JIT Reminders
6
the User Web Console to insert the event into Calendar. The tracking of a calendar
can be considered as the case for Temporal Reminders as activities are predictable,
so if an event is setup (and not cancelled or updated), it is bound to trigger an
action when the time comes.
b. WhereAmI [8] Location Tracker - To further investigate the merits of our
framework in terms of flexibility and extensibility, we developed a WhereAmI
Location Tracker. WhereAmI is a Wireless Access Point-based user location
service developed at Georgia Institute of Technology to be used for location-based
applications within the campus. Using this we were able to register triggers to
monitor the location of users within the campus and fire events based on their
movement between locations. These can be considered as the case for Spatial
Reminders and events registered that track a users location will only trigger when
the user reaches that location which may never happen. This required the events
to be logged into a database where the tracker will check with the database if the
user has an associated action with that location. We helped in the development of
3rd party lookup for the WhereAmI API which would allow a user to monitor not
just his own location but also that of his buddies, allowing the setting up of
complex events based on the location of both the user and his buddy on the
Georgia Tech campus.
c. More trackers - Due to the extensible nature of the framework, a developer can
add any tracker by writing a single Java class to access the API and setup action
events for them. Example cases are Facebook status tracker using the Facebook
API, Weather warning tracker using the Weather.com API and more.
c. Mobile Notifications - The uniqueness of our solution is captured in the functionality of
the mobile notifications. As previously described, even though Google Calendar provides
notifications like browser-base alerts, email or mobile SMS it is yet to achieve the
sophistication of being able to setup advanced mobile communication like 2-way calls,
conferences, voice message etc. We used Java SIP Servlets deployed on a SIP Application
Server(like Sailfin) which would allow call setup between registered parties. Our solution
was similar to the Click To Dial [9] use case but with the slight difference that this was an
auto generated call using the concept of a Back-To-Back User Agent (B2BUA).
JIT Reminders
7
Our current project implementation includes call setup, but we have been able to use
conference bridges like jVoiceBridge [9] to setup conferences between multiple parties
and Media Servers to play video messages to a part during our evaluation phase. We are
working on integrating these notifications within the framework.
d. Admin and User Web Console - They were written in HTML, JavaScript and JSP. They
provide the user interface with which a user interacts and creates, edits or deletes entries
from his Google Calendar, or with which the admin maintains the various users of the
service. We use the standard Google Calendar API to interact with all Google services.
The user web console has two options to begin with: Register: This is for new users. They
can register with our service using this page. They provide their desired user name and
password and also their Google user name and password (this is the only time they need
to give this information). This information is then entered into a MySQL database from
where we can have easy access to it. Login: This is for returning users. After having
created their account, users can login with their selected username and password using
this page. This username, password is used to authenticate them and fetch their Google
credentials from the database. After this we authenticate them with Google so that any
action they take on our web console will also be reflected in their Google calendar. The
user upon having logged in may now decide whether he wants to create, edit or delete an
entry for an event in his calendar. He is taken to the appropriate page. If a user chooses to
create a new entry he must then choose the type of service he wants, time based or
JIT Reminders
8
location based. After selecting this he sets the type of event: call or reminder. For a call he
then chooses the user to which he wants to set up a call as well as the date and time of the
call (that user must also be registered with our service and the list of users that can be
called is fetched from the database). Once a user submits his entry am event is setup in
the users Google Calendar using the standard Google Calendar API. The admin console is
also implemented in HTML, JavaScript and JSP’s. It has similar functionality which
allows the administrator to manage the list of users in the database as well as manage the
various trackers viz. The Master Tracker, The Google Calendar Tracker and The
WhereAmI Location Tracker. In addition the maintenance of service trackers can also be
performed via the admin console.
The source code for the software is packaged as following:
5. Example: Google Calendar Tracker with Call notification
We now present a sample use case that will allow to explain in more detail the interactions
between the various components of the system.
a. The Master Tracker is started which triggers cron jobs for the individual service tracker,
which in our case is the Google Calendar Tracker. In our test runs, we configured the cron
job to run every 4 hours i.e. after every 4 hours the GCal tracker was called.
b. As the GCal Tracker implements the Job interface of the Quartz framework, it overrides
the execute() method which is the main method invoked every time the class is called.
The code for interacting with Google Calendar is here which includes: user
authentication, fetching user calendars, fetching individual events within the next 4
hours, parsing the events and setting up notification based on the results of the parsing.
JIT Reminders
9
c. Events are programmed in their individual classes, and setting up of an event requires
setting up of another Job with the new JobDetail() object, registering it with a timed
trigger using new SimpleTrigger() and scheduling it using scheduler.scheduleJob(jobDetail,
timedTrigger)
d. At the set time, a call will be placed between the 2 parties using SIP as the signaling
protocol.
6. Contributions
As noted earlier, the currently existing services do not allow the monitoring of multiple
services and setup of mobile notifications similar to our solution. We would like to
enumerate the contributions made by our solution:
a. Service monitoring using 3rd-party APIs - The use of APIs has been very extensive in the
implementation of mashups and we were able to implement a similar solution in our
approach by using the Google Calendar and WhereAmI location API. The GCal API is
fairly new but powerful and the WhereAmI API is under heavy development. We were
able to provide a composite service monitoring architecture using the 2 APIs.
b. Mobile Notifications using SIP - The space of server-side SIP applications has limited
examples and source code to learn from, but we were able to demonstrate the power of
SIP servlets by extending the available code into a generic approach. We were able to
abstract away the ‘click’ from the Click To Dial and auto-generate calls between the 2
parties. We plan to contribute our approach to the open-source community and hopefully
will allow more developers to be able to create event-driven applications.
c. A generic extensible framework with pluggable trackers and notifications - As described,
our architecture holds the real benefit of being extensible in that adding a tracker requires
minimal developer effort. Programming a new service tracker or a notification type
requires a single Java class and keeps a clean separation of concerns. If we compare to the
MVC approach of developing application,s our framework provides a similar TNC
approach with the Master Tracker acting as the Controller between the Trackers and
Notifications.
JIT Reminders
10
7. Learnings
As part of completing the project objectives, we’ve gained significant theoretical and
practical knowledge which include:
1. Partially our objectives were similar to that of WebCQ [11], thus we investigated the
architecture used by the team for their implementation and were able to understand the
reasons why their approach required web crawling whereas we used 3rd party APIs which
provide an interface to most of the services. This speaks highly of the way that current
state of web application development and developer support for building applications
around core services like Mail, Calendar, Location, Weather etc.
2. The pull architecture implemented by us in the system architecture is in contrast to the
‘push architecture’ by Comet. As we have implemented our current architecture in the
former way, we have be exposed to advantages and disadvantages to using this approach.
3. The development of the framework has enabled us to appreciate the Service Oriented
Architecture(SOA) for event-based processing.
4. The team members had prior experience in using Google Apis like Ajax Search, Mail etc.
and our work with Calendar has allowed us to build on our existing knowledge and
contribute towards developing a repository of code that is useful to the developer
community.
5. The usage of SIP for the mobile notifications helped us in greater project experience in
development of converged applications
The class lectures gave us the correct direction towards building the system architecture and
concepts of Continual Queries(CQs) which further allowed us to tie together the various
functional components into an integrated framework.
8. Future Work
Our work can be extended in the following directions:
JIT Reminders
11
a. Adding support for more trackers - This will remain the primary focus of our future work
as we can extend the system by adding support for trackers like Stocks, Weather, Social
networks etc. During our research, we have not come across a framework like ours which
will allow such extensible support to existing APIs and we will be working towards
continuing our efforts in that domain.
b. Adding support for notifications - Based on user feedback that we have received, video
messages are the most requested notification type which we would like to enable and
deploy the system in an IMS architecture, so that users at Georgia Tech will be able to
use, evaluate and test our system
c. Adding better user console support - As the reminder notifications are targeted towards
mobile users, there is a definite need to extend the user console for the mobile using JME
(Java Mobile Edition).
d. Usability aspects of the user web interface - While the user web console for the Google
Calendar tracker is very intuitive, the console for the location tracker requires some work
in order to make it more usable and natural for users. In that effect, we have developed a
prototype of the web interface using ESRI ArcGIS web services [12]. We plan on
integrating this with our existing web console to improve the usability aspects of our
frontend.
9. Conclusion
We have developed a framework that allows for dynamically enabling/disabling service
trackers using 3rd party APIs and setting up mobile notifications based on SIP, using a job
JIT Reminders
12
scheduling architecture with Quartz JEE framework. The trackers are based on an
‘information pull and action push’ architecture. We were able to develop service trackers for
predictable time-based events using Google Calendar and unpredictable location-based
events using WhereAmI. Further, we abstracted the ‘click’ away from the Click To Dial
open source project which allowed us to auto-generate a call between the required parties.
Our approach is fairly generic in that it can be extended to add support for more trackers
and multiple notification types.
10. References
1. Asterisk PBX [http://www.asterisk.org/]
2. Skype VOIP [http://skype.com/]
3. Zimbra Email [http://www.zimbra.com/]
4. Quartz, Java Job Scheduling Framework [http://www.opensymphony.com/quartz/]
5. Java SIP Servlets, JSR 116 [http://jcp.org/aboutJava/communityprocess/final/jsr116/]
6. Sailfin, SIP Application server [https://sailfin.dev.java.net/]
7. Google Calendar API [http://code.google.com/apis/calendar/]
8. Where Am I Location Service [http://rnoc.gatech.edu/whereami/programming/]
9. Click To Dial, SIP application [http://wiki.glassfish.java.net/Wiki.jsp?
page=SipClickToDialExample2]
10.jVoiceBridge [https://jvoicebridge.dev.java.net/]
11.Web CQ [http://www.cc.gatech.edu/projects/disl/WebCQ/]
12.ESRI ArcGIS web service [http://www.esri.com/software/arcgis/]
JIT Reminders
13
Download