Relative Content

Tag Archive for erlang

How can I replace only certain values in a map of maps, while keeping all the others?

I have a very deep map of maps with lots of values, where I want to update only a few values, while keeping all the rest. I thought that maps:merge/2 would be just the ticket, but the problem with that is that it will replace every key, all the way up to the root. I only want to update the value in the leaf. This is what maps:merge/2 does:

How can I replace only certain values in a map of maps, while keeping all the others?

I have a very deep map of maps with lots of values, where I want to update only a few values, while keeping all the rest. I thought that maps:merge/2 would be just the ticket, but the problem with that is that it will replace every key, all the way up to the root. I only want to update the value in the leaf. This is what maps:merge/2 does:

What makes Erlang suitable for cloud applications?

We are starting a new project and implementing on our corporations’s instantiation of an openstack cloud (see http://www.openstack.org/). The project is security tooling for our corporation. We currently run many hundreds of dedicated servers for security tools and are moving them to our corporations instantiation of openstack.

Can Clojure’s thread-based agents handle c10k performance?

I’m writing a c10k-style service and am trying to evaluate Clojure’s performance. Can Clojure agents handle this scale of concurrency with its thread-based agents? Other high performance systems seem to be moving towards async-IO/events/greenlets, albeit at a seemingly higher complexity cost.

In what meaningful ways does Erlang prevent race conditions in concurrent programming?

Reading about concurrency in Erlang, reminds me of the Akka concurrency toolkit. Both give you tools to prevent or limit race conditions. But you can send links to mutable data to other processes using the Akka toolkit, which is still unsafe. I see Akka as a useful tool, but it does not provide protection against out-of-order access to objects and data leading to race-conditions, deadlock, and/or starvation. It doesn’t prevent you from writing unsafe code the way Java or C# protects you from writing most of the kinds of memory leaks you can write in C++ (you can still create memory leaks in Java by tricking the garbage collector, but it is less of a problem than having to remember to free every byte you allocate).

Erlang/Haskell web service to server files [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for […]

clojure/erlang/go for high volume server

I have a project that will need to handle 1000s of requests a second with a decent amount of processing for each. For the most part, the processing will be done on a list of items, basically filtering it and returning a smaller list. This process can be done in parallel fairly easily and I should also say, speed is important. I’ve narrowed my language of choice for the project down to clojure, erlang, and go, and have researched them all to a moderate degree.

Where is it appropriate to do input validation in Erlang?

I’m writing a module that runs a finite state machine* based on the contents of an array of records passed in at initialization. Each record describes a state and includes instructions on how to act on inputs (i.e., when in state S1, input I triggers a transition to state S2). For the FSM to work correctly, the transitioned-to states need to exist.