Pony - GitHub Pageswonks.github.io/slides/kent-october-20-2017.pdfOther bullets about Pony (from a...
Transcript of Pony - GitHub Pageswonks.github.io/slides/kent-october-20-2017.pdfOther bullets about Pony (from a...
Disclaimer!
Mostofthecontentoftheseslidesisfrom
• DenyCapabilitiesforFast,SafeActors(byClebsch,Drossopoulou,Blessing,andMcNeil)
• AblogpostbyAdrianColyer onthatpaper(https://blog.acolyer.org/2016/02/17/deny-capabilities/)
Checkthoseoutformoreinfo!
Ponyisanopen-source,object-oriented,actor-model,capabilities-secure,high-performanceprogramminglanguage
Ponydescribesitselfas
• Typesafe• Memorysafe• Exceptionsafe• Data-racefree• Deadlockfree• Nativecodecompiled• CompatiblewithC
OtherbulletsaboutPony(fromapodcastinJuly):
• Ponyhasnolocks!• ScalesfromaRaspberryPithrougha64corehalfterabytemachinetoa4096coreSGIbeast• Actorshave256-byteoverhead,socreatinghundredsofthousandsofactorsispossible• ActorsGCtheirownheaps– noglobalstop-the-worldpauses• Becausethetypesystemisdata-racefree,it’simpossibletohave[manycommon]concurrencyproblemsinPony
referenceoftype‘S’withcapability‘k’
apossibly“unaliased”type
Referencecapabilities(i.e.denyproperties)
iso:Isolatedreferencesformstaticregions:mutablereferencesreachableviatheiso referencecanonlybereachedviatheiso reference,andimmutablereferencesreachableviatheisoreferenceareeithergloballyimmutableoronlyreachableviatheiso reference.
Imageanddescriptionsborrowedfromhttps://blog.acolyer.org/2016/02/17/deny-capabilities/
trn:allowsanobjecttobewrittentoonlyviathetrn reference,butreadfromviaotheraliasesheldbythesameactor.Thisallowstheobjecttobemutablewhilestillallowingittotransitiontoanimmutablereferencecapabilityinthefuture,inordertoshareitwithanotheractor.
Imageanddescriptionsborrowedfromhttps://blog.acolyer.org/2016/02/17/deny-capabilities/
Imageanddescriptionsborrowedfromhttps://blog.acolyer.org/2016/02/17/deny-capabilities/
ref:arefvariablecanbeusedtoreadandwritetheobjectwithinanactor,andothervariableswithinthesameactorcanalsobeusedtoreadandwritetheobject,butaccess(bothreadandwrite)isdeniedtoanyother(global)actor.
val:aval variableisabitlikeconst,itdenotesavariablethatisgloballyimmutable– itdenieswritecapabilitiesbothlocallyandglobally(andhencebyimplication,allowsreadingfromanywhere).
Imageanddescriptionsborrowedfromhttps://blog.acolyer.org/2016/02/17/deny-capabilities/
box:aboxvariabledeniesanyotheractors(globalactors)therighttouseavariabletowritetotheobject.Othervariableswithinthesameactormaybeusedtowritetotheobject,andotheractorsmaybeabletoreadit(butnotboth).
Imageanddescriptionsborrowedfromhttps://blog.acolyer.org/2016/02/17/deny-capabilities/
tag:wecanaliasatag(passitasaparameter,assignittoothertagvariables),andwecanalsoinvokebehaviorsonit.
(i.e.tosendmessagestoanotheranotheractor,youonlyneedatagreferencetoit)
Note!Atagreferenceisopaque,i.e.wecanonlyinvokebehaviorsorcompareforidentityequality.
Imageanddescriptionsborrowedfromhttps://blog.acolyer.org/2016/02/17/deny-capabilities/
Recall-- Ponyis
• Data-racefree• Deadlockfree(i.e.nolocksinruntime)• GC’d withnoglobalstop-the-worldpauses(sinceactorsGCtheirownheaps)
Madepossiblebyreferencecapabilities
Ponytoday?
• Version0.20.0(breakingchangesoccuroccasionally)• OneofthePonyteammembersisVPofEngineeringatWallaroo Labs,wheretheyusePonydaily.• Underactivedevelopment(e.g.generalizedruntime backpressureisafeaturecurrentlybeingworkedon)