1 sending sms (short message service) to library patrons by using google calendar data api presented...
Post on 15-Jan-2016
215 views
TRANSCRIPT
1
Sending SMS (Short Message Service) to library patrons
by using Google Calendar Data APIPresented by
Andrew Wong Venia Mak
8th Annual IUG meeting at HKIEd Library 3-4 December 2007
2
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
3
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.
Monthly average no. of library email notices sent (Dec 2006 to Nov 2007)
First overdue 2142
Second overdue 340
Third overdue 84
Pickup 3384
Recall 1891
Courtesy 15185
Drop hold 84
Recall overdue 867
Total 23,977
Monthly expense :
2,3977 x $0.4 = $9590.8 per month
Library Services
4
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™.
Library Services
5
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.
Why Google Calendar™
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>
6
Architecture Library Patrons
-Mail server
-DB server
-SMS API
-Web server
1. Create Google account
2. Register mobile phone to Google Calendar3. Authorize
libsms.ied.edu.hk
5. Insert event by Google Calendar Data API
6. Send SMS alert
Innopac Server
4. Send Email notice
4. Cc copies of email notice
libsms.ied.edu.hk
7
HKIEd LibrarySend Library Notification
via Email (INNOPAC)
SMS API(hosted at libsms.ied.edu.hk)
Google Calendar Data API
Patron’s event is inserted into his/her Google calendar directly through Google Calendar Data
API.
Google Calendar
Google CalendarA SMS reminder will be sent to patron who has registered his/her mobile phone with Google
Calendar Mobile Setting
Creating Calendar Event
Receiving CC copies of library email notice
Receiving SMS
Work Flow Library Services
8
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
9
Work FlowContent of Library Notice Derived From the INNOPAC
From: HKIEd Library-Lending [mailto:[email protected]]Sent: Sunday, November 04, 2007 6:09 AMTo: CHAN, TAI MAN <[email protected]>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
Patron’s email address.
i.e. [email protected]
SMS API
Sender. i.e. Lending Service
No. of items.
i.e. 2 items
Types of notice.
i.e. Courtesy notice
Library Services
10
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
11
Work Flow3. Google Calendar Data API
Google Calendar allows client applications to view and update calendar events
Example of Google Data API feedsExample 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
12
Work Flow 4. Google Calendar
Library Services
13
Work Flow4. Google Calendar
SMS reminder
Words shown in SMSDue time of event
Time to send SMS reminder
Library Services
14
Work Flow 5. Send SMS to patrons
Library Services
15
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
16
Registration with SMS Alert Service
start
Have you registered in Google Calendar account?
Have you registered your
mobile phone with Google Calendar?
Register your Google Account in Library SMS
Register Google Calendar
Account
Register mobile phone with Google Calendar
NO
NO
Yes
Yes
Library Services
17
Library SMS Alert Service – Registration Instructions
Library Services
18
3 Steps for Library SMS Alert Service Registration1) Create a Google Account
2) Register mobile phone with Google Calendar ™
3) Register to Library SMS alert service
Library Services
19
Types of Library Notice Sent to Google Calendar™Types of library notice SMS text to be shown on mobile phone
Courtesy notice HKIEd LIB: Please note <number> item(s) due in 3 days.
First overdue HKIEd LIB: Please note <number> item(s) now overdue.
Second overdue HKIEd LIB: Please return <number> item(s) now overdue.
Third overdue HKIEd LIB: Please return <number> item(s) now long overdue.
Item(s)to be picked up HKIEd LIB: <number> item(s) ready for pick up at <MMW or TCL> library.
Cancellation of requested item
HKIEd LIB: Request for <number> item(s) now cancelled.
Recalled item(s) HKIEd LIB: <number> item(s) recalled. Please check new due date.
Recalled overdue HKIEd LIB: URGENT - <number> item(s) now overdue.
Library Services
20
No. of Patrons Registered
Types of patrons Number
Staffs 50
Students 270
Total 320*
Library Services
*As of 30 Nov 2007
21
Library SMS Alert Service Statistics
Types of SMS alert No. of SMS
First Overdue 258
Second overdue 18
Third overdue 3
Pickup at MMW 1125
Pickup at TCL 184
Recall 506
Drop hold 35
Recall overdue 192
Courtesy 2306
Total 4627
From 1 Sept 2007 to 30 November 2007
Library Services
22
Advantages of This Project1) Google is popular and users are familiar with its services.
2) 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.
3) FREE service from Google.
4) An value-added service to our EMAIL notice.
5) More convenient to library patrons. They can receive library notifications anywhere without checking emails.
6) Connecting INNOPAC with other standards and systems that can fully utilize its functionality and capability
Library Services
23
Disadvantages of This Project1) Request patrons to grant the permission to a
dedicated web server.
2) The availability of the service is determined by Google Calendar™.
3) 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
24
Further Development
Implement “iCalendar” protocol. “iCalendar” protocol is a common format for exchange calendaring and scheduling information across Internet.
1) Simplify the registration process2) Extend to other calendars with supporting “iCal
endar” protocol such as Yahoo!
Strengthen the integration of INNOPAC with other systems such as Web 2.0 applications
Library Services