4 ms·
Running a 60fps web application using a RaspberryPi
- gambiting 11y agoThe problem I found with using RaspberryPi as a server for anything, is that it kills SD cards within a few months. And I've tried with some super expensive Ultra/Extreme cards as well, they all die in 3-4 months of running a web server off it.
- colinramsay 11y agoHave you tried using the SD card as just a pure boot device and running everything else from a USB-attached drive?
- gambiting 11y agoYep, but USB and Ethernet are on the same bus so it slows down both significantly.
- mvip 11y agoThis is a very valid point. We've encountered a lot of issues around this when developing Screenly (https://www.screenlyapp.com https://www.screenlyapp.com). Firstly, do careful due diligence on the SD cards (quality between different vendors/models varies a lot). Secondly, make sure to move all directories with frequent writes (such as /var/log) to ramdisk. This will increase the life span by a lot.
- fookyong 11y agoas someone who might be using the Pi in a somewhat high-availability environment pretty soon, this frightens me! What do you think is the main variable here - SD card quality? amount of I/O? or is it simply that the Pi is not meant for high availability? If the answer leans to the latter, what other choices are there? My goals is to find a small computer (very small) that has reliable uptime and can do 1080p video.
- gambiting 11y agoActual SSDs have multiple memory chips in them, and not only they spread writes between them, they do actual wear leveling, so once certain cells become unwritable they are marked as such and the controller starts using cells from the reserved area(which can be few or even several gigabytes on larger drives). SD cards on the other hand have only one chip, and although they have a controller that monitors the wear level, they have an extremely limited number of spare cells, so it's very easy to kill an SD card by repeatedly writing to the same address. As others have mentioned - you could solve this by serving the content from a USB drive, but because Ethernet and USB share a bus, you will essentially halve the speed of each, which is not ideal. If you have the money to spend, I would recommend a different board, but with a dedicated SATA port, so you can use an actual SSD or a regular hard drive for serving content. So....TK1? https://developer.nvidia.com/jetson-tk1 https://developer.nvidia.com/jetson-tk1
- jononor 11y agoSome friends working with installations have said that power outtages kills SD cards very quickly with RPi, and that changing to a BeagleBone Black improved things. Another alternative is https://www.olimex.com/Products/OLinuXino/A20/A20-OLinuXino-LIME-4GB/open-source-hardware https://www.olimex.com/Products/OLinuXino/A20/A20-OLinuXino-...
- rasz_pl 11y agonoatime + logs into ramdisk with periodic flushes, or log into network share
- matthewmacleod 11y agoThis is great advice. I have also done some work on building a good user interface using the Pi, and was surprised by how difficult it was. There's no good Android build available for the Pi, for example – would be ideal for many of the kind of UIs you would want to implement. In the end I have been using a Go web server with websockets to display a single-page app in Firefox running under X. It's still not totally satisfactory though – UI is slow due to the lack of HW acceleration, and there is no nice solution for on-screen keyboards, so I'll probably have to implement one in JS eventually. Touch screen support is sketchy at best. Are there other similar platforms out there that might offer HW acceleration or working Android implementations? I also had a crack at the Orange Pi which claims to have functioning Android, but… let's say that's an overstatement.
- fookyong 11y agoAlso interested in a response. There's also a bunch of OEM options from China (pico pcs / stick pcs) that look like they might do the job but might be overpromising...
- pjc50 11y agolack of HW acceleration Genuine question: where does the obstacle lie here? The BCM2835 is a hardware video accelerator with a small ARM on the side. GPU libraries are available. Is it something missing from X or Firefox?
- rasz_pl 11y agoLimitation is in "developers", that is WEB developers playing with embedded systems. There is nothing stopping you from deploying dedicated OpenGL application on RPi, but this is not the 2.0 way. Bros want nodejs and responsive UIs in javascript .... you end up with this: https://youtu.be/tG70c3Zadek?t=10m49s https://youtu.be/tG70c3Zadek?t=10m49s tldr: full minute to boot X and chromium just to implement simple 20 lines of python application.
- matthewmacleod 11y ago
- mnutt 11y agoThis is great. I'm using Pi's for a similar purpose, a bunch of monitoring dashboards all over our office that pull from webpages. I'm using a combination of a central server to configure which web pages are shown, and a chrome extension on each Pi to periodically ping the server. It's really hard to find a decently new version of chrome for Arm. Raspbian stable is on an ancient Chrome 22.0 and even testing is only up to 38.0. So I'm excited to try out this method with Qt.