<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<br>
<br>
On 2/11/11 23:47 , dokondr wrote:
<blockquote
cite="mid:CAMXF=YC_D6ggEC=emUVVfq089faMqTKFBg_JEbueE08NaVAWcQ@mail.gmail.com"
type="cite">Hi, <br>
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 applications. <br>
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: <br>
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.<br>
</blockquote>
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)<br>
<br>
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.<br>
<br>
<blockquote
cite="mid:CAMXF=YC_D6ggEC=emUVVfq089faMqTKFBg_JEbueE08NaVAWcQ@mail.gmail.com"
type="cite">
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?<br>
</blockquote>
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.<br>
<br>
<blockquote
cite="mid:CAMXF=YC_D6ggEC=emUVVfq089faMqTKFBg_JEbueE08NaVAWcQ@mail.gmail.com"
type="cite">
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.?<br>
4) What libraries Erlang has to serialize data structures in/from
files (need this for debugging mostly, anything similar to Python
pickling)? <br>
</blockquote>
If you "just" want to write some data structures and inspect them in
a text editor then you can just do a <br>
<br>
io:format(FileHandle, "something is written ~p", [Something])<br>
<br>
and if you restrict yourself to only write the data you can use
<a class="moz-txt-link-freetext" href="file:consult/1">file:consult/1</a> to read in a list of terms from a file - this is very
nice.<br>
<br>
Hope you can use some of this.<br>
<br>
Cheers,<br>
Torben<br>
<br>
<blockquote
cite="mid:CAMXF=YC_D6ggEC=emUVVfq089faMqTKFBg_JEbueE08NaVAWcQ@mail.gmail.com"
type="cite"><br>
Thanks!<br>
Dmitri<br>
<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
erlang-questions mailing list
<a class="moz-txt-link-abbreviated" href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a>
<a class="moz-txt-link-freetext" href="http://erlang.org/mailman/listinfo/erlang-questions">http://erlang.org/mailman/listinfo/erlang-questions</a>
</pre>
</blockquote>
</body>
</html>