[erlang-questions] MySQL cluster - MnesiaXXL

Yerl <>
Mon Oct 23 19:38:26 CEST 2006


Hi!


> I think memcached is the best cache available _assuming you're not
> using Erlang_, but if you are building an Erlang app, I can't see why
> you would want to use memcachd instead of Mnesia.
>
> - Mnesia runs in the same memory space as Yaws, which means it's 
> insanely fast.
> - Mnesia is a piece of cake to use.
> - Mnesia is easy to reconfigure in runtime.
> - Mnesia simplifies your architecture because you don't need to
> install 3rd party components.
> - Mnesia has a lot of capabilities that memcached doesn't have,
> including disc_copy storage, ACID transactions, etc.
>
Completely agree with you on these points if you only work in Erlang world.
At work, we need the best sofware for the best task. Our code is mainly 
written in C/C++.
> If I were to build an Erlang webapp (which is purely hypothetical :) )
> I wouldn't look past Mnesia. I can't see a reason to think that
> memcached is any better.
>
What the experience showed me is to never say that thing is better than 
another one before doing some benchmarks.
As what we supposed with Yaws (don't miss understand me, I like and use 
Yaws at work, at home , anywhere ;-) ) the first time we've use it, Zeus 
WS is 3/2 times faster on static/dynamic content (our production web 
server is about 10 times faster).

Did you really play with memcached before?
It's incredibly fast and reliable piece of code.

cheers
Younès


> Regards,
> Yariv
>
>
> On 10/23/06, Yerl <> wrote:
>>
>>  Hi There!
>>  I disagree too Yariv.
>>  In this case, what just don't use the best cache available: memcached
>>  (http://www.danga.com/memcached/) instead of Mnesia.
>>  memcahched = cache
>> MySQL + memcahched = database + cache = "easy, and everyone need to 
>> do it"
>>
>>  cheers
>>  Younès
>>
>>
>>  Yariv Sadan a écrit :
>>  On 10/22/06, Pat e <> wrote:
>>
>>
>>  BTW
>> After all is it wise to gamble (i know all of you will say it isn't :)
>> a site reputation and speed when all Mnesia sh#t blows up into your
>> face... but we need real time, and that is where Mnesia it seems
>> shines!
>> Why real time... well lets say you want AJAX tech implemented for all
>> future 5 million users, with all of them contacting each other RT, and
>> not have single glitch in delivery time and reliability (well
>> something like big phone switch operator), and also have for the ease
>> of use (LOL :) have user data on Mnesia disk tables ;)
>>
>>  I disagree :)
>>
>> I know what you're thinking:
>>
>> MySQL = database
>> Mnesia = database
>> MySQL + Mnesia = 2 databases = SCARY
>>
>> However, this changes greatly when you change your thinking so that
>>
>> Mnesia = cache
>> MySQL + Mnesia = database + cache = "easy, and everyone is doing it"
>>
>> (in fact, I believe I've heard of some popular hack called memcachd, 
>> no ? :)
>> )
>>
>> To build your app, all you need besides MySQL is one Mnesia table that
>> holds {Node, UserId} tuples. When user A send tries to send a message
>> to user B, you look up the tuple where UserId == B and then you go
>>
>> Node ! {msg, A, B, Msg}
>>
>> That's it. If you want to render HTML pages that display large amounts
>> of data such as user profiles, etc, you user ErlyDB to write the
>> horriby complex expression
>>
>> user:find_id(17)
>>
>> That's all there is to it.
>>
>> At least, that's my take on the problem (without knowing much about
>> what the problem is) :)
>>
>>
>>
>>
>>
>>  I know I'm boring, and that you talked about it many times, but if you
>> don't try - you don't fly (and if you fly, you can also dive easily
>> :=).
>>
>>  And if you are going to fly, use a plane instead of hacking yourself a
>> pair of wings :)
>>
>> BR
>> Yariv
>> _______________________________________________
>> erlang-questions mailing list
>> 
>> http://www.erlang.org/mailman/listinfo/erlang-questions
>>
>>
>>
>>
>>
>
>




More information about the erlang-questions mailing list