Cloud
Infrastructure from
Python Code
How far could we go?
Asher Sterkin
SVP Engineering, GM
● A Software Engineer since 1978
● SVP Engineering and GM @ BST LABS, BlackSwan Technologies
● Technology lead of the Cloud AI Operating System (CAIOS) project
● Contacts:
○ Linkedin: https://www.linkedin.com/in/asher-sterkin-10a1063
○ Twitter: https://www.twitter.com/asterkin
○ Email: asher.sterkin@gmail.com
○ Slideshare: https://www.slideshare.net/AsherSterkin
○ Medium: https://asher-sterkin.medium.com/
○ Mastodon: https://mastodon.social/@asterkin
○ Reddit: https://www.reddit.com/user/ashersterkin
○ Github: https://github.com/BstLabs
About Myself
Disclaimer
● I’m a senior manager of one of the IfC Products - CAIOS
● Best effort to avoid direct marketing against competitors
● It not an not official position of my employer BlackSwan Technologies
● Specific examples use CAIOS for illustration purposes only
● AWS icons usage is for illustration purposes only as well
“Infrastructure from Python Code” Mission
“Your Computer is Cloud”
Ease of use
Development
Deployment
Operation
Cost
Security
Reliability
Sustainability
PyIFC
Empowering mainstream Python programmers to develop, deploy, and operate
cost-effective, secure, reliable, and sustainable cloud software without a hassle
What’s the Problem?
IaC
SDK Engineering Silos
● Low level of abstraction
● Vendor-specific
● Complicated
● Error-, cost-, and security-prone
● Special technical knowledge
● Lot of coordination needed
● Far from core business
What About CDKs?
Don't solve the core problem anew – but rather,
wrap the same low-level abstractions in a
programming language
Raise the Level, Bridge the Gap
The Solution
The PyIfC Solution
PyIFC
Service Configuration
Logic” Template
Out Ports
Ports Binding
● Cost-effective
● Secure
● Reliable
● Sustainable
In Ports
Endpoint
Here, how could it look like
Warning: vendor-specific example
Pure Python Code
Build, release, run
service.py
service_config.py
module.py
build
module.py
function.py
stack.json
release <user-storage> run
<service-stack>
Based on port-to-resource binding specified in
configuration:
● Generate resource template descriptor(s)
● Incorporate resource-specific out port adaptors
to convert high-level application calls to
resource SDK calls
Warning: vendor-specific example
Live Demo …
One Inch Depth
Dive into PyIFC
Machinery
I
F
C
services vendors APIs location
acquire
configure
consume
operate
4 Pillars of the “Infrastructure From Code”
Service
Configuration
3 most important
things in
real-estate
business
1. Location
2. Location
3. Location
Deployment Location
Device gateway Edge location
Region
AWS Wavelength AWS Local Zone
AWS Outposts servers
Privacy
Latency
Aggregation
Flexibility
Operation cost
Sustainability!!!
PyIFC
Code
Computation Location
Endpoint Instance
Lambda function Application
AWS Step
Functions
workflow
Service
PyIFC
Cost
Flexibility
Available RAM
CPU/GPU power
Legacy
Sustainability !!!
Code
Batch EMR Crawler
Storage Location
Volume Bucket
File system Athena DB OpenSearch
Index
Redshift DB Table Aurora DB DocumentDB Neptune
QLDB
Keyspaces
MemoryDB
Timestream
ElastiCache
PyIFC
Volume
Durability
Access Time
Cost
Flexibility
Legacy
Sustainability !!! Kafka
Code
Messaging Channel
PyIFC
Volume
Durability
Latency
Throughput
Cost
Flexibility
Legacy
Sustainability!!!
Kafka
SNS SQS MQ SES Kinesis
Code
Optimizing deployment locations manually will become
increasingly challenging over time, as new technology options
emerge and add more variables to consider.
Where We Are Today
and Where Could We
Go?
IfC Technology Landscape
nitric
klotho
nitric
klotho
caios
nitric
klotho
vercel
modal
chalice
cloudflare ampt
nitric
klotho
cloudflare
cloudflare wing dark
nitric
klotho
vercel
encore
shuttle
frontend
core
backend
extensions
The Potential is Much Bigger
Application Logic
Core
Domain
C
l
o
u
d
S
e
r
v
i
c
e
A
d
a
p
t
e
r
s
C
l
o
u
d
S
e
r
v
i
c
e
A
d
a
p
t
e
r
s
I
n
t
e
r
n
e
t
S
e
r
v
i
c
e
A
d
a
p
t
e
r
s
I
n
t
e
r
n
e
t
S
e
r
v
i
c
e
A
d
a
p
t
e
r
s
Supportive
Subdomain
Internet
Services
Cloud Services
Generic
Subdomain
A
P
I
P
o
r
t
s
A
P
I
P
o
r
t
s
A
P
I
P
o
r
t
s
A
P
I
P
o
r
t
s
PyIFC
PyIFC
PyIFC
Where IfC Meets DDD
Open-end Architecture
Application Logic
Generic,
Supportive,
Core
Subdomains
Generic,
Supportive,
Core
Subdomains
Out of proc
Sidecar
In-proc
extension
Adapters
As far, as there is a market for this
How Far Could We Go?
Let Python be Python
What is Needed?
Protocols for PEPs and Standard Library
Protocols for Popular Open Source Solutions
Standard Schema for High-Level
Resource Configuration
What is Needed?
Python IfC Objective
Unlock full Python potential
as a truly cloud-native
programming language by
adapting its runtime and
compiler to work optimally
with cloud resources
Things to Takeaway …
“Infrastructure from Python Code” Mission
“Your Computer is Cloud”
Ease of use
Development
Deployment
Operation
Cost
Security
Reliability
Sustainability
PyIFC
Empowering mainstream Python programmers to develop, deploy, and operate
cost-effective, secure, reliable, and sustainable cloud software without a hussle
It’s not Academic
Questions

PyCascades-23.pdf