Chicago Boss: Routes does not work in production mode?
Chicago Boss: Routes does not work in production mode?
Chicago Boss: Routes does not work in production mode?
I had a similar problem years ago. What you are trying to do is remove an offline node, which as far as I am aware was impossible in earlier versions of mnesia. You can however connect to the cluster using a dummy node named bad@node, and started with a tweaked system.config of the original clustered …
If you have enough RAM it’s not too hard to handle 1M or more connections on linux. These guys handled 10 million connections with a java application on a single box using regular CentOS kernel with a few sysctl tweaks: sysctl -w fs.file-max=12000500 sysctl -w fs.nr_open=20000500 ulimit -n 20000000 sysctl -w net.ipv4.tcp_mem=’10000000 10000000 10000000′ sysctl …
Yes but it is painful. Below is a “lambda function declaration” (aka fun in Erlang terms). 1> F=fun(X) -> X+2 end. %%⇒ #Fun <erl_eval.6.13229925> Have a look at this post. You can even enter a module’s worth of declaration if you ever needed. In other words, yes you can declare functions.
Since OTP 17.0 there are named funs: 1> Perms = fun F([]) -> [[]]; F(L) -> [[H|T] || H <- L, T <- F(L–[H])] end. #Fun<erl_eval.30.54118792> 2> Perms([a,b,c]). [[a,b,c],[a,c,b],[b,a,c],[b,c,a],[c,a,b],[c,b,a]] Before that you could do this with a little argument trick: 1> Foo = fun(F, X) -> F(F, X) end. #Fun<erl_eval.12.113037538> 2> Foo(Foo, a). <…infinite loop!> …
The story Imagine a system to handle mobile phone calls or mobile data access (that’s what Erlang was created for). There are gateway servers that maintain the user session for the duration of the call, or the data access session (I will call it the session going forward). Those server have an in-memory representation of …
As you described, there are many different approaches you could take by ultimately they boil down to two different categories: 1) code compilation and 2) code evaluation. The example you described above requires compilation, which will define a module and then you would have to invoke it. However, as you found out, it requires defining …
The way the documentation describes the difference between include and include_lib is: include_lib is similar to include, but should not point out an absolute file. Instead, the first path component (possibly after variable substitution) is assumed to be the name of an application. Example: -include_lib(“kernel/include/file.hrl”). The code server uses code:lib_dir(kernel) to find the directory of …
Should I just start with a few gen_servers with a supervisor and incrementally build on that? You’re missing one key component in Erlang architectures here: applications! (That is, the concept of OTP applications, not software applications). Think of applications as components. A component in your system solves a particular problem, is responsible for a coherent …
Well, you could do worse than studying the code of some of these haskell games. Some of these use FRP (functional reactive programming), which some people are working on as a pure, high-level technique for games and other things. But most are a typical haskellish mixture of effectful and pure functional code. Bloggers with relevant …