Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wendelin.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Kirill Smelkov
wendelin.core
Commits
43e6bcb0
Commit
43e6bcb0
authored
Jun 28, 2018
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
f723fb47
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
36 additions
and
20 deletions
+36
-20
CHANGELOG.rst
CHANGELOG.rst
+15
-0
setup.py
setup.py
+1
-0
wcfs/__init__.py
wcfs/__init__.py
+12
-12
wcfs/todo.dot
wcfs/todo.dot
+1
-1
wcfs/todo.svg
wcfs/todo.svg
+7
-7
No files found.
CHANGELOG.rst
View file @
43e6bcb0
Wendelin.core change history
============================
2.0.0 (2018-XX-YY)
------------------
- Switch to using kernel virtual memory manager. Bigfiles are now primarily
accessed with plain OS-level mmap to files from synthetic WCFS filesystem. This
removes overhead of handling pagefaults in userspace and makes bigfile's cache
(now it is the kernel's pagecache) to be shared in between several processes.
Additionally custom coherency protocol is provided, which allows clients
that want to receive isolation guarantee ("I" from ACID) to still use the shared
cache and at the same time get bigfile view isolated from other's changes.
By default wendelin.core python client provides full ACID semantics as before.
0.12 (2018-04-16)
-----------------
...
...
setup.py
View file @
43e6bcb0
...
...
@@ -261,6 +261,7 @@ setup(
'bench'
:
viamake
(
'bench'
,
'run benchmarks'
),
},
# TODO install wcfs exe along wcfs/ py package.
entry_points
=
{
'console_scripts'
:
[
# start wcfs
'wcfs = wendelin.wcfs:main'
,
...
...
wcfs/__init__.py
View file @
43e6bcb0
...
...
@@ -21,7 +21,7 @@
"""Module wcfs.py provides python gateway for spawning and interoperating with wcfs server
Join(zurl) joins wcfs server. If wcfs server for zurl is not yet running, it
can
be automatically started if `autostart=True` parameter is passed to join.
will
be automatically started if `autostart=True` parameter is passed to join.
It will also be automatically started by default unless
$WENDELIN_CORE_WCFS_AUTOSTART=no is specified in environment.
...
...
@@ -122,6 +122,7 @@ def join(zurl, autostart=_default_autostart()):
# start wcfs with telling it to automatically exit when there is no client activity.
return
_start
(
zurl
,
"-autoexit"
)
# _start starts wcfs server for ZODB @ zurl.
#
# optv can be optionally given to pass flags to wcfs.
...
...
@@ -227,7 +228,6 @@ def _start(zurl, *optv):
# wcfs, because we want spawned wcfs to potentially overlive our
# process and to serve other processes. For the same reason we do
# not preserve cancel channel in returned Conn.
f
=
_rx
startedok
.
close
()
return
Conn
(
mntpt
,
f
)
...
...
@@ -244,7 +244,6 @@ def _start(zurl, *optv):
# _wcfs_exe returns path to wcfs executable.
# TODO install wcfs exe along wcfs/ py package.
def
_wcfs_exe
():
return
'%s/wcfs'
%
dirname
(
__file__
)
...
...
@@ -253,21 +252,13 @@ def _wcfs_exe():
# it also makes sure the mountpoint exists.
def
_mntpt_4zurl
(
zurl
):
# XXX what is zurl is zconfig://... ? -> then we have to look inside?
# -> _zstor_2zurl extracts zurl in canonical form and zconfig:// is not possible there.
m
=
hashlib
.
sha1
()
m
.
update
(
zurl
)
mntpt
=
"%s/wcfs/%s"
%
(
tempfile
.
gettempdir
(),
m
.
hexdigest
())
_mkdir_p
(
mntpt
)
return
mntpt
# mkdir -p.
def
_mkdir_p
(
path
):
try
:
os
.
makedirs
(
path
)
except
OSError
as
e
:
if
e
.
errno
!=
EEXIST
:
raise
# _zstor_2zurl converts a ZODB storage to URL to access it.
def
_zstor_2zurl
(
zstor
):
...
...
@@ -285,6 +276,15 @@ def _zstor_2zurl(zstor):
raise
NotImplementedError
(
"don't know how to extract url from %r"
%
zstor
)
# mkdir -p.
def
_mkdir_p
(
path
):
try
:
os
.
makedirs
(
path
)
except
OSError
as
e
:
if
e
.
errno
!=
EEXIST
:
raise
# if called as main just -> serve(argv[1])
...
...
wcfs/todo.dot
View file @
43e6bcb0
...
...
@@ -30,5 +30,5 @@ digraph {
test
[
label
=
"? tests"
]
zodburl
[
label
=
"zstor -> zurl"
,
style
=
filled
fillcolor
=
grey95
]
autoexit
[
label
=
"autoexit
if\nautostart &&
!activity"
]
autoexit
[
label
=
"autoexit
\nif
!activity"
]
}
wcfs/todo.svg
View file @
43e6bcb0
...
...
@@ -68,21 +68,21 @@
<!-- autoexit -->
<g
id=
"node6"
class=
"node"
>
<title>
autoexit
</title>
<ellipse
fill=
"none"
stroke=
"#000000"
cx=
"4
60.0456"
cy=
"-26.8701"
rx=
"97.6615
"
ry=
"26.7407"
/>
<text
text-anchor=
"middle"
x=
"4
60.0456"
y=
"-30.6701"
font-family=
"Times,serif"
font-size=
"14.00"
fill=
"#000000"
>
autoexit if
</text>
<text
text-anchor=
"middle"
x=
"4
60.0456"
y=
"-15.6701"
font-family=
"Times,serif"
font-size=
"14.00"
fill=
"#000000"
>
autostart
&&
!activity
</text>
<ellipse
fill=
"none"
stroke=
"#000000"
cx=
"4
38.0456"
cy=
"-26.8701"
rx=
"52.1524
"
ry=
"26.7407"
/>
<text
text-anchor=
"middle"
x=
"4
38.0456"
y=
"-30.6701"
font-family=
"Times,serif"
font-size=
"14.00"
fill=
"#000000"
>
autoexit
</text>
<text
text-anchor=
"middle"
x=
"4
38.0456"
y=
"-15.6701"
font-family=
"Times,serif"
font-size=
"14.00"
fill=
"#000000"
>
if
!activity
</text>
</g>
<!-- wcfs->autoexit -->
<g
id=
"edge5"
class=
"edge"
>
<title>
wcfs
->
autoexit
</title>
<path
fill=
"none"
stroke=
"#000000"
d=
"M437.4092,-187.8647C455.1593,-179.1615 478.2928,-164.4722 489.0456,-143.4802
502.0598,-118.0735 492.8759,-86.511 481.5061,-62.632
4"
/>
<polygon
fill=
"#000000"
stroke=
"#000000"
points=
"4
84.5519,-60.8997 476.9096,-53.5617 478.3078,-64.0639 484.5519,-60.8997
"
/>
<path
fill=
"none"
stroke=
"#000000"
d=
"M437.4092,-187.8647C455.1593,-179.1615 478.2928,-164.4722 489.0456,-143.4802
499.9346,-122.2223 497.028,-112.2512 489.0456,-89.7401 485.013,-78.3678 477.9494,-67.5524 470.3413,-58.199
4"
/>
<polygon
fill=
"#000000"
stroke=
"#000000"
points=
"4
72.7666,-55.6532 463.5777,-50.3793 467.4721,-60.2324 472.7666,-55.6532
"
/>
</g>
<!-- wcfs_simple->autoexit -->
<g
id=
"edge8"
class=
"edge"
>
<title>
wcfs_simple
->
autoexit
</title>
<path
fill=
"none"
stroke=
"#000000"
d=
"M17
3.9291,-98.3925C182.215,-95.3125 190.8415,-92.2909 199.0456,-89.7401 255.7919,-72.0965 320.7548,-56.4326 371.6738,-45.153
"
/>
<polygon
fill=
"#000000"
stroke=
"#000000"
points=
"3
72.6488,-48.5223 381.6637,-42.9562 371.1454,-41.6856 372.6488,-48.5223
"
/>
<path
fill=
"none"
stroke=
"#000000"
d=
"M17
4.3504,-98.3929C182.516,-95.3465 190.9924,-92.3364 199.0456,-89.7401 260.1704,-70.034 331.5264,-51.878 380.2507,-40.1968
"
/>
<polygon
fill=
"#000000"
stroke=
"#000000"
points=
"3
81.0719,-43.5992 389.9881,-37.8763 379.4491,-36.7898 381.0719,-43.5992
"
/>
</g>
<!-- Btree_read -->
<g
id=
"node7"
class=
"node"
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment