State of the Wolfram Cloud

John Pacey
Director of Cloud Development – Wolfram Research

(RowDefault[, (Spacer1), , (Spacer1), ])  #WolframTechConf

ABSTRACT

After a general introduction to the Wolfram Cloud, we’ll talk about what’s new in the world of cloud notebooks and beyond. We’ll give a short demo of improved rendering support for W|A notebooks along with a sneak peak at some new upcoming features.  We’ll also give a brief update at the ongoing “containerization” of the cloud architecture, which will be particularly interesting for Wolfram Enterprise Private Cloud (EPC)

The Wolfram Cloud

www.wolframcloud.com

Work with notebooks and write WL code in a web browser

Share interactive notebooks with others

Deploy applications written in Wolfram Language

Working with notebooks

Expand[(1+x)^100]

manipulate=Manipulate[Plot[Cos[a x+b],{x,0,6}],{{a,2,"Multiplier"},1,4},{{b,0,"Phase Parameter"},0,10}]

CloudPublish[manipulate,"mymanipulate"]

Working with deployed content

CloudDeploy[APIFunction[{"x"->"Integer"},FactorInteger[#x]&]]

CloudDeploy[
FormFunction[
"Input" -> <|"Input" -> "Hello World!", "Label" ->None|>, 
SpeechSynthesize[#Input]&, 
AppearanceRules-><|
"Title"->"Text to Speech",
"Description" -> "Write to me, I'll speak to you!"
|>
], "WolframSpeak"
]

CloudDeploy[APIFunction[
"choices" -> DelimitedSequence["String"],
HTTPRedirect @ First @ CloudDeploy[FormFunction["choices" -> #choices, Identity]] &
],"ChoicesFormAPI"]

CloudDeploy[
APIFunction[
{"name" -> "String"},
HTTPResponse[XMLTemplate["<h1>Hello <wolfram:slot/></h1>"][#name]] &
]
,"Greetings"]

Embedding notebooks

Seamlessly embed notebooks on websites

https://wolfr.am/notebookembedder

WolframNotebookEmbedder.embed(
  "https://www.wolframcloud.com/obj/jpoeschko/Public/Example.nb",
   container);

Building applications

A few examples of Wolfram sites built using the Wolfram Cloud

Wolfram Community

Wolfram Data Drop

Wolfram Function Repository

Wolfram U

W|A Notebooks in the cloud

Improved support for rendering of Wolfram|Alpha notebooks

https://www.wolframcloud.com/env/jpacey/WANEIntroExamples.nb

Upcoming new feature: Deployed view editing

Allows users to start evaluating and editing their own copy of a notebook right away. The changed file can then be saved by the user as desired.

Built as a feature of cloud notebooks, so it “just works” everywhere, including in embedded notebooks.

WIP: Container architecture

Improved user isolation, eventually allowing user-provided binaries

Wolfram Enterprise Private Cloud (EPC)

More robust and fully scalable

Shipped as Helm chart + container images

Runs on Kubernetes (Amazon EKS, Azure AKS, on-premises, …)

Also still packaged as VM if desired

WIP: Native Graphics

grid[c_]:={Table[Line[{{n,0},{3n,1}},VertexColors->{c,GrayLevel[1,0]}],{n,-5,5,.1}],Table[{Blend[{c,GrayLevel[1,0]},n],Line[{{-1,n},{1,n}}]},{n,0,1,.05}]};
neonLines=Graphics[{
AbsoluteThickness[5],grid[Hue[0.82,1,0.5]],
AbsoluteThickness[3],grid[Hue[0.82,1,1]],
AbsoluteThickness[1],grid[White]
},AspectRatio->1,PlotRange->{{-1,1},{0,1}},Background->Black,ImageSize->Medium];

mesh=With[{n=30},Graphics[GeometricTransformation[Line[{{#,0},{0,n-#}}]&/@Table[x,{x,1,n}],RotationTransform/@(Pi{0,.5,1,1.5})],ImageSize->Medium]];

glowCircles=Graphics[{FaceForm[{Hue[0.2],Opacity[0.3]}],EdgeForm[{Thick,Hue[0.2],Opacity[0.5]}],Table[Disk[{0,0},n/10],{n,10}]},Background->Black,ImageSize->Medium];


f[n_]:={n*Cos[n],n*Sin[n]};
c[n_]:=Directive[ColorData["SolarColors"][1-n],Opacity[1.4-n]];
spiral=With[{step=0.1,max=15Pi},Graphics[{
PointSize[Large],
Point[
Table[f[n],{n,0,max,step}],
VertexColors->Table[c[n/max],{n,0,max,step}]
]
}
,Background->Black
,PlotRangePadding->Scaled[0.1]
,ImageSize->Medium
]];

Grid[{{mesh,glowCircles},{spiral,neonLines}}]

cloudLogo[center_,radius_]:=With[{
innerStarShortScale=1/E,innerStarLongScale=1/GoldenRatio,
outerStarShortScale=0.674,outerStarLongScale=1
},{
AbsoluteThickness[radius*12],

(* Central spikes *)
Line[Table[{center,center+innerStarShortScale*radius*{Cos[θ],Sin[θ]}},{θ,Pi/2,2Pi+Pi/2,2Pi/5}]],

(* Inner star *)
Line[Table[
center+If[EvenQ[n],innerStarShortScale,innerStarLongScale]*radius*{Cos[n*2Pi/10+Pi/2],Sin[n*2Pi/10+Pi/2]}
,{n,0,10,1}]],

(* Outer star *)
Line[Table[
center+If[EvenQ[n],outerStarShortScale,outerStarLongScale]*radius*{Cos[n*2Pi/20],Sin[n*2Pi/20]}
,{n,0,20,1}]],

(* Peak-to-peak struts *)
CapForm["Butt"],
Line[Table[
{
center+innerStarLongScale*radius*{Cos[n*2Pi/5+3Pi/10],Sin[n*2Pi/5+3Pi/10]},
center+outerStarLongScale*radius*{Cos[n*2Pi/5+3Pi/10],Sin[n*2Pi/5+3Pi/10]}
}
,{n,0,5,1}]],

(* Trough-to-trough struts *)
Line[Table[
{
center+outerStarShortScale*radius*{Cos[n*2Pi/5+Pi/2-Pi/10],Sin[n*2Pi/5+Pi/2-Pi/10]},
center+innerStarShortScale*radius*{Cos[n*2Pi/5+Pi/2],Sin[n*2Pi/5+Pi/2]},
center+outerStarShortScale*radius*{Cos[n*2Pi/5+Pi/2+Pi/10],Sin[n*2Pi/5+Pi/2+Pi/10]}
}
,{n,0,5,1}]]
}];
cloudLogo[center_]:=cloudLogo[center,1];
cloudLogo[]:=cloudLogo[{0,0}];

With[{(*use a Taylor series to approximate Sin and Cos,since they are not supported in the client-side evaluator yet*)sinSeries=N[Normal[Series[Sin[#],{#,0,9}]]],
period=N[2Pi],threePeriod=N[3*2*Pi],halfPeriod=N[Pi]},
DynamicModule[{t=0,sin=Function[sinSeries]},
Column@{
Animator[Dynamic[t],{0,1},AppearanceElements->{"PlayPauseButton"},AnimationRunning->False],
Graphics[{
(* Data *)
{
Hue[0.6,0.5],Thickness[0.04],
Dashing[{0.01,0.02},Dynamic[-t]],
Line[{{1,0.7},{3,0.7}}],
Dashing[{0.01,0.02},Dynamic[t]],
Line[{{1,0.3},{3,0.3}}]
},

(* Monitor Body *)
GrayLevel[0.3],
Rectangle[{0,0},{4/3,1},RoundingRadius->0.1],
Rectangle[{4/3/2-0.1,-0.2},{4/3/2+0.1,0}],
Disk[{4/3/2,-0.21},{0.3,0.15},{0,Pi}],

(* Monitor Screen *)
White,Rectangle[{0,0}+{0.1,0.1},{4/3,1}-{0.1,0.1}],

(* Monitor Screen Content *)
{
(* Input cell *)
Black,
Line[#-{0.05,0.05}&/@{{0.2,0.8},{0.7,0.8}}],
Line[#-{0.05,0.05}&/@{{0.2,0.75},{0.6,0.75}}],

(* Top bar *)
{
RGBColor[{203,47,30}/255],Rectangle[{0.1,0.85},{0.15,0.9}],
GrayLevel[51/255],Rectangle[{0.15,0.85},{4/3-0.1,0.9}],
GrayLevel[229/255],Rectangle[{0.1,0.8},{4/3-0.1,0.85}]
},

(* Brackets *)
{
GrayLevel[179/255],
Line[#+{0.1,-0.05}&/@{{1.03,0.81},{1.05,0.81},{1.05,0.73},{1.03,0.73}}],
Line[#+{0.1,-0.05}&/@{{1.07,0.81},{1.09,0.81},{1.09,0.39},{1.07,0.39}}],
Line[#+{0.1,-0.16}&/@{{1.03,0.81},{1.05,0.81},{1.05,0.5},{1.03,0.5}}]
},

(* Plot *)
{
Thickness[0.004],Hue[0.4,1,0.6],
Dashing[{0.5,1},Dynamic[0.5*(1-t)]],
Line[Table[{x,2Sin[x]}/15+{0.15,0.5},{x,0,2Pi,0.01}]]
}
},

(* Cloud *)
{
{EdgeForm[{Thickness[0.007],Black}],White,Disk[{3.5,0.4},Dynamic[0.7416407864998737-0.02*sin[Mod[threePeriod*t,period]-halfPeriod]]]},
{RGBColor[{225,18,11}/255],cloudLogo[{3.5,0.4},1/GoldenRatio]}
}
},ImageSize->{576,236},PlotRange->{{0,4.4},{-0.5,1.3}}]},UnsavedVariables->{t}]]

Related talk following this one

“The State of Graphics in the Cloud” by Matthew Adams

Other news

Adding support for CloudObjects in all Wolfram Language File related functions

Stability and Performance improvements

General kernel stability and improved notification on when and why a kernel dies

Particular focus on performance of Dynamics in deployed notebooks

Additional Input Assistants

Accessibility

Summary

W|A Notebooks in the cloud

Deployed view editing of notebooks for unauthenticated or authenticated users

Accessibility improvements

Continued integration and support of CloudObjects in File functions

Stability and performance improvements are key priorities

Native Graphics (WIP)

Containerized architecture (WIP)

Thank you! Questions?

John Pacey
jpacey@wolfram.com

Additional presentations

“State of Graphics in the Cloud”

Office Hours

“Office Hour: Wolfram Cloud”