First, how are they the same?

   - They both run in NodeJS.
   - They both mount "TiddlyWiki Folders" allowing you to edit the tiddlers
   stored in that data folder.
   - They both support Basic Auth.

How are they different? The "regular" NodeJS TW5 server loads a data folder
on startup and serves the browser a dynamically generated single-file
TiddlyWiki at its root (e.g. http://localhost/). The browser saves changes
to individual tiddlers back to the server via a simple API. This
drastically cuts down on the size of the upload when saving changes and is
especially good for serving and editing over the internet (if you trust its
basic auth AND are using SSL). However there is no way to access any static
files on the server. And if you want to serve more than one data folder at
a time, you need to start a new instance manually with a different port
number.

TiddlyServer is a simple file server that just serves static files as it
finds them, mimicing the way Apache serves a directory index. When the user
clicks on a regular NodeJS TW5 data folder (which is any folder with a
"tiddlywiki.json" file in it), however, it mounts an instance of the
regular TW5 server at that path (http://localhost/folder/mydatafolder). All
requests starting with that data folder path are then routed to that
instance of the TW5 server.

There are several advantages to this approach:

   - You can have multiple data folders served from one server, each with
   their own path.
   - You can put static files beside them and link directly to them using
   relative links.
   - You can open those static files directly in your browser (audio, pdfs,
   videos, etc) if your browser supports it.
   - You can put your folder setup on Dropbox or another file syncing
   system and then sync changes between computers. It works perfectly for
   syncing one computer at a time.
   - Static files can save themselves back to the server using a PUT
   request.

Neither of these work for syncing changes coming from several computers
unless you are very careful to completely reload TiddlyServer or NodeJS TW5
after all the changes are downloaded. NodeJS TW5 only loads the tiddlers on
startup and then stores them in memory and saves the changes back to disk.
TiddlyServer inherits this behaviour, but per data folder, meaning that you
can reload individual data folders to get the latest changes from disk
(using "?reload=true" on a path).

Also, neither of them are very safe online. They only use basic auth, so
you absolutely have to serve them over HTTPS. A reverse proxy that takes
care of authentication first would probably be a better way. So only serve
it on networks you trust. Otherwise just serve it on localhost, and you
should be good. Both of them should be immune to CSRF attacks, though, as
file saving happens using PUT and DELETE.

I would say they both respond about the same, and one is not more
future-proof than the other, except that NodeJS TW5 is the actual core
code, and TiddlyServer loads it as a dependency. The code that actually
integrates with NodeJS TW5 is about 10 lines, so it should be easy for any
TW5 programmer to figure out.

I hope that explains some things. Thank you, Mark S, for your comments. I
can give what I know, but it is good to hear it from someone else as well
because you get a different perspective.

Arlen

P.S. I am the one that wrote TiddlyServer (in case you didn't figure that
out yet), so that is the perspective I'm coming from. I love to hear other
peoples perspectives, though.

On Tue, Sep 19, 2017 at 3:41 PM, Dave <cedar...@telus.net> wrote:

> What are the main differences between tiddlyserver and "regular" nodejs
> TW5?
>

> Is one easier to set up (e.g. for computer non-professionals)?
>
Is one easier to maintain?
>
Is one better for one type of use vs another use case?
>
Is one more future-proof than the other?
>
Is one faster responding during normal use than the other?
>

>
> Here's an example use case:
>
> Have one master TW5 instance that can switch between folders and access
> thousands of different sets of TW data (e.g. customer files), possibly
> accessing different clients in different browser tabs, and ideally, being
> able to search and analyse data from several clients at once for analysing
> data patterns amoung all or certain subgroups.
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/CAJ1vdSQNh6rYfVYVDGvpT4d1TxJFnOeQhdPE%3DaZT6ZVme5zhVw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to