good luck with the asbestosis!
>> 4) People upload executables/scripts/some other sort of potentially
>> dangerous file
>> [...]
>> Q1 Regarding (4), is it a good idea to restrict the types of files people
>> can upload (my opinion on this is yes, it is)?
>
> Can you provide a specific example of what might be dangerous and why?
I think that's a good question. Maybe it's not our business to block .exe files
>> Q2 TiddlyWeb currently doesn't work very well with large binary files (eg
>> videos). Do we want to restrict the size of files we can upload, or include
>> better support for large files
>
> I consider TiddlySpace (also raw TiddlyWeb) a platform for sharing content -
> which to me is primarily textual. With that in mind, I regard binary
> tiddlers (most commonly images) as taking a supportive role.
That's an interesting POV. I see TiddlyWeb as a RESTful store for
blobs of data, akin to S3 with enough metadata to form tiddlers, and
mechanisms for assembling those tiddlers into TiddlyWikis.
I don't see anything conflicting in our views, just legs and trunk of
the same elephant.
> Thus I'm not in favor of trying to provide extensive file-hosting
> capabilities. While one might argue that a video can be just as "supportive"
> as an image, this seems to go beyond the original design. There are better
> hosts for that type of content. (It's not inconceivable to user/create a
> separate, adjacent service dedicated to file hosting.)
Right. I think I'd continue to use flickr for hosting images, vimeo
for videos, and other places for large audio files, but for reasons of
size and having an interface and UI better suited to photos, videos,
audio etc. OTOH it seems strange to preclude storing images, videos,
audio.
>> Q3 There is currently no interface showing progress on uploaded files. Is
>> this something we want, and if so, how do we accomplish it
>
> It would be nice, but I'm not sure about the complexities involved. Given
> the above, I don't see it as a priority.
It's possible. I wouldn't say it was high priority.
>> Q4 There seems to be a lot of confusion over how binary tiddlers should be
>> displayed/edited.
[snip]
> So basically, my expectation is that just TiddlyWeb provides the raw data
> and the client determines what to do with it.
Agreed.
> That leaves actual binary data, whose handling should also be determined by the client
> - which normally means it should be made available to the client in base64.
Absolutely! I really don't like the current tiddler with conjured up
non-editable wikitext.
> It might also be worth considering to serve binary tiddlers in skinny form
> in the TiddlyWiki serialization and use lazy loading - but that might then
> require special handling for the unplugged scenario (which is possibly
> inevitable anyway).
That sounds good to me.
>> 4) People upload executables/scripts/some other sort of potentiallyI think that's a good question. Maybe it's not our business to block .exe files
>> dangerous file
>> [...]
>> Q1 Regarding (4), is it a good idea to restrict the types of files people
>> can upload (my opinion on this is yes, it is)?
>
> Can you provide a specific example of what might be dangerous and why?
That's an interesting POV. I see TiddlyWeb as a RESTful store for
>> Q2 TiddlyWeb currently doesn't work very well with large binary files (eg
>> videos). Do we want to restrict the size of files we can upload, or include
>> better support for large files
>
> I consider TiddlySpace (also raw TiddlyWeb) a platform for sharing content -
> which to me is primarily textual. With that in mind, I regard binary
> tiddlers (most commonly images) as taking a supportive role.
blobs of data, akin to S3 with enough metadata to form tiddlers, and
mechanisms for assembling those tiddlers into TiddlyWikis.
> Thus I'm not in favor of trying to provide extensive file-hosting
> capabilities. While one might argue that a video can be just as "supportive"
> as an image, this seems to go beyond the original design. There are better
> hosts for that type of content. (It's not inconceivable to user/create a
> separate, adjacent service dedicated to file hosting.)
Right. I think I'd continue to use flickr for hosting images, vimeo
for videos, and other places for large audio files, but for reasons of
size and having an interface and UI better suited to photos, videos,
audio etc. OTOH it seems strange to preclude storing images, videos,
audio.
> That leaves actual binary data, whose handling should also be determined by the clientAbsolutely! I really don't like the current tiddler with conjured up
> - which normally means it should be made available to the client in base64.
non-editable wikitext.
That sounds good to me.
> It might also be worth considering to serve binary tiddlers in skinny form
> in the TiddlyWiki serialization and use lazy loading - but that might then
> require special handling for the unplugged scenario (which is possibly
> inevitable anyway).
> How about some sort of .exe trojan?
What about a .exe trojan that is named foo.gif?
This is one of those situations where it is very hard to tell without
a lot of serverside checking/complexity.
Avoiding complexity on both the server and the client is an important
goal here because complexity is fraught with error. If there is a
expectation that the content stored is valid and safe then the code
which checks for validity and safety needs to be correct. Making it
correct is really really hard.
> I think it's primarily textual at the moment, sure. However, I don't see why
> it has to stay that way. Some sort of wiki based on videos/images with
> tagging/metadata would be "really cool".
Storing those videos and images in the tiddlywiki would be "not cool".
If I were to personally create a wiki that is about videos and images
with metadata, I would store the metadata in the wiki, and URIs to the
videos and images located in other storage systems that are more
suited to binary content.
The content delivery systems in TiddlyWeb are designed for delivery
small chunks of content: tiddlers. Which are defined as small blocks
of microcontent.
That TiddlyWeb _can_ deliver large binaries is a side effect of the
fact that anything can be represented as a stream of bytes. However
TiddlyWeb's delivery of that stuff is not efficient in any of cpu
usage, I/O usage, or HTTP protocol usage.
(The above is just info to provide context for the discussion.)
> Some sort of co-existing service better designed to handle binary content is
> an interesting concept, yes.
In my opinion I think they call that "the web". No co-existence
required, just URIs.
> I quite like the idea of combining text/video/images into a single wiki.
> Flickr/Vimeo/YouTube/etc having a better UI is besides the point: the UI is
> exactly what we're discussing.
Well, no, not quite, I think we are talking about several things and
there is no "exactly" about it and that's part of why the conversation
won't resolve to a conclusion.
One of the things we are discussing is how a tiddlyspace hosted tiddlywiki
will allow a person to manipulate binary stuff. But right alongside that is
how a tiddlywiki will itself manipulate binary stuff. These things are
separate concerns, but require one another.
> What would the point of seeing the base64 data of a binary image upon
> clicking edit be (just curious)? How would you be expected to update that?
> What about large images? If somebody uploads a few (say 3) large images, you
> could easily end up serving a TiddlyWiki multiple MBs in size. Something
> that would presumably take quite a while.
I believe the goal is that if the base64 content is there, then an
editor for that type of content can be built into the tiddlywiki. The
tiddlywiki can, when edit is clicked, recognize the content and "do
the right thing".
That goal (above) directly conflicts with the concern represented by
your statement about "that would presumably take quite a while".
_If_ we want to allow binary editing in TiddlyWiki _and_ we want to
preserve offline capability, and we want to do it in a way that
doesn't require a bunch of extra smarts and conditionals, then we need
the binary content in the tiddlywiki.
_If_ we have binary content in the tiddlywiki, then we present the
risk that that binary content is going to create very large (and slow)
tiddlywikis.
> Isn't that similar to what already happens (aka - a link to the image)? I'm
> not sure the unplugged scenario needs excellent binary support (past
> "pseudo-binary" of course).
It's _very_ import, from the server-side perspective that the
tiddlywiki generated for the unplugged scenario is not significantly
different from the tiddlywiki generated from the plugged scenario.
Right now the difference between foo.wiki and
foo.wiki?download=foo.html is that there is a Content-Disposition
header added to the HTTP response.
If we want something different, it could potentially add a lot of code
and the value proposition doesn't feel strong enough for that (yet).
(More in response to other messages.)
--
Chris Dent http://burningchrome.com/~cdent/
[...]
> That's an interesting POV. I see TiddlyWeb as a RESTful store for
> blobs of data, akin to S3 with enough metadata to form tiddlers, and
> mechanisms for assembling those tiddlers into TiddlyWikis.
It's kind of like that, except it is very consciously optimized in the
direction of small textual things. The major deal here is that say you
have a giant mp3 in the store that you want to GET as JSON. The entire
mp3 is read into memory before becoming a JSON string. Both of those
collections of (many) bytes will be in memory at the same time.
Similar things if the mp3 is being encoded into a tiddlywiki.
There would be efficiency value in _only_ including the URI of the
pure content-type representation of a binary tiddler in the tiddlywiki
and JSON representations, and then optimizing the storage and delivery
of the pure[1] representation so it can be streamed direct from the
storage.
Doing that, however, interacts poorly with the "edit this binary in my
tiddlywiki" desire.
[1] By pure I mean where the resource is not processed before being
sent over the pipe, it is just delivered as is.
> Absolutely! I really don't like the current tiddler with conjured up
> non-editable wikitext.
Nor do I, but this was done explicitly to guard against the tiddlywiki
getting a tiddler which contains many megabytes of unusable stuff,
that when edited, breaks the binary tiddler (by corrupting the
content).
Until we resolve "how to deal with binary tiddlers in tiddlywiki"
we're sort of stuff.
> I guess it's pretty much a given that we need to distinguish "real" and
> "pseudo" binaries, the latter being text-based (i.e. content type text/*) and
> thus not too different from wikitext.
I _think_ we've resolved that text/* and */*+xml will be considered
psuedo binaries. Anybody else have additions?
> It might also be worth considering to serve binary tiddlers in skinny form in
> the TiddlyWiki serialization and use lazy loading - but that might then
> require special handling for the unplugged scenario (which is possibly
> inevitable anyway).
If we can define and strictly constrain what that special handling might
be for the unplugged scenario (which might be as simple as "don't be
lazy here if download query parameter is set) the above seems like a
good idea, as you don't need to search (in the tiddlywiki itself)
binary tiddlers so them not being present early on in the store is not
a big deal.
However, for big tiddlers, while they are lazy loading it would be
nice to have some status spinner to indicate that work is going on (as
the current message is static).
So let's have a strawman, for sake of knocking it down:
* the server continues to accept binaries like it does[1]
* the wiki serialization sends text/* and *+xml as psuedo binaries
* real binaries are sent without text set at all, thus being lazy
* if download parameter is set, include the base64 encode stuff in
* text
* the JSON serialization of binaries (the one's being lazy loaded) is
base64encoded and the client side knows to turn that into a data:uri
when lazy loading stuff
In what ways is this bad? In what ways is it good?
[1] and we worry about limits later/separately
On Thu, 15 Jul 2010, Ben Gillies wrote:What about a .exe trojan that is named foo.gif?
How about some sort of .exe trojan?
Storing those videos and images in the tiddlywiki would be "not cool".I think it's primarily textual at the moment, sure. However, I don't see why
it has to stay that way. Some sort of wiki based on videos/images with
tagging/metadata would be "really cool".
In my opinion I think they call that "the web". No co-existenceSome sort of co-existing service better designed to handle binary content is
an interesting concept, yes.
required, just URIs.
_If_ we want to allow binary editing in TiddlyWiki _and_ we want to
preserve offline capability, and we want to do it in a way that
doesn't require a bunch of extra smarts and conditionals, then we need
the binary content in the tiddlywiki.
On Thu, 15 Jul 2010, FND wrote:I _think_ we've resolved that text/* and */*+xml will be considered
I guess it's pretty much a given that we need to distinguish "real" and "pseudo" binaries, the latter being text-based (i.e. content type text/*) and thus not too different from wikitext.
psuedo binaries. Anybody else have additions?
So let's have a strawman, for sake of knocking it down:
* the server continues to accept binaries like it does[1]
* the wiki serialization sends text/* and *+xml as psuedo binaries
* real binaries are sent without text set at all, thus being lazy
* if download parameter is set, include the base64 encode stuff in
* text
* the JSON serialization of binaries (the one's being lazy loaded) is
base64encoded and the client side knows to turn that into a data:uri
when lazy loading stuff
In what ways is this bad? In what ways is it good?
[1] and we worry about limits later/separately
--You received this message because you are subscribed to the Google Groups "TiddlyWeb" group.
To post to this group, send email to tidd...@googlegroups.com.
To unsubscribe from this group, send email to tiddlyweb+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/tiddlyweb?hl=en.
Well on the web in general we rely on people being responsible for
protecting themselves with virus scanners or operating systems that
are fairly robust and sandboxed. Every time you get a file via
bit-torrent it could be pretty much anything, yeah?
>> In my opinion I think they call that "the web". No co-existence
>> required, just URIs.
>
> So we could provide a nice interface to flickr/picasa/vimeo/youtube/etc
> instead?
I was thinking more along the lines of letting people create
referential tiddlers. That is: tiddlers which contain URIs of remote
resources which would be treated as local resources under the right
conditions.
> Maybe the _If_ question is the thing we should be discussing? SVG, etc is
> text based, so we'd only need to deal with it in the usual way (with some
> extra stuff for displaying it properly, etc). Should we be supporting
> image/png, audio/*, etc at all?
Given that before the advent of tiddlyspace the primary binary tiddlers
were pngs and gifs then, I think, yes, we do need to support them.
True, we could take the email attachment scanning POV, but that's a
very slippery slope. How about a HTML trojan?
I suspect this is a social issue, and in the hands of the downloader.
> I think it's primarily textual at the moment, sure. However, I don't see why
> it has to stay that way. Some sort of wiki based on videos/images with
> tagging/metadata would be "really cool".
yup! Though to be fair to Fred, I don't think he's saying don't do
that, only, don't host the video files on TiddlyWeb 'cos the store
isn't optimised for large files.
TiddlyWebWiki 0.36 (released last Friday) enables editing for all known
textual/pseudo-binary tiddlers - i.e. anything with content-type text/*
or *+xml.
More significantly, the upcoming version 0.37 revamps handling of binary
tiddlers; their body is now always serialized as base64-encoded data,
with a new client-side plugin rendering that data:
http://svn.tiddlywiki.org/Trunk/association/plugins/BinaryTiddlersPlugin.js
For legacy browser that don't support data: URIs, images have an alt
attribute while non-image binaries are essentially non-functional links.
While I could imagine linking back to the data on the server, I'm not
keen on introducing TiddlyWeb-specific dependencies to calculate the
respective URI.
I reckon we'll also need special handling for SVGs?
-- F.
Please raise an issue for this, also to avoid derailing this thread with
implementation details.
Thanks.
-- F.
That seems unexpected - what version of TiddlyWeb (and TiddlyWebWiki)
are you currently using?
You could try the current development build:
$ wget http://fnd.lewcid.org/tmp/tiddlyweb-1.1.dev5.tar.gz
$ tar -xvf tiddlyweb-1.1.dev5.tar.gz
$ mv tiddlyweb-1.1.dev5/tiddlyweb myInstance
# restart myInstance server
> we use a lot of (1000s) binary pictures, that are shown in different
> tiddlers
Can you elaborate on this a bit? Thousands of tiddlers in a single bag?
Is there any kind of filtering or on-demand loading? What do your
recipes look like?
While huge collections are a known design limitation of TiddlyWeb, it
should not take that long...
-- F.
How big are your binary tiddlers, approximately? That is, are they
generally just small image files, or big PDF documents?
> That seems unexpected
I lied - since the TiddlyWiki serialization now includes the raw data
for all binary tiddlers, a large number of binary tiddlers (or even a
few large binary tiddlers) can have a significant impact.
So we'll probably make this a configuration option (in a week or two),
giving instance owners the option to fall back to the original handling,
replacing the actual data in (non-pseudo-)binary tiddlers' body with a
link to the resource on the server.
> *you said "loading on demand", is there a concept or testcase for?
There have been various experiments and huge discussions (see group
archives), but as far as I'm aware, there's no simple solution that can
just be picked up and used.
> *you said "huge collection", how much is huge?
Well, that depends on a number of factors - pulling a number out of the
air, I'd say five figures perhaps? At various times, Chris has written
about this topic, and how particular applications work around it, e.g.
by using a store implementation tailored to the respective use case.
> *tagging is essential, so will i be able to tag binarys later someday
Well, in theory, right now:
http://trac.tiddlywiki.org/changeset/12328
http://svn.tiddlywiki.org/Trunk/association/plugins/TiddlyWebConfig.js
However, this requires the new way of handling binary tiddlers, and thus
conflicts with what I said above about optionally reverting to the old
behavior. At that point, we'll have to introduce special handling for
such mangled tiddlers, ensuring that the original body is retrieved
before the modified tiddler can be PUT...
> *as mentioned we use a lot of plugins, so are there known limitations
> in tiddlyweb 1.1, or can we use these plugins further?
Some server-side plugins will have to be updated for compatibility with
tiddlyweb 1.1 (to be released as 1.2), but this is generally not a big
deal and many of the common plugins have already been updated for use in
TiddlySpace.
> I did't know it was recommended to take even 1.1 now?
It's not - I was just trying to get more data to get to the bottom of
the issue, but that's become irreleavant now.
Aside: "lazy loading" is commonly used for dynamic/on-demand loading -
your use of it for slow loading might be confusing.
-- F.
Not at the moment, no, but we could probably investigate adding a
query parameter (similar to "fat" used with JSON tiddler
collections) that would make it possible to control it per request
(presumably lowering but not raising the limit set by the server).
Would that be useful?
--
Chris Dent http://burningchrome.com/
[...]
> I was testing around a bit:
Thanks for that.
> After reloading the tiddler is shown, but the image isn't rendered,
> the tiddler looks empty?
> BUT: if i create a new tiddler and link to [img[/tiddlyweb/bags/
> sandbox/tiddlers/test.jpg]] the image is shown.
The BinaryTiddlersPlugin has not yet been updated to handle the
tiddlers which have the <html><img ></html> style contents that get
sent when binary content is not sent.
As a result the links get treated as base64 content and do not
decode to correct images, thus resulting in no image.
> If i edit the image tiddler the editor division is'nt shown also?
> Why, i would like to be able to copy the link inside the tiddler.
This is related to the above. If there is binary content in the
tiddler, then we don't want people messing with it, as it will
result in corrupting the binary data.
So, short story: You've found a bug in the BinaryTiddlersPlugin
which will be fixed soon. When it is fixed these issues should be
resolved.
> File "/opt/coolstack/lib/python2.5/base64.py", line 76, in b64decode
> raise TypeError(msg)
> TypeError: Incorrect padding
This also is the same problem as above. The <html><img> stuff was
sent back to the server as if it is base64, which it is not, of
course, and thus could not be decoded.
> Maybe some circumstances addicted to tiddlyweb 1.2.1 and
> tiddlywebwiki 0.44?
I'm pretty sure all of these things are related to BinaryTiddlersPlugin
around here:
http://trac.tiddlywiki.org/browser/Trunk/association/plugins/BinaryTiddlersPlugin.js#L47
And FND or I will work it out soon, unless somebody else gets there
first.
> Hi Chris,
> back from holidays again (Cyprus is really hot and humid!).
I've made a quick hacky patch to BinaryTiddlersPlugin which makes
the images at least display (when binary content is not included in
the wiki). It does not address the problems when editing the
tiddlers.
A diff is attached.