nyss open legislation

Post on 26-Jun-2015

407 Views

Category:

Technology

0 Downloads

Preview:

Click to see full reader

DESCRIPTION

The slides from my presentation on the internal architecture and future plans for the New York State Senate's Open Legislation project @ Capitol Camp.

TRANSCRIPT

Open Legislation

“Browse, search and share legislative Information from the

New York State Senate”

The Developers

Nathan FreitasJared Williams

Graylin Kim

#nyss_openlegislation @ freenode

Announcements

Opened our platform– Eclipse J2EE, detailed setup instructions– Moved to Github!

● http://github.com/nysenatecio/OpenLegislation

Went Mobile!– On the iPhone, Android, Blackberry, and iPad

Gathering outside interest

Summer 2010

Improving as a Platform

We'll look at then and nowto make clear our trajectory.

Then, end with an open discussionon the destination of the platform.

The RESTful Interface

Then

API

Collection – /api/1.0/<format>/<otype>/<oid>– /api/1.0/html/bill/S66026

– /api/1.0/html/calendar/cal-floor-00001-2009-2010

– /api/1.0/html/transcript/1401

Search – search/?term=<query>&format=<format>– /search/?term=otype:action&pageIdx=5&pageSize=40

Shortcuts - /<shortcut>– /actions

– /bills

– /votes

Now

API Rules

1. URL Layout Should be Consistent and Unified– /2.0/<command>

2. Required Arguments Should be explicit– /2.0/<command>/<the>/<required>.<format>

3. Arguments should be clear and understandable– /2.0/bill/<bill_id>-<session year>.<format>

– /2.0/calendar/<type>-<MM-DD-YYYY>.<format>

– /2.0/transcript/<type>-<MM-DD-YYYY>.<format>

4. Provide as much information as possible

API

/2.0/command(/<required_arg>)*.<format>

Examples– /2.0/search.html?term=oid:S66026 AND otype:bill– /2.0/bill/S66026-2009.json– /2.0/transcript/regular-06-22-2010.xml– /2.0/calendar/tomorrow.html

Not backwards compatible!

Data

<response>

<metadata>

<total>20</total>

<status>SUCCESS</status>

</metadata>

<results>

<result>

<type>bill</type>

<data>

<id>S60023</id>

<text> ..... </text>

...

</data>

</result>

....

{

"metadata": {

"total":20,

"status":"success"

},

"results": [

{

"type":"bill",

"data":{

"id":"S60023",

"text":"....",

...

}

},

....

Reflection driven dumps of all (useful) available data!

The Response Speed

We don't have metrics(we probably should)

Just trust us, it got fasterLets look at how

3 Stage Process

1. Populating MySQL

2. Populating Lucene

3. Serving the Data– Routing the Requests– Load the Data– Render the Data

Then

Now

Looking to the Future

Some thoughts...

Complete decoupling of Data Models

Automation with Reflection/Annotation

Standards for Data Models

Client Libraries for more languages, platforms

Work is always ongoingSuggestions, issues, and concerns are

ALWAYS welcome.

top related