force uncompress when websocket streaming and updated version
[brisk.git] / TODO.txt
1  TODO |
2 ------+
3
4   FEATURES |
5  ----------+
6    - WEBSOCKET TRANSPORT
7      . refactoring $enc attribute management
8      DONE . reintroduced $enc = 'plain' for websocket
9      DONE . fallback for not correct WS version
10      DONE . fini of ws stream
11      DONE . reactivate compression
12      DONE . fix xynt_test01
13      DONE M2: brisk working
14      DONE . manage multiport apache config
15      DONE . manage headers correctly in sac-a-push
16      DONE . manage transport.close method where required
17      DONE . xynt_stream: manage fallback to multiple ports
18      DONE . manage fini for ws
19      POST . server: manage input data from clients
20      POST . manage ping/pong (seems not required)
21
22      DONE . client (xynt_streaming.js)
23      DONE . server (transport.phh)
24
25      DONE M1: xynt_test01.php working
26
27
28    - improved S
29      . db update (add components, maybe single string)
30      . filter in index.php
31      . filter in index_wr.php
32
33    - prefs API:
34      . prefs_assign(content): assign json content as output var
35      . prefs_apply(prefs_new): apply new content to g_prefs and system
36      . prefs_load(content): load json content and apply to g_prefs and system
37
38      . prefs_update: update preferences temporarly
39      . prefs_save: save to the server the new prefs
40
41    - preferences (listen into preferences)
42         // js var, volatile server, (db server || cookie)
43         temporary: js var, volatile server
44         permanent: js var, volatile server, (db server || cookie)
45
46      . data from db OR, if missing, from cookies
47
48      . update values
49      . database change
50      . MANAGE NOT AUTH USERS
51
52    - preferences (with "modifiable S")
53      . Mod. S: new flag into database
54      . graph infrastructure
55      . new box to edit color
56
57   MAJOR |
58  -------+
59    - BUG: some connection to the named socket fails
60    - Not simultaneous more then one stream
61
62
63   MINOR |
64  -------+
65    WIP - try to be more antivirus-friendly
66    - multiple rows between games
67    - packetize and automatize php-ancillary and apache module
68    - DISABLED_TO_FIX: DNS access (perform blocking dns requests, must be fixed)
69
70
71   DONE |
72  ------+
73    DONE - temporarly server hung not reflected on user timeouts
74    DONE - timeouted users are still be able to sit down (only the first at the table is banned)
75    DONE - page still opened after the server restart
76    DONE - log_legal address fix
77    DONE - manage too fast reload in xynt-streaming
78    DONE - add xhr as transport layer and manage different streams better
79    TEST - BUG: pari + 72 non fa 4x ma attualmente fa 3x, da correggere
80    TEST - BUG: lurker are logged out (and remain a pending socket opened (look the spush log)
81    DONE - save/restore database
82    DONE - into the room local step remains -1
83    DONE - centralize all '<script ...' incapsulation to allow multiple transport system.
84    DONE - BUG: access with password from 2 diff browsers the second go in strange "page not found" 
85           in the first tentative, the second works
86    DONE - BUG: access with password from 2 diff browsers place the first in a strict loop (the 
87           problem was a call to a static parent method instead of the overrided child method,
88           substitute self:: with the dynamically get class::)
89    DONE - garbage management
90
91    DONE/FROZEN - problem with getpeer (HOSTADDR)
92
93    DONE - slow cards distribution
94    DONE - substr to mb_substr
95    DONE - parametrizations:
96           . parametrization of $DOCUMENT_ROOT  var in brisk-spush.phh file
97           . parametrization of SITE_PREFIX(_LEN) define
98           . move the name of the named socket into the configuration file
99    DONE - manage and test cross forwarder between table and room
100    DONE - setcookie (for tables only and persist prefs)
101    DONE - images flickering on slow windows: try to poll stream every 300 ms (seems to be download problem)
102    DONE - database connection fails after a while, check close and try PGSQL_CONNECT_FORCE_NEW.
103    DONE - unneeded garbage_time.expired access
104    DONE - BUG: fast loop on stream index_rd_ifra page (js watchdog start without timeout corrupt counts)
105    DONE - BUG: logout failed (fixed with a garbage_collector wrapper at sac-a-push level
106    DONE - 404 wrong page management (remove directories redirections (es. brisk/))
107    DONE - configuration file management
108    DONE - app level keep-alive
109    DONE - index_wr other issues
110    DONE - from room to table
111    DONE - from table to room
112    DONE - chunked
113    DONE - bug: read from a not resource handle (already closed because a new socket substitute it)
114    DONE - partial write for normal page management
115    DONE - index_rd_ifra: last_clean issue
116    DONE - fwrite failed error management (select, buffer where store unsent data, and fwrite check and retry)
117    DONE - bug: after restart index_rd.php receive from prev clients a lot of req
118    DONE - index_wr.php::chat
119    DONE - index_wr.php::exit
120    DONE - index_rd.php porting
121    DONE - generic var management from internet
122    DONE - index.php auth part
123    ABRT - index_wr.php::reload - reload is js-only function
124    ABRT - keepalive management - not interesting for our purposes
125
126  BRISK4 (mammuth)
127  ======
128
129  - STEP MANAGEMENT VERIFY
130  Slim Paragraph
131  DONE - move the garbage timeout on file
132  DONE - in index_rd load all data only when required
133  - briskin5 alignment
134    DONE . extern del garb_timeout
135    DONE . user_load parameters verify
136    DONE . Bin5::load_data and Bin5::save_data refactoring with
137           data split
138    . move many function into "Bin5 class"
139  - garbaging of .step files
140
141  DB: - initial usage
142      DONE - configurabilità file o db
143      DONE - aggiornare le funz di gestione db in modo che prevedano anche il flag DISABLE
144      DONE - travasatore file to pg
145        DONE - travaso punteggi
146        DONE - memorizzazione nuovi i punteggi nel db
147        DONE - gestione classifiche in SQL
148          DONE - produrle
149          DONE - mostrarle
150
151      STEP 1.1
152        DONE - points archiver
153
154      STEP 1.2
155        DONE - partial usability if database go down.
156
157      STEP 1.5
158      - sistema di inserimento nuovi utenti (riversatore da form di inserimento)
159
160      STEP 2
161      - aggiornare le funz di gestione db in modo che prevedano anche il flag SUSPEND
162      - modifica password   
163      - ripristino password 
164
165      STEP 3
166      - comunicazioni di aggiornamento (stato salvato sul server) 
167
168  DONE - var $G_base aggiunta per gestire include in include da path differenti
169
170  BRISK3 (trusty)
171  ======
172   DONE - donameter
173     DONE - G_donors
174     DONE (WOW!) - js object with infos
175     DONE - main logic at login (cookie check in index_rd.php; show_message and createCookie via snippets with block
176            to prevent fast reload)
177     DONE - cookie per non assillare e visualizz.
178     DONE - graphical donameter
179     WIP content (in conf.)
180
181   DONE - numero di tavoli auth-only nel .brisk-install
182   - isolation
183     TEST - ricalcolo delle persone in piedi quando si cambia modalità
184     DONE - se si e' in isolation non si può cambiare nick perdendo l' auth
185     DONE - non leggere le chat di quelli non autenticati (in isolation)
186     DONE - regole per passare alla modalita' (in piedi o ai tavoli autenticati) 
187     DONE - treni non auth da nascondere 
188     DONE - verso gli altri ??: uguale a prima
189
190   finire multilingua (briskin5/index_wr.php e altri se ce ne sono)
191   coniglio
192   only auth strictly
193   placing limits to config file
194
195 Dunque, 
196
197 - come vengono aggiornate le classifiche: ogni giorno alle 23:58
198
199 - cosa cambia tra le tre coppie di classifiche: 
200   ci sono le classifiche dell' ultima settimana, quelle dell' ultimo mese,  e quelle dell' ultimo trimestre,
201   per ognuno di questi lassi di tempo poi c'è la classifica di chi ha giocato più di TOT partite o meno di TOT partite, con TOT che cambia a seconda del lasso di tempo.
202
203 - come vengono calcolate le classifiche: per ogni utente vengono presi tutti i punti fatti ai tavoli con lucchetto nel lasso di tempo preso in considerazione (ultima settimana, ultimo mese o ultimo trimestre), sommati e divisi per il numero di partite fatte in quello stesso lasso di tempo per normalizzare i valori; poi siccome la gente quando vede 0.18734 sbarella ho deciso di moltiplicare il tutto per 100.
204
205 Un esempio per chiarire:
206
207   l'utente 'pippo' che è nuovo gioca 4 partite nell'ultima settimana con i seguenti punteggi:
208     -2, 1, 2, 1
209   lo score viene { [ (-2) + (1) + (2) + (1) ] / 4 }  * 100 = 50.0
210   
211   a parità di score tra utenti va più in alto chi ha giocato più partite.
212
213 Se dopo quelle 4 partite 'pippo' non ne giocherà più, passata una settimana dall'ultima giocata 
214 sparirà dalla classifica settimanale e rimarrà in quelle mensili e trimestrali.
215
216
217   
218
219
220
221
222  BUG
223  ---
224  
225   DONE - paste da demauroparavia
226   DONE - recupero partita per re-login con password
227   DONE - problema "|" nei nomi (manca enhance degli script lato server)
228   - problema col treno se mouse sopra mentre stringe (verif)
229   
230  MINOR
231  -----
232
233  NORMAL
234  ------
235
236   - win test
237   WIP - /listen 
238     DONE - skin della textarea
239     DONE - set cookie 
240     DONE - init client (read from cookie) - ALWAYS BY SERVER
241     DONE - init server
242     DONE - after cookie check auth-only when no-auth case
243     DONE - aggiungi info accanto a "Chat"
244   DONE - /mesgtoadm
245   DONE - img dei comandi
246
247   DONE - form per garantire utenti (accoda in un file nel formato corretto)
248   DONE -   process request
249   DONE -   show form
250   DONE -   close butt
251   DONE -   submit form
252   DONE -   process form js side 
253   DONE -   process form
254   DONE -   documentazione in help
255
256   DONE - user status
257
258   DONE - aggiornare help
259   DONE -   overflow management
260   DONE -   for status
261   -   for password
262
263   DONE - reload home
264   - notify for long pages
265
266   - buddy list
267   - silenziastolti vari (fino al buddy import)
268   - restrict challenge per IP
269   - restricted charset for login
270   - watchdog
271
272   - db (minimal)
273     - db admin page
274     - user db admin
275     - use db 
276     - admin db
277
278     - studiare un anti-dos
279   - login modify
280  DONE  - db (fake)
281  DONE  - display auth
282     - manage preferences 
283
284  minor
285  -----
286    - auth after login
287
288 ----- done ------
289
290  BUG
291  ---
292   DONE   righe troncate
293   DONE - questione "a monte" che:
294   DONE   - lascia fuori il bottone
295   DONE   - scrive &agrave e compagnia
296   DONE - refresh act_table when unauthorized
297   DONE - problema ghost autenticato (ne prendi il posto ovunque sia)
298
299  MINOR
300  -----
301   DONE - refactoring of the owner name (auth attr for owner name)
302   DONE   - room
303   DONE     - at chat input line 
304   DONE     - in the chat output line
305   DONE     - deauth management
306   DONE - table
307   DONE   - at chat input line
308   DONE   - in the chat output line
309   DONE   - for user area of other users
310   DONE   - deauth management
311   DONE - alart to one user
312
313
314  NORMAL
315  ------
316   DONE - strong ban: "expire time|IP|session|(nick if authenticated)"
317   DONE   - login: se auth      -  verifica solo gli expire per quel nick
318   DONE   -        se non auth  -  verifica gli expire per IP e sessione
319   DONE   - riscrivere messaggi
320
321   DONE - login 
322   DONE   - se pass:
323   DONE     - richiede per l' utente un token (tutta la parte backend va un minimo studiata)
324   DONE     - lo legge, ci hasha la password
325   DONE     - invia la pass al server hashata
326   DONE   - se non pass:
327   DONE     - check del login e return corretto
328   DONE     - oggetto in shm single table con ( "ip", "login", timestamp ) e suo management
329   DONE     - rename ghost if logged
330   DONE     - onunload_cb e onbeforeunload_cb !!! 
331   DONE   - da change attrs a change class (input field)
332   DONE     - colore del bg per arrivare ad essere omogeneo
333   DONE     - cambiare path e file di config
334   DONE   - login with or without pass
335   DONE   - registered nick notice (METTERE IL MSG NELLA PAG DI LOGIN)
336   DONE     - segnalare tavoli solo per auth
337   DONE     - rename restriction at auth table
338   DONE     - change nick (strcasecmp)
339   DONE   - refact js tables to handle flags
340   DONE - room javascript refactoring
341
342   DONE - work background
343   DONE - reserved tables
344
345
346  BRISK2 (spawn)
347  ======
348
349    
350    URGENT - tables spawn
351             DONE - link with photos
352             DONE - top banner in Etc file
353             DONE - spawn of a table
354             DONE - data to cookies (removed table_idx from xhr calls also)
355             DONE - set subst to shutdowner/shutdowned
356             DONE - return to index.php
357             DONE - game's token
358             DONE - recover of corrupted table data
359             DONE - closure of a table
360             DONE - flush of the table
361             DONE - security checks for right scope access
362             DONE - garbage collector management
363             DONE -    recursive garbage - howto ?
364             DONE - stat & subst in browser
365             DONE - laccwr setting and exit if all players are unactive for some time
366             DONE - the list of test case
367             DONE - shm dimension
368             DONE - remove unused parts
369             DONE - move images
370             DONE - optimizations
371             DONE - cambiare titolo al tavolo
372             DONE - shutdowning lock tables
373             DONE - topbanner
374             DONE - public announcements
375             DONE - 10 sec to exit from table
376
377             FAR - inheritances
378    
379    TRAIN  -  DONE - add again in reload   
380              DONE - wag_set refact
381              DONE - filtra char speciali per title
382              DONE - chatt_send refact 
383              DONE - elenco dei giocatori
384              DONE - documentazione online
385              DONE - timeout management     
386              LATER - border color a muzzo
387        
388    NORM   - testament
389    NORM   - public announcements
390    NORM   - 10 sec to exit from table
391    NORM   - moving label for tables click
392
393 ----------------- join -----------------
394    NORM   - map
395
396    NORM   - restart preload img
397    NORM   - tools dir with a main and some pages where check briscola tools.
398    NORM   - watchdog
399
400    NORM   - chat vecchie in reload (forse)
401
402  MIDDLE TODO
403  ===========
404
405    - user assistant (with button to enable disable)
406    - documentation
407
408
409  FAR TODO
410  ========
411    NORM - internationalization
412    NORM - img -> div + css
413    
414  WEB
415  ===
416
417    - link to stable/unstable
418
419 -------------------------------------------------------------------
420  DONE
421  ====
422
423    ABORTED - asta: highlight buttons (css hover) - change pointer when over
424    DONE - step proxy
425    DONE - special chars in js
426    DONE - ban temporaneo dai tavoli
427    DONE - flash player to play sound
428    DONEBUG - (aum. il timeout) - carte giocate che restano girate
429          Sembra non migliorare di molto la cosa, gestita la cache
430          correttamente, sono apposto.
431
432    DONE - one player reject a game, to less points (<= 2)
433    DONE - help page
434    DONE - test di download per la cache
435    DONE - se passano tutti tranne l'ultimo l'asta va al penultimo.
436           Corretto il codice, occorre verificare se questo
437           ingenera qualche problema.
438    DONE - raddoppiato il numero di righe nella chat
439    DONE - corretto bug del /nick
440    DONE - carosello pubblicità altout
441    DONE - smammamorti
442    DONE - unload of the stream
443    DONE - standup centrati
444    DONE - current player - in info
445    DONE - HELP butt con ABOUT, REGOLE, VERSIONE
446    DONE - welcome lines in the chats (room and table)
447    DONE - welcome lines in the chats (room and table)
448    DONE - nomi in primo piano se vai sul quadrato   
449    DONE - to pass explicit config file to INSTALL.sh
450    DONE - flag to create a config file
451    ABRT - bottoni => immagini
452    DONE - aggiungere bottone al login
453    DONE - nomi in primo piano se vai sul quadrato   
454    DONE - installer to set cookie path
455    DONE - change name
456    DONE - automatic and manual logout
457    DONE - cache problems solved via .htaccess
458    DONE - all players out of the auction
459    DONE - time to send cards
460    DONE - hide cards before sends at a new game
461    DONE - well recognization of the browser and O.S.
462    DONE - login consistency !!!!
463    DONE - functionalization of garbage
464    DONE - call garbage function into login
465    DONE - game
466    DONE - manage the reload from scratch of the table page
467    DONE - table reset
468    DONE - sendcard => card_send(idx, ....)
469    DONE - show table for game
470    DONE - points calculation
471    DONE - make-up of the chooser
472    DONE - where place the briscola on the table
473    DONE - users info
474    DONE - show current auction position
475    DONE - table with internal management of the transition between pages.
476    DONE - server side page abort management  
477    DONE - cookie problem with Ajax
478    DONE - spostare il tasto "esco"
479    DONE - to pass explicit config file to INSTALL.sh 
480    DONE - 8 tables
481    DONE - safety out management
482    DONE - info enhancement and related button (how win the last game and
483           with how much points ?)
484
485  WEB
486    DONE - homepage
487    DONE - screenshots
488
489 DOC
490    CHAPTERS
491       HTTP Streaming
492       Local serializer
493       Database on shmem
494       Page abort (reload on http streaming case)
495       Chat
496       Cookies management
497       CSS tricks
498
499 CHECK ON NEW SERVERS
500 .htaccess AllowOverwrite mode for Cache-Control directive
501
502
503
504
505 */
506