Running Node.js on customer machines - Atishay Jain node.js on customer... · Running Node.js on...

34
Running Node.js on customer machines API design for building a cloud-native application Senior Computer Scientist, Adobe @atishay811 Atishay Jain

Transcript of Running Node.js on customer machines - Atishay Jain node.js on customer... · Running Node.js on...

Page 1: Running Node.js on customer machines - Atishay Jain node.js on customer... · Running Node.js on customer machines API design for building a cloud-native application Senior Computer

Running Node.js on customer machinesAPI design for building a cloud-native application

Senior Computer Scientist, Adobe

@atishay811

Atishay Jain

Page 2: Running Node.js on customer machines - Atishay Jain node.js on customer... · Running Node.js on customer machines API design for building a cloud-native application Senior Computer

Atishay JainSenior Computer Scientist, Adobe

Part of many iconic software products from Photoshopand Illustrator to Adobe Capture. Creator of awardwinning augmented reality mobile apps from the IxDAInteraction Design award to the FWA App of the day. 10years of industry experience working on all platformsfrom desktop, frontend, backend and mobile.

https://atishay.me https://linkedin.com/in/atishay

Page 3: Running Node.js on customer machines - Atishay Jain node.js on customer... · Running Node.js on customer machines API design for building a cloud-native application Senior Computer

Agenda

• Two definitions of Cloud Native• Making the “Cloud” Native• History of computing• Where does JavaScript fit in• Running Node.js as a

background process• Its all about use cases

Image from Littlefun.org

Page 4: Running Node.js on customer machines - Atishay Jain node.js on customer... · Running Node.js on customer machines API design for building a cloud-native application Senior Computer

Two definitions of Cloud Native

Page 5: Running Node.js on customer machines - Atishay Jain node.js on customer... · Running Node.js on customer machines API design for building a cloud-native application Senior Computer

Two definitions of Cloud Native

Cloud Native for developers

MicroservicesContinuous

Delivery

DevOpsContainers

Cloud Native

Page 6: Running Node.js on customer machines - Atishay Jain node.js on customer... · Running Node.js on customer machines API design for building a cloud-native application Senior Computer

Two definitions of Cloud Native

Cloud Native for developers Cloud Native for users

Image from gyfcat

MicroservicesContinuous

Delivery

DevOpsContainers

Cloud Native

Page 7: Running Node.js on customer machines - Atishay Jain node.js on customer... · Running Node.js on customer machines API design for building a cloud-native application Senior Computer

Two definitions of Cloud Native

Cloud Native for developers Cloud Native for users

Image from giphy

MicroservicesContinuous

Delivery

DevOpsContainers

Cloud Native

Page 8: Running Node.js on customer machines - Atishay Jain node.js on customer... · Running Node.js on customer machines API design for building a cloud-native application Senior Computer

Native

Two definitions of Cloud Native

Cloud Native for developers Cloud Native for users

MicroservicesContinuous

Delivery

DevOpsContainers

Cloud Native

Page 9: Running Node.js on customer machines - Atishay Jain node.js on customer... · Running Node.js on customer machines API design for building a cloud-native application Senior Computer

What is native for the users?

User’s Cloud• Collaboration• Synchronization• Automatic updates

User’s Native• Realtime performance.• Handle Flaky network.• Offline support.

Page 10: Running Node.js on customer machines - Atishay Jain node.js on customer... · Running Node.js on customer machines API design for building a cloud-native application Senior Computer

Making the “Cloud” Native

Page 11: Running Node.js on customer machines - Atishay Jain node.js on customer... · Running Node.js on customer machines API design for building a cloud-native application Senior Computer

Making the “Cloud” Native

Cloud Native for developers

MicroservicesContinuous

Delivery

DevOpsContainers

Cloud Native

User’s Cloud• Collaboration• Synchronization• Automatic updates

User’s Native• Realtime performance.• Handle Flaky network.• Offline support.

Page 12: Running Node.js on customer machines - Atishay Jain node.js on customer... · Running Node.js on customer machines API design for building a cloud-native application Senior Computer

Making the “Cloud” Native

Fighting with the laws of Physics.

Image from giphy

Page 13: Running Node.js on customer machines - Atishay Jain node.js on customer... · Running Node.js on customer machines API design for building a cloud-native application Senior Computer

Making the “Cloud” Native

− Multi-regions− CDN− Edge computing− ??

Image from wikipedia

Page 14: Running Node.js on customer machines - Atishay Jain node.js on customer... · Running Node.js on customer machines API design for building a cloud-native application Senior Computer

Does it feel native?

Image from me.me

Making the “Cloud” Native

Page 15: Running Node.js on customer machines - Atishay Jain node.js on customer... · Running Node.js on customer machines API design for building a cloud-native application Senior Computer

Making the “Cloud” Native

Cloud Native for developers

MicroservicesContinuous

Delivery

DevOpsContainers

Cloud Native

User’s Cloud• Collaboration• Synchronization• Automatic updates

User’s Native• Realtime performance.• Handle Flaky network.• Offline support.

Page 16: Running Node.js on customer machines - Atishay Jain node.js on customer... · Running Node.js on customer machines API design for building a cloud-native application Senior Computer

Making the “Cloud” Native

Cloud Native

ContinuousDelivery

Microservices

DevOps

ContainersCDN/Edge

Replication Regions

Core RegionDeveloper’s Cloud Native

User

Page 17: Running Node.js on customer machines - Atishay Jain node.js on customer... · Running Node.js on customer machines API design for building a cloud-native application Senior Computer

Making the “Cloud” Native

Cloud Native

ContinuousDelivery

Microservices

DevOps

ContainersCDN/Edge

Replication Regions

Core RegionDeveloper’s Cloud Native

UserMicroservice as Daemon

Page 18: Running Node.js on customer machines - Atishay Jain node.js on customer... · Running Node.js on customer machines API design for building a cloud-native application Senior Computer

Making the “Cloud” Native

Microservice as Daemon

Bad Idea• Security?• How about updates?• Offline support?• Where is the truth?

Page 19: Running Node.js on customer machines - Atishay Jain node.js on customer... · Running Node.js on customer machines API design for building a cloud-native application Senior Computer

Making the “Cloud” Native

Cloud Native for developers

MicroservicesContinuous

Delivery

DevOpsContainers

Cloud Native

User’s Cloud• Collaboration• Synchronization• Automatic updates

User’s Native• Realtime performance.• Handle Flaky network.• Offline support.

Page 20: Running Node.js on customer machines - Atishay Jain node.js on customer... · Running Node.js on customer machines API design for building a cloud-native application Senior Computer

History of Computing

Page 21: Running Node.js on customer machines - Atishay Jain node.js on customer... · Running Node.js on customer machines API design for building a cloud-native application Senior Computer

When one machine was not

enough.

CloudWhen there was a single

machine.

Mainframes

When everyone had a machine

Personal Computer ????Future

History of Computing

?

Page 22: Running Node.js on customer machines - Atishay Jain node.js on customer... · Running Node.js on customer machines API design for building a cloud-native application Senior Computer

History of Computing

Power

Flexibility

Page 23: Running Node.js on customer machines - Atishay Jain node.js on customer... · Running Node.js on customer machines API design for building a cloud-native application Senior Computer

Where does JavaScript fit in?

Page 24: Running Node.js on customer machines - Atishay Jain node.js on customer... · Running Node.js on customer machines API design for building a cloud-native application Senior Computer

Where does JavaScript fit in?

Image from Pixabay, Wikipedia

• Built for network based async communication.

• Heavily invested language.

• The language designers have been challenged with making the language look native.

Page 25: Running Node.js on customer machines - Atishay Jain node.js on customer... · Running Node.js on customer machines API design for building a cloud-native application Senior Computer

Where does JavaScript fit in?

Image from Pixabay, Wikipedia

Service Workers

Page 26: Running Node.js on customer machines - Atishay Jain node.js on customer... · Running Node.js on customer machines API design for building a cloud-native application Senior Computer

Where does JavaScript fit in?

Image from Pixabay, Wikipedia

Service WorkersCloud Native for developers

MicroservicesContinuous

Delivery

DevOpsContainers

Cloud Native

Page 28: Running Node.js on customer machines - Atishay Jain node.js on customer... · Running Node.js on customer machines API design for building a cloud-native application Senior Computer

Where does JavaScript fit in?

• Built to be run 24x7.• Asynchronous.• I/O Optimized.• Mostly self-contained.

Logo from Wikipedia

Page 29: Running Node.js on customer machines - Atishay Jain node.js on customer... · Running Node.js on customer machines API design for building a cloud-native application Senior Computer

Running Node.js as a background process

Page 30: Running Node.js on customer machines - Atishay Jain node.js on customer... · Running Node.js on customer machines API design for building a cloud-native application Senior Computer

Running Node.js as a background process

Logo from Wikipedia

Cloud Native for developers

MicroservicesContinuous

Delivery

DevOpsContainers

Cloud Native

Page 31: Running Node.js on customer machines - Atishay Jain node.js on customer... · Running Node.js on customer machines API design for building a cloud-native application Senior Computer

Running Node.js as a background process

Logo from Wikipedia

Caveats with Node.js

• Built for the server.• No proxy support built in.• Packaging is messy.

Page 32: Running Node.js on customer machines - Atishay Jain node.js on customer... · Running Node.js on customer machines API design for building a cloud-native application Senior Computer

Its all about use cases

Page 33: Running Node.js on customer machines - Atishay Jain node.js on customer... · Running Node.js on customer machines API design for building a cloud-native application Senior Computer

Conclusion

Cloud native for user Service as a daemon Node.js on desktop

Page 34: Running Node.js on customer machines - Atishay Jain node.js on customer... · Running Node.js on customer machines API design for building a cloud-native application Senior Computer