For example are you hoping to take a pi into a classroom (or similar
shared environment) with a TiddlyWiki/Web on it and have the
participants use it from a keyboard and mouse attached to the pi or
from a different computer that attaches to the pi over the network?
The answer to that question changes the options quite a bit.
Store.php seems slower in response than Node.js does.
Using the Server Side abilities to allow TiddlyWiki to control the RasPi.
This is where TiddlyWeb and Node.js come into play.
This solution took less than 20 minutes to fully implement once I figured it all out.
The advantage the RasPi has in it's ability as a server as the browser is a bit under powered to fully take advantage of TW5.
Store.php seems slower in response than Node.js does.That should really depend on how you use both.If you use node.js to create the desired wiki on the fly then loadong via node.js should be slower than loading from a folder to which you save TiddlyWiki using store.php, since store.php is entirely uninvolved in the loading process.When it comes to saving things, store.php must surely be slower as we're not writing changes to individual tiddler files but the entire wiki-html, every time. However, store.php shouldn't be slower than saving an entire TiddlyWiki to whichever remote location. It mostly depends on the network speeds, I'd think.
Using the Server Side abilities to allow TiddlyWiki to control the RasPi.This is where TiddlyWeb and Node.js come into play.Or whichever interfaces / API the RasPi exposes and how, e.g. via server or not.Perhaps a TiddlyWeb / Node.js server only needs to reroute a given request rather than implement any serverside scripting.I have no idea.Not sure if the RasPi can, would, could or should run two servers,one for its control interfaces and one for whichever TiddlyWiki serverside.A first step could simlpy be to iframe this stuff from within TiddlyWiki...
This solution took less than 20 minutes to fully implement once I figured it all out.Do you have a concise write-up of that process on your site?
- step a
- step b
- ...
The advantage the RasPi has in it's ability as a server as the browser is a bit under powered to fully take advantage of TW5.Quite possibly, but servers may at some point also be asked to do quite some heavy lifting.Sure, rendering an x-MB sized Wiki is demanding for an itsy wee Pi.
This comment about Store.php and Node.js "speeds" was in regards to using the official Raspberry Pi Browser with TW5.
I have done no load testing of the RasPi server for any of the versions I have loaded.I have a RasPi with Berryboot server and store.php, a RasPi with Node.js, and a RasPi with TiddlyWeb(still need to work on that a lot).
The last RasPi has the standard Rasbian install from 12/24/2014 which is the newest version I could get when I started this.
The Viewer Pi with the new OS layout and Newest HTML 5 browser works fairly well with TW5 but it does crash.I was able to load the TW Hangouts from the web and watch a video for a bit but then it crashed.
When you work on a TiddlyWiki that is on the node.js server it takes longer to load, a lot longer.
But once it is loaded it responds quicker to keystrokes.
The store.php version loaded fairly fast but it was sloooow when I would type in, very old skool laggy.
It would be interesting to see if the TW core could be converted to GPU code as that would make it Zip Zip around by comparison.
Perhaps a TiddlyWeb / Node.js server only needs to reroute a given request rather than implement any serverside scripting.I have no idea.
I will have to explore using a node.js tiddler in an iframe as that would be very cool indeed.
TiddlyWeb is built on Python and the Raspberry Pi is all about Python so there is a serious synergy there.My hope was to put "hooks" into existing Python code using TiddlyWeb stuff(don't know the specific term if it is a recipe bag or other)Still need to do a bunch of testing and what not, mostly what not.
I agree and would like to see/do some load testing for the different flavors of server side implementation.I think store.php would be the best if you stagger the loads and the saves.
Not sure though I might find out that node.js or TiddlyWeb has some special caching ability or something that makes it faster over time.
Don't really know but that is why I set all this up was to test and try, poke prod and learn.Of course I have a bunch of projects so I need to devote time to each and I wanted to get some other people involved with the RasPi TW5 experiments.
I will have to explore using a node.js tiddler in an iframe as that would be very cool indeed.
Adding an iframe into a TW, is like haveing 2 or even more heavy pages open at the same time.
Since TW is already slow, imo that isn't the best idea. But it will be fast, since no TW API is needed. So worth exploring.
This comment about Store.php and Node.js "speeds" was in regards to using the official Raspberry Pi Browser with TW5.
You could use the midory browser. I did a fast test with an old 256MB RasPi. The TW UI is relatively slow according to response time but it didn't crash.
There are some problems with some CSS rulse around text input boxes. But imo this can be fixed.
I have done no load testing of the RasPi server for any of the versions I have loaded.I have a RasPi with Berryboot server and store.php, a RasPi with Node.js, and a RasPi with TiddlyWeb(still need to work on that a lot).
I don't exactly know, why you need Berryboot. It's a software to start different images on the pi. I'm using Raspbian since the beginning and didn't have any problems with it. Raspbian is a debian derivative, so any help in the web that is debian, ubuntu and the like will work well. So mixing Operating systems IMO will just slow you down, since every OS is a bit different. eg: startup procedure. ....
The last RasPi has the standard Rasbian install from 12/24/2014 which is the newest version I could get when I started this.
sudo apt-get update
sudo apt-get upgrade
will give you the latest and greatest stable versions of everything.
or you can use raspi-config in the command line. It's a simple UI to do system low level settings.
eg: If you only need the pi as a server and you don't start the graphical UI you can assign more memory to the "backends".
Not automatically starting the graphical UI may speed up nodejs and tiddlyweb servers.
If you need the UI you can log in and use startx or if you log in wit putty you can start the lxpanel with X-forwarding to your windows machine.
The Viewer Pi with the new OS layout and Newest HTML 5 browser works fairly well with TW5 but it does crash.I was able to load the TW Hangouts from the web and watch a video for a bit but then it crashed.try the midori browser, which imo is pre-installed at the pi.
When you work on a TiddlyWiki that is on the node.js server it takes longer to load, a lot longer.
I'm not sure about this. I'll make some tests.
But once it is loaded it responds quicker to keystrokes.
I don't believe this, since there is no difference, if you load index.html as a file or if nodejs serves it.
Saving does make a difference, since php-save saves the whole file and nodes-save saves a single tiddler.
But the UI can't be slower or faster, since it's the same code, that needs to be executed by the browser javascript engine.
The store.php version loaded fairly fast but it was sloooow when I would type in, very old skool laggy.
hmmm. As I wrote above. That's strange. May be some different plugins? .. try midori
It would be interesting to see if the TW core could be converted to GPU code as that would make it Zip Zip around by comparison.
Why do you think, this would make TW faster?
The TW core creates html that is rendered by the browser. So if the browser uses the GPU to render HTML it is faster, as if the CPU needs to do the rendering.
I think there is a misunderstanding of the term "rendering".
- TW rendering means: The TW core converts wikitext to html, that can be "drawn by the browser".
- Browser rendering means: Take the hmtl code and draw it pixel by pixel to the screen.
TW rendering speed is only affected by the power of the CPU and the javascript engine implemented by the browser.
Perhaps a TiddlyWeb / Node.js server only needs to reroute a given request rather than implement any serverside scripting.I have no idea.
To control the raspi with TiddlyWiki, we would need a REST API. The mechanism is the same as the TiddlyWeb or nodejs API. ... It needs someone that does the code. .. that's it.
I will have to explore using a node.js tiddler in an iframe as that would be very cool indeed.
Adding an iframe into a TW, is like haveing 2 or even more heavy pages open at the same time.
Since TW is already slow, imo that isn't the best idea. But it will be fast, since no TW API is needed. So worth exploring.
TiddlyWeb is built on Python and the Raspberry Pi is all about Python so there is a serious synergy there.My hope was to put "hooks" into existing Python code using TiddlyWeb stuff(don't know the specific term if it is a recipe bag or other)Still need to do a bunch of testing and what not, mostly what not.
As I wrote above. Someone would need to add some RaspberrPi REST API to the TiddlyWeb API. IMO as a TiddlyWeb plugin.
I agree and would like to see/do some load testing for the different flavors of server side implementation.I think store.php would be the best if you stagger the loads and the saves.
Should be, since there is no load except if you load / save the file.
Not sure though I might find out that node.js or TiddlyWeb has some special caching ability or something that makes it faster over time.There is no caching involved in the default setup but TiddlyWeb shouldn't be a big problem even for 10+ concurrent users and the simple text store.
If I load a TWclassic from a TiddlyWeb server CPU usage goes up to about 22% and then returns to idle state. eg: htop (the program to show these values) uses 4% max, the rest is idle.
Starting the X environment needs about 50MByte more memory.
I did assign 16MByte for the GPU, which is the minimal setting (raspi-config) since I don't use the UI at the pi. So no GPU used.
Without X I have about 80 MByte ram free
With X I have 30 MByte ram free.
Note: I have the old 256MByte RasPi. So RAM is valuable. ... No slow SWAP memory used atm :)
Don't really know but that is why I set all this up was to test and try, poke prod and learn.Of course I have a bunch of projects so I need to devote time to each and I wanted to get some other people involved with the RasPi TW5 experiments.
I did a lot of tinkering with the RaspberryPi and TiddlyWeb about a year ago. see: http://tweb-at-home.tiddlyspace.com/ and https://github.com/pmario/tweb-config (for TWc atm)
There is a good blog post about tweb-config: http://www.rs-online.com/designspark/electronics/blog/building-a-personal-microcontent-server-with-raspberry-pi
I'm rewriting tweb-config at the moment to use TW5. ... But the system / concept will be completely different, with one more year of experience and the development going on in the DevOps space.
I was thinking that if Node.js was on the GPU it would allow for faster interactions as the GPU is about 10X the CPU.
My concern about moving node.js to the GPU I think is a moot point after reading today's RasPi Blog.
I have done no load testing of the RasPi server for any of the versions I have loaded.I have a RasPi with Berryboot server and store.php, a RasPi with Node.js, and a RasPi with TiddlyWeb(still need to work on that a lot).
I don't exactly know, why you need Berryboot. It's a software to start different images on the pi. I'm using Raspbian since the beginning and didn't have any problems with it. Raspbian is a debian derivative, so any help in the web that is debian, ubuntu and the like will work well. So mixing Operating systems IMO will just slow you down, since every OS is a bit different. eg: startup procedure. ....Why I use BerryBoot?It started as I wanted a multiOS boot SD card and BerryBoot did this I think a year before NOOBs came out.I like BerryBoot as it is rock solid easy to set up, I think even easier and more friendly than NOOBs, which is ridiculously easy to set up, #heheh.BerryBoot server has all I need, probably not as secure as it could be, is only I think 20mb, is set up in less than 20 minutes and works.Raspbian takes hours to set up and I don't need all that stuff, just an easy to use headless server that I can store TW.html files using store.phpSo I guess my answer is "Time". I spend less with BerryBoot and get great results.The hardest part is you can't go headless until you change the password, then you can go headless from there.
I should have also said I wanted to use very low cost MicroSD memory cards and boot from a server to allow me to run several Pi's and keep the costs down.The more Pi's the more you can save using a 128mb BerryBoot MicroSD Card that only cost a dollar.I might combine my two ideas and see if I can boot from Server Images for the TW5 different servers methods.I do run into issues from time to time with BerryBoot and then I switch to dedicated Raspbian on an 8 GB or larger card.
The Raspberry Pi should work with any SD-compatible cards, although there are some guidelines that should be followed:
- SD card size. For installation of NOOBS, the minimum recommended card size is 8GB. For image installations we recommend a minimum of 4GB; some distributions can run on much smaller cards, specifically OpenElec and Arch.
- SD card class. The card class determines the sustained write speed for the card; a class 4 card will be able to write at 4MB/s, whereas a class 10 should be able to attain 10 MB/s. However it should be noted that this does not mean a class 10 card will outperform a class 4 card for general usage, because often this write speed is achieved at the cost of read speed and increased seek times.