4 ms·
I'm always a sucker for parallel functional programming, but I could not find any details on how specifically it works (and importantly: performs) in Clio.
by Athas 7y ago
I'm always a sucker for parallel functional programming, but I could not find any details on how specifically it works (and importantly: performs) in Clio.
- garritfra 7y agoClio is still in early development. Right now, you are able to host a clio module with multiple workers: https://docs.clio-lang.org/learn/official-tutorial/hosting https://docs.clio-lang.org/learn/official-tutorial/hosting
- jchook 7y agoApparently it works by hosting HTTP or Websocket microservices and communicating between them via JSON. The .clio files transpile to JavaScript, and the project optimistically targets full JS interoperability (e.g. compatible with any of your favorite npm modules). Thanks to the portability of JSON, clio can import functions from any compatible microservice, including those written in other languages. For an example of this, see: https://github.com/clio-lang/python-microservice-example https://github.com/clio-lang/python-microservice-example Besides reading the tutorial, I found this source helpful to understanding how Clio knits the microservices together: https://github.com/clio-lang/clio/blob/develop/host/host.js https://github.com/clio-lang/clio/blob/develop/host/host.js
- vojta_letal 7y agoI'd like to see a thorough performance evaluation. JS/NPM based untyped language together with communication via HTTP/JSON sounds painfully inefficient.
- garritfra 7y agoWell, Microservices built with Node.js are just that :p Node's V8 engine is very fast
- jchook 7y agoIt seems Clio targets an AWS Lambda-style serverless infrastructure, having a network of short-lived, auto-scaling single-function instances, ideally leading to optimal resource utilization, hands-free administration, unlimited scalability, etc... but trading some performance.
- garritfra 7y agoThats one goal we're aiming for.