CloudServices/Presence/UseCases

From MozillaWiki
Jump to: navigation, search

Chat Room (=IRC Channel)

A chat room app let people talk with each other on the same web page. You connect to the system using Persona and you avatar appears on the page to other users. You can add contacts in that app.

People see you messages in realtime. It's built using whatever chat technology (BOSH/XMPP, plain websockets)

Before Mozilla Presence:

  • a user appears as present (or busy or idling etc..) in the chat room when she's connected to the app and uses it
  • a user that is not currently using the app (perhaps because FFOS killed that app due to constrained device resouces) appears offline.
  • if the application wants to reach an offline user, it does not really know if the user is offline at the device level or just the app level.

With Mozilla Presence

  • a user runs the Presence service and let it know when he's offline/online at the device level (desktop browser: a social API sidebar, FXOS: some background service)
  • the user set permissions: "yes the chat app can get my presence updates"
  • the user then can use the chat app independantly from the presence thing - or not having it running at some point at all
  • the chat app interacts with the presence server: it gets a stream of presence update from the presence server only if the user authorized it and status messages if set
  • the chat app can notify a user that another user pinged him in the room

Resources:

Live Support

(This is about a tentative and unnamed Firefox OS support tool.)

Maria is a Mozillian who wants to helpful to other Firefox OS users. She signs up with a support application (an application that Mozilla creates). She indicates what she knows about, and what languages she speaks.

Javier wants to activate developer mode on his phone, but can't find the right setting. He goes into Help > Live Support. The phone sends a request to the support app: someone wants support with Settings in es-MX. The application looks in its database of contributors to see who has the appropriate expertise (and language) to help him, and who is online. Among the pool of possible people it selects Maria, and pings her to see if she can provide support. If she doesn't respond then another person is selected from the pool (or maybe many people are asked at once), and if someone else helps Javier then Maria is notified that her help is no longer needed.

Note that Maria would be participating under an alias specific to the support application (though not anonymous), and she will not be fielding support requests all the time (e.g., she may not provide support at work, only after hours).


Facebook

Jeff wants to appear online on Facebook (he's already determined on Facebook who can see him, etc).

He's already installed the Facebook app on his FFOS phone, he goes to the Settings and touch, "Authorize Presence", his screen loads a doorhanger (provided by Mozilla Presence) asking if he wants to authorize the app.

Jeff clicks "Yes" on the doorhanger page, and the Facebook app waits while Facebook recieves the redirect, stores his UID, and closes the doorhanger (and likely needs to do something else to register this with the device so that it will appear in the Presence Settings page).

The next day, Jeff wakes up, and goes to check his e-mail on his phone. Upon seeing his idle drop, the phone's simple-push client (which is always running) includes an 'O' in its next PING to simplepush to indicate the user is now online. Mozilla Presence gets notified of this and acts on it to batch the status change to Facebook. The batch of updates goes to Facebook including Jeff's, so Facebook knows that Jeff is now online, and updates its database indicating this.

Jeff's friend Marsha goes to Facebook to see if any of her friends are online. Marsha sees that Jeff is now online and sends a chat request. Facebook uses SimplePush to notify Jeff of the chat request. Jeff sees the chat request

AppMaker

similar to Live Support

Sue has signed up to be an appmaker tutor -- Bob is a new appmaker teacher, and is stuck in a workshop, Bob wants to know which of the tutors are available to help w/ a togetherJS session

Sue is an appmaker expert. She previously authorized AppMaker to see her Online Presence - as Jeff did in with Facebook in the previous story. She also configured her notifications so any message coming from AppMaker when she's online would display a message on her screen and let her start the app.

Bob is building a cool new application with his class in AppMaker and would like some input from someone. Appmaker maintains a mapping of which helpers are appropriate for which users (e.g. by language skills). He's currently working in AppMaker from his FFOS Phone and sees that Sue is online.

Bob clicks on Sue's name in his contact lists and hit "invite Sue for peer design session". AppMaker sends a notification to Sue using the Simple Push service.

Sues gets the notification instantly on her phone via her simple-push client and joins Bob on the design page.

AppMaker uses Together.js so Bob and Sue can interact live on the page.

Wikipedia

(This comes from conversations about TogetherJS and Wikipedia)

similar to Live Support

Some questions that might be nice to answer with a presence service:

  • Is there someone actively working on this page (or its related Talk/etc pages) right now?
  • Is there someone ready to offer X help at this moment? (X examples: editing help, template authoring, mediate disputes)
  • Given a community of interest (people interested in baseball, admins, etc):
    • Who is around?
    • What are they doing? (E.g., editing pages, hanging out in a discussion, etc; each person would opt in to publicizing this information to other people.)


Chatspace

Jen is building https://github.com/mozilla/chatspaces - we should investigate how presence fits there