nyss open legislation
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
![Page 1: Nyss Open legislation](https://reader033.vdocuments.mx/reader033/viewer/2022052906/558cdaa0d8b42ae5118b45e5/html5/thumbnails/1.jpg)
Open Legislation
“Browse, search and share legislative Information from the
New York State Senate”
![Page 2: Nyss Open legislation](https://reader033.vdocuments.mx/reader033/viewer/2022052906/558cdaa0d8b42ae5118b45e5/html5/thumbnails/2.jpg)
The Developers
Nathan FreitasJared Williams
Graylin Kim
#nyss_openlegislation @ freenode
![Page 3: Nyss Open legislation](https://reader033.vdocuments.mx/reader033/viewer/2022052906/558cdaa0d8b42ae5118b45e5/html5/thumbnails/3.jpg)
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
![Page 4: Nyss Open legislation](https://reader033.vdocuments.mx/reader033/viewer/2022052906/558cdaa0d8b42ae5118b45e5/html5/thumbnails/4.jpg)
Summer 2010
Improving as a Platform
![Page 5: Nyss Open legislation](https://reader033.vdocuments.mx/reader033/viewer/2022052906/558cdaa0d8b42ae5118b45e5/html5/thumbnails/5.jpg)
We'll look at then and nowto make clear our trajectory.
Then, end with an open discussionon the destination of the platform.
![Page 6: Nyss Open legislation](https://reader033.vdocuments.mx/reader033/viewer/2022052906/558cdaa0d8b42ae5118b45e5/html5/thumbnails/6.jpg)
The RESTful Interface
![Page 7: Nyss Open legislation](https://reader033.vdocuments.mx/reader033/viewer/2022052906/558cdaa0d8b42ae5118b45e5/html5/thumbnails/7.jpg)
Then
![Page 8: Nyss Open legislation](https://reader033.vdocuments.mx/reader033/viewer/2022052906/558cdaa0d8b42ae5118b45e5/html5/thumbnails/8.jpg)
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
![Page 9: Nyss Open legislation](https://reader033.vdocuments.mx/reader033/viewer/2022052906/558cdaa0d8b42ae5118b45e5/html5/thumbnails/9.jpg)
Now
![Page 10: Nyss Open legislation](https://reader033.vdocuments.mx/reader033/viewer/2022052906/558cdaa0d8b42ae5118b45e5/html5/thumbnails/10.jpg)
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
![Page 11: Nyss Open legislation](https://reader033.vdocuments.mx/reader033/viewer/2022052906/558cdaa0d8b42ae5118b45e5/html5/thumbnails/11.jpg)
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!
![Page 12: Nyss Open legislation](https://reader033.vdocuments.mx/reader033/viewer/2022052906/558cdaa0d8b42ae5118b45e5/html5/thumbnails/12.jpg)
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!
![Page 13: Nyss Open legislation](https://reader033.vdocuments.mx/reader033/viewer/2022052906/558cdaa0d8b42ae5118b45e5/html5/thumbnails/13.jpg)
The Response Speed
![Page 14: Nyss Open legislation](https://reader033.vdocuments.mx/reader033/viewer/2022052906/558cdaa0d8b42ae5118b45e5/html5/thumbnails/14.jpg)
We don't have metrics(we probably should)
Just trust us, it got fasterLets look at how
![Page 15: Nyss Open legislation](https://reader033.vdocuments.mx/reader033/viewer/2022052906/558cdaa0d8b42ae5118b45e5/html5/thumbnails/15.jpg)
3 Stage Process
1. Populating MySQL
2. Populating Lucene
3. Serving the Data– Routing the Requests– Load the Data– Render the Data
![Page 16: Nyss Open legislation](https://reader033.vdocuments.mx/reader033/viewer/2022052906/558cdaa0d8b42ae5118b45e5/html5/thumbnails/16.jpg)
Then
![Page 17: Nyss Open legislation](https://reader033.vdocuments.mx/reader033/viewer/2022052906/558cdaa0d8b42ae5118b45e5/html5/thumbnails/17.jpg)
![Page 18: Nyss Open legislation](https://reader033.vdocuments.mx/reader033/viewer/2022052906/558cdaa0d8b42ae5118b45e5/html5/thumbnails/18.jpg)
![Page 19: Nyss Open legislation](https://reader033.vdocuments.mx/reader033/viewer/2022052906/558cdaa0d8b42ae5118b45e5/html5/thumbnails/19.jpg)
![Page 20: Nyss Open legislation](https://reader033.vdocuments.mx/reader033/viewer/2022052906/558cdaa0d8b42ae5118b45e5/html5/thumbnails/20.jpg)
Now
![Page 21: Nyss Open legislation](https://reader033.vdocuments.mx/reader033/viewer/2022052906/558cdaa0d8b42ae5118b45e5/html5/thumbnails/21.jpg)
![Page 22: Nyss Open legislation](https://reader033.vdocuments.mx/reader033/viewer/2022052906/558cdaa0d8b42ae5118b45e5/html5/thumbnails/22.jpg)
![Page 23: Nyss Open legislation](https://reader033.vdocuments.mx/reader033/viewer/2022052906/558cdaa0d8b42ae5118b45e5/html5/thumbnails/23.jpg)
![Page 24: Nyss Open legislation](https://reader033.vdocuments.mx/reader033/viewer/2022052906/558cdaa0d8b42ae5118b45e5/html5/thumbnails/24.jpg)
Looking to the Future
![Page 25: Nyss Open legislation](https://reader033.vdocuments.mx/reader033/viewer/2022052906/558cdaa0d8b42ae5118b45e5/html5/thumbnails/25.jpg)
Some thoughts...
Complete decoupling of Data Models
Automation with Reflection/Annotation
Standards for Data Models
Client Libraries for more languages, platforms
![Page 26: Nyss Open legislation](https://reader033.vdocuments.mx/reader033/viewer/2022052906/558cdaa0d8b42ae5118b45e5/html5/thumbnails/26.jpg)
Work is always ongoingSuggestions, issues, and concerns are
ALWAYS welcome.