Впервые сделал крупный проект (под NDA, так что не расскажу, какой) на облачных функциях. Впечатления противоречивые.
Изначально программисты арендовали компьютер в датацентре: или целиком или кусочек. На нём теоретически можно делать что угодно, но для запуска своих программ нужно было настроить операционную систему, безопасность и авторизацию, установить нужные исполнительные модули, программы для удобства деплоя, мониторинг нагрузки итд. Поэтому появились сервисы, которые это всё делают за тебя, а тебе дают буквально окно, куда можно написать свой код и запускать его удалённо на чужой машине.
Конкретно я пользовался решением от Яндекса, чей протокол скопирован напрямую с Amazon Web Services. Причём, в документации не только открыто об этом говорится, но ещё и в некоторых местах перенаправляют на доки от Amazon. И SDK предлагают тоже использовать амазоновский. До санкций я бы сказал, что это не так плохо — можно использовать что-то привычное тем, кто уже работал с Amazon. Но сейчас привязка к американскому сервису выглядит скорее жирным минусом. Не знаю, есть ли у Яндекса ресурсы на какое-то серьёзное разделение. Судя по состоянию документации и платформы в целом — нет.
Yandex Cloud кажется системой, которая активно развивалась несколько лет назад, а сейчас подзаброшена. Среда выполнения .NET отстаёт от актуальной на две версии (3.1 вместо 6, четвёртой версии не существует). Изначально мой проект был написан как обычное контейнеризированное приложение на .NET 6, а потом я переводил его на функции. Пришлось пройтись по всему коду и переписать несовместимые куски с C#10 на C#8, это было не слишком приятно.
Документации фактически нет, а там, где есть, много путаницы. В примерах написано одно, по факту другое: например в функцию вместо объекта Request приходит просто строка, а разбирать её надо самому. Авторизацию я нашёл только на Stackoverflow. Интересно, что адекватных доков про неё не было ни у Яндекса, ни у Amazon.
Функция выполняется и выгружается, поэтому ваша программа не должна рассчитывать на наличие постоянно живущего процесса. Мне пришлось вытащить из неё большой словарь, который грузится при старте, и положить уже подготовленные данные из него в Object Storage — это такое горячее файловое хранилище, там же рядом с функциями. Справедливости ради, работает это всё быстрее, чем я думал. Удалось запихнуть в функции даже сравнительно большой проект с кучей классов, создающий при запуске несколько десятков объектов и производящий загрузку из сети с декомпрессией.
Другой важный плюс — бесплатная квота довольно внушительная: миллион вызовов и 10Гб*часов оперативной памяти в месяц. Для пет проекта вы сможете вообще не покупать сервер. Но если сервер у вас всё-таки есть, деплой вы уже настроили, то удобнее будет, конечно, делать как привычно. И гибкости больше.
#dev
Выдержано под водой
Это делают все: греки, калифорнийцы, испанцы и французские шампанисты, которым до моря, вроде, не близко. Глянем на три интересных хозяйства, выдерживающих вина не там, где мы привыкли:
1. Gaia, вино Thalassitis, Санторини, Греция. Не все брачующиеся, приезжающие на Санторини ради фотки в белом среди голубого, в курсе, что здесь делают первоклассные вулканические вина. Хозяйство Gaia (“Гейя”) выдерживает на глубине моря вино из сорта ассиртико.
2. Leclerc Briant, Cuvée Abyss, Brut Zéro, Шампань, Франция. Это вино погружается в соль моря на один год. Помимо вышеназванного дома, за экспериментами замечены M.Hostomme, Louis Roederer, Veuve Clicquot и другие дома.
3. Bisson, вино Abissi (не удивительно, тоже “бездна”), Лигурия, Италия. Игристое вино по классическому методу лежит под водой у берегов Портофино в течение 13 месяцев.
При желании найдёте
#FunFacts@TheWineology
🐾Snow Safari in South Africa!
🗓 August in South Africa means winter — and yes, it really does snow there! ⛄️
❄️ In 2024, an unusually heavy snowfall covered parts of the country. Lions, giraffes, rhinos, and even elephants were wading knee-deep in snow — 📸 photos and videos went viral across social media.
▶️ Video: https://t.me/c/2139192078/409
#SouthAfrica#Wildlife#FunFacts#Safari
The first crossword puzzle appeared in the Sunday “Fun” section of the New York World newspaper on December 21, 1913. 📰🧩
We will send the solutions spoilered right after this so you can try it for yourselves. 😉
@googlefactss#Crossword#History#FunFacts
Since 1380, Iceland was ruled by Denmark. On December 1, 1918, Iceland became its own country with the same king as Denmark. In 1940, Iceland started making its own big decisions. On June 17, 1944, Iceland became a republic and stopped having a king.
👑🇮🇸
[Source]
@googlefactss#Iceland#History#Independence#FunFacts
The yo-yo is a toy made of two disks connected by an axle with a string. When dropped, the string unwinds and rewinds, making the yo-yo return to the hand. It dates back to ancient Greece around 500 BCE but likely started earlier in China. In the 18th century France, it was called “joujou de Normandie.” The name “yo-yo” comes from a Filipino word meaning “come-come.” 🎯🧸
[Read more]
@googlefactss
#YoYo#ToyHistory#FunFacts
#TellTheWorldAboutYourHomeland
🇷🇺 Ahead of #RussiaDay, kids from the nation have been sharing their love and insights regarding the Motherland, its landmarks, traditions and places of interests of their regions - all part of the Tell the World about Your Homeland contest, 6th edition.
#Kamchatka
Hailing from a truly amazing region of Russia, one of the most beautiful places on earth, Adelina, Matvei and Ulyana share insights into the role of dogs in everyday life and history of their home region and the unique traditions of dog sledding.
#FunFacts
🌋 Kamchatka is home to 300 volcanoes, 29 of which are active. The most famous of these is Klyuchevskaya Sopka, which at an impressive 4,750 metres is the highest active volcano in Eurasia.
💧 Kamchatka is famous for its unique geysers. The Geyser Valley is one of the most amazing places in Russia and the world. This small area is impressively rich in hot springs.
🐻 The region’s diverse nature supports a variety of ecosystems and wildlife, including brown bears, bighorn sheep, reindeer and sea lions. Kamchatka bears are particularly large and numerous.
🐟 Kamchatka has earned a reputation as the salmon capital of the world, with its rivers and lakes teeming with this type of fish. Every year millions of salmon come to spawn, making it Russia's largest fishing centre.
🏞 Kamchatka is proud of its many nature reserves, which cover almost 30 per cent of its total area. The most famous of these are the Kronotsky Nature Biosphere Reserve and the South Kamchatka Federal Game Reserve, both of which are on the UNESCO World Heritage List.
🌿 Kamchatka is also famous for its rich flora. Forty rare and endangered plant species are found around mineral hot springs and fumaroles, four of which are endemic to Kamchatka.
#RussiaDay2024
#TellTheWorldAboutYourHomeland
🇷🇺 Ahead of #RussiaDay, kids from the nation have been sharing their love and insights regarding the Motherland, its landmarks, traditions and places of interests of their regions - all part of the Tell the World about Your Homeland contest, 6th edition.
#Kamchatka
Hailing from a truly amazing region of Russia, one of the most beautiful places on earth, Adelina, Matvei and Ulyana share insights into the role of dogs in everyday life and history of their home region and the unique traditions of dog sledding.
#FunFacts
🌋 Kamchatka is home to 300 volcanoes, 29 of which are active. The most famous of these is Klyuchevskaya Sopka, which at an impressive 4,750 metres is the highest active volcano in Eurasia.
💧 Kamchatka is famous for its unique geysers. The Geyser Valley is one of the most amazing places in Russia and the world. This small area is impressively rich in hot springs.
🐻 The region’s diverse nature supports a variety of ecosystems and wildlife, including brown bears, bighorn sheep, reindeer and sea lions. Kamchatka bears are particularly large and numerous.
🐟 Kamchatka has earned a reputation as the salmon capital of the world, with its rivers and lakes teeming with this type of fish. Every year millions of salmon come to spawn, making it Russia's largest fishing centre.
🏞 Kamchatka is proud of its many nature reserves, which cover almost 30 per cent of its total area. The most famous of these are the Kronotsky Nature Biosphere Reserve and the South Kamchatka Federal Game Reserve, both of which are on the UNESCO World Heritage List.
🌿 Kamchatka is also famous for its rich flora. Forty rare and endangered plant species are found around mineral hot springs and fumaroles, four of which are endemic to Kamchatka.
#RussiaDay2024
#TellTheWorldAboutYourHomeland
🇷🇺 Ahead of #RussiaDay, kids from the nation have been sharing their love and insights regarding the Motherland, its landmarks, traditions and places of interests of their regions - all part of the Tell the World about Your Homeland contest, 6th edition.
#Kaliningrad
Yekaterina comes from our country’s westernmost region. She shared her impressions and observations about her beloved hometown, Kaliningrad, its monumental cathedral, its parks stunning in any season, as well as philosopher Immanuel Kant’s legacy as regards his 300th anniversary, celebrated this year.
#FunFacts
📚 Famous philosopher Immanuel Kant was born and bred in Kaliningrad (then Königsberg). He had a direct bond with Russia as a member of the Russian Academy of Sciences, and he was also a subject of the Russian Empire. A prominent philosopher, he was buried in the city’s historical center, which came to be known as Kant Island. On April 22-24, the city hosted the International Kant Congress, which Foreign Ministry officials attended.
🧡 The Kaliningrad Region accounts for almost 90 percent of the world’s amber reserves. The Catherine Palace in St Petersburg used these so-called sun stones from Kaliningrad region to recreate an exact copy of the lost Amber Room. This project took 24 years and was completed in 2003, when St Petersburg marked its 300th anniversary.
⚓️ Kaliningrad hosts the Museum of the World Ocean,Russia’s one-of-a-kind museum dedicated to all of maritime science, nature and technology. Its exhibits include ships such as the Vityaz, Kosmonavt Viktor Patsayev – a space communications vessel which used to be part of the Space Service Ship Fleet, as well as the submarine B-413, the fishing boat SRT-129, lightship Irbensky, the Be-12 hydroplane and even a sperm whaleskeleton.
#RussiaDay2024
The first roller coaster was invented in Russia. It started as ice sledding in the 15th century. In 1784, St. Petersburg opened a ride with carriages on grooved tracks. In the 19th century, France and the U.S. made changes that created the roller coasters we have today. 🎢❄️
[Read more]
@googlefactss
#RollerCoaster#History#FunFacts#Russia#AmusementPark
🏅 Tug of War was an official Olympic sport from 1900 to 1920, with teams from multiple countries competing for gold.
[Learn more]
@googlefactss
#TugOfWar#OlympicHistory#SportsFacts#FunFacts
🐘Слоны — отличные пловцы, и это занятие им очень нравится!
Они способны преодолевать расстояния до 50 км.
А ещё они умеют нырять — хобот служит им дыхательной трубкой для «подводного плавания». 🤿
#Слоны#Животные#Природа#ЮАР#ИнтересныеФакты
___________________
🐘Elephants are excellent swimmers — and they love it!
They can cover distances of up to 50 km (30 miles).
They also dive skillfully, using their trunks as natural snorkels. 🤿
#Elephants#Wildlife#Nature#SouthAfrica#FunFacts
🎥https://t.me/AfroPouchkine/1459