Project

General

Profile

GSoC 2016 » History » Version 3

gry, 02/04/2016 12:06 AM
http://piratepad.net/vdo3UDwdRR

1 1 gry
h1. GSoC 2016
2 1 gry
3 1 gry
h2. Core
4 1 gry
5 1 gry
h3. Log search
6 1 gry
7 1 gry
There needs to be a core-side thingy to search logs so that clients dont have to write all the db code from scratch
8 1 gry
9 2 gry
h3. Highlights
10 1 gry
11 2 gry
* #1122 Reworking of the code for notifications, highlights and ignores (implement on the back end)
12 2 gry
* #1121 Track highlights (Away log) server-side
13 2 gry
* #989 Add ignore highlight option in a channel's context menu
14 2 gry
* #734 Retrieve unread highlights on attach | Non-linear backlog
15 2 gry
16 2 gry
h4. Highlight rules
17 2 gry
18 3 gry
( source:  http://piratepad.net/vdo3UDwdRR )
19 1 gry
20 1 gry
QuasselNotify
21 1 gry
 * By default, is on "core port + 1"
22 1 gry
 * Only available if core has SSL Certificate
23 1 gry
 * (This could also alternatively be on the same port as the core, but with protocol 0x03, in case quassel ever implements it natively; In the case of a native implementation, the GetRule/AddRule/DelRule would be issued through the normal Quassel protocol)
24 1 gry
 * Messages are described by protobuf
25 1 gry
 * Messages are distributed using MQTT
26 1 gry
27 1 gry
The following spec further discusses types of messages that can be delivered between clients. They will be sent with QoS 1 (at least once delivery).
28 1 gry
29 1 gry
Each rule belongs to a topic, and a client can decide to subscribe to multiple topics.
30 1 gry
31 1 gry
For example, one could create a rule for all "help" "please" messages in freenode#quassel, and declare this to be part of the group "work", while rules in other channels, say, #disney, could be part of the group "fun".
32 1 gry
During work hours, the client could decide to only subscribe to the topic "work", while during other hours, it would only subscribe to the topic "fun".
33 1 gry
34 1 gry
Types
35 1 gry
36 1 gry
 * MessageID: int
37 1 gry
 * UUID?
38 1 gry
 * Topic: String
39 1 gry
 * BufferInfo: { int: id | int: networkid | int: type | int: groupid | String: name  }
40 1 gry
 * Message: { MessageID: id |  int: time | int: type | int: flags | BufferInfo : buffer| String: sendermask | String: content }
41 1 gry
 * SmartRegex: { String: regex | boolean: inv }
42 1 gry
 * HighlightRule: { UUID : id | Topic : topic | SmartRegex : message | SmartRegex : sender | SmartRegex : channel | boolean : inverted }
43 1 gry
44 1 gry
Client -> Server
45 1 gry
46 1 gry
 * RequestRules{ }
47 1 gry
 * AddRule{ HighlightRule  : rule }
48 1 gry
 * DelRule{ UUID : id }
49 1 gry
 * RemoveNotification{ UUID : id } (if notification is swiped away)
50 1 gry
51 1 gry
Server -> Client
52 1 gry
53 1 gry
 * Notification{ Message : message }
54 1 gry
 * ListRules{ Array[HighlightRule]: rules}
55 1 gry
 * RemoveNotification{ MessageID : id } (if last read progresses, for example, or it’s read on other clients)
56 1 gry
57 1 gry
(obviously, mqtt handles pub/sub)
58 1 gry
59 1 gry
Specification of what "a message is a highlight" for a topic:
60 1 gry
All of the following apply:
61 1 gry
 # The message maches one or more highlight rules with inverted == false
62 1 gry
 # The message matches zero highlight rules with inverted == true
63 1 gry
64 1 gry
Pseudocode:
65 1 gry
66 1 gry
<pre>
67 1 gry
boolean Topic::matches(Message m) {
68 1 gry
    for (HighlightRule rule: invertedRules) {
69 1 gry
        if (rule.matches(m)) return false;
70 1 gry
    }
71 1 gry
    for (HighlightRule rule: normalRules) {
72 1 gry
        if (rule.matches(m)) return true;
73 1 gry
    }
74 1 gry
    return false;
75 1 gry
}
76 1 gry
</pre>
77 1 gry
78 1 gry
79 1 gry
Specification of "a message matches a highlight rule":
80 1 gry
All of the following apply:
81 1 gry
82 1 gry
 # The rule’s message regex matches the messages message content
83 1 gry
 # The rule’s sender regex matches the messages nick!ident@host
84 1 gry
 # The rule’s channel regex matches the messages network#channel
85 1 gry
86 1 gry
Pseudocode:
87 1 gry
88 1 gry
<pre>
89 1 gry
boolean HighlightRule::matches(Message m) {
90 1 gry
    return message.matches(m.content) && sender.matches(m.sender) && channel.matches(m.buffer.network + "#" + m.buffer.name);
91 1 gry
}
92 1 gry
</pre>
93 1 gry
94 1 gry
95 1 gry
Specification of "a SmartRegex matches on a String":
96 1 gry
97 1 gry
 * If inv is false, then the smartregex matches exactly when its wrapped regex would match
98 1 gry
 * If inv is true, then the smartregex matches exactly when its wrapped regex would not match
99 1 gry
100 1 gry
Pseudocode:
101 1 gry
102 1 gry
<pre>
103 1 gry
boolean SmartRegex::matches(String s) {
104 1 gry
    return inv ^ regex.matches(s));
105 1 gry
}
106 1 gry
107 1 gry
</pre>
108 1 gry
109 1 gry
h3. Backlog management
110 1 gry
111 1 gry
* #734 Retrieve unread highlights on attach | Non-linear backlog
112 1 gry
   * #1330 server-side log search in core
113 1 gry
   * «If the core would have such an API, it would be amazing... Especially for stuff like quasseldroid and so... Message filtering would be nice in general. "Give me all unread messages containing my nickname". Would be amazingly useful for notifications.»
114 1 gry
* #1252 separate log and backlog tables
115 1 gry
* #1083 Archive search
116 1 gry
* #1327 The search box should search the complete log
117 1 gry
* #716 Alternate Backlog Retrieval System - Timelines
118 1 gry
* #1204 Have an option to keep a buffer log, but not keep it in the channels tree
119 1 gry
* #1316 Quassel freezes when I switch to a buffer with large backlog
120 1 gry
121 1 gry
h3. Scripting
122 1 gry
123 1 gry
Scripting at the core side.
124 1 gry
125 1 gry
Currently implemented without hooks as a one-off command. [https://github.com/quassel/quassel/tree/master/data/scripts existing scripts], ? code where they are processed ?.
126 1 gry
127 1 gry
Needs to support scripting at the core side with hooks, "when someone joins do X", etc.
128 1 gry
129 1 gry
* [[Possiable Scripting Object]]
130 1 gry
* #265 Plug-In/Script support
131 1 gry
* "Task machinery":https://github.com/seezer/quassel/commit/8e4c1d8c20b04bd1b2e7a98ab3ad2899e5735724 (from seezer, needs feedback before using this to build event driven scripting thing)
132 1 gry
133 1 gry
h2. Clients
134 1 gry
135 1 gry
Improve any of the [[Mobile]] clients
136 1 gry
137 1 gry
h3. Web client
138 1 gry
139 1 gry
Improve Quassel-web for a "cloud" experience?
140 1 gry
141 1 gry
* https://github.com/sandsmark/quassel-web - sandsmark
142 1 gry
* https://github.com/magne4000/quassel-webserver - magne4000