Node.js

Waansin

Well-Known Member
Joined
Feb 16, 2005
Messages
284
Reaction score
0
Location
Port Elizabeth
Are there any Node.js hackers lurking around here?

For the uninitiated: http://nodejs.org
You can use node.js to easily build scalable network programs using server-side Javascript.

I'm keen to start some form of South African node.js interest group
 
Yes we are using it in our production environment for our tracking solution. Works great. We actually some of our java stuff with node
 
Last edited:
I guess this is not something that a lot of people are interested in, pity. Maybe I can indoctrinate node.js into students at the local university.
 
This is almost 2 years later, I'm using Node.js for a project that I'm working on. So far so good. I moved from PHP, so the ease at which I can build an API with little effort is fantastic.

I use:
- Express.js on Node.js
- Underscore.js (front and back-end)
- MongDB and Mongoose.js (the source of my troubles, MySQL won't go away)
- Backbone.js (also making me feel stupid at times) [not playing very well with Google Maps API]

I decided to use JavaScript alone for everything

My only worry so far is that hosting seems to be quite complicated, I know there's Amazon, Azure, No.de, Monglab etc, but the prices are a bit out of my league (due to the amount of RAM needed by MongoDB). Hopefully I win, if I can host this one I'll prolly start using Node for everything practicable, until I graduate into things like Python and Java
 
Last edited:
Heroku has node.js support

I'll admit that it's partly due to being lazy to read up on the role of 'Workers' that every time I look at Heroku I go "their pricing is too complicated and looks expensive as a result".

I have been considering Windows Azure or Amazon Web Services, for when I'm ready to release my project into the wild, but I need to figure out approximates of how much each will cost me
 
SuperNev,

I have compiled node.js to run on a Webfaction.com host. But there are probably better options around if you're wanting to run MongoDB as well. Do some research into dedicated servers and you may be surprised how reasonable they can be. Downside with a dedicated server is you're on your own to support the software on it.

MongoDB is easy to use but difficult to use properly. Don't be fooled by the ease of getting data in and also don't think that a document data store can handle all jobs you need. There are just some DB jobs that a RDMS does without breaking a sweat (think aggregate functions among others) that will have your brain melting trying to figure out how to accomplish in MongoDB.

Also, most hosts provide a MySQL instance for you. Personally, MongoDB is a lot of fun and great to know, but is a serious dark pit of soul crushing agony if you're relying on it in a production (money-making) system without having good experience and knowledge of it.
 
SuperNev,

I have compiled node.js to run on a Webfaction.com host. But there are probably better options around if you're wanting to run MongoDB as well. Do some research into dedicated servers and you may be surprised how reasonable they can be. Downside with a dedicated server is you're on your own to support the software on it.

MongoDB is easy to use but difficult to use properly. Don't be fooled by the ease of getting data in and also don't think that a document data store can handle all jobs you need. There are just some DB jobs that a RDMS does without breaking a sweat (think aggregate functions among others) that will have your brain melting trying to figure out how to accomplish in MongoDB.

Also, most hosts provide a MySQL instance for you. Personally, MongoDB is a lot of fun and great to know, but is a serious dark pit of soul crushing agony if you're relying on it in a production (money-making) system without having good experience and knowledge of it.

Thanks, yea so far it looks like I'm gonna go the dedicated route.

To be honest, MongoDB was a last resort in a complex problem that I was trying to solve, I chose it for its schema-less (or rather flexible schema) design, and importantly geoindexing (other alternative was PostgreSQL, which still intimidates me).

Here's a background of what I'm doing:
A few months back I posted a small project that I was working on, on MyBB. It was a public transit direction system (have to find a shorter way of describing it) for taxis around Joburg and surrounds. Here's the link: http://rwt.to.
I initially built it with PHP on both the back and front-end (the latter on top of Wordpress so I could ship it faster). For the data store I used MySQL. All was fine until I started reinventing the wheel with a lot of things (like the algorithm that I was using). So began the search for an alternative. I don't have the time to learn Python or Ruby, as they seemed to be viable alternatives. MySQL was also a problem cos I had to calculate the distance points from one another (e.g. a simple things as 'SELECT 10 stations with distance of < 10km from point A was a mission).

I ended up choosing Node.js after I tried out some tutorials and played with it. MongoDB so far is flexible, and I have been able to write my own algorithm that incorporates taxis, Gautrain and bus. The stack works so far, the real issue will be the performance in production.

Foursquare use MongoDB, they are open about the issues they've had with it (biggest being the need for lots of memory), that was another thing that convinced me to go with Mongo.

I'll see how things go, if Node doesn't work out, hopefully I'll have shown viability of my project, then I can try get funding and get professionals to build the back-end on something other than JavaScript. Mongo is likely to stay. I've had too many sleepless nights trying to figure out how to get some things to work on SQL :)

Thanks for all the advice
 
that looks like an interesting project.

without knowing to much about your exact requirements, from a purely geospacial POV, I would say that neo4J or some other graphing DB would be much more suited than Mongo.
 
that looks like an interesting project.

without knowing to much about your exact requirements, from a purely geospacial POV, I would say that neo4J or some other graphing DB would be much more suited than Mongo.

Mongo at least beats Relational Graphing DBs. I looked into Postgre and other suggestions on the StackExchange GIS site, but they felt like black boxes. I tried Postgre for a few days, and stopped in the first hour. Part of the problem was that I needed to download a huge SA map database off OpenStreetMaps. The whole thing felt complicated, and unnecessary because I am not intending on drawing dynamic routes (eg. a bus route doesn't change every day, storing its path as an array is adequate enough).

I didn't know about neo4j until just now. Thanks for sharing. I checked their website, will do more research into it. Maybe I can add it to my stack someday. The Dublin Transport thing's code is on Github, but the site is dead, so I can't see how that has been implemented. I'll maybe save up half a day next week to try run it on my PC and see how it is.

Now, back to mongo. Everything I need is precomputed when I add routes on the system, so I don't really need a graph db. I don't know how well this will scale, hopefully some success will shed light. The geoindexing makes my queries more efficient already, and I have built a cheap algorithm that determines valid requests from invalid ones. So you can't search for a route from Botswana to Mocam for example, you just get a response saying that route is not available, all this with just one query to the DB. This is cacheable, so that's a plus.

I also want control of the routing algorithms, because I plan on adding a lot more transport services [like sheshatuks.co.za and planes] (eg. using a public flights API to give airplane routes from say Cape Town to Johannesburg instead of just telling you to spend x days on a train/bus) and features (like having users of the site add their own private routes) which will eventually lead to me having to tweak the algo to meet those requirements.

Out of interest, there's another guy working on something similar. The site is http://awayto.be. Try going from Port Elizabeth to Polokwane, or just click this link: http://awayto.be/#/-33.93264,25.56995/-23.891581,29.4496. He's much more experienced than me with programming, he did these computer things at varsity. He is also doing his own algorithms. Hopefully he continues with developing the site, would love to have a competitor to bench myself against.
 
Hi Guys,

glad to have found this thread!

We're currently looking to hire 2 Node.js developers (Senior/Mid and Junior) to join our growing startup based in Stellenbosch.

Please pm me if you're interested and I can send you more details and offer you a free coffee if you're based in Stellies/Cape Town/surrounds :)
 
We are looking to hire a Full Stack node.js developer for our startup based in Silicon Valley.

We are from Cape Town but we are using a distributed team so we're happy to hire a South African.

MongoDB, Node.js, Ember.js, Bootstrap, LESS.

Email me if you know someone - [email protected]
 
A quick question. What does node.js bring to the table that other technologies don't? It seems that the downsides - JS lacking mature development tools, the inherent complexity of the technology and lack of skills out tgere far negate any of the benefits.
 
Top
Sign up to the MyBroadband newsletter
X