250 likes | 442 Views
Sending SMS (Short Message Service) to library patrons by using Google Calendar Data API Presented by Andrew Wong Venia Mak. 8th Annual IUG meeting at HKIEd Library 3-4 December 2007. Library Services. Background.
E N D
Sending SMS (Short Message Service) to library patrons by using Google Calendar Data API Presented by Andrew Wong Venia Mak 8th Annual IUG meeting at HKIEd Library 3-4 December 2007
Library Services Background • Mobile phone is becoming the most popular personal communication device to all kinds of user. • SMS is a very popular and effective messaging service to alert users with the latest information. • SMS (Short Message Service) is a mobile service that enables the transmission of alphanumeric messages between telecom devices. • SMS is reliable because the system holds undelivered message, and resends them at intervals until receipt is confirmed. • Some JULAC libraries have been using SMS such as HKU and LU.
Library Services Why Google Calendar™ • Sending SMS is not a free service. Sender is required to pay for the messaging fee. HK$0.4 to HK$0.8 will be costed to send a SMS message. • Causes financial burden to the Library if sending SMS via telecom service provider. • “Google Calendar™ ” is a product of Google, which allows registered users to receive FREE SMS reminders of events.
Library Services Why Google Calendar™ • Google Calendar™ provides Web Service interface (i.e. Google Calendar Data API), which allows development partners to automatically feed new events to the Calendar. • “Web 2.0 is the network as platform, spanning all connected devices.” By Tim O’reilly. • The Library can make use of Google Calendar Data API to feed the “Library Notices” to Google Calendar™ as new events. • Technically, our “Library Notices” are treated as “Events” in Google Calendar™. Thus, the Google Calendar™ will send “Library Notices” as Calendar Events to our Library patrons via FREE SMS for notification if our patrons have registered in Google Calendar™.
Why Google Calendar™ • Google Calendar™ is based upon GData model which use REST principles and Atom • GData feeds support queries based upon URL parameters. With proper authentication, it also supports the ability to post new entries, to modify them or delete them. Making connection: GET /calendar/feeds/default/private/full HTTP/1.1 Content-Type: application/x-www-form-urlencoded Authorization: AuthSub token="yourSessionToken“ User-Agent: Java/1.5.0_06 Host: www.google.com Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2Connection: keep-alive” Insert an event: POST http://www.google.com/calendar/feeds/default/private/full <entry xmlns='http://www.w3.org/2005/Atom' xmlns:gCal='http://schemas.google.com/gCal/2005'> <content type="html">Please note 2 items are overdue Nov 11 11:10pm-11:10pm</content> <gCal:quickadd value=”True”> </entry>
Architecture Library Patrons 4. Send Email notice • Create Google account • Register mobile phone to Google Calendar Innopac Server 3. Authorize libsms.ied.edu.hk 4. Cc copies of email notice 6. Send SMS alert • -Mail server • DB server • SMS API • Web server 5. Insert event by Google Calendar Data API libsms.ied.edu.hk
HKIEd Library Library Services Work Flow Send Library Notification via Email (INNOPAC) Receiving CC copies of library email notice SMS API (hosted at libsms.ied.edu.hk) Creating Calendar Event Google Calendar Google Google Calendar Data API Patron’s event is inserted into his/her Google calendar directly through Google Calendar Data API. Google Calendar A SMS reminder will be sent to patron who has registered his/her mobile phone with Google Calendar Mobile Setting Receiving SMS
Library Services Work Flow1. Send Library Notifications via Email (INNOPAC) • Library SMS server receives CC copies of library email notice • Procmail is a mail filtering utility. This utility can receive CC copies of Library Email notices. It can be set to accept those sender from *.ied.edu.hk. Afterwards, accepted mails are forwarded to SMS API (i.e. $HOME/sms/sms_main) for further processing. • Part of email contents are derived from the email notice such as user’s email address, type of notice and no. of items
Library Services Work FlowContent of Library Notice Derived From the INNOPAC From: HKIEd Library-Lending [mailto:circcomm@edlis.ied.edu.hk] Sent: Sunday, November 04, 2007 6:09 AM To: CHAN, TAI MAN <chantaiman@ied.edu.hk> Subject: HKIEd Library : Courtesy Notice Mong Man Wai Library (Lending Services) The Hong Kong Institute of Education 10 Lo Ping Road, Tai Po, N.T. Tel no.: 2948-6658. 04-11-07 DUE DATE REMINDER The following item(s) will be due for return within 3 days. Please return the item(s) on or before the due date, otherwise overdue fines will be charged. Please ignore this reminder if you have already returned or renewed the item(s). Please note that you cannot renew items that have been requested by other users. Thank you. TITLE: How to evaluate progress in problem s CALL NO: QA63 .C48 1987 c.4 BARCODE: 31995007503935 MMW Lib Book DUE: 07-11-07 DATE CHECKED OUT: 06-10-07 04:52PM TITLE: Visual Basic 6.0 CALL NO: QA63 .C48 1987 c.4 BARCODE: 31995007503935 MMW Lib Book DUE: 07-11-07 DATE CHECKED OUT: 06-10-07 04:54PM CHAN, Tai Man 32:975 Sender. i.e. Lending Service Patron’s email address. i.e. chantaiman@ied.edu.hk No. of items. i.e. 2 items Types of notice. i.e. Courtesy notice SMS API
Library Services Work Flow2. SMS API • Store the information (receiver, sender, notice type, no. of items, pickup location) into the database • Check the patron if he/she has registered library SMS alert service • Regarding email notices, generate calendar events in the form of Google Calendar Data Feed Google Calendar Data API
Library Services Work Flow3. Google Calendar Data API • Google Calendar allows client applications to view and update calendar events Example of Google Data API feeds <entry xmlns='http://www.w3.org/2005/Atom' xmlns:gd='http://schemas.google.com/g/2005'> <category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/g/2005#event'></category> <title type='text'>HKIEd Library: Please note 2 items due in 3 days.</title> <content type='text'>HKIEd Library: Please note 2 items due in 3 days.</content> <author><name>HKIEd Library</name><author> <gd:transparency value='http://schemas.google.com/g/2005#event.opaque'> </gd:transparency> <gd:eventStatus value='http://schemas.google.com/g/2005#event.confirmed'> </gd:eventStatus> <gd:where valueString='$location'></gd:where> <gd:when startTime=‘2007-11-04 11:10' endTime=‘2007-11-04 11:10'> <gd:reminder minutes=‘5‘ method=‘sms’/></gd:when> </entry> Google Calendar
Library Services Work Flow4. Google Calendar
Library Services Work Flow4. Google Calendar Words shown in SMS Due time of event Time to send SMS reminder SMS reminder
Library Services Work Flow5. Send SMS to patrons
Library Services Schedule of Sending SMS • Not as same as the time of receiving Email notice • Temporarily schedule: sent out at 11:00 am, 11:30 am and 12:00 noon • Delay caused by no service connection
Library Services Registration with SMS Alert Service start Google Have you registered in Google Calendar account? NO Register Google Calendar Account Yes Have you registered your mobile phone with Google Calendar? Register mobile phone with Google Calendar NO Yes Register your Google Account in Library SMS
Library Services Library SMS Alert Service – Registration Instructions
Library Services 3 Steps for Library SMS Alert Service Registration • Create a Google Account • Register mobile phone with Google Calendar ™ • Register to Library SMS alert service
Library Services Types of Library Notice Sent toGoogle Calendar™
Library Services No. of Patrons Registered *As of 30 Nov 2007
Library Services Library SMS Alert Service Statistics • From 1 Sept 2007 to 30 November 2007
Library Services Advantages of This Project • Google is popular and users are familiar with its services. • The Library, as a data provider, we doesn’t need to “reinvent the wheel” for sending message if the technology is already available at INTERNET such as SMS, Blackberry and PDA. • FREE service from Google. • An value-added service to our EMAIL notice. • More convenient to library patrons. They can receive library notifications anywhere without checking emails. • Connecting INNOPAC with other standards and systems that can fully utilize its functionality and capability
Library Services Disadvantages of This Project • Request patrons to grant the permission to a dedicated web server. • The availability of the service is determined by Google Calendar™. • Registration process is not straight-forward. Patrons have to create accounts in Google and activate SMS alert service before making registration for using our SMS alert service for receiving Library notices.
Library Services Further Development • Implement “iCalendar” protocol. “iCalendar” protocol is a common format for exchange calendaring and scheduling information across Internet. • Simplify the registration process • Extend to other calendars with supporting “iCalendar” protocol such as Yahoo! • Strengthen the integration of INNOPAC with other systems such as Web 2.0 applications
Library Services Thank You Andrew WONG cwwong@ied.edu.hk Venia MAK ymmak@ied.edu.hk