Merge apprtc-collider branch to Master

The apprtc-collider branch contains the changes to 
1. Make AppRTC use Collider for signaling
2. The user joins the room on a separate POST message to GAE, instead of on the first GET
3. The first user of a room is the caller and GAE caches his signalling messages, which are pushed to the second user when the second user joins the room.

Can we fix it in a later CL? This isn't a regression from the Master.

On Tue, Dec 9, 2014 at 11:55 AM, Justin Uberti <notifications@github.com>
wrote:

> In samples/web/content/apprtc/apprtc.py
> <https://github.com/GoogleChrome/webrtc/pull/285#discussion-diff-21557255>
> :
>
> > +  room_key = get_room_key(room_id)
> > +  return Client.gql('WHERE ANCESTOR IS:ancestor AND room_id=:rid',
> > +                    ancestor=room_key, rid=room_id)
> > +
> > +# Returns dictionary of client_id to Client.
> > +def get_room_client_map(room_id):
> > +  clients = get_room_clients(room_id)
> > +  client_map = {}
> > +  for client in clients:
> > +    # Sometimes datastore converts to unicode string. This converts it back
> > +    # to match string coming in from request handlers.
> > +    client_map[str(client.client_id)] = client
> > +  return client_map
> > +
> > +class ByePage(webapp2.RequestHandler):
> > +  def post(self, room_id, client_id):
> >      with LOCK:
>
> LOCKs just serialize on a single app server instance. They are like
> mutexes. I don't think they cause any serialization for datastore - as Zeke
> says, you need to use transactions for that.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/GoogleChrome/webrtc/pull/285/files#r21557255>.
>



-- 
Jiayang Liu