<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EstiloCorreo17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:70.85pt 3.0cm 70.85pt 3.0cm;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=ES link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><span lang=EN-US>Hi all, <o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>

<p class=MsoNormal><span lang=EN-US>Let’s say that we want to protect
some exported function from the outside world but namespace, application or
node, like the <b><i>internal</i></b> keyword in C#.<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>Some times I presented this problem, for
example I use the Jinterface, but in the clients in C# or Java, the client must
know<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>the Erlang node cookie to connect to it, so
that is the first violation of the security, because we can do wherever we want
with the node in the server, like accessing to the database and to finish the
server node as we like.<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>So if I have this function that I want it to
be public to all the application modules in Erlang<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>To be called from some modules, but I won’t
it to can be called from the outside world like clients using Jinterface. For
example<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>

<p class=MsoNormal><b><i><span lang=EN-US>In node1 in the Erlang server.<o:p></o:p></span></i></b></p>

<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>

<p class=MsoNormal><span lang=EN-US>-module(server_interface).<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>-export([ send_to_all/1 ]).<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>

<p class=MsoNormal><span lang=EN-US>send_to_all(Msg)-><o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>        …<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>

<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>

<p class=MsoNormal><span lang=EN-US>-module(other).<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>-compile(export_all).<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>

<p class=MsoNormal><span lang=EN-US>another_fun()-><o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>        Msg = …<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>        …<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>        send_to_all(Msg),<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>        …<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>

<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>

<p class=MsoNormal><span lang=EN-US>So what I want is that from the another
node we can not do<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>

<p class=MsoNormal><b><i><span lang=EN-US>In node2 or JInterface simulated node.<o:p></o:p></span></i></b></p>

<p class=MsoNormal><b><i><span lang=EN-US><o:p> </o:p></span></i></b></p>

<p class=MsoNormal><span lang=EN-US>rpc:call(node1, server_interface,
send_to_all, [“Hello!”]).<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>

<p class=MsoNormal><span lang=EN-US>I mean, to export funs local to node or
application.<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>

<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>

<p class=MsoNormal><span lang=EN-US>NOTE: to resolve this problem I can create
a fun with a long atom parameter as a cookie but that shall be ugly I think.<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>

<p class=MsoNormal><span lang=EN-US>send_to_all(aksjdgaskjgfksdjfbdfdsf_34tiuh78vbif
4h, Msg)-><o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>        …<o:p></o:p></span></p>

</div>

<br>=======================================================================<br>
Este mensaje ha sido enviado mediante el servicio de correo electrónico que ofrece la Federación de Radioaficionados de Cuba a sus miembros para respaldar el cumplimiento de los objetivos de la organización y su política informativa. La persona que envía este correo asume el compromiso de  usar el servicio a tales fines y cumplir con las regulaciones establecidas.<br>
</body>

</html>