Git Product home page Git Product logo

ems-redux's Introduction

ems-redux

Build Status

API for exposing Events and their sessions with speakers.

EMS uses Collection+JSON and further constrains the media-type.

Additional Constraints

All collections in EMS are homogenious. This means there will only be one type of object in any given collection.

Date properties are formatted according to RFC-3339. Will always be set to Midnight. MUST be in UTC timezone.

DateTime properties are formatted according to RFC-3339. MUST be in UTC timezone.

URI properties are normalized URIs according to RFC-3986.

Never assume that the properties listed are the only ones there. As the API evolves, new properties MAY appear. Clients MUST be written to allow for this. Old clients MUST ignore unknown properties.

Event

An event is a primary object type in EMS. An event consists of the following fields:

  • name required, string.
  • venue optional, string.
  • start optional, DateTime.
  • end optional, DateTime. If this appears, it MUST be a datetime after start.

Session

A Session is always linked to a specific Event. A session consists of the following fields:

  • title required, string.
  • summary optional, string
  • body optional, string
  • audience optional, string
  • outline optional, string
  • locale required, two-letter iso code of language of the session. Usually 'en' or 'no'.
  • format required, enumeration from the set ("presentation", "lightning-talk", "panel" or "bof"), if not filled, the server will assign a default.
  • level required, enumeration from set set ("beginner", "beginner-intermediate", "intermediate", "intermediate-advanced", "advanced"), if not filled, the server will assign a default.
  • state optional, set by the server. May be set by the use of hypertext controls found elsewhere.
  • tags optional, string array
  • keywords optional, string array

Contact

A Contact is a primary object type in EMS. A contact consists of the following fields:

  • name required, string.
  • emails required, array string. There MUST be at least 1 email.
  • bio optional, string.
  • locale optional, two-letter iso code of language of the contact. Usually 'en' or 'no'.

There will also be hypertext controls for the photo of the contact.

Link relations

See the wiki for the link relations used. All link relations not found in the registries defined in collection+json should be considered to have the base URI of http://purl.org/javabin/rels/ems/

Exploring the API

You can use Trygve Laugstøl's excellent collection+json browser to explore the API.

Enabling authentication

The application is using JAAS for authentication.

The authentication is for now just Basic, meaning that the application should use HTTPS to make this more secure.

Set the system property 'java.security.auth.login.config' to the location of the config file.

If no system or security properties were set, try to read from the file, ${user.home}/.java.login.config, where ${user.home} is the value represented by the "user.home" System property.

Example file:

ems {
    com.sun.security.auth.module.LdapLoginModule REQUIRED
    userProvider="ldap://ldap.java.no"
    authIdentity="uid={USERNAME},ou=People,dc=java,dc=no"
    useSSL=false;
};

Creating new events

To create a new event you need to create a file called event.json with the follwoing content:

{
  "template": {
    "data": [
      {
        "name": "name",
        "value": "JavaZone 20XX"
      },
      {
        "name": "venue",
        "value": "Oslo Spektrum"
      }
    ]
  }
}

Add the basic auth token and run the following curl:

curl -XPOST -H 'Content-Type: application/vnd.collection+json' [email protected] -n https://javazone.no/ems/server/events -H 'Authorization: Basic <auth>'  -v

ems-redux's People

Contributors

alexander-svendsen avatar anders88 avatar bendiksolheim avatar chrissearle avatar computerlove avatar hamnis avatar henrikno avatar ingarabr avatar kvalle avatar sveinung avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ems-redux's Issues

A changelog list

For clients that download lists (for offline use) having a change log that lists all items of a particular type would be useful.

Suggested API:

In the start resource, have a query like this:

{
  "href" : "..",
  "rel" : "changelog",
  "prompt" : "Enter search string",
  "data" :
  [
    {"name" : "type", "value" : "<rel>"},
    {"name" : "from", "value" : "<from date>"}
  ]
}

Don't know if using rels as a type identifier is a good idea, but it'll work.

SSL

Currently the code will return http URLs if accessed over http and https if over https. But it is likely that we'll terminate SSL at nginx level - so something in the code needs to know this - pick it up and switch the URLs in the returned content to https.

Encoding?

http://javazone.no/ems/server/events/cee37cc1-5399-47ef-9418-21f9b6444bfa/sessions/7fc17439-1c31-4688-8cda-3e01765a338a

one of several but this one seems to have the most problems:

"name": "body",
"prompt": "Body",
"value": "L���¦r Lisp, Groovy, og hvordan interpretere virker ... p���¥ under en time.\n\nVi bruker forskjellige programmeringsspr���¥k hver dag. Mange av oss er innom Java og JavaScript, kanskje php, eller Clojure, eller Groovy eller Ruby... og vi tar disse spr���¥kene egentlig for gitt.\n\nMen ... hvordan er de laget? Hvilke bevegelige biter har de? Hva gj���¸r de forskjellige bitene? Hvordan kan jeg lage mitt eget programmeringsspr���¥k, om jeg vil?\n\nDen store hemmeligheten er at dette egentlig ikke er s���¥ vanskelig. Hvis vi bare bruker litt tid p���¥ hver bit, for seg selv, og peprer den med tester, forsvinner magien, og bare kode st���¥r igjen.\n\nDeilig, deilig kode.\n(PS. Du trenger ikke kunne Groovy for ���¥ f���¸lge med her, jeg har valgt Groovy nettopp fordi konseptene blir s���¥ klare, spr���¥ket st���¥r ikke i veien.)"

Video links

We have video's available online for 2009 thru 2012 on vimeo (see video.javazone.no) - I would like these to be added to the database so that we can test adding video links to the iOS app.

Then we will be ready for when 2013 videos come out.

Dates on conference list

In a (probably vain) attempt to avoid having to re-write the iOS app next year and the year after and ... I'd thought to do the following:

At app start - if no data - fetch a list of all conferences - store in CoreData.

Sort by date - pick newest.

Give the user a settings view that lists all conferences in reverse date order - so that they can change if they want.

But the dates on the conferences are all 1970 - I can't sort on that, I can't pick newest either.

I'm currently picking them from http://test.java.no/ems-redux/server/events (events collection).

In fact - all I really want here is start date - at this level I don't care about time or stop - but they don't hurt if they are present :)

Slots - what do we want/need?

The current slot system is a bit of a mess. EMS creates slots that are not used - and the clients have to try to group sessions into meaningful periods.

We're also assuming that the system is for all day conferences - as it stands it doesn't really fit feks javaBins meetings.

What do we actually present?

Well - as far as I can see - JZ has three levels.

  • Day
  • Main Period Group
  • Slot time

A slot is part of a group happens on a day.

Right now the apps/web team extract group and day based on logic that is JZ specific and happens in the client.

If we supported

  • Outer
  • Inner
  • Slot

And then said that outer and inner were conference specific and defined manually then we could have day and the groupings defined as data rather than logic - and then for javaBin we could define oh - I don't know - month and week or whatever suits. We could even make the inner and outer non-time based (Outer could be oslo, bergen, sørlandet feks) if we had the correct parent/child relationships.

This is meant to be the start of a discussion - hope that others can join in before we actually decide what to make EMS do :)

Could session have a field indicating length?

Talks needs to be published before they are assigned to a slot. It will then be nice to have a field indicating the length of the talk. For example a workshop can be anything for 120 to 480 minutes long.

If-Modified-Since and Last-Modified for binaries (speaker images)

We're updating the iOS app to prevent it downloading speaker images every time you open a session.

To do so we're now sending the If-Modified-Since header.

This is working fine for gravatar images (48 speakers in 2014) but not for EMS images (111 speakers in 2014).

Nor does EMS send the Last-Modified header - so I have no date to check against.

Oddly - EMS seems to respect If-Modified-Since for non-images - but for images it just returns a 200 OK and the image instead of 304 Not Modified.

Some sample URLS.

Relates to javaBin/ems-ios#129

BioPic image sizes

Downloading images in full res over an edge connection takes a long time.

We've had to give the users an option to turn this off in earlier mobile app versions.

Some speakers have loaded up 5mp sized images before now.

On a small screen where we're likely to show an image in 100px big or so this is seriously overkill and uses far too much data traffic.

It would be nice to have images available in other sizes - we can certainly have a set of supported (full, thumb, mobile) etc.

Post migration data corruption

After migration to postgres I'm seeing issues in the data when pulling to the app.

You can see it on the web too if you have the direct links:

An example

http://2015.javazone.no/details.html?talk=41c7a0b5f9012e4c764f626c429433963e8bc28bff68d61651f3baf8035b835f

Check room and slot

These are also missing from the program view http://2015.javazone.no/program.html

Not sure how to find all of the ones with issues - it's pretty fiddly getting them out of coredata on an ios box. Hope you can find a better way.

Permalinks

Apps need permalinks to make sharing/social media meaningful.

It would be best for the apps that this data was available as links with a "permalink" rel in the C+J document for sessions.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.