[erlang-questions] Erlang in Amazon AWS cloud
Thu Nov 3 09:37:40 CET 2011
On 2/11/11 23:47 , dokondr wrote:
> Recently I was requested to move my application to Amazon AWS. My app
> is written in Haskell and I find it a little bit difficult to scale
> Haskell app naturally in AWS. So I started thinking about rewriting my
> app in Erlang as it provides natural environment for concurrent
> I don't have much experience with Erlang and will be happy to get
> advise on what Erlang systems AWS will be able to scale efficiently.
> There are several main things I need:
> 1) A persistent key-value store. I am thinking about using Mnesia or
> Amazon SimpleDB. I would prefer Mnesia, as I want to be able to run
> my app also locally, without live connection to AWS. Yet I don't know
> how to run Mnesia in AWS in efficient, scalable way.
SimpleDB has its good sides when your data is highly independent and you
never have different parts accessing the same entries at the same time.
SDB does not have transactions or joins which makes it a bit hard to do
things where transactions is the natural thing to do. (I talk from
personal pain here, I really, really miss transactions)
Mnesia in AWS is not a bit problem, but you have to deal with the fact
that your instance can disappear and everything is lost, so you need do
a bit of thinking about how to deal with that. I bet some of the Mnesia
gurus can help you with some pointers there.
> 2) My app today consists of several standalone processes that
> communicate by means of simple files. I move from files to key-value
> store, but would like to preserve independent processes communicating
> with each other. What is a natural Erlang way to do this? How this
> natural way will be able to scale in AWS?
Erlang is all about message passing directly between processes - forget
about the files. It scales extremely well in AWS. Disclaimer: we have
not tried to do inter-machine communication with our newest
architecture, but I doubt it will be much of an issue.
> 3) My app works with blog messages and does some NLP and a lot of text
> processing, also works with JSON. As I understand, processing text in
> Erlang is a bit tough. What Erlang libraries can help here - string
> tokenizers, JSON libs, etc.?
> 4) What libraries Erlang has to serialize data structures in/from
> files (need this for debugging mostly, anything similar to Python
If you "just" want to write some data structures and inspect them in a
text editor then you can just do a
io:format(FileHandle, "something is written ~p", [Something])
and if you restrict yourself to only write the data you can use
file:consult/1 to read in a list of terms from a file - this is very nice.
Hope you can use some of this.
> erlang-questions mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions