PikoPong
  • Web Dev
  • Hack
  • Database
  • Big Data
  • AWS
  • Linux
No Result
View All Result
PikoPong
  • Web Dev
  • Hack
  • Database
  • Big Data
  • AWS
  • Linux
No Result
View All Result
PikoPong
No Result
View All Result
Home Web Dev

“Durable”

October 20, 2020
in Web Dev
289 3
“Durable”


Looks like the word “durable” is an emerging term in the world of serverless. As I understand it, it’s like allowing for state in places you wouldn’t normally expect to have it. For example, you call some cloud function and run some JavaScript… unless you have it go get some data from elsewhere, it has no information other than it’s own code. It doesn’t remember what happened last time it ran. It’s a clean slate each time. But let’s say your cloud function was a class, and when you initialized that class you got an ID, and through that ID you could talk to that exact instance of that class whenever you wanted. That instance sticks around as long as you need it. It’s durable.

Android Chrome Android Firefox Android Browser iOS Safari Opera Mini
No No No No No

Cloudflare released a feature called Durable Objects:

… we settled on “Unique Durable Objects”, or “Durable Objects” for short. Let me explain what they are by breaking that down:

• Objects: Durable Objects are objects in the sense of Object-Oriented Programming. A Durable Object is an instance of a class — literally, a class definition written in JavaScript (or your language of choice). The class has methods which define its public interface. An object is an instance of this class, combining the code with some private state.

• Unique: Each object has a globally-unique identifier. That object exists in only one location in the whole world at a time. Any Worker running anywhere in the world that knows the object’s ID can send messages to it. All those messages end up delivered to the same place.

• Durable: Unlike a normal object in JavaScript, Durable Objects can have persistent state stored on disk. Each object’s durable state is private to it, which means not only that access to storage is fast, but the object can even safely maintain a consistent copy of the state in memory and operate on it with zero latency. The in-memory object will be shut down when idle and recreated later on-demand.

Pretty cool. The real-time aspects are extremely compelling.

Azure is also using “durable” in their offices through Durable Functions. Part of that offering is Entity Functions:

Entities behave a bit like tiny services that communicate via messages. Each entity has a unique identity and an internal state (if it exists). Like services or objects, entities perform operations when prompted to do so. When an operation executes, it might update the internal state of the entity. It might also call external services and wait for a response. Entities communicate with other entities, orchestrations, and clients by using messages that are implicitly sent via reliable queues.

The documentation is a little tricker for me to understand (I think it’s aimed at people who live and breath this stuff more than I do), but the concept sounds very similar to Cloudflare’s thing. Entities have IDs that you access them through. They persist and can be used for the same real-time-y stuff, like displaying the state/score of a video game to anyone who is connected.


The post “Durable” appeared first on CSS-Tricks.

You can support CSS-Tricks by being an MVP Supporter.



Source link

Share219Tweet137Share55Pin49

Related Posts

Intrinsic Typography is the Future of Styling Text on the Web
Web Dev

Intrinsic Typography is the Future of Styling Text on the Web

The way we style text hasn’t changed much over the years. There have been numerous advancements to help make...

April 20, 2021
Say Hello To CSS Container Queries
Web Dev

Say Hello To CSS Container Queries

I haven’t been more excited for a CSS feature like I’m now in the past six years I spent...

April 20, 2021
Keep Logs Tidy With the Log Cleaner Package for Laravel
Web Dev

Keep Logs Tidy With the Log Cleaner Package for Laravel

Laravel Log Cleaner is a package by Joost van Veen for keeping your log files small and tidy. While...

April 20, 2021
Making GraphQL Work In WordPress — Smashing Magazine
Web Dev

Making GraphQL Work In WordPress — Smashing Magazine

About The AuthorLeonardo Losoviz is a freelance developer and writer, with an ongoing quest to integrate innovative paradigms (Serverless...

April 20, 2021
Next Post
Announcing the 2020 State of CSS Survey

Announcing the 2020 State of CSS Survey

Smarter Ways to Generate a Deep Nested HTML Structure

Smarter Ways to Generate a Deep Nested HTML Structure

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recommended

How To Build An Accessible Front-End Application With Chakra UI And Nuxt.js — Smashing Magazine

How To Build An Accessible Front-End Application With Chakra UI And Nuxt.js — Smashing Magazine

July 20, 2020
Customizing Stubs in Laravel | Laravel News

Customizing Stubs in Laravel | Laravel News

April 9, 2021
A Customizable Linux Terminal for Power Users

A Customizable Linux Terminal for Power Users

March 2, 2021
Learn about Dynamic Static Typing and the new Flysystem at this months Worldwide Laravel Meetup

The March Laravel Worldwide Meetup is today

March 23, 2021

Categories

  • AWS
  • Big Data
  • Database
  • DevOps
  • IoT
  • Linux
  • Web Dev
No Result
View All Result
  • Web Dev
  • Hack
  • Database
  • Big Data
  • AWS
  • Linux

Welcome Back!

Login to your account below

Forgotten Password?

Create New Account!

Fill the forms bellow to register

All fields are required. Log In

Retrieve your password

Please enter your username or email address to reset your password.

Log In