-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathWebRTCos.py
76 lines (60 loc) · 1.99 KB
/
WebRTCos.py
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
## @file
## @brief WebRTC-based distributed computing platform (JS hell)
from metaL import *
## @defgroup wrtc WebRTC-OS
## @ingroup os
## @brief WebRTC-based distributed computing platform (JS hell)
## @{
TITLE = Title('WebRTC-based distributed computing platform (JS hell)')
ABOUT = '''
* Hans Oksendahl http://hox.io/
* [Bubble Hash is a distributed hash-table implemented in a web browser](https://github.com/hansoksendahl/bubblehash)
* issue [WebRTC is an interesting technology for distributed OS design](https://github.com/hansoksendahl/bubblehash/issues/1)
* https://www.unisonweb.org/talks ideas about global hashed objects storage
'''
## [D]istributed [S]ystem Module
class dsModule(minpyModule):
def __init__(self, V=None):
super().__init__(V)
self.init_ini()
def init_ini(self):
self['ini'] = self.ini = File(self, ext='.ini')
self.diroot // self.ini
self.ini.sync()
def init_reqs(self):
super().init_reqs()
self.reqs // 'flask' // 'ply' // 'xxhash'
self.reqs.sync()
def init_mk(self):
super().init_mk()
self.mk.all.dropall() //\
(S('all: $(PY) $(MODULE).py $(MODULE).ini') //
"$^")
self.mk.sync()
def init_vscode_settings(self):
super().init_vscode_settings()
self.f11.cmd.val = 'make test'
self.f12.cmd.val = 'make all'
self.vscode.settings.sync()
def init_py(self):
super().init_py()
#
self['parser'] = self.parser = Section('parser')
self.py // self.parser
self.parser //\
pyImport('ply.lex as lex') //\
pyImport('ply.yacc as yacc')
#
self['web'] = self.web = Section('web interface')
self.py // self.web
self.web //\
pyImport('flask')
#
self.py.sync()
MODULE = dsModule()
MODULE['TITLE'] = TITLE
MODULE['ABOUT'] = ABOUT
README = README(MODULE)
diroot = MODULE['dir'] // README
README.sync()
## @}