{"id":301,"date":"2019-01-31T21:58:44","date_gmt":"2019-01-31T20:58:44","guid":{"rendered":"https:\/\/www.codemotion.com\/magazine\/serviceworkers-are-more-than-data-proxys\/"},"modified":"2021-12-23T14:26:56","modified_gmt":"2021-12-23T13:26:56","slug":"serviceworkers-are-more-than-data-proxys","status":"publish","type":"post","link":"https:\/\/www.codemotion.com\/magazine\/devops\/cloud\/serviceworkers-are-more-than-data-proxys\/","title":{"rendered":"Trent Willis: ServiceWorkers are more than just data proxys"},"content":{"rendered":"<p><span class=\"firstcharacter\">W<\/span>e all enjoy using our favorite web applications to work, communicate, relax, and more. But what happens when an Internet connection is not available? Simply put, if we can&#8217;t access the web, we can&#8217;t access our web applications, as they heavily depend on data and services running on the cloud.<\/p>\n<p>Several attempts have been made to address this issue, with the ultimate goal to allow web applications to perform <i>some<\/i> work while offline (does the name <b>AppCache<\/b> ring any bells?).<\/p>\n<p><b>ServiceWorker<\/b> technology was conceived with the same goal, allowing the developer to write an intermediate layer between the application running on the client and the data stored elsewhere.<\/p>\n<p>Designed as a data proxy, a ServiceWorker is used to cache data locally, with application dependent logic.<\/p>\n<p>But ServiceWorkers are much more than that. They are, in essence, a tool to execute client side code beyond the scope of a single web page.<\/p>\n<p><i>Trent Willis<\/i>, senior engineer at Netflix, showcased some interesting scenarios at <b>Codemotion Milan 2018<\/b>.<\/p>\n<p><code><\/code><\/p>\n<p><code><\/code><\/p>\n<p><code><br \/>\n<\/code><code>\/\/ Fullfills a request for an encrypted image with a normal PNG response.<br \/>\n\/\/ Does so by loading the encrypted image data, decrypting it, and then putting it into<br \/>\n\/\/ a PNG blog which the browser knows how to render.<br \/>\nconst pngFromEncryptedImageRequest = async (request) =&gt; {<\/code><\/p>\n<p><code><\/code><\/p>\n<p>const response = await fetch(request);<br \/>\nconst encryptedData = await response.arrayBuffer();<br \/>\nconst decryptedData = await decryptData(encryptedData);<br \/>\nconst pngBlob = new Blob([decryptedData], { type: &#8216;image\/png&#8217; });<\/p>\n<p><code><\/code><\/p>\n<p>return new Response(pngBlob);<br \/>\n};<\/p>\n<p>&nbsp;<\/p>\n<p><em>Snippet 1: custom file decryption in a ServiceWorker<\/em><\/p>\n<p>Since a ServiceWorker sits between the application and the server, it represents the perfect place to implement client side data processing, while keeping the page responsive.<\/p>\n<p>As an example, a ServiceWorker could be used to decode an image format that is not natively supported by the browser. With a few lines of code, we can implement a polyfill for that format, translating the data received from the server into something that the browser can interpret.<\/p>\n<p>To avoid extra computational overhead, the decoded compatible image can be then cached using traditional caching techniques typical of ServiceWorkers applications.<\/p>\n<p>Another interesting use case is encryption. ServiceWorkers allow implementing E2EE (End To End Encryption) in a very flexible and efficient way, without depending on the facilities offered by the browser.<\/p>\n<p>ServiceWorker technology is therefore a great tool to develop fewer browser-dependent applications. They provide developers all the flexibility they need without compromises on security.<\/p>\n<p>Compared to traditional approaches designed to overcome browsers limitations (applets, plugins, extensions, etc), they are application-wide rather than browser-wide and therefore easier to maintain and deploy.<\/p>\n<p>At this point, the reader may wonder how all this client side processing can be implemented efficiently, considering the limitations imposed by the browser.<\/p>\n<p>The most common technique is to pipeline data processing as much as possible. A naive processing implementation for a ServiceWorker would simply fetch an entire response from the server, process its body and then generate a reply for the browser. This approach leads to twice the memory usage, poor single-threaded performance and, in some cases, can cause the browser page to freeze for some time.<\/p>\n<p>The <b>streaming API <\/b>comes to the rescue, as a very powerful tool to implement efficient <i>pipelined<\/i> (stream oriented) processing. Basically, data is processed in small chunks; while processing one chunk, the next one can be fetched. This reduces drastically the memory consumption and decreases the overall execution time.<\/p>\n<p>Moreover, developers can leverage multithreading, at the least to some extent, using <b>WebWorkers<\/b>. WebWorkers allow our application to run tasks in the background. Under the hood, the browser spawns another thread and runs the code worker under it.<\/p>\n<p>Communication between WebWorkers and ServiceWorkers can be implemented using the messaging API, as objects shared via<i> postMessage()<\/i> calls can be transferred from one context to another safely.<\/p>\n<p>All the tools described above allow front-end developers to write efficient, streamlined applications without compromising portability and browsers compatibility.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We all enjoy using our favorite web applications to work, communicate, relax, and more. But what happens when an Internet connection is not available? Simply put, if we can&#8217;t access the web, we can&#8217;t access our web applications, as they heavily depend on data and services running on the cloud. Several attempts have been made&#8230; <a class=\"more-link\" href=\"https:\/\/www.codemotion.com\/magazine\/devops\/cloud\/serviceworkers-are-more-than-data-proxys\/\">Read more<\/a><\/p>\n","protected":false},"author":31,"featured_media":302,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_editorskit_title_hidden":false,"_editorskit_reading_time":0,"_editorskit_is_block_options_detached":false,"_editorskit_block_options_position":"{}","_uag_custom_page_level_css":"","_genesis_hide_title":false,"_genesis_hide_breadcrumbs":false,"_genesis_hide_singular_image":false,"_genesis_hide_footer_widgets":false,"_genesis_custom_body_class":"","_genesis_custom_post_class":"","_genesis_layout":"","footnotes":""},"categories":[5244],"tags":[22],"collections":[],"class_list":{"0":"post-301","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-cloud","8":"tag-codemotion-milan","9":"entry"},"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v26.9 (Yoast SEO v26.9) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Trent Willis: ServiceWorkers are more than just data proxys - Codemotion Magazine<\/title>\n<meta name=\"description\" content=\"Codemotion and Facebook organized the Tech Leadership Training boot camp, heres a personal reportage from one of our attendees.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.codemotion.com\/magazine\/devops\/cloud\/serviceworkers-are-more-than-data-proxys\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Trent Willis: ServiceWorkers are more than just data proxys\" \/>\n<meta property=\"og:description\" content=\"Codemotion and Facebook organized the Tech Leadership Training boot camp, heres a personal reportage from one of our attendees.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.codemotion.com\/magazine\/devops\/cloud\/serviceworkers-are-more-than-data-proxys\/\" \/>\n<meta property=\"og:site_name\" content=\"Codemotion Magazine\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/Codemotion.Italy\/\" \/>\n<meta property=\"article:published_time\" content=\"2019-01-31T20:58:44+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-12-23T13:26:56+00:00\" \/>\n<meta name=\"author\" content=\"Sergio Monteleone\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:image\" content=\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/01\/trent-willis-2.jpg\" \/>\n<meta name=\"twitter:creator\" content=\"@CodemotionIT\" \/>\n<meta name=\"twitter:site\" content=\"@CodemotionIT\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Sergio Monteleone\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/devops\/cloud\/serviceworkers-are-more-than-data-proxys\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/devops\/cloud\/serviceworkers-are-more-than-data-proxys\/\"},\"author\":{\"name\":\"Sergio Monteleone\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#\/schema\/person\/1175f6a51ed61a57ce2bbe8f28682052\"},\"headline\":\"Trent Willis: ServiceWorkers are more than just data proxys\",\"datePublished\":\"2019-01-31T20:58:44+00:00\",\"dateModified\":\"2021-12-23T13:26:56+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/devops\/cloud\/serviceworkers-are-more-than-data-proxys\/\"},\"wordCount\":607,\"publisher\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/devops\/cloud\/serviceworkers-are-more-than-data-proxys\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/01\/trent-willis-2.jpg\",\"keywords\":[\"Codemotion Milan\"],\"articleSection\":[\"Cloud\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/devops\/cloud\/serviceworkers-are-more-than-data-proxys\/\",\"url\":\"https:\/\/www.codemotion.com\/magazine\/devops\/cloud\/serviceworkers-are-more-than-data-proxys\/\",\"name\":\"Trent Willis: ServiceWorkers are more than just data proxys - Codemotion Magazine\",\"isPartOf\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/devops\/cloud\/serviceworkers-are-more-than-data-proxys\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/devops\/cloud\/serviceworkers-are-more-than-data-proxys\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/01\/trent-willis-2.jpg\",\"datePublished\":\"2019-01-31T20:58:44+00:00\",\"dateModified\":\"2021-12-23T13:26:56+00:00\",\"description\":\"Codemotion and Facebook organized the Tech Leadership Training boot camp, heres a personal reportage from one of our attendees.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/devops\/cloud\/serviceworkers-are-more-than-data-proxys\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.codemotion.com\/magazine\/devops\/cloud\/serviceworkers-are-more-than-data-proxys\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/devops\/cloud\/serviceworkers-are-more-than-data-proxys\/#primaryimage\",\"url\":\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/01\/trent-willis-2.jpg\",\"contentUrl\":\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/01\/trent-willis-2.jpg\",\"width\":960,\"height\":639},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/devops\/cloud\/serviceworkers-are-more-than-data-proxys\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.codemotion.com\/magazine\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"DevOps\",\"item\":\"https:\/\/www.codemotion.com\/magazine\/devops\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Cloud\",\"item\":\"https:\/\/www.codemotion.com\/magazine\/devops\/cloud\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Trent Willis: ServiceWorkers are more than just data proxys\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#website\",\"url\":\"https:\/\/www.codemotion.com\/magazine\/\",\"name\":\"Codemotion Magazine\",\"description\":\"We code the future. Together\",\"publisher\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.codemotion.com\/magazine\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#organization\",\"name\":\"Codemotion\",\"url\":\"https:\/\/www.codemotion.com\/magazine\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/11\/codemotionlogo.png\",\"contentUrl\":\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/11\/codemotionlogo.png\",\"width\":225,\"height\":225,\"caption\":\"Codemotion\"},\"image\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/Codemotion.Italy\/\",\"https:\/\/x.com\/CodemotionIT\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#\/schema\/person\/1175f6a51ed61a57ce2bbe8f28682052\",\"name\":\"Sergio Monteleone\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/01ed53edef772160c6afbbad5e36940f0cd612cbcf1a6dc3178588bd2b44708c?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/01ed53edef772160c6afbbad5e36940f0cd612cbcf1a6dc3178588bd2b44708c?s=96&d=mm&r=g\",\"caption\":\"Sergio Monteleone\"},\"description\":\"Software developer and the co-founder of Moga Software s.r.l., a software house based in Italy. I tend to write code for anything that has a C\/C++ compiler, but don't mind using other technologies and languages. I love cats, dogs and, more in general, any lifeform when Lifeform.numLegs() &lt;= 4.\",\"url\":\"https:\/\/www.codemotion.com\/magazine\/author\/sergio-monteleone\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Trent Willis: ServiceWorkers are more than just data proxys - Codemotion Magazine","description":"Codemotion and Facebook organized the Tech Leadership Training boot camp, heres a personal reportage from one of our attendees.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.codemotion.com\/magazine\/devops\/cloud\/serviceworkers-are-more-than-data-proxys\/","og_locale":"en_US","og_type":"article","og_title":"Trent Willis: ServiceWorkers are more than just data proxys","og_description":"Codemotion and Facebook organized the Tech Leadership Training boot camp, heres a personal reportage from one of our attendees.","og_url":"https:\/\/www.codemotion.com\/magazine\/devops\/cloud\/serviceworkers-are-more-than-data-proxys\/","og_site_name":"Codemotion Magazine","article_publisher":"https:\/\/www.facebook.com\/Codemotion.Italy\/","article_published_time":"2019-01-31T20:58:44+00:00","article_modified_time":"2021-12-23T13:26:56+00:00","author":"Sergio Monteleone","twitter_card":"summary_large_image","twitter_image":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/01\/trent-willis-2.jpg","twitter_creator":"@CodemotionIT","twitter_site":"@CodemotionIT","twitter_misc":{"Written by":"Sergio Monteleone","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.codemotion.com\/magazine\/devops\/cloud\/serviceworkers-are-more-than-data-proxys\/#article","isPartOf":{"@id":"https:\/\/www.codemotion.com\/magazine\/devops\/cloud\/serviceworkers-are-more-than-data-proxys\/"},"author":{"name":"Sergio Monteleone","@id":"https:\/\/www.codemotion.com\/magazine\/#\/schema\/person\/1175f6a51ed61a57ce2bbe8f28682052"},"headline":"Trent Willis: ServiceWorkers are more than just data proxys","datePublished":"2019-01-31T20:58:44+00:00","dateModified":"2021-12-23T13:26:56+00:00","mainEntityOfPage":{"@id":"https:\/\/www.codemotion.com\/magazine\/devops\/cloud\/serviceworkers-are-more-than-data-proxys\/"},"wordCount":607,"publisher":{"@id":"https:\/\/www.codemotion.com\/magazine\/#organization"},"image":{"@id":"https:\/\/www.codemotion.com\/magazine\/devops\/cloud\/serviceworkers-are-more-than-data-proxys\/#primaryimage"},"thumbnailUrl":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/01\/trent-willis-2.jpg","keywords":["Codemotion Milan"],"articleSection":["Cloud"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.codemotion.com\/magazine\/devops\/cloud\/serviceworkers-are-more-than-data-proxys\/","url":"https:\/\/www.codemotion.com\/magazine\/devops\/cloud\/serviceworkers-are-more-than-data-proxys\/","name":"Trent Willis: ServiceWorkers are more than just data proxys - Codemotion Magazine","isPartOf":{"@id":"https:\/\/www.codemotion.com\/magazine\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.codemotion.com\/magazine\/devops\/cloud\/serviceworkers-are-more-than-data-proxys\/#primaryimage"},"image":{"@id":"https:\/\/www.codemotion.com\/magazine\/devops\/cloud\/serviceworkers-are-more-than-data-proxys\/#primaryimage"},"thumbnailUrl":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/01\/trent-willis-2.jpg","datePublished":"2019-01-31T20:58:44+00:00","dateModified":"2021-12-23T13:26:56+00:00","description":"Codemotion and Facebook organized the Tech Leadership Training boot camp, heres a personal reportage from one of our attendees.","breadcrumb":{"@id":"https:\/\/www.codemotion.com\/magazine\/devops\/cloud\/serviceworkers-are-more-than-data-proxys\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.codemotion.com\/magazine\/devops\/cloud\/serviceworkers-are-more-than-data-proxys\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.codemotion.com\/magazine\/devops\/cloud\/serviceworkers-are-more-than-data-proxys\/#primaryimage","url":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/01\/trent-willis-2.jpg","contentUrl":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/01\/trent-willis-2.jpg","width":960,"height":639},{"@type":"BreadcrumbList","@id":"https:\/\/www.codemotion.com\/magazine\/devops\/cloud\/serviceworkers-are-more-than-data-proxys\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.codemotion.com\/magazine\/"},{"@type":"ListItem","position":2,"name":"DevOps","item":"https:\/\/www.codemotion.com\/magazine\/devops\/"},{"@type":"ListItem","position":3,"name":"Cloud","item":"https:\/\/www.codemotion.com\/magazine\/devops\/cloud\/"},{"@type":"ListItem","position":4,"name":"Trent Willis: ServiceWorkers are more than just data proxys"}]},{"@type":"WebSite","@id":"https:\/\/www.codemotion.com\/magazine\/#website","url":"https:\/\/www.codemotion.com\/magazine\/","name":"Codemotion Magazine","description":"We code the future. Together","publisher":{"@id":"https:\/\/www.codemotion.com\/magazine\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.codemotion.com\/magazine\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.codemotion.com\/magazine\/#organization","name":"Codemotion","url":"https:\/\/www.codemotion.com\/magazine\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.codemotion.com\/magazine\/#\/schema\/logo\/image\/","url":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/11\/codemotionlogo.png","contentUrl":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/11\/codemotionlogo.png","width":225,"height":225,"caption":"Codemotion"},"image":{"@id":"https:\/\/www.codemotion.com\/magazine\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/Codemotion.Italy\/","https:\/\/x.com\/CodemotionIT"]},{"@type":"Person","@id":"https:\/\/www.codemotion.com\/magazine\/#\/schema\/person\/1175f6a51ed61a57ce2bbe8f28682052","name":"Sergio Monteleone","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.codemotion.com\/magazine\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/01ed53edef772160c6afbbad5e36940f0cd612cbcf1a6dc3178588bd2b44708c?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/01ed53edef772160c6afbbad5e36940f0cd612cbcf1a6dc3178588bd2b44708c?s=96&d=mm&r=g","caption":"Sergio Monteleone"},"description":"Software developer and the co-founder of Moga Software s.r.l., a software house based in Italy. I tend to write code for anything that has a C\/C++ compiler, but don't mind using other technologies and languages. I love cats, dogs and, more in general, any lifeform when Lifeform.numLegs() &lt;= 4.","url":"https:\/\/www.codemotion.com\/magazine\/author\/sergio-monteleone\/"}]}},"featured_image_src":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/01\/trent-willis-2-600x400.jpg","featured_image_src_square":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/01\/trent-willis-2-600x600.jpg","author_info":{"display_name":"Sergio Monteleone","author_link":"https:\/\/www.codemotion.com\/magazine\/author\/sergio-monteleone\/"},"uagb_featured_image_src":{"full":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/01\/trent-willis-2.jpg",960,639,false],"thumbnail":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/01\/trent-willis-2-150x150.jpg",150,150,true],"medium":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/01\/trent-willis-2-300x200.jpg",300,200,true],"medium_large":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/01\/trent-willis-2-768x511.jpg",768,511,true],"large":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/01\/trent-willis-2.jpg",960,639,false],"1536x1536":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/01\/trent-willis-2.jpg",960,639,false],"2048x2048":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/01\/trent-willis-2.jpg",960,639,false],"small-home-featured":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/01\/trent-willis-2.jpg",100,67,false],"sidebar-featured":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/01\/trent-willis-2-180x128.jpg",180,128,true],"genesis-singular-images":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/01\/trent-willis-2-896x504.jpg",896,504,true],"archive-featured":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/01\/trent-willis-2-400x225.jpg",400,225,true],"gb-block-post-grid-landscape":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/01\/trent-willis-2-600x400.jpg",600,400,true],"gb-block-post-grid-square":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/01\/trent-willis-2-600x600.jpg",600,600,true]},"uagb_author_info":{"display_name":"Sergio Monteleone","author_link":"https:\/\/www.codemotion.com\/magazine\/author\/sergio-monteleone\/"},"uagb_comment_info":0,"uagb_excerpt":"We all enjoy using our favorite web applications to work, communicate, relax, and more. But what happens when an Internet connection is not available? Simply put, if we can&#8217;t access the web, we can&#8217;t access our web applications, as they heavily depend on data and services running on the cloud. Several attempts have been made&#8230;&hellip;","lang":"en","_links":{"self":[{"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/posts\/301","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/users\/31"}],"replies":[{"embeddable":true,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/comments?post=301"}],"version-history":[{"count":2,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/posts\/301\/revisions"}],"predecessor-version":[{"id":825,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/posts\/301\/revisions\/825"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/media\/302"}],"wp:attachment":[{"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/media?parent=301"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/categories?post=301"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/tags?post=301"},{"taxonomy":"collections","embeddable":true,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/collections?post=301"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}