{"id":1958,"date":"2018-04-29T20:39:30","date_gmt":"2018-04-29T20:39:30","guid":{"rendered":"https:\/\/foghosting.com\/?p=1958"},"modified":"2018-04-29T20:39:30","modified_gmt":"2018-04-29T20:39:30","slug":"eco-design-for-web-and-mobile-applications-develop-sustainably","status":"publish","type":"post","link":"https:\/\/foghosting.com\/blog\/eco-design-for-web-and-mobile-applications-develop-sustainably\/","title":{"rendered":"Eco-design for web and mobile applications: develop sustainably!"},"content":{"rendered":"<div class=\"wpb-content-wrapper\"><p>[vc_row][vc_column][vc_column_text]Greenspector helps companies make their web and mobile applications more energy efficient. The French startup, based in Nantes, uses its online tool to identify energy-hungry features and design choices that result in overuse of resources. While the impact of datacenters on worldwide electricity consumption is often mentioned, and rightly so, it is probably time we explore eco-design for software too. And the evil this eco-design means to combat? bloatwares. Interview with Olivier Philippot, CTO at Greenspector.<br \/>\n<img decoding=\"async\" class=\"aligncenter wp-image-1960 size-full\" src=\"https:\/\/foghosting.com\/blog\/wp-content\/uploads\/2018\/04\/greenspector-greenit-dashboard-743x400-1.png\" alt=\"\" width=\"743\" height=\"400\" srcset=\"https:\/\/foghosting.com\/blog\/wp-content\/uploads\/2018\/04\/greenspector-greenit-dashboard-743x400-1.png 743w, https:\/\/foghosting.com\/blog\/wp-content\/uploads\/2018\/04\/greenspector-greenit-dashboard-743x400-1-300x162.png 300w\" sizes=\"(max-width: 743px) 100vw, 743px\" \/><br \/>\nHosted by DC3, the Greenspector platform provides developers with various metrics via a dashboard that displays different measurements.<\/p>\n<p>It all started with three IT consultants concerned by the environmental footprint of IT projects. Appalled by the internet\u2019s growing energy consumption, (according to a recent Greenpeace report if the internet were a country, it would be the sixth largest energy consumer in the world, they created a good practice guide and provided advice to companies on green IT. However, teams are not always on board. \u201cManufacturers of IT equipment have been taking energy efficiency into account for a few years already,\u201d explains Olivier Philippot. The problem is that in the world of software development, computing resources are seen as abundant and decreasing in cost \u2013 a belief fueled by Moore\u2019s law, constantly increasing connection speeds, the development of cloud computing and services that facilitate horizontal scaling within infrastructures.<\/p>\n<p>&#8220;Just like a gas naturally fills all available space, applications will use all the resources available on whatever server or smartphone they are running on.&#8221;<\/p>\n<p>Measuring the cost of each feature and asking if it is worth it<\/p>\n<p>Greenspector was created in 2010. It designed an SaaS tool that accurately measures the resources used by an application when run on the leading equipment on the market (tablets and smartphones). These resources include energy, CPU and RAM usage, data exchange via the device\u2019s different network interfaces and impact on the battery level. Certain operating systems do provide this information, but it is not always the case. \u201cAndroid, for example, provides users with a list of applications showing which ones are using the most data and battery power. It is possible to obtain more detailed metrics by doing further research and reverse engineering. Obtaining this data from Apple devices is much more difficult, but we are very close. We are also working on the possibility of measuring the efficiency of IoT applications. The number of connected objects is rising rapidly and will soon exceed the number of regular devices.\u201d This is a big challenge, because cards and operating systems are very diverse when it comes to IoT. For Apple devices and connected objects, Greenspector has developed energy sensors that monitor the electronic components directly and transmit the results via an API. The Greenspector platform, hosted by DC3, then analyzes the data. It provides developers with the various metrics via a dashboard displaying different measurements.<\/p>\n<p>\u201cFirst we tried analyzing code, and then realized that it was not the best approach. The measurements were far from comprehensive, because requests and external elements like libraries, which are more and more frequently integrated into the code, can be highly resource intensive. With our tool, the developer knows the exact cost of each feature. They are then better able to optimize the code, or identify the culprits using profiling tools if necessary.\u201d<\/p>\n<p>Often, they go further than just optimizing the code. Measuring the cost of certain features sometimes leads the developer to ask if they are really worth it. \u201cAn application\u2019s performance is tested frequently: response times, display times, interface fluidity, and so on. The metrics provided by Greenspector make another approach possible. When we think in terms of cost, we realize that certain features are very expensive for what they do. Image sliders, a trend in web design despite being generally disliked by users, consume a lot of resources. One of our customers improved their site\u2019s energy efficiency by 80% when they removed them! To take another example: we know that 90% of users only look at the first results page when they submit a query to a search engine. But it always calculates several dozen results pages right away. Can\u2019t we think of other ways of doing things?\u201d<\/p>\n<p>Multiple factors lead to over-consumption \u2013 and sometimes they\u2019re the ones you don\u2019t expect<\/p>\n<p>The huge rise in mobile internet use (overtaking desktop internet use in October 2016) has led web developers to work harder to make web applications more efficient. But there is still a lot of \u201cbloat\u201d, according to Olivier Philippot. And the large-scale use of tracking tools has not improved things, multiplying remote server requests during application use or website visits. On top of that, we do not always realize when code is not optimized. \u201cPeople often use tools like caching systems and CDN, or techniques like placing JavaScript at the bottom of the page so processing happens in the background after the page\u2019s main elements are loaded. These technologies or \u2018good practices\u2019 improve basic performance while masking anything weighing down the code in the actual applications.\u201d<\/p>\n<p>Developers have also been taking advantage of smartphones\u2019 increasing power (the latest models have processors with up to eight cores), transferring a lot of the processing to the user. \u201cIt is not strictly a bad idea, because the link between customer and server, as well as data exchange, uses a lot of power.\u201d But again, we must not be dogmatic: when processing is not tied to individual data, it can be more efficient to carry out the calculations on the server side. These will then be pooled and cached for thousands or millions of users.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-1961 size-full\" src=\"https:\/\/foghosting.com\/blog\/wp-content\/uploads\/2018\/04\/greenspector-dashboard-greenit-2-768x376-1.png\" alt=\"\" width=\"768\" height=\"376\" srcset=\"https:\/\/foghosting.com\/blog\/wp-content\/uploads\/2018\/04\/greenspector-dashboard-greenit-2-768x376-1.png 768w, https:\/\/foghosting.com\/blog\/wp-content\/uploads\/2018\/04\/greenspector-dashboard-greenit-2-768x376-1-300x147.png 300w\" sizes=\"(max-width: 768px) 100vw, 768px\" \/><\/p>\n<p>From the energy efficiency perspective, startups surprisingly do not perform much better than large companies, according to Olivier Philippot. \u201cLarge companies have a certain technical debt, and use old, fairly energy-intensive frameworks. But the agile methods popular among startups, which create very short development cycles, have their own negative effects. They use frameworks that allow them to move quickly, like AngularJS, and these create an enormous number of requests and events.\u201d<\/p>\n<p>It is nevertheless difficult to recommend one language over another. \u201cThe developer\u2019s skill set is a key factor. It is better to know PHP inside out and use it correctly, even though it is known for being heavy, than use HTML5 + JavaScript in a less careful way. There is no silver bullet, but getting into the habit of measuring your code\u2019s performance and skillfully optimizing your development environment is a good start.\u201d What is more, languages like Java that claim to manage hardware complexity (memory management, lower layers&#8230;) like to suggest that they are more efficient. In truth this is not always the case: these high-level languages are based on an execution environment, notably a JVM (Java Virtual Machine), that run a &#8220;<a href=\"https:\/\/en.wikipedia.org\/wiki\/Garbage_collection_(computer_science)\">Garbage Collector<\/a>&#8221; algorithm. This reclaims memory by automatically recycling the memory allocated to objects not in use. This relieves the developer from this tedious task, which lightens the code. The problem is that the garbage collector algorithms are not perfect. Bugs causing memory leaks are not uncommon, and GCs are often too frequent and energy intensive. Ultimately, the most efficient programming languages in terms of energy are the low-level languages, closest to the instructions understood by a processor.<\/p>\n<p>Mobility and pay-per-use infrastructures will make developers more environmentally friendly<\/p>\n<p>With the only tool of its kind in the world, Greenspector\u2019s team of 14 staff members has won over large groups including Orange, La Poste, LVMH, SNCF and Merck. If the French startup is focusing on auditing mobile applications, it is because this gives the user a more immediate advantage. \u201cWhether it is about mobile applications for the general public or job-specific applications used by train conductors or postal workers, for example, the problem of battery life is a powerful lever. &#8220;<a href=\"https:\/\/greenspector.com\/en\/articles\/2017-12-12-why-you-should-care-about-your-application-impact-on-battery-life\">https:\/\/greenspector.com\/en\/articles\/2017-12-12-why-you-should-care-about-your-application-impact-on-battery-life<\/a> Google and Apple are even starting to promote economical applications&#8221; .\u201d In contrast, it is harder to convince IT departments to optimize the code for applications hosted on their internal infrastructures or by a web host. \u201cWhen the gain to be won from refactoring the code is to turn off a few virtual machines on an infrastructure that has several dozen or even hundreds, it is hard to motivate the teams to act.\u201d But Olivier Philippot is convinced that pay-per-use cloud computing instances, which are becoming more and more common, will make developers think harder about their code\u2019s energy efficiency. Savings will be easier to quantify. It is a question of maturity.<\/p>\n<p>Perhaps in the future we will see labels to encourage environmentally friendly applications. \u201cThis approach currently goes against the status quo, given the relatively low hosting costs in the internet\u2019s current economic model, but it will become the norm. Awareness is rising. Among large groups and public organizations, eco-design is appearing in web project specifications. And just look at the number of articles on the environmental consequences of Bitcoin mining or the widespread use of blockchain technology. We are thinking about the impact of technologies before devising industrial uses. That is something new!\u201d Greenspector is determined to help raise awareness on this issue. In a few weeks it will launch a free online tool to allow everyone to see how efficient an application or website really is.[\/vc_column_text][\/vc_column][\/vc_row]<\/p>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>[vc_row][vc_column][vc_column_text]Greenspector helps companies make their web and mobile applications more energy efficient. The French startup, based in Nantes, uses its online tool to identify energy-hungry features and design choices that&hellip;<\/p>\n","protected":false},"author":2,"featured_media":1960,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":""},"categories":[2],"tags":[3,4],"class_list":["post-1958","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-discover","tag-eco-design","tag-eco-design-for-web-and-mobile"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/foghosting.com\/blog\/wp-json\/wp\/v2\/posts\/1958","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/foghosting.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/foghosting.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/foghosting.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/foghosting.com\/blog\/wp-json\/wp\/v2\/comments?post=1958"}],"version-history":[{"count":0,"href":"https:\/\/foghosting.com\/blog\/wp-json\/wp\/v2\/posts\/1958\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/foghosting.com\/blog\/wp-json\/wp\/v2\/media\/1960"}],"wp:attachment":[{"href":"https:\/\/foghosting.com\/blog\/wp-json\/wp\/v2\/media?parent=1958"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/foghosting.com\/blog\/wp-json\/wp\/v2\/categories?post=1958"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/foghosting.com\/blog\/wp-json\/wp\/v2\/tags?post=1958"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}