With the feature freeze since the first of januari, some changes within our structure and inventarise all your quickly added requests we have started with code reviews about two weeks ago. Last week we have started with the first steps. With one of the major things, and certainly not the least important, the webservice.
Major change in providing non and secure connections
We will not provide non secure and secure connections simultaneously. The new setup will be or secure or non secure. We have changed the network connections setup in such a way that for creating connections we will be using a shared code base. This results in far less code, but with more possibilities.
The old setup was in such a way we ended up in providing 9 connection types in total. Because of the change we made we will be able to reduce this to a maximum of three, starting with overhauling the webservice.
Changed webserver
We have completely rewritten the webserver. The original webserver just caused too much issues. For example when you log in, not allways where all requests honoring you as logged in. Also it occured that sometimes small file corruption occured during the transfer of files to your browser.
Besides the above the webserver also feeled "outdated", it did not support keep-alive requests resulting in every request being served as a new connection, and especially with the secure connections this is a very, very expensive operation on the server processor wise.
The changes
With the new setup we have made the following changes and are currently able to:
- Support keep-alive requests. Just open a couple connections to the webserver, and re-use them, better response times and less processor consuming.
- Support for spdy: Google Chrome supports the spdy protocol, Spdy is an advanced replacement for secure http 1.1. So if you are going to use a recent version of the server with chrome, and enabled SSL you are using spdy.
- HTTP 2 support: The replacement for http1.1 and it's mucho's faster. The new http protocol provides much faster showing of pages because it applies some really cool techniques. It is the current future of the web and we felt the need to support it. If you enable SSL and user an other browser then Chrome and it supports http2, you will be using it automatically.
- Selecting SSL or non SSL: We will be providing one connection type. Secure or non secure, we will add this setting to the web interface soon, for now change a setting in system.properties by adding: "server.enablessl=true" to it. When you have done this, restart the server and change http to https, the port is still the same: 8080.
- Advanced protocol selection on one port: The webserver can identify with which protocol you are connecting. We have rebuilt it in such a way it automatically recognizes if you are connecting with http 1.1, spdy, http2 or websockets. Read on what this means for websockets.
- Websockets merged with http port. I think this feature will be liked by users who want to connect from an external resource. Instead that you have to open multiple ports on your router, the websockets and http requests now all are initiated on the same port.
- HTTP and HTTPS are available on the same port. This is an important one! When you switch between SSL and non SSL the port number is always the same which by default is 8080!
The above are the most important notable changes made that will infect you as an user immediately, there have been some other changes made in the code which makes the above possible which is not immediately visible.
With the complete rewrite of the webserver and the addition of spdy and http 2 we think we made an huge step forward in the start to finalize the web interface and will make it possible to implement a more advanced interface. As browsers become more capable we want to utilize this to provide a nice experience. Because it is now possible to provide spdy and http2 all web service requests will almost be as fast as normal http requests (except for the very first request initializing the secure connection, but when initialized, oh yeah.. it almost flies!).
Important upcoming changes
SSL Certificates
Currently with every reboot a new self signed certificate is being created. We will soon be adding the possibility for you to provide your own certificate (self signed or bought).
Interfaces
We will be removing device specific web interfaces. We have noticed that the mobile and tablet web interface are not used that much. Also these interfaces take up a lot of time and we would like to move the whole to the apps which will also be enhanced.
Web interface
Currently all the pages on the webserver are being parsed by an internal parsing system. This takes up memory and precious processor cycles. We are going to change the whole web page serving part. With this change the server will be "detached" from the web interface. This means that it will be possible to completely replace a web interface making it possible for other users to create their own interfaces and use these as a drop in for the default interface.
Our web interface will be enhanced to move from a webserver part to a real client part interface. With this change we will be able to provide language files to make it possible to provide PiDome in your own native language when available. Making the web interface language aware and move all the texts to language files will take up most of the time and will be an ongoing process.
Mobile clients and screens
These are currently incompatible with the updated web interface. If you are downloading a bleeding edge build from the build server (available on the download page). you will have a mobile and screen client incompatible version. This is because we are not completely finished yet with the server side connection overhaul for these clients. We hope to have everything alligned next week
Some last words
Some last words to finish up this post.
Sponsors
We are still looking for sponsors. We are looking around to replace our build server and the possibility to buy a macbook. Currently my development platform is 100% windows and the build server is a desktop computer (often in use by family).
If you are willing to help us out please contact us using the contact form, select Sponsoring as the subject and we will work something out with you in return.
Developers
We will soon be looking around for an extra developer for the front end. As we would like to create a real client side web application it would be awesome if someone woud step up with the knowledge of modular front end application building and knows about React as this is our choice for building the components. Keep an eye on our twitter account so you know when we will be starting to look around. An important milestone for us is to finalize the backend API, otherwise you would continuously be rebuilding, that ain't fun.
Merchandise
Yep, we have been thinking about merchandise. More information will follow when we have this available. And a more stable server.
Last but not least
The PiDome website is slowly moving to an SSL address, the https address is already available and will soon be the default address.
Cheers and good night!