Commit Graph

66 Commits

Author SHA1 Message Date
Ian Gulliver
49f14e54cf Stop some pathological datastore behavior when a client is fetching many messages. 2016-01-05 18:12:59 -08:00
Ian Gulliver
30a3e89bfc Fix several cases of assuming that a Profile always has a numeric ID, rather than a named key, which is untrue. 2015-12-24 15:26:43 -08:00
Ian Gulliver
db9b63cec8 Switch to uuid names for Event keys, because appengine reuses model ids. 2015-06-22 20:56:27 -07:00
Ian Gulliver
33f368910f Better method for tracking reconnect of polling clients. 2015-06-19 22:43:20 -07:00
Ian Gulliver
f89e936f55 Don't delete all events, just the ones that are acked. 2015-06-15 21:31:21 -07:00
Ian Gulliver
0ead64a41d Tell polling clients when we've recreated their connection and they need to resubscribe. 2015-06-15 21:25:00 -07:00
Ian Gulliver
1325ad570e Event cleanup pipeline. 2015-06-14 21:48:36 -07:00
Ian Gulliver
0df573171d Change lots of keys to IDs for length. 2015-06-14 19:56:13 -07:00
Ian Gulliver
71514b7655 Move events from keys to ids. 2015-06-14 19:33:40 -07:00
Ian Gulliver
cc6ad7803a Fix polling and acks. 2015-06-14 19:24:00 -07:00
Ian Gulliver
a63bd0abda Rename funciton, allow acking. 2015-06-14 15:26:02 -07:00
Ian Gulliver
33579856c8 Untested code for polling instances. 2015-06-12 19:57:55 -07:00
Ian Gulliver
3995a4d0d9 Don't send pins until a subscription is established, since unpin events never come in that case. 2015-06-07 14:16:54 -07:00
Ian Gulliver
0aa1d6c41c Attach a random 32-bit unsigned integer to each message for game protocols. 2014-11-11 15:56:31 -08:00
Ian Gulliver
f675715317 Bugfixes for "me" ACL. 2014-06-21 17:29:10 -07:00
Ian Gulliver
368c704b81 Translate events in pre-channel subscribe responses. 2014-06-19 23:36:47 -07:00
Ian Gulliver
3c452dabf3 Add message translation layer than can handle "me" as an ACL. 2014-06-19 23:14:26 -07:00
Ian Gulliver
40229ff0c0 Return the new message for sendMessage and pin RPCs. Pass it through the sendMessage Promise callback. 2014-06-12 23:12:00 -07:00
Ian Gulliver
66c1564980 Add server-side info logging. 2014-06-09 23:51:41 -07:00
Ian Gulliver
d2e7b76df9 Add support for magic "admin" ACL that is only satisfied by appengine administrators. 2014-06-08 23:41:23 -07:00
Ian Gulliver
44ede2abbf Record IP addresses for messages and pins to support later banning. 2014-06-08 22:04:53 -07:00
Ian Gulliver
1b4b55ac23 Cache named profiles in memory in the Python application, since they're immutable once written. 2014-06-07 23:06:17 -07:00
Ian Gulliver
7c04134dc4 Rewrite the session code, again. Now use the username as the profile key name. 2014-06-02 22:54:16 -07:00
Ian Gulliver
f4bb278835 Impose access controls for subscribe even without a channel open. 2014-06-02 21:53:51 -07:00
Ian Gulliver
5079aac9a6 Allow subscribe to return events from a subject even when not creating a subscription 2014-06-01 21:14:58 -07:00
Ian Gulliver
fd5569c5dc Generate the client_id on the client, so we don't need a round trip to get it before we can send arbitrary RPCs.
This changes the Profile/Client relationship; we never needed to be transactional with them, so split them up entirely so we can reparent Clients.
2014-05-31 23:25:15 -07:00
Ian Gulliver
27a21cc2d3 New debug console. Add sender_message_id to delivered messages for code simplicity. 2014-05-30 16:56:22 -07:00
Ian Gulliver
e1288a67fb Fixes for read/write ACLs on server and client side 2014-05-30 16:42:30 -07:00
Ian Gulliver
a70982243b Add app-local caching and stop using memcache; reduce overall datastore access. 2014-05-28 14:44:13 -07:00
Ian Gulliver
9736c15faa Subjects get a key name to enforce uniqueness. 2014-05-28 13:51:42 -07:00
Ian Gulliver
be27a86b72 Use get_or_insert for finding instances. 2014-05-28 13:39:15 -07:00
Ian Gulliver
1dd1490518 Pin test, fixes, cleanup 2014-05-27 15:33:51 -07:00
Ian Gulliver
d96c31abf7 Remove stupid cycling UUID scheme. Instead, limit server-side pin deduping to a single instance. 2014-05-27 14:54:16 -07:00
Ian Gulliver
b700202e4f Quiet some of the logspam around instances 2014-05-26 17:28:59 -07:00
Ian Gulliver
898121dabd Remove the concept of keys; they can just be encoded into subject names. 2014-05-25 23:50:53 -07:00
Ian Gulliver
8e7af2f5cf Add support for ephemeral messages that are tied to an open channel, aka "pins". 2014-05-25 23:40:56 -07:00
Ian Gulliver
ba82bf3dee Minor cleanups 2014-05-23 15:24:52 -07:00
Ian Gulliver
b5bce48df6 Make Instance actually stand alone. 2014-05-23 15:00:28 -07:00
Ian Gulliver
0b38d082c1 Remove Instance from the Profile hierarchy to allow key_name queries. 2014-05-23 14:29:11 -07:00
Ian Gulliver
1ec2340f48 Need to make the client_id even shorter. Switch to id() 2014-05-23 11:40:08 -07:00
Ian Gulliver
0e87448f6f Switch to using Instance key as the channel_id, since there seems to be an undocumented length limit. 2014-05-23 11:23:30 -07:00
Ian Gulliver
6bfa10e82a Add a third level construct under Profile and Client, Instance. This allows more than one connected object with the same client credentials. 2014-05-23 10:31:52 -07:00
Ian Gulliver
8fd851c409 Fix a subscribe bug when last_id=0 2014-05-20 10:26:10 -07:00
Ian Gulliver
f27fc7977b Add real subject ACL support and tests. 2014-05-19 20:52:57 +03:00
Ian Gulliver
1ee22da229 Add a message ordering test. Fix a nasty ID generation bug. 2014-05-18 21:58:40 +03:00
Ian Gulliver
0380679ddb When rebuilding the channel, subscribe via last seen ID, so we don't miss messages from the time we were disconnected. 2014-05-18 11:20:44 +03:00
Ian Gulliver
63ac321537 Establish a definite ordering and sequential IDs for messages, at the expense of another datastore read/write pair. 2014-05-18 10:58:39 +03:00
Ian Gulliver
6389787833 Small API changes to move toward subject ACLs. 2014-05-17 19:13:59 +03:00
Ian Gulliver
d3f716a081 Use a property instead of key_name to hold subject name. This makes Message.ToEvent() do an additional datastore read, but opens up the ability to add more subject indexes. 2014-05-17 18:50:12 +03:00
Ian Gulliver
0247b78c6b Suppress duplicate messages from a client (e.g. when network failure causes retries for RPCs that actually went through). 2014-05-16 23:07:38 +03:00