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