Skip to content

Codebase

sics-iot edited this page Aug 27, 2013 · 3 revisions

The bulk of the source code sits in engine/src/main/java/com/sics/sicsthsense, which contains directories:

  • /core - The main POJO classes representing nouns in the SicsthSense system (e.g., User, Stream, DataPoint).
  • /resources - The HTTP resource representations (e.g. defining what to do after GET or POST)
  • /jdbi - The database interaction classes, mostly a global DAO object.
  • /views - Static content represented through templates
  • /auth - Authentication for OpenID and basic username/password

The basic idea is that client requests are passed to the appropriate Jersey "resource" (not to be confused with a SicsthSense resource) which is just the hard implementation of the theoretical concept of a REST Resource. Each request type (GET, POST, etc.) will be sent to the method in the Jersey resource with the matching Java annotation @GET, @POST etc.

The URL is broken down and path parameters made available where specified, and even query parameters made available if specified. The frameworks magically take care of "injection" and will create Java POJOs from JSON supplied payloads if desired.

Authentication is a bit more tricky.

Clone this wiki locally