forked from rejetto/hfs-aborted-see-new-repo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnote.txt
134 lines (124 loc) · 5.54 KB
/
note.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
=== FEASIBILITY
distribution: how? size?
https://github.com/wearefractal/npkg
npm install hfs
system integration
some of these features are expected to not be possible with Node, but must be verified.
Those who are not possible will be achieved with a different executable communicating with node possibly via socket.
background notifications
Windows' tray icons
automatic handling starting/restaring of the server
Windows' services
easy way to add to the VFS, possibly starting HFS if it's not running
Windows' shell context menu
=== DESIGN
- GUI: all web
- admin on different port, to eventually accept connection only in local
- executable helper to get some features:
- tray icon for
- start/stop
- easy access to administration
- notification
- shell context menu
- add files via right click
- Windows' service
- webservices
- it should be possible to build an ajax-based webapp, like a straight template like for HFS 2.2
- both webservices and template engine
- does the webapp need a template engine at all or should it all be done via ajax?
- login
- folder list
- navigate folders (get folder by folder, or whole tree for speed?)
- search
- select & action (archive, delete, rename...)
- the web apps must perfectly working offline, don't rely on online resources (or do it just as an option or gracefully degrade)
- most non-core features should be plugins. We should have a repository and easy installations.
=== GUI
libraries to evaluate
extjs
amplesdk http://www.amplesdk.com/examples/markup/xul/
pergola http://www.dotuscomus.com/pergola/examples.html
=== FRONT END
login (cookie based)
switch on url resource type
case 'file': serve file
case 'link': redirect
case 'folder':
switch ($format)
case nothing: serve front-end web app, with this folder already selected
case 'tar': serve archive
case 'zip': serve archive
default: unknown
http://superdit.com/2011/06/01/extjs-simple-file-browser/
=== VFS
- able to
- add virtual items, (will override others with same name)
- add real items, (override)
- renamed, (a real item with customName. Remember that an existance check is always done)
- deleted, (this make the item with same resource to be skipped)
these are not child nodes, but are the names are kept in an object of the folder
- various options set (like hidden, permission, log, counting, comment, realm, icon)
- file node permissions by account (values: anyone, anonymous, any account, account list)
- NOT the old "access", it's just download+browse
- visible (this will make this item appear or not in lists, but won't prevent download)
default: anyone
- browse (only folders: prevent display of items inside, but with a message, not as if the folder was empty [recursive])
default: anyone
- download/stream [recursive]
default: anyone
- archive [recursive]
default: anyone
- upload (only folders [recursive])
default: no one
- delete [recursive]
default: no one
- options and metadata
- log (allow logging of this item [recursive])
default: yes
- logMask (only folders [recursive])
default: *
- count as download [recursive]
default: yes
- count as download Mask (only folders [recursive])
default: *
- upload mask (only folders [recursive])
default: *
- visibility mask (only folders [recursive])
default: *
- download mask (only folders [recursive])
default: *
- default file mask (only folders [recursive])
default: index.htm*;default.html*
- ?(leave it to future versions) auto-hide empty folders (folders only)
default: no
- hide extension [recursive]
default: no
- comment
- icon
- ? message when not allowed
- permissions and options have default values that are enforced when not assigned, to not clutter the stored data structure
=== MORE IDEAS
- adding only "?" at the end of an URL of a file, will turn on a specific feature on that download
like asking the browser for the save dialog
could this be done with a plugin?
- only-once downloads
plugin?
=== PLUGIN SYSTEM
- an important part in designing a good plugin system is to have clear in mind what their needs are
- it could be good to collect plugins idea, then list what their needs are. So it's easier to sequentially
check that every requirement is met
- technically, how to make it?
- HFS could be the event emitter, and plugins the subscribers
- this won't permit plugins to be blocking. Like a plugin who takes an output and wants to manipulate
it before outputting.
- a real example?
- enable/disable plugins without having to restart the server
- possible plugins
- add flags to displaied connections
- this is mainly client-side
NEED: integrate with the template
- it needs access to a webservice, so it needs a server part that will proxy the webservice
NEED: respond to its own socket.io messages
=== USEFUL STUFF
file system errors http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/errno.h.html
C lib reference http://publib.boulder.ibm.com/infocenter/zos/v1r12/index.jsp?topic=%2Fcom.ibm.zos.r12.bpxbd00%2Frtread.htm