node.js - Use Erlang + some other language on backend -
i want learn more erlang, , playground, want use core backend logic.
i wonder, if connecting end users should choose stack, nodejs , connect somehow erlang?
say, want make websocket connections users nodejs, it's suitable websockets, , create communication between nodejs , erlang pass data-crunching erlang, while keep nodejs middleman between backend , end users.
should use middleman technology @ or solution put erlang + apache/nginx , implement whole system using erlang?
erlang's main strength handling of client connections , routing requests workers. lightweight , isolated processes makes scale large number of connections while making error tolerant. erlang typically not right language heavy number crunching, should used request handling , routing.
so instead of putting node.js connection handler , router use e.g. yaws or cowboy (more popular choice currently) websocket server , handle in erlang.
in production system use nginx/haproxy load-balancer/proxy in front of erlang server, not necessary in way.
an interesting article on erlang server scalability a million-user comet application mochiweb, it's comet-style http requests, not web sockets, has lot of information.
Comments
Post a Comment