📜 ⬆️ ⬇️

Beyond the clouds: what is serverless and why do we misunderstand it?

The internet is changing. New technologies are emerging that are preparing a revolution in the very purpose of the web and the way it is used. Internet without servers? In offline mode? The uninitiated decide that this is nonsense and go to call an ambulance. For everyone else, Slobodan Stojanovic reflects on the future of Internet technology.



Slobodan is a programmer entrepreneur from Belgrade, for the last 5 years CTO has been working for Cloud Horizon, a company that creates web applications for American startups He is a fan of JavaScript and the latest Internet technologies: chatbots, Serverless, web-assembly.

- What technologies in the modern web, in your opinion, are already outdated and inhibit its development?
')
Slobodan Stojanovic: As Douglas Adams wrote in “The Hitchhiker's Guide to the Galaxy”: “Summarizing the results of all the results: people are a problem.” There are things that are outdated because the web is developing very fast and they are slowing us down. But again, when you visit a website created more than 20 years ago, for example, the Space Jam official website , you see the power of the Internet — even after 20 years of rapid development, the old things are still relevant.

Yes, there are obsolete things, but the beauty of web development is that you can just use only what your target audience needs. For example, WebVR is a cool new technology, but in your right mind you will not create a site for a bank or a government agency based on it.

- Some people think that web 3.0 is “the Internet of things”, some are networked “artificial intelligence”. And what is Web 3.0 for you?

Slobodan Stojanovic: Difficult question. It is difficult to predict where human thought will turn in the future. Currently, the network can finally support serious applications, not just websites. In addition, as we see, WebVR and similar things can bring new interesting features to the Internet. And finally, in a few months, we will see how much the web assembly technology will have on the network itself.

The Internet of Things and artificial intelligence will definitely have a big impact. But it is still difficult for me to see how big it can be and how quickly these innovations can become mainstream technologies.

- Is the emergence of serverless technologies a kind of niche movement or a revolutionary event on the web? What are their advantages, for what actual tasks are they suitable?

Slobodan Stojanovic: This is a revolutionary event. Not only for the Internet, but also for technology in general.

Now serverless is still a big buzzword, but there is a promising technology behind it that can become as important as the clouds now. Only a few years have passed, and everyone is using cloud computing, because it makes no sense to keep your own servers if you are not an infrastructure company or not as big as Facebook.

Serverless is just a step further. The clouds have shown us that it is not necessary to own the servers as physical machines. Serverless teaches us that in most cases we should not think about servers and scaling, but focus on our business logic.

Imagine that you can use each of the “microservices” of your application, whether payments, user management, newsletter, as a completely independent function that can “fall” without damaging the entire application. And imagine that each of these services can scale independently. That is, if no one uses the generation of PDF files, this service is inactive, but if many users decide to use this service, it instantly scales to support it.

And finally, imagine that you pay only for the services that are used, and only for the time when they were actually used. This is Serverless.

I note that Serverless requires a slightly different architecture of our applications. They must have event structure and do not use stateless information.

“Why now, when the Internet coverage has become more or less extensive, such attention to asynchronous web technologies is both Websockets and Offline. Is the way of consumption changing?

Slobodan Stojanovic: Yes, it sounds paradoxical: we have an internet connection almost everywhere, but we are trying to make applications available offline. But if you spend some time thinking, you will realize that this is not a paradox at all.

First, the Internet everywhere? Well, maybe if you are in the major cities of Europe or North America.

Secondly, Offline - is it only offline access to content? Not really. Offline helps with caching and the like. Thus, Offline is more than offline content, it can improve the performance of web applications in general.

Web applications evolve, and the way we interact with them evolves with them. Websockets and p2p connections are becoming more stable, and real-time communication takes place almost everywhere.

- How do web development languages ​​react to technology development? Are there any obvious restrictions that hinder development? Do we need new programming languages, the same Dart? What should they be able to do, which classical languages ​​cannot boast of?

Slobodan Stojanovic: JavaScript with Node.js is enough for me Of course, some new languages ​​can solve some new problems, but it is more important to understand the problem you are trying to solve than to have a new programming language.

From time to time I like to try new languages ​​and watch new ideas, but I don’t think that we have such serious problems that only a new language can fix.

- Can you use a practical example to show how, for example, you can significantly reduce the amount of code when using new programming languages?

Slobodan Stojanovic: Actually, no. Another thing is more important: some old languages ​​are developing, so now we can use the ES6 + syntax in JavaScript and write some ordinary constructs using much less code. For other things there are libraries and frameworks. Computers also evolve, so a little more zeros and ones do not ultimately have a strong influence on the computer. Except for special cases, when everything is used to improve performance.

- What are the frameworks for web development, mobile development you consider advanced and badly needed for JS-developers? What do you use yourself?

Slobodan Stojanovic: I like JavaScript, because there is a lot to do in it without a framework. And it seems that so far there are no large frameworks for it, as in some other languages.

Of course, React and Angular are the most popular, but they are more like libraries than full-fledged frameworks. The same for node.js, express and hapi, but cool, but very small, not like the huge frameworks that can do everything.

Here are some things that I use in my daily work:

Claudia.js is a library that simplifies working with Serverless applications on AWS. It has libraries of API and bot creation.

Hapi.js is one of the best frameworks for node.js, but in the past few months I’ve been mainly involved in deploying Serverless applications, so now I don’t need it.

Koa is another framework that is always one step ahead of others. It supports async / await.

React is currently my favorite library for single-page applications. There are many tools in it that can help create a modular exterior that can be easily scaled and modified. This can be very useful in a situation where you are creating a startup application that must start with MVP and scale quickly depending on the feedback received from customers.

- What tasks will need to be solved by developers in Web 3.0? How to prepare for these tasks, what to follow? What resources would you advise?

Slobodan Stojanovic: Developers are always well versed in technical issues, this is our job. But the biggest challenge that needs to be solved is not related to Web 3.0 or any particular category. This task is to understand the business perspective of the project you are working on. Because products can exist only as a composition of business needs, design and development. Our job as developers is to make the last part as good as possible, plus also understand that the first two parts are good enough.

From a technical point of view, we just need to continue to do what we do best - create awesome apps and learn new things all the time. Our work should be both fun and serious.

You can dive deeper into the world of severless technologies by looking at the recording of Slobodan's speech at HolyJS 2016 Moscow: “ Dr. Strangelove or How I learned to love the Serverless Chatbots . ”

No less interesting will be the new report 8 1/2 things about serverless (with Node.js) on the new HolyJS 2017 Piter which will be held on June 2-3 in St. Petersburg.

Source: https://habr.com/ru/post/329218/


All Articles