SlideShare una empresa de Scribd logo
1 de 16
ErlHive Safe Erlang Reloaded An angle on community web development Ulf Wiger, Ericsson AB
The Goal ,[object Object],[object Object],[object Object],[object Object]
The Frustration ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
The Tuple Store ,[object Object],[object Object],[object Object],[object Object],[object Object],Authentication, etc. tuple store DB HTTP
Stored modules extend the vision Authentication, etc. erlhive DB Public code and data Private code and data Safe, web-based community web application development User A User E
Back-end Concepts ,[object Object],[object Object],[object Object]
Classes of Variable ,[object Object],[object Object],[object Object],[object Object]
Access control ,[object Object],[object Object],In the public area: Read/call Read/write/delete/call Modules Append Append/read/delete Streams Read Read/write/delete Scalars & arrays Other Users Owner
Safe code execution ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Code example -module(ex3_joe). -export([f/0]). f() ->   [{’?MODULE’, ?MODULE},   ...,   {ex3_pub,  erlhive.ulf.ex3_pub:f() }]. -module(ex3_pub). -export([f/0]). f() ->   [{’?MODULE’, ?MODULE},   {time, calendar:universal_time()},   {caller,  erlhive.user:caller() },   {from_module,  erlhive.user:from_module() },   {owner,  erlhive.user:owner() },   {ex3_priv,  ex3_priv:f() }]. -module(ex3_priv). -export([f/0]). f() ->   [{’?MODULE’, ?MODULE},   ...]. Owned by user <<”ulf”>> Owned by user <<”joe”>> 1> erlhive:with_user(   <<”ulf”>>,   fun(M) ->   M:set_variable(ex3_pub, [{class, module},{area, public}]),   M:store_module(ex3_pub, ”-module(ex3_pub)....”)   end).
Code example -module(ex3_joe). -export([f/0]). f() ->   [{’?MODULE’, ?MODULE},   ...,   {ex3_pub,  erlhive.ulf.ex3_pub:f() }]. -module(ex3_pub). -export([f/0]). f() ->   [{’?MODULE’, ?MODULE},   {time, calendar:universal_time()},   {caller,  erlhive.user:caller() },   {from_module,  erlhive.user:from_module() },   {owner,  erlhive.user:owner() },   {ex3_priv,  ex3_priv:f() }]. -module(ex3_priv). -export([f/0]). f() ->   [{’?MODULE’, ?MODULE},   ...]. Package syntax for calling other users’ modules ” Meta functions” for introspection
Execution -module(ex3_joe). -export([f/0]). f() ->   [{’?MODULE’, ?MODULE},   ...,   {ex3_pub,  erlhive.ulf.ex3_pub:f() }]. -module(ex3_pub). -export([f/0]). f() ->   [{’?MODULE’, ?MODULE},   {time, calendar:universal_time()},   {caller,  erlhive.user:caller() },   {from_module,  erlhive.user:from_module() },   {owner,  erlhive.user:owner() },   {ex3_priv,  ex3_priv:f() }]. -module(ex3_priv). -export([f/0]). f() ->   [{’?MODULE’, ?MODULE},   ...]. 2> erlhive:with_user(   <<”joe”>>,   fun(M) ->   M:apply(erlhive.joe.ex3_joe, f, [])   end). [{’?MODULE’, ’erlhive.joe.ex3_joe’},  {caller, <<”joe”>>},  {from_module, ’erlhive.user’},  {owner, <<”joe”>>},  {ex3_pub, [{’?MODULE’, ’erlhive.ulf.ex3_pub’},   {time, {{2006,11,9},{16,53,17}},    {caller, <<”joe”>>},   {owner, <<”ulf”>>},   {ex3_priv, [{’?MODULE’, ’erlhive.ulf.ex3_priv’},   {caller, <<”ulf”>>},   {from_module, ’erlhive.ulf.ex3_pub’},   {owner, <<”ulf”>>}]}]}]
Execution -module(ex3_joe). -export([f/0]). f() ->   [{’?MODULE’, ?MODULE},   ...,   {ex3_pub,  erlhive.ulf.ex3_pub:f() }]. -module(ex3_pub). -export([f/0]). f() ->   [{’?MODULE’, ?MODULE},   {caller,  erlhive.user:caller() },   {from_module,  erlhive.user:from_module() },   {owner,  erlhive.user:owner() },   {ex3_priv,  ex3_priv:f() }]. -module(ex3_priv). -export([f/0]). f() ->   [{’?MODULE’, ?MODULE},   ...]. 2> erlhive:with_user(   <<”joe”>>,   fun(M) ->   M:apply(erlhive.ulf.ex3_priv, f, [])   end). ** exited: {aborted, {{undef,[{{’erlhive.ulf.ex3_priv’,   <<”joe”>>,   ’erlhive.user’}, f, 0},   {erlhive,with_watchdog,1},   ...]}, ...} Cannot call another user’s private modules. Restricted calls appear as undefs.
Profiling -module(ex3_joe). -export([f/0]). f() ->   [{’?MODULE’, ?MODULE},   ...,   {ex3_pub,  erlhive.ulf.ex3_pub:f() }]. -module(ex3_pub). -export([f/0]). f() ->   [{’?MODULE’, ?MODULE},   {caller,  erlhive.user:caller() },   {from_module,  erlhive.user:from_module() },   {owner,  erlhive.user:owner() },   {ex3_priv,  ex3_priv:f() }]. -module(ex3_priv). -export([f/0]). f() ->   [{’?MODULE’, ?MODULE},   ...]. 2> erlhive:profile(   <<”joe”>>,   fun(M) ->   M:apply(ex3_joe, f, [])   end). { [{’?MODULE’,’erlhive.joe.ex3_joe’},   ...], [{trace,<0.403.0>,call,{erlhive_user,apply,4}},  {trace,<0.403.0>,call,{’erlhive.joe.ex3_joe’,f,1}},  {trace,<0.403.0>,call,{’erlhive.ulf.ex3_pub’,f,1}},  {trace,<0.403.0>,return_to,{’erlhive.ulf.ex3_pub’,f,1}},  {trace ,<0.403.0>,return_to,{’erlhive.ulf.ex3_pub’,f,1}}]} A censored call trace. Can be followed by a specific trace on ’visible’ modules. (work in progress...)
Status ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Questions?

Más contenido relacionado

Similar a ErlHive Safe Erlang Reloaded

Re-Design with Elixir/OTP
Re-Design with Elixir/OTPRe-Design with Elixir/OTP
Re-Design with Elixir/OTPMustafa TURAN
 
Unbundling the JavaScript module bundler - Road to Coderful
Unbundling the JavaScript module bundler - Road to CoderfulUnbundling the JavaScript module bundler - Road to Coderful
Unbundling the JavaScript module bundler - Road to CoderfulLuciano Mammino
 
Unbundling the JavaScript module bundler - DublinJS July 2018
Unbundling the JavaScript module bundler - DublinJS July 2018Unbundling the JavaScript module bundler - DublinJS July 2018
Unbundling the JavaScript module bundler - DublinJS July 2018Luciano Mammino
 
Global objects in Node.pdf
Global objects in Node.pdfGlobal objects in Node.pdf
Global objects in Node.pdfSudhanshiBakre1
 
Hooks and Events in Drupal 8
Hooks and Events in Drupal 8Hooks and Events in Drupal 8
Hooks and Events in Drupal 8Nida Ismail Shah
 
Introduction And Basics of Modules in Drupal 7
Introduction And Basics of Modules in Drupal 7 Introduction And Basics of Modules in Drupal 7
Introduction And Basics of Modules in Drupal 7 Dhinakaran Mani
 
Mageguru - magento custom module development
Mageguru -  magento custom module development Mageguru -  magento custom module development
Mageguru - magento custom module development Mage Guru
 
Mastering Python lesson 4_functions_parameters_arguments
Mastering Python lesson 4_functions_parameters_argumentsMastering Python lesson 4_functions_parameters_arguments
Mastering Python lesson 4_functions_parameters_argumentsRuth Marvin
 
OOP in C#
OOP in C#OOP in C#
OOP in C#DevMix
 
INTRODUCTION TO OBJECT ORIENTED PROGRAMMING.pptx
INTRODUCTION TO OBJECT ORIENTED PROGRAMMING.pptxINTRODUCTION TO OBJECT ORIENTED PROGRAMMING.pptx
INTRODUCTION TO OBJECT ORIENTED PROGRAMMING.pptxDeepasCSE
 
Java - A broad introduction
Java - A broad introductionJava - A broad introduction
Java - A broad introductionBirol Efe
 

Similar a ErlHive Safe Erlang Reloaded (20)

Re-Design with Elixir/OTP
Re-Design with Elixir/OTPRe-Design with Elixir/OTP
Re-Design with Elixir/OTP
 
Alfredo-PUMEX
Alfredo-PUMEXAlfredo-PUMEX
Alfredo-PUMEX
 
Alfredo-PUMEX
Alfredo-PUMEXAlfredo-PUMEX
Alfredo-PUMEX
 
Alfredo-PUMEX
Alfredo-PUMEXAlfredo-PUMEX
Alfredo-PUMEX
 
Alfredo-PUMEX
Alfredo-PUMEXAlfredo-PUMEX
Alfredo-PUMEX
 
Django Good Practices
Django Good PracticesDjango Good Practices
Django Good Practices
 
Unbundling the JavaScript module bundler - Road to Coderful
Unbundling the JavaScript module bundler - Road to CoderfulUnbundling the JavaScript module bundler - Road to Coderful
Unbundling the JavaScript module bundler - Road to Coderful
 
Unbundling the JavaScript module bundler - DublinJS July 2018
Unbundling the JavaScript module bundler - DublinJS July 2018Unbundling the JavaScript module bundler - DublinJS July 2018
Unbundling the JavaScript module bundler - DublinJS July 2018
 
Getting modular with OSGI
Getting modular with OSGIGetting modular with OSGI
Getting modular with OSGI
 
Global objects in Node.pdf
Global objects in Node.pdfGlobal objects in Node.pdf
Global objects in Node.pdf
 
Hooks and Events in Drupal 8
Hooks and Events in Drupal 8Hooks and Events in Drupal 8
Hooks and Events in Drupal 8
 
Requiring your own files.pptx
Requiring your own files.pptxRequiring your own files.pptx
Requiring your own files.pptx
 
Introduction And Basics of Modules in Drupal 7
Introduction And Basics of Modules in Drupal 7 Introduction And Basics of Modules in Drupal 7
Introduction And Basics of Modules in Drupal 7
 
Mageguru - magento custom module development
Mageguru -  magento custom module development Mageguru -  magento custom module development
Mageguru - magento custom module development
 
Mastering Python lesson 4_functions_parameters_arguments
Mastering Python lesson 4_functions_parameters_argumentsMastering Python lesson 4_functions_parameters_arguments
Mastering Python lesson 4_functions_parameters_arguments
 
OOP in C#
OOP in C#OOP in C#
OOP in C#
 
INTRODUCTION TO OBJECT ORIENTED PROGRAMMING.pptx
INTRODUCTION TO OBJECT ORIENTED PROGRAMMING.pptxINTRODUCTION TO OBJECT ORIENTED PROGRAMMING.pptx
INTRODUCTION TO OBJECT ORIENTED PROGRAMMING.pptx
 
Java - A broad introduction
Java - A broad introductionJava - A broad introduction
Java - A broad introduction
 
Drupal 8 Hooks
Drupal 8 HooksDrupal 8 Hooks
Drupal 8 Hooks
 
Java 7: Quo vadis?
Java 7: Quo vadis?Java 7: Quo vadis?
Java 7: Quo vadis?
 

Último

Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 

Último (20)

Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 

ErlHive Safe Erlang Reloaded

  • 1. ErlHive Safe Erlang Reloaded An angle on community web development Ulf Wiger, Ericsson AB
  • 2.
  • 3.
  • 4.
  • 5. Stored modules extend the vision Authentication, etc. erlhive DB Public code and data Private code and data Safe, web-based community web application development User A User E
  • 6.
  • 7.
  • 8.
  • 9.
  • 10. Code example -module(ex3_joe). -export([f/0]). f() -> [{’?MODULE’, ?MODULE}, ..., {ex3_pub, erlhive.ulf.ex3_pub:f() }]. -module(ex3_pub). -export([f/0]). f() -> [{’?MODULE’, ?MODULE}, {time, calendar:universal_time()}, {caller, erlhive.user:caller() }, {from_module, erlhive.user:from_module() }, {owner, erlhive.user:owner() }, {ex3_priv, ex3_priv:f() }]. -module(ex3_priv). -export([f/0]). f() -> [{’?MODULE’, ?MODULE}, ...]. Owned by user <<”ulf”>> Owned by user <<”joe”>> 1> erlhive:with_user( <<”ulf”>>, fun(M) -> M:set_variable(ex3_pub, [{class, module},{area, public}]), M:store_module(ex3_pub, ”-module(ex3_pub)....”) end).
  • 11. Code example -module(ex3_joe). -export([f/0]). f() -> [{’?MODULE’, ?MODULE}, ..., {ex3_pub, erlhive.ulf.ex3_pub:f() }]. -module(ex3_pub). -export([f/0]). f() -> [{’?MODULE’, ?MODULE}, {time, calendar:universal_time()}, {caller, erlhive.user:caller() }, {from_module, erlhive.user:from_module() }, {owner, erlhive.user:owner() }, {ex3_priv, ex3_priv:f() }]. -module(ex3_priv). -export([f/0]). f() -> [{’?MODULE’, ?MODULE}, ...]. Package syntax for calling other users’ modules ” Meta functions” for introspection
  • 12. Execution -module(ex3_joe). -export([f/0]). f() -> [{’?MODULE’, ?MODULE}, ..., {ex3_pub, erlhive.ulf.ex3_pub:f() }]. -module(ex3_pub). -export([f/0]). f() -> [{’?MODULE’, ?MODULE}, {time, calendar:universal_time()}, {caller, erlhive.user:caller() }, {from_module, erlhive.user:from_module() }, {owner, erlhive.user:owner() }, {ex3_priv, ex3_priv:f() }]. -module(ex3_priv). -export([f/0]). f() -> [{’?MODULE’, ?MODULE}, ...]. 2> erlhive:with_user( <<”joe”>>, fun(M) -> M:apply(erlhive.joe.ex3_joe, f, []) end). [{’?MODULE’, ’erlhive.joe.ex3_joe’}, {caller, <<”joe”>>}, {from_module, ’erlhive.user’}, {owner, <<”joe”>>}, {ex3_pub, [{’?MODULE’, ’erlhive.ulf.ex3_pub’}, {time, {{2006,11,9},{16,53,17}}, {caller, <<”joe”>>}, {owner, <<”ulf”>>}, {ex3_priv, [{’?MODULE’, ’erlhive.ulf.ex3_priv’}, {caller, <<”ulf”>>}, {from_module, ’erlhive.ulf.ex3_pub’}, {owner, <<”ulf”>>}]}]}]
  • 13. Execution -module(ex3_joe). -export([f/0]). f() -> [{’?MODULE’, ?MODULE}, ..., {ex3_pub, erlhive.ulf.ex3_pub:f() }]. -module(ex3_pub). -export([f/0]). f() -> [{’?MODULE’, ?MODULE}, {caller, erlhive.user:caller() }, {from_module, erlhive.user:from_module() }, {owner, erlhive.user:owner() }, {ex3_priv, ex3_priv:f() }]. -module(ex3_priv). -export([f/0]). f() -> [{’?MODULE’, ?MODULE}, ...]. 2> erlhive:with_user( <<”joe”>>, fun(M) -> M:apply(erlhive.ulf.ex3_priv, f, []) end). ** exited: {aborted, {{undef,[{{’erlhive.ulf.ex3_priv’, <<”joe”>>, ’erlhive.user’}, f, 0}, {erlhive,with_watchdog,1}, ...]}, ...} Cannot call another user’s private modules. Restricted calls appear as undefs.
  • 14. Profiling -module(ex3_joe). -export([f/0]). f() -> [{’?MODULE’, ?MODULE}, ..., {ex3_pub, erlhive.ulf.ex3_pub:f() }]. -module(ex3_pub). -export([f/0]). f() -> [{’?MODULE’, ?MODULE}, {caller, erlhive.user:caller() }, {from_module, erlhive.user:from_module() }, {owner, erlhive.user:owner() }, {ex3_priv, ex3_priv:f() }]. -module(ex3_priv). -export([f/0]). f() -> [{’?MODULE’, ?MODULE}, ...]. 2> erlhive:profile( <<”joe”>>, fun(M) -> M:apply(ex3_joe, f, []) end). { [{’?MODULE’,’erlhive.joe.ex3_joe’}, ...], [{trace,<0.403.0>,call,{erlhive_user,apply,4}}, {trace,<0.403.0>,call,{’erlhive.joe.ex3_joe’,f,1}}, {trace,<0.403.0>,call,{’erlhive.ulf.ex3_pub’,f,1}}, {trace,<0.403.0>,return_to,{’erlhive.ulf.ex3_pub’,f,1}}, {trace ,<0.403.0>,return_to,{’erlhive.ulf.ex3_pub’,f,1}}]} A censored call trace. Can be followed by a specific trace on ’visible’ modules. (work in progress...)
  • 15.