BJ,

That's pretty much close to the solution (still feel it was more of a hack) 
I gave to the classic wiki a few years ago. Back then I was a bit worried 
about mobile access (yeah, I use my wiki everywhere) because each time the 
wiki loaded (and I have several wikis) the entire html was served. I went 
into dissecting the stock HTML and putting the entire javascript in a 
separate file. That way it was cached by the browser, and only a small(er) 
HTML file was transferred, containing only the tiddlers.

I've seen tiddlywiki 5 boasting 1.5 Mb of data transfer for an empty wiki. 
That's quite a lot even nowadays. Refreshing my wiki 10 times a day, it 
means 450 Mb at the end of the month (ouch).

I now have 6 different wikis (I use them as notebooks for specific 
subjects). And the url is used internally to select the database. I even 
have a coarse access control list (for each wiki as a whole).

I wish I can add all these features into tiddlywiki 5. It will be the only 
way for me to switch. I still don't understand much of the massive piece of 
code the new tiddlywiki has become.

I want to keep as much of the original code as possible (both in the server 
and the client side). I really like your idea, as long as I'm able to 
intercept load, save, and delete. I would also like to expose the functions 
from the same http server that is already running.

What will I loose if I leave ALL the system tiddlers to be loaded at start? 
I really don't know what's being loaded, so I wonder if that differed load 
of some system tiddlers could bring any advantage?


I know tiddlywiki tries to store everything in a single file, but that only 
seems useful when you're editing local (the only way available at the 
genesis). For a server version it has no use, and actually, it makes it 
harder to cache. Is it too hard to modify the code so it will serve a few 
javascripts and the HTML?





On Sunday, January 25, 2015 at 6:29:33 PM UTC-4:30, BJ wrote:
>
> Hi Abilio,
> when runninng a tiddlywiki with node.js, a complete tiddlywiki html file 
> is built and then served, it includes all the tiddlers.
> It is a two stage process, first tiddlywiki(nodejs) builds itself from the 
> directories that contains the tiddlers as files. Then depending upon which 
> 'edition' is specified different plugins are included (controlled by 
> tiddlywiki.info as you probably know). see also the editions directory 
> for tw5.com-server/tiddlers/ which is where the 'user' tiddlers are loaded 
> from with the server edition.
> The nodejs instance of tw will then will build the html file using a set 
> of templates. 
> There is a template that is used for the store, look for the line
> <$list filter=<<saveTiddlerFilter>> template="$:/core/templates/
> html-div-tiddler"/>
> in the source files - this is creating the text of tiddlers for the 
> 'store' area of the html file.
>
> If you are only interested in having 'user' tiddlers in the database you 
> could replace this with a new widget to extract the tiddlers from your 
> database. 
>
> Cheers
>
> BJ
>
>
> On Sunday, January 25, 2015 at 3:54:09 PM UTC-6, Abilio Marques wrote:
>>
>> Hi, 
>>
>> As a long time user of tiddlywiki, I adapted the classic version into a 
>> server version using sqlite and nodejs a couple of years ago. I never 
>> published the code as I think it was more of a hack than real software. 
>> After tiddlywiki5 was published, I found that it already has a server 
>> running in nodejs. Now I want to add the sqlite storage as an alternative 
>> to plain text files.
>>
>> Been trying to create a syncadaptor plugin for sqlite. Read these before 
>> I started:
>>
>> http://tiddlywiki.com/dev/#Syncadaptor
>> http://tiddlywiki.com/dev/#SyncAdaptorModules
>>
>> It made me believe that it was possible.
>>
>> Then, as a quick test, I went into the directory called, 
>> tiddlywiki/plugins and copied the filesystem directory into a new one 
>> called sqlite. Refactored the entire code to replace "filesystem" by 
>> "sqlite".
>>
>> Created a test wiki with the --init server parameter, then modified the 
>> plugins list inside tiddlywiki.info accordingly (replaced filesystem 
>> with sqlite).
>>
>> Tested it and still ran... Then tried a few console logs, and it printed 
>> text when saving or deleting a tiddler, but... loadTiddler didn't run. I 
>> was suspicious from the start, as it runs a dummy callback and the comments 
>> read:
>>
>> We don't need to implement loading for the file system adaptor, because 
>>> all the tiddler files will have been loaded during the boot process
>>>
>>
>>
>> Tried to find where, and I must say I got lost in the code... Would 
>> anyone please point me in the right direction on how to make the plugin be 
>> the responsible for loading all the tiddlers? (in other words, allow 
>> loadTiddler to run)
>>
>> This time, I want to release my code, so I don't want to solve it in a 
>> "replace this code in the core" fashion.
>>
>>
>> Thanks in advance,
>> Abilio
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWikiDev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/tiddlywikidev.
For more options, visit https://groups.google.com/d/optout.

Reply via email to