What’s New in the Cloud

Wolfram Technology Conference 2021

Jan Poeschko
Director of Wolfram Cloud Engineering

The Wolfram Cloud

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

Integrate[2021/(10-x^13),x]//Numerator

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

CloudPublish[manipulate,"mymanipulate"]

New editing features in cloud notebooks

TeX input (Ctrl+4)

Similar: InputForm-based input (Ctrl+⇧+1)

Convert to StandardForm (Win: Alt+Ctrl+N, Mac: Ctrl+⇧+N)

New hyperlink UI (Win: Ctrl+⇧+H, Mac: ⌘+⇧+H)

some anchor text

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

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

Video in the Cloud

v=Video["https://exampledata.wolfram.com/agent327.mp4"]

Information[v]

obj=CopyFile[URL["https://exampledata.wolfram.com/agent327.mp4"],CloudObject["myvideo.mp4"]]

Video[obj]

Related talks

“Video Processing & Analysis” by Shadi Ashnai
“Video Generation” by Carlo Giacometti

System Modeling in the Cloud

model=SystemModel["IntroductoryExamples.MultiDomain.DCMotor"]

model["Summary"]

sim=SystemModelSimulate[,1,<|"ParameterValues"->{"sineVoltage1.offset"->Range[5]}|>];

SystemModelPlot[sim,{"sineVoltage1.v"}]

Related talks

“New in System Modeler” by Jan Brugard
"Automated Workflows for System Modeling and Controller Design" by Sergio Vargas & Suba Thomas

New CloudExpression implementation

ce=CreateCloudExpression[{"a","b","c"},"myexpr"]

AppendTo[ce,"d"]

ce[4]

Get[ce]

Efficient granular part extraction and updates for lists and associations

Atomic mutations

Backed by PostgreSQL database

Update announcement on Community:
https://wolfr.am/Z9Rwbjse

Embedding notebooks and external notebooks

Seamlessly embed notebooks on websites

wolfr.am/notebookembedder

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

New: Notebooks given by URL or expression

https://www.wolframcloud.com/view?url=https://dataverse.scholarsportal.info/api/access/datafile/152530

https://www.wolframcloud.com/view?expr=Notebook%5B%7BCell%5B%22hello%20world%22%2C%20%22Text%22%5D%7D%5D

In the Wolfram Notebook Embedder:

WolframNotebookEmbedder.embed({
  cloudBase: "https://www.wolframcloud.com",
  url: "https://raw.githubusercontent.com/WolframResearch/COVID-19/master/Computational-Essays/COVID-19-Visualizing-Epidemic-Data.nb"
}, container);

Cloud support status

WolframLanguageData["Plot","CloudSupportStatus"]

WolframLanguageData["RunProcess","CloudSupportStatus"]

WolframLanguageData["RunProcess","CloudSupportNotes"]

Notebook features: wolfr.am/CloudNotebooksImplementationNotes

Release notes: wolframcloud.com/obj/release-notes/

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

Other news

Performance improvements

Accessibility

Spam protection in FormFunction (FormProtectionMethod)

Support for Single Sign-On (SSO)

Cloud Basic: Files expire after 60 days of creation

Summary

TeX input and other typesetting input methods

New hyperlink UI

Native Graphics (WIP)

Video, System Modeling, CloudExpression

External notebooks based on URL or expression

WolframLanguageData, “CloudSupportStatus”

Containerized architecture (WIP)

Thank you! Questions?

Jan Poeschko
@poeschko
jpoeschko@wolfram.com

Office Hours

“Office Hour: Wolfram Cloud”
“Office Hour: The Notebook Front End”
“Office Hour: System Modeling”

Setup and utilities

URLEncode[ToString[Notebook[{Cell["hello world","Text"]}],InputForm]]