Spec me a programming stack for a low powered machine

Soldato
Joined
27 Oct 2006
Posts
6,972
Location
London
Think extremely low powered cpu ~ Raspberry PI (which is fairly quick)

Now what I want to do is port over an app built by me 10 years back on even slower hardware, the only thing I had going for me was memory (128meg of it), so instead of a LAMP structure I built instead a semaphore locking memcache data structure which was central to IPC from the webapp (php) and daemons (perl/php).

It worked great but roll on 10 years I want to try something new maybe JSON as my RPC transport as I want to learn something new. A 5 minute google comes up with counchbase as my best option.

What do you guys think ? and what languages do you think I should be coding in. Typically I'm thinking this...

Mobile App (HTML5/JavaScript) -> JSON -> couchbase
Server Daemon (Spec me an effecient language) -> JSON/native API -> couchbase
Web (Will probably stick with php unless everything can be client side HTML5 like the mobile app?) -> JSON -> counchbase
 
Soldato
OP
Joined
27 Oct 2006
Posts
6,972
Location
London
That was short lived.... couchbase is way overkill. membase might have been an option but again primarily for big web applications.

couchdb by itself doesn't appeal

Just bumped into redis.io ..... this could be the answer !

EDIT: Blooming heck.... redis.io is full of win. Anyone used it ? I'm definitely going for this
 
Last edited:
Soldato
OP
Joined
27 Oct 2006
Posts
6,972
Location
London
Just an update on what I ended up with

1 - redis.io as the backend data with published/subscription channels

2 - Redis data is populated and published by daemons written with php, perl and C

From years of neglect I've found that my front end skills to be somewhat lacking but javascript was easy to pick up and I found Websockets very easy to master

3 - A ruby server subscribes to the redis channels and pushes out data via a Websocket to clients

4 - Clients Web // JavaScript // Android and boy is the result fast. As soon as a hardware device updates it's pushed through to clients instantly ! Amazing

Anyway from here I'm going to rationalize and re-factor the backend ie get rid of the ruby as I know jack **** about how to code ruby and I don't particulary want to learn it :D

Got to learn more JavaScript and understand how to do this with XMLHttpRequest instead

Anyone have any smart ideas on how else to push data to a client ? Better implementations ?
 
Last edited:
Soldato
Joined
27 Sep 2005
Posts
4,633
Location
London innit
Not a lo of info on what you are doing, Red is is great for KVP stuff. Mongo also pretty good for slightly different use cases. Better suited to big hardware.

Go have a look at Node.js and Twisted.
 
Soldato
OP
Joined
27 Oct 2006
Posts
6,972
Location
London
Yeah I've been playing with node, again very easy but OOP in JavaScript makes me want to hurl.

Project is to rewrite a home automation/energy monitoring system target platform is an android stick (well in my case it's a busted android tab :D same thing / proof of concept).

Thanks for the heads up on twisted and one thing about node that is bothering me .... is node.js dead ? :o Seems like less and less is being written for it
 
Soldato
Joined
27 Sep 2005
Posts
4,633
Location
London innit
Yeah I've been playing with node, again very easy but OOP in JavaScript makes me want to hurl.

Project is to rewrite a home automation/energy monitoring system target platform is an android stick (well in my case it's a busted android tab :D same thing / proof of concept).

Thanks for the heads up on twisted and one thing about node that is bothering me .... is node.js dead ? :o Seems like less and less is being written for it

JS is a horrible language, but it has trained a generation to think in event driven ways so it is not without merit. Not sure whether Node is dead or not, some of the big vendors seem to have raised their flags to it. I wouldn't pick it as a platform in my field, but it has some areas it makes sense in.

Twisted is interesting, but not very 'Pythonic'
 
Soldato
Joined
28 Oct 2002
Posts
5,014
Anyone have any smart ideas on how else to push data to a client ? Better implementations ?

MQTT? It's a messaging protocol with clients for pretty much any language, standard pub/sub model, retained messages and quality of service might be useful features for what you're doing.
 
Soldato
OP
Joined
27 Oct 2006
Posts
6,972
Location
London
MQTT? It's a messaging protocol with clients for pretty much any language, standard pub/sub model, retained messages and quality of service might be useful features for what you're doing.

Yep ended up with this but that's where redis really surprised me - we get a pub/sub model but very cheaply in comparison to more comprehensive apps like activemq
 
Soldato
Joined
28 Oct 2002
Posts
5,014
Yep ended up with this but that's where redis really surprised me - we get a pub/sub model but very cheaply in comparison to more comprehensive apps like activemq

True ActiveMQ is quite heavyweight, if you just want an MQTT broker though RSMB or Mosquitto should do the job more than capably and take far less resources.
 
Back
Top Bottom