Presentation is loading. Please wait.

Presentation is loading. Please wait.

Ben Burbridge, Rebecca Jones, Hilary Newman Product Development

Similar presentations


Presentation on theme: "Ben Burbridge, Rebecca Jones, Hilary Newman Product Development"— Presentation transcript:

1 Ben Burbridge, Rebecca Jones, Hilary Newman Product Development
The Open System Ben Burbridge, Rebecca Jones, Hilary Newman Product Development

2 The Open System Access to Your Data Integrate With Other Systems Reports We Couldn’t Anticipate Ad Hoc Reports – Unique to You Write Applications Partnering for Improved User Services

3

4 Sierra Back-end Persistence
Sierra uses the PostgreSQL relational database as its “system of record” Innovative will provide direct access to the database Technically, libraries will be writing queries and reports against database ‘views’ Sort of a ‘roll your own’ create lists

5 What is a ‘view’? A view is a ‘façade’ in front of one or more tables that you can query as a single, simple “table” No data is stored with a view They are read-only They can contain any SQL SELECT statement ‘Join’ multiple tables together Filter the result Sort the result and more…

6 View Example Corresponding Underlying tables ‘Helper’ View
SELECT from the view SELECT from the tables SELECT a.icode, b.description FROM icode a join icode_18n_desc b on b.icode_id = a.id join language c on b.language_id = c.id WHERE c.lang_code = {current user’s language code} SELECT * FROM icode_view_myuser icode description b book c cd-rom d dvd both return:

7 View Guiding Principles
Insulate you from changes to the underlying tables and columns so that we don't break your reports Ease querying for the report Present multiple tables as ‘one’ (simplify) Filter the rows Etc Expose new data as soon as it is available

8 Types of Views ‘Generated‘ Views ‘Helper‘ Views
One-to-one with the underlying tables Available for querying at the lowest-level ‘Helper‘ Views Innovative-developed views that join many tables into one Simplify a complex (transactional) data model for reporting purposes

9 Challenges in managing and documenting
Sheer volume 300+ tables and growing 2500+ columns and growing Constant change New tables (or new columns on existing tables) appearing all the time! Tables, columns get renamed occasionally... Tables, columns can disappear(!) Multiple releases will be in play simultaneously in the future

10 Sierra Views ‘Behind the Curtain”

11 Internal Tool: LookingGlass

12 LookingGlass: View management

13 LookingGlass: View Documentation

14 LookingGlass: Documentation Detail

15 SierrraDNA: Details

16 SierraDNA: Entity-Relationship Diagrams

17 PgAdminIII

18 Working out the SQL

19 iReport Example

20 .pdf Result

21 View Configuration and Support
Versioning Security Dedicated direct SQL access ‘role’ Dedicated accounts setup via the Admin App Access control via Postgres configuration and firewall

22 Dev partners’ SQL Views webinar:
View Links SierraDNA Dev partners’ SQL Views webinar:

23 Sierra APIs Sierra Phase 1: Architectural Review Sierra Phase 2: RESTful Services

24 Sierra Phase 1: Architectural Components
Review -- Postgre Database -- Services Layer -- SQL Access Encapsulate database – Consistent business rules

25 Dashboard OpenSocial container. Allows you to plug in gadgets.

26 Sierra Phase 1: Architectural Components
Took it one step further. Dashboard.

27 REST Endpoint Already had a data access layer
Tightly coupled, fine grained Loosely coupled, course grained

28 WebCirc and beyond As we build gadgets, applications such as WebCirc, RESTservices are create. Sierra Partners can leverage those same APIs in their apps.

29 RESTful Services What is REST? Authentication Versioning Support
We will be using these same business services

30 What is REST? Architectural style Based on http, used by browsers Understood by machines Resources (nouns) Methods (verbs) Format

31 URL for everything a machine needs to talk about Nouns for machines
Resources URL for everything a machine needs to talk about Nouns for machines Examples (list of holds) (hold2 in list of holds)

32 Methods (REST is CRUD) POST Create a resource GET Read a resource PUT Update a resource DELETE Delete a resource

33 Format XML JSON /bib/b100123/holds.xml /bib/b100123/holds&format=xml
/bib/b100123/holds.json /bib/b100123/holds&format=json

34 XML Response Example <bib>
<record_key>b100123</record_key> <holds count="2"> <hold> <hold_key>hold4</hold_key> <record_key>p </record_key> <links><link rel="self" href=" </hold> <hold_key>hold27</hold_key> <record_key>p </record_key> <links><link rel="self” href=" </holds> <links><link rel="self" href=" </bib>

35 JSON response example { "record_key" : "b100123", "holds" : {
"count" : 2, "list" : [ { "hold_key" : "hold4", "record_key" : "p ", ... "links" : [ { "href" : " "rel" : "self" } ], }, { "hold_key" : "hold27", "record_key" : "p ", "links" : [ { "href" : " "rel" : "self" } ], } ] }, "links" : [ { "href" : " "rel" : "self" } ] }

36 Add one hold to a list of holds Get all holds on bib Update all holds*
CRUD holds Add one hold to a list of holds POST /bib/b100123/holds Get all holds on bib GET /bib/b100123/holds Update all holds* PUT /bib/b100123/holds Delete all holds DELETE /bib/b100123/holds

37 Create something on a hold* Get one hold Update one hold
CRUD one hold Create something on a hold* POST /bib/b100123/holds/hold2 Get one hold GET /bib/b100123/holds/hold2 Update one hold PUT /bib/b100123/holds/hold2 Delete one hold DELETE /bib/b100123/holds/hold2

38 Authentication with OAuth2
Oauth is an open authentication protocol Ability to run a rest service granted to a User using Auth/Auth Token is like a temporary library card Diff between OAuth1 and Oauth2 is SSL for return of the token and subsequent request

39 Add /v1 to the beginning of every request In the future, we’ll add /v2
Versioning Add /v1 to the beginning of every request /v1/bib/b100123/holds In the future, we’ll add /v2 /v2/bib/b100123/holds Later, end of life all of /v1

40 We use the APIs to build Sierra Automatically exposed Documentation
Support We use the APIs to build Sierra Automatically exposed Documentation Deployment Developer Keys Eat our own dog food

41 Which APIs? And When? Patron Facing: Place & Cancel Holds, Renew Items WebCirc: Check Out, Check In Item Availability Set Item Status Create Orders Create Pull Slips Tell Us!

42 Questions?

43 Thank You!


Download ppt "Ben Burbridge, Rebecca Jones, Hilary Newman Product Development"

Similar presentations


Ads by Google