Tag Archives: Raspberry Pi

Raspberry Pi 2

A Raspberry Pi 2 was released today! It has a quad core chip running at 900MHz, and it has 1GB of RAM.

The new Pi’s SoC is the BCM 2836, which uses a quad core ARM Cortex-A7.  It will now be able to run Ubuntu.  Windows 10 will also be available for it in some form.

Read more on the Raspberry Pi site: http://www.raspberrypi.org/raspberry-pi-2-on-sale/

ARM powered server farm

My Banana Pi site has been up for a few days now, and I’m very happy with its performance.  I’ve put my clusters together to form a nice neat stack:

ARM server farm

ARM server farm

The Banana Pi servers are in the rack on the left.  The other two racks contain Raspberry Pi servers.

Banana Pi and Raspberry Pi server farm

Banana Pi and Raspberry Pi server farm

You can read about how I set up the Banana Pi cluster here: http://banoffeepiserver.com/banana-pi-server-cluster/.

A new version of Pyplate CMS is now available

It’s a long time since I posted here. I’ve been working on Pyplate, my Python CMS. Over the last few months I’ve made a lot of changes to the UI. Most site administration tasks can now be done via the Pyplate UI.

I’ve modified Pyplate to use the WSGI server interface instead of CGI. With CGI, the Python interpreter has to be loaded everytime a script is executed. Using WSGI means that a Python interpreter is kept in memory between requests. When a script needs to be executed it can run immediately because the interpreter has already been loaded. This has no effect on page load times of static pages, but dynamic pages are served much more quickly. The difference is huge.

There are different implementations of WSGI for different servers. In order to use WSGI with Apache, libapache2-mod-wsgi must be installed. This ensures that a python interpreter is loaded into each Apache thread. The downside of this is that each thread takes up more memory.

With Nginx, people often use set up a uWSGI server.  Nginx must be configured to pass requests for scripted pages to the uWSGI server. The uWSGI server executes a script, and returns the result to Nginx, which then passes the page back to the user who requested it.

I’ve also implemented a very simple webserver based on the WSGI class in the Python library. This server can handles static pages. If a requested file can’t be found, the server hands the request to Pyplate.  Pyplate generates the page, and returns it to the server.

The Python server is not very fast. It’s slower than Apache, and enabling page caching doesn’t make much difference. On the upside, it is very easy to set up.

I’ve added some security patches to Pyplate. A security token is embedded in each form generated by Pyplate. When a user clicks on the submit button, the security token is sent to the server with the POST request, and validated. I’ve also made some changes to the cookie code to make it harder to steal user’s cookies.

User information is now stored more securely. A salt is used to encrypt each user’s password, and a different salt is generated for each user.

I think Pyplate has come a very long way. It’s now a much more complete, more usable CMS. It’s still pretty simple, and small enough to run quickly.

What’s next? I’m working on a site built on a Banana Pi cluster. I’m building it using Pyplate, and it’s going to be based on my Raspberry Pi site. I may add a few more articles to my Raspberry Pi site, but eventually I plan to get back to working on Pyplate.



Beta testing continues…

I announced the start of Pyplate beta testing on the Raspberry Pi forum.

I’ve had a little feedback already, and so far it’s been mostly positive. There was an issue with some scripts that didn’t have the right permissions, but I’ve fixed that now.

I’ve also posted an article on my Raspberry Pi site about installing Pyplate on a Pi.

The latest version of my CMS is now live

I’ve reached an important milestone with my CMS. I’ve finished integrating SQLite, and developed the backend to a point where it’s pretty usable. It’s stable, and with caching enabled, performance is exactly the same as before. In fact, even without page caching, it’s still quite fast.

This morning I backed up the site and synced it with the cluster, so the new version of my CMS is now live on Raspberry Web Server. I’ve updated the theme, but apart from that there’s no visible sign that the site is different. Press shift F5 is you’re still seeing the old theme.


I’ve integrated a database into my CMS

I haven’t added any articles to my Raspberry Pi site recently as I’ve been working on my CMS. I’ve added support for an SQLite database, which meant I had to rewrite most of the code. I’ve also been doing a lot of work on the back end. I’ve created pages to manage posts and categories, edit site settings, and manage the cache. New themes can now be uploaded and installed on the server. I’ve developed 5 themes so far.

The CMS still needs a lot of work, but it’s quite usable – I’ve already started using it to build a new site. I still need to develop some UI code for user management, and I need to develop a method for integrating plugins. I’m getting close to being able to release a beta version.

My Raspberry Pi site’s Alexa rank has dipped below 200,000 for the first time (the lower the number, the better the ranking).  The site’s Google page rank has been updated to 3.  I think that’s not bad for a site that’s been up for less than a year.

In other news, raspberrypiforums.com has changed it’s name to thefruitycomputer.com.  The redesigned it and it looks really groovy.

Support for different layouts added to my CMS

I’ve spent the last few days working on the CMS that powers my Raspberry Pi site.  I’ve fixed some bugs in the XML handling code, so now I don’t have to edit the XML files manually when I add new pages.

I’ve also developed a simple API that allows me to call a Python function to print the sidebar and other page furniture.   I’ve changed the layout a bit, so I hope everyone likes the changes.

I’ve implemented a system for defining layouts like this:

<div id="container">
<div id="midpage">
</div><!-- midpage -->
</div><!-- end_container -->
<script src="/js/jquery-1.7.2.min.js"></script>
<script src="/js/lightbox.min.js"></script>

The API that I developed is used to fill in the parts of the layout in curly brackets.

Most of the site settings can now be edited from within the CMS’s backend, although there’s still a lot of UI development work ahead of me.

I’m hoping to release a beta version of my CMS early in the new year.