Citoid

From Wikitech
Jump to: navigation, search

Citoid is a stateless node service on the SCB cluster. It processes HTTP requests containing a URL or ISBN number by retrieving citation information from external sources with help from a local XULrunner-based Zotero server. It responds with a JSON structure containing the citation information.


Deployment

Deployment is currently using Scap3.

# on tin 
cd /srv/deployment/citoid/deploy/
git pull && git submodule update --init
scap deploy

Monitoring

Testing

These are example queries you can use to verify whether citoid basically works:

This request will query zotero:

curl 'http://localhost:1970/api?format=mediawiki&search=http:%2F%2Flink.springer.com%2Fchapter%2F10.1007%2F11926078_68'

This request will let citoid make the request itself:

curl 'http://localhost:1970/api?format=mediawiki&search=http:%2F%2Fwww.pbs.org%2Fnewshour%2Fmaking-sense%2Fcare-peoples-kids%2F'

Troubleshooting

By default, the service listens on port 1970. Example request:

curl -XPOST -d'format=mediawiki&url=http://link.springer.com/chapter/10.1007/11926078_68' http://sca1001:1970/url

Logs

/srv/log/citoid/main.log on each node.

Fail-over

The SCB cluster is load balanced through LVS. The failure of an individual node does not affect the availability of the service.

Restarting a node

service citoid restart

See also