> 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