It's an interesting idea, and it touches on the broader question of
whether Erlang + Mnesia is a better solution than memcached even for
sites that aren't built with ErlyWeb (hey, nobody's perfect :) ).
Memcached has proven itself for Facebook and LiveJournal, whereas
Mnesia has proven itself in telcom applications, which aren't exactly
in the same space as webapps but are even more demanding in terms of
performance and reliability. It would be interesting to see some
benchmarks and hear some war stories. I've heard from some companies
that have switched whatever they were using to Erlang and gotten
significant (many orders of magnitude) performance gains, but not much
is published on this topic..

Yariv


On Jan 16, 2008 7:51 AM, Itai Zukerman <[EMAIL PROTECTED]> wrote:
>
> > A PHP presentation tier talking to an Erlang web service for its data?
> > Reimplementing PHP in Erlang? Compiling PHP to Erlang? What are the
> > benefits? Et c. :)
>
> I'm thinking of a PHP extention to turn PHP into an Erlang "C-node",
> and then use Erlang to manage persistent data, communication, etc.
> Basically what Yariv does, but with a PHP front-end.
>
> So PHP would look like this:
>
>   $pid = erl_self();
>   erl_send( "[EMAIL PROTECTED]", "{~p,get_user_info,~d}", $pid, $userId );
>   list( $i, $term ) = erl_receive( "{ok,UserName,UserAge}", "{error,Why}" );
>   switch( $i ) {
>     case 0:
>       list( $name, $age ) = erl_extract( $term );
>       ...
>     case 1:
>       list( $why ) = erl_extract( $term );
>       echo( "error: $why" );
>       ...
>   }
>
> I'm a bit unsure about the best way to pull the data out of the Erlang
> terms.  I've only skimmed through the erl_interface docs.
>
> Why?  Because although I haven't tried it, yet, I suspect Erlang would
> make a better, more stable and scalable back-end than a memcache+Java
> combination.  And you need PHP because, well, it's so popular.
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to "Bay Area Functional 
Programmers"  
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/bayfp?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to