Internals
Open Stories and Issues
Conversations should time out: Currently, once we load a Conversation into the SpaceConversationsActor, it stays there until the Space itself times out. That's probably unwise: we should have a separate timer for each Conversation.
Email Address should not exist on Person: Currently, the Person record (the view of an Identity in a Space) contains that Identity's email address. We are going to significant effort to
hide that email address from end users. But it really shouldn't be there in the first place.
Get Profiling working again: Much of profiling got scragged by the rewrite of the QL Pipeline to use Futures. It needs a deep rethink in general.
Improved way to create RequestM: At Alex's talk on Monix Tasks, he described how Monix Task.create works. Instead of the two-phase approach I used for RequestM, based on Promise, he passes a function to create, which is the stuff between prep and returning. This is clearly a better way, so replace prep with this!
Introduce BulkSpaceEvent: At the moment, we're doing things like SecuritySpacePlugin as
multiple Events. Conceptually, that's wrong -- they should really be one aggregated Event.
Invocation should be based on the State Monad: This is to fix the "elem" problem -- the fact that you have to
manually remember, after calling something like contextBundlesAndElements, to use the elem later in the for comprehension. If you goof, you get multiplicative horror. We need this to be automatic.
mainIdentity is a fundamentally broken idea: We're using the convenient concept of
mainIdentity
in more and more places in the code. But it really doesn't make sense -- if I have a FB login and a direct Querki login, which one is "main"? I suspect we're getting into trouble here.
Notification Rendering no longer works appropriately: This design bug isn't user-visible -- yet -- but shows up as a horrible hack in the Client's NotificationsPage. CommentNotifier shows the bug clearly. The issue is that we're rendering the link to the Comment deep in the server, inside CommentNotifier, but we really should be doing so client-side.
Optimize the Read permission recalculation when a Space changes: This is currently wildly inefficient, and while I try to avoid premature optimization it seems likely to become a disaster for the Arisia Volunteers Space: with hundreds of people frequently modifying a Space with tens of thousands of records, it's likely to bog down.
Race condition during node startup: Potentially, Play can start receiving and processing requests for this node before it has joined the Cluster; badness will presumably result.
RequestContext should be passed more consistently: We pass the RC a lot, enough to probably standardize on it. Doing so would have huge advantages, not least being able to use it as a thread of control for logging. If QLog took an implicit RC, then it could basically preface spews with a request ID.
Rewrite Requester to be tell-based rather than ask-based?:
This post points out the fragility of using "ask" too much. I suspect it'll eventually become an issue for us -- while we don't often use ask explicitly, we do use it under the hood of Requester, and we use that a lot. Also, we use ask to go from the Play layer to the middle layer.
Rewrite the internal QL pipeline: This one is still deeply hypothetical, and huge, but the potential performance gains are sufficiently huge as to be worth really digging down and dealing with it.
Space Persisters need their own thread pool: This hasn't proven to be a problem yet, but probably will be. At the moment, we allow an arbitrary number of Space Persisters to try to write simultaneously. That's fine unless the DB communications load completely; if they do, the Space Persisters will eventually starve the global threadpool.
UserPersistence should all be asynchronous: Pretty much all functions here are MySQL calls, and thus relatively slow. They should all be getting performed on a separate, dedicated MySQL threadpool, and should all be returning Futures. (Or better yet, IO.)
Closed Stories and Issues
Creating a Space often gives an Unexpected Error: Two times out of three, when you try to create a Space in the production environment, you get no response, and eventually get an Unexpected Error, even though the Space has been created successfully.
editThingInternal() needs to stop using raw OIDs: In particular, the "model" parameter is a raw OID; it should have always been a ThingId. Fixing this is going to be a PITA, since we have screwed it up in so many places, but it needs to happen -- at the moment, it is causing all sorts of bugs.