Building a really realtime website
Building a really realtime website
Hi,
Today I finally made some time to have a look at a way to make my website REALLY realtime.
Not the x second interval Ajax polling anymore, but the real deal - instantly seeing new information being displayed in your web pages!
Once you've figured it out, it's soo easy... much easier than I imagined that it would be, actually.
I wrote a post about it on my weblog so if you wanna know more about how to do it, read it.
It's still in a 'Proof of Concept' status with working examples right now, but it looks very promising
http://blog.hekkers.net/2012/10/13/real ... socket-io/
Today I finally made some time to have a look at a way to make my website REALLY realtime.
Not the x second interval Ajax polling anymore, but the real deal - instantly seeing new information being displayed in your web pages!
Once you've figured it out, it's soo easy... much easier than I imagined that it would be, actually.
I wrote a post about it on my weblog so if you wanna know more about how to do it, read it.
It's still in a 'Proof of Concept' status with working examples right now, but it looks very promising
http://blog.hekkers.net/2012/10/13/real ... socket-io/
- RDNZL
- Forum Moderator
- Posts: 1008
- Joined: Sun Sep 24, 2006 1:45 pm
- Location: Dordrecht, The Netherlands
- Contact:
Re: Building a really realtime website
Nice stuff, I noticed the code sample on the site are not error free, or my Node.js installation is not correct yet, need some more time to tinker with it.
Regards, Ron.
- Willem4ever
- Global Moderator
- Posts: 805
- Joined: Mon Oct 30, 2006 3:48 pm
- Location: Uithoorn / Netherlands
Re: Building a really realtime website
I'm working on an apache plugin which allows you to subscribe to a mosquito broker thru mosquitto-1.0.js using websockets. First tests are looking good !
Re: Building a really realtime website
Ron, if you mail me the errors maybe I can help. Had some myself tooRDNZL wrote:I noticed the code sample on the site are not error free
- RDNZL
- Forum Moderator
- Posts: 1008
- Joined: Sun Sep 24, 2006 1:45 pm
- Location: Dordrecht, The Netherlands
- Contact:
Re: Building a really realtime website
I have it working now.
It was because i'm on Linux, and was struggling to get node.js and MQTTjs to work together.
It was because i'm on Linux, and was struggling to get node.js and MQTTjs to work together.
Regards, Ron.
Re: Building a really realtime website
That would be even better, very nice!Willem4ever wrote:I'm working on an apache plugin which allows you to subscribe to a mosquito broker thru mosquitto-1.0.js using websockets.
Re: Building a really realtime website
I've got my smart meter online now; online as in the smart meter data being displayed in real-time
It doesn't get any better than this
With the help of Willems Apache module,which works great!
View the real-time web page here:
http://www.hekkers.net/domotica/Smartmeter.aspx
PS: IE doesn't support it; Chrome, Firefox, iPad should all be OK.
It doesn't get any better than this
With the help of Willems Apache module,which works great!
View the real-time web page here:
http://www.hekkers.net/domotica/Smartmeter.aspx
PS: IE doesn't support it; Chrome, Firefox, iPad should all be OK.
- RDNZL
- Forum Moderator
- Posts: 1008
- Joined: Sun Sep 24, 2006 1:45 pm
- Location: Dordrecht, The Netherlands
- Contact:
Re: Building a really realtime website
Nice.
Willem is your apache module code online somewhere?
Would links to test with it too.
Willem is your apache module code online somewhere?
Would links to test with it too.
Regards, Ron.
- Willem4ever
- Global Moderator
- Posts: 805
- Joined: Mon Oct 30, 2006 3:48 pm
- Location: Uithoorn / Netherlands
Re: Building a really realtime website
Not yet Ron, I have to prepare some instructions to make it suitable for the general public and it comes with no guarantees Last night I added an additional option to prevent publishing thru the websocket interface - I can email you what I currently have which seems to work on OSX (Mountain Lion), Centos 6.3 and Fedora 17. Send me your email address by PM and I will forward the source with very basic instructions to you. For every one else, stay tuned on Github
- Willem4ever
- Global Moderator
- Posts: 805
- Joined: Mon Oct 30, 2006 3:48 pm
- Location: Uithoorn / Netherlands
Re: Building a really realtime website
Check here for my realtime online smart meter
Re: Building a really realtime website
alleen maar vraagtekens...
- Willem4ever
- Global Moderator
- Posts: 805
- Joined: Mon Oct 30, 2006 3:48 pm
- Location: Uithoorn / Netherlands
Re: Building a really realtime website
Forgot to mention, it is based on webs sockets which is currently not supported nu IE, Safari / Chrome / Firefox / iPhone with IOS 6 should work fine.
Re: Building a really realtime website
Willems page still works fine for me.. except for the certificate...?
Since yesterday (late in the evening) my Opentherm Gateway information is 'real time' available the same way my smart meter info is.
The only thing left to do is making a web page.
Since yesterday (late in the evening) my Opentherm Gateway information is 'real time' available the same way my smart meter info is.
The only thing left to do is making a web page.
- Willem4ever
- Global Moderator
- Posts: 805
- Joined: Mon Oct 30, 2006 3:48 pm
- Location: Uithoorn / Netherlands
Re: Building a really realtime website
Yeah, it is signed by my personal CA ... for the geeks, the page is available on IPv4 and IPv6 and connects to the broker using IPv6 ....
- Willem4ever
- Global Moderator
- Posts: 805
- Joined: Mon Oct 30, 2006 3:48 pm
- Location: Uithoorn / Netherlands
Re: Building a really realtime website
The apache handler is uploaded to Github. It includes a simple webpage which allows you to play with MQTT using the mosquitto web socket interface. Sofar it is confirmed to work on Ubuntu 11.04 (Thanks Ron !) , Centos/Redhat 6 and OSX 10.8, Test are undergoing to get it working with a Raspberry PI.