- 28 August, 2019 - 6 ’ read

Serverless Architecture: Imagicle’s journey to the Clouds.

[et_pb_section fb_built=”1″ _builder_version=”3.22″ background_color=”#ffffff” custom_padding=”63px|0px|0px|0px”][et_pb_row _builder_version=”3.25″ background_size=”initial” background_position=”top_left” background_repeat=”repeat” custom_margin=”0px|||” custom_padding=”0px||0px|”][et_pb_column type=”4_4″ _builder_version=”3.25″ background_color=”#ffffff” custom_padding=”|||” custom_padding_tablet=”” custom_padding_phone=”” custom_padding_last_edited=”on|phone” custom_padding__hover=”|||”][et_pb_text admin_label=”journey to the Clouds” _builder_version=”4.9.10″]

The journey to the Clouds.

It was last April when me and my fellas from Imagicle’s R&D department set off on a long journey. 
Our destination? Cloud-native architecture for our UC licences. Something that would make even Frodo and his valiant Sam go pale, I’m telling you.
 
Today, we constantly hear about Cloud: Cloud technologies, Amazon, Google, RedHat, Oracle and many other players, but what’s really going on out there?
 
In the real-world scenario, whoever you are, you should identify yourself in one of these categories: 
  1. You are a startup starting from scratch, and you’re dealing with some of the latest technologies like Kubernetes, Docker, Lambda, etc. face with stuck-out tongue & winking eye 
  2. You are a big company with one or more monolith products, you probably keep using old technologies like Cobol or 90’s tech like Java and C#, and you want to migrate to the Cloud only with drag&drop effort.
  3. You are Imagicle, you have one monolith UCX Suite, and you have a big dream: you want to build an actual native cloud system. This means you can experiment with the latest technologies while trusting in a great wealth of consolidated experience in software development.
 
Lucky for me, me and my mates are in the 3rd scenario!
Well, pack your bags and get ready: I want to tell you a fantastic story and take you straight to the Mount Doom of technology.
[/et_pb_text][et_pb_divider show_divider=”off” _builder_version=”3.12″ height=”50px”][/et_pb_divider][et_pb_text admin_label=”Serverless Architecture: what is it?” _builder_version=”4.9.10″]

What Serverless mean?

Serverless computing (or serverless for short), is an execution model where the cloud provider (AWS, Google Cloud or Azure) is responsible for executing a piece of code by dynamically allocating the resources. And only charging for the amount of resources used to run the code. 
So, despite the name, serverless architecture doesn’t mean running the code without servers.
Instead, it means that there’s no need to buy or use servers/virtual machines. It’s a way of building and running applications and services without managing the infrastructure.
All you need to do is develop your application and distribute it with serverless architecture by choosing the runtime.
Server software, Server hardware, Auto-Scaling, Networking, Provisioning, will be the Cloud Provider’s responsibility.
All happens auto-magically.
[/et_pb_text][et_pb_image src=”https://www.imagicle.com/wp-content/uploads/blog/2019/08/2-1.jpg” align=”center” align_tablet=”center” align_phone=”” align_last_edited=”on|desktop” admin_label=”Image” _builder_version=”3.23″ max_width_tablet=”” max_width_phone=”” max_width_last_edited=”on|phone”][/et_pb_image][et_pb_text admin_label=”Remember when…” _builder_version=”4.9.10″]
Remember when you used to need a costly bare metal server with a huge proliferation of the slowest VM (oh… how little I like VMs!), hours, even days to set up the right environment… and eventually, when you thought you were ready, you weren’t able to scale?! tired face 
 
Take a breath. It’s prehistory!
Today you can create an environment with only a few lines of code (i.e., Terraform or CloudFormation) and deploy your application in a few seconds on a magic infrastructure entirely controlled by your Cloud Provider.
You can scale up as much as you want, to infinity and beyond!
[/et_pb_text][et_pb_divider show_divider=”off” admin_label=”Divider” _builder_version=”3.12″][/et_pb_divider][et_pb_text admin_label=”How did we get rid of servers?” _builder_version=”4.9.10″]

How did we get rid of servers?

How did we get to do the same (or more) operations without servers?
Simple. We have moved away from everything superfluous (we’ve handed all this stuff to the Cloud Provider, remember?) to focus on the one fundamental thing: development.
 
After the Bare Metal and the VMs, containers arrived and allowed us to create fantastic microservice applications. But this is not the last technological stage; in fact, there is still something we must take the distance from: the container itself!
Functions allow us to focus only on the development, without thinking about other matters like:
  • choosing the right Docker image;
  • setting up our k8s cluster with correct policies;
  • setting up application servers like JBoss or servlet containers like Tomcat;
  • provisioning the required hardware.
[/et_pb_text][et_pb_image src=”https://www.imagicle.com/wp-content/uploads/blog/2019/08/1-1.jpg” align=”center” align_tablet=”center” align_phone=”” align_last_edited=”on|desktop” admin_label=”Image” _builder_version=”3.23″ max_width_tablet=”” max_width_phone=”” max_width_last_edited=”on|phone”][/et_pb_image][et_pb_text admin_label=”Jack Robinson” _builder_version=”4.9.10″]
Basically, the function does nothing more than putting your application into a container before you can say Jack Robinson.
[/et_pb_text][et_pb_divider show_divider=”off” admin_label=”Divider” _builder_version=”3.12″][/et_pb_divider][et_pb_text admin_label=”How did we get rid of servers?” _builder_version=”4.9.10″]

Why choosing Serverless Architecture?

Let’s go back to the journey of us brave R&D adventurers.
We were just looking for an cloud license management system when we decided to develop one ourselves: it was at that very moment that the questions that led us to serverless architecture emerged.
 
  1. How many requests should we handle?
  2. How much traffic will be generated?
  3. How many times should we call that API?
 
The Fellowship of the Clouds hesitated for a moment. face screaming in fear 
 
That day we didn’t know how to answer, yet. The good news, though, is that the first time you’re doubtful about which architecture to choose but you know it will be based on microservices, you can take into considerations the questions above: if you can’t establish with the utmost precision how much you’ll be able to scale and provision, probabily the architecture you need is serverless.
 
See, many people ask me: when should serverless architecture be used?
The answer is very simple: when should it not be used?
 
In fact, it’s much easier to say when you shouldn’t use it than when you need to use it. Here is a list of general cases when serverless is not a good fit:
 
  • a very complex task, with high memory requirements and peculiar requirements;
  • fine-grained customization/flexibility/control level beyond what’s allowed by the functions;
  • a long-running task that can’t be broken into smaller functions (remember that you pay as you go);
  • when your functions are always up and running, and the cost is greater than a container (cost of the cluster is excluded);
  • in case your Cloud provider doesn’t offer a good FaaS (Function as a Service) platform.
[/et_pb_text][et_pb_divider show_divider=”off” admin_label=”Divider” _builder_version=”3.12″][/et_pb_divider][et_pb_text admin_label=”The Imagicle recipe.” _builder_version=”4.9.10″]

The Imagicle recipe.

Now, you’re probably thinking: “Ok, Chris, but which runtime should I pick?
Today there are a lot of runtimes in the Serverless scenario. 
For example, AWS, currently the most advanced Cloud Provider, supports Go, Python, NodeJs, Java, and .Net Core 2.
 
There is not a single right answer to this question, but perhaps it can help you to know how the Imagicle team approached this dilemma.
 
When we’ve begun developing the function, we asked ourselves:
  • Which language will be more efficient and fast? 
  • What language will allow us to save money?
  • Which language will the most suitable for our future in the Cloud?
 
Keep in mind that the function’s cost is calculated considering 3 different factors: 
  1. memory;
  2. seconds of computing time;
  3. number of requests.
 
The first 2 points are very simple to manage, while the last one may be tricky, because, in our case, is in our clients’ hands.
 
After some technical experiments, we have adopted GO, an open source programming language, because:
  • it’s faster than other languages (less execution time = less Cloud cost);
  • it is very simple to develop with;
  • it produces only one distributable file (easy to deploy);
  • in my opinion, it’s the language of the Cloud as much as python was the language of data science and ML, Scala was the language of Big Data, Java was the language of enterprise backend, PHP of the web, and so on. 
 
To complete the recipe, we seasoned with a pinch of Serverless Framework to enable us to manage all functions lifecycle and all IAC (infrastructure as a code).
[/et_pb_text][et_pb_divider show_divider=”off” admin_label=”Divider” _builder_version=”3.12″][/et_pb_divider][et_pb_text admin_label=”Conclusions” _builder_version=”4.9.10″]

Conclusions.

Well, well, guys.
The Fellowship of the Imagicle Clouds is on track: we can already see the slopes of Mount Doom.
 
Today our Cloud Licensing backend, based on a functions set, got a clean bill of health.
When there’s nothing to do, our architecture “turns off”, and when our Imagicle ApplicationSuite needs to call our service, the infrastructure turns on by magic!
 
What we have built during these months has a very specific name: Imagicle Cloud Licensing.
 
Starting from the last Summer Release 2019, in fact, Imagicle partners and customers can set a Smart Account and manage all Imagicle licenses directly from our Cloud, taking all the advantages of an easy activation, a real-time view of activities and centralized management

It’s a huge change. And it’s 100% serverless.

 

 
As we said, we are only on the slopes. As we proceed in our technological ascent, many other innovations will come, getting us (and you!) closer and closer to the Clouds.
 
 

So, guys, what do you think? Do you still love your old architecture?

 

#stayimagicle

 
 
Ps. Wanna join the Fellowship? Check our openings here!
 
 
[/et_pb_text][et_pb_sidebar area=”et_pb_widget_area_2″ _builder_version=”3.12″ custom_margin=”0px|||” custom_padding=”0px|||”][/et_pb_sidebar][et_pb_comments show_count=”off” module_id=”imaPostComments” _builder_version=”3.16″ header_level=”h2″ header_text_color=”#bd557c” form_field_text_align=”left” form_field_font_size=”14px” custom_button=”on” button_text_size=”12px” button_text_color=”#ffffff” button_bg_color=”#1bbbe9″ button_border_width=”0px” button_border_radius=”0px” button_letter_spacing=”1px” button_font=”VAGRoundedStd-Light|||on|||||” button_use_icon=”off” button_alignment=”left” text_orientation=”left” max_width=”90%” max_width_tablet=”” max_width_phone=”” max_width_last_edited=”on|desktop” module_alignment=”center” custom_margin=”50px||0px|” custom_margin_tablet=”” custom_margin_phone=”” custom_margin_last_edited=”on|desktop” custom_padding=”0px||0px|” header_font_size_tablet=”51″ header_line_height_tablet=”2″ custom_css_submit_button=”padding:6px 30px 4px 30px!important;||” button_border_color_hover=”#ffffff” button_border_radius_hover=”0px” button_bg_color_hover=”#00b996″ saved_tabs=”all” button_text_size__hover_enabled=”off” button_text_size__hover=”null” button_one_text_size__hover_enabled=”off” button_one_text_size__hover=”null” button_two_text_size__hover_enabled=”off” button_two_text_size__hover=”null” button_text_color__hover_enabled=”off” button_text_color__hover=”null” button_one_text_color__hover_enabled=”off” button_one_text_color__hover=”null” button_two_text_color__hover_enabled=”off” button_two_text_color__hover=”null” button_border_width__hover_enabled=”off” button_border_width__hover=”null” button_one_border_width__hover_enabled=”off” button_one_border_width__hover=”null” button_two_border_width__hover_enabled=”off” button_two_border_width__hover=”null” button_border_color__hover_enabled=”on” button_border_color__hover=”#ffffff” button_one_border_color__hover_enabled=”off” button_one_border_color__hover=”null” button_two_border_color__hover_enabled=”off” button_two_border_color__hover=”null” button_border_radius__hover_enabled=”on” button_border_radius__hover=”0px” button_one_border_radius__hover_enabled=”off” button_one_border_radius__hover=”null” button_two_border_radius__hover_enabled=”off” button_two_border_radius__hover=”null” button_letter_spacing__hover_enabled=”off” button_letter_spacing__hover=”null” button_one_letter_spacing__hover_enabled=”off” button_one_letter_spacing__hover=”null” button_two_letter_spacing__hover_enabled=”off” button_two_letter_spacing__hover=”null” button_bg_color__hover_enabled=”on” button_bg_color__hover=”#00b996″ button_one_bg_color__hover_enabled=”off” button_one_bg_color__hover=”null” button_two_bg_color__hover_enabled=”off” button_two_bg_color__hover=”null”][/et_pb_comments][/et_pb_column][/et_pb_row][/et_pb_section]

You might also be interested in…

Keep an eye on the Imagicle world.
Get some free, happy content and stay up to date.