Image for post
Image for post

I know, it’s May 2020, half of Northern Lights season 2020 is out, but it is a good time to speak about technologies I’ve used to run my “northern lights awards” in the very beginning of January 2020!

Intro

In my spare time, I do landscape photography, as a hobby, and found myself in love with the Northern Lights. For this purpose, each winter I travel far north to witness the magic in the sky. If you haven’t done so, it’s worth it, but you have to be prepared and patient!

Not so long ago a friend of mine asked me about heading north to hunt the Northern Lights: “which country is the best for observing The Aurora?”. This type of question is really hard to answer, there are multiple reasons for that. While you can guess on chances how would you compare landscapes, experiences, culture, and people? A combination of these factors makes the traveling experience unique! …


Image for post
Image for post

Intro

The Java Platform Module System, as described in JEP (JDK enhancement proposal) 261, was introduced as part of Java 9, and the JDK itself was modularized as part of JEP 200 (The Modular JDK). This post aims to introduce these two concepts, the module system and the process of modularizing the JDK itself while building a case for using the module system in your next application to increase application security, portability, and maintainability!

Goals

The primary goal of the modular system was to introduce a new abstraction layer within the JDK on top of packages. Before the module system, the JDK was monolithic. Many JEP’s were created to address this including JEP 200: The Modular JDK, 201: Modular Source Code, 220: Modular Run-Time Images, 260: Encapsulate Most Internal APIs, 282: jlink: The Java Linker. One major benefit of this change to the JDK is that users can now build a smaller portable Java runtime image by utilizing a newly introduced tool called “jlink” (Java linker). …


Image for post
Image for post

Intro

Being a software engineer is just what I do for a living. However, that’s not entirely who I am. In my spare time, I do landscape photography. Almost a year ago I found myself in love with The Northern Lights, especially with a process of hunting them, it’s like chasing a storm, but that storm happened a few days ago, but it happened on the Sun.

In order to be a successful aurora chaser, it is strongly required to learn and understand the nature of the phenomenon. …


Image for post
Image for post

One of the most important programming languages we care a lot about is Python. Not so long ago we published a new FDK Python 0.1.1. If you haven’t heard about that please read one of the latest blog posts, you may find it very useful.

Fn CLI before 0.5.52

Before 0.5.52, during every Python function build the CLI was attempting to download the dependencies from public index PYPI. Unfortunately, not all dependencies available publicly, therefore, developers had to write their own Dockerfile in order to install a function’s dependencies using internal artifactories. …


Image for post
Image for post

The Python FDK has been updated with significant performance improvements for cold starts, but some changes are breaking.

This post will help you move to the latest FDK so that you can reap the benefits.

Investigating FDK Cold-start Performance

A New Core

If you are familiar with our Python FDK source code you have probably noticed that we use aiohttp as a base HTTP server implementation. There were a couple of reasons for this:

  • In a few lines of code, you can get a working HTTP server over UNIX domain socket.
  • Event-driven, compatible with asyncio, every HTTP route handler is a coroutine which allows function developers to write a function that works with background operations using native async/await syntax. …


Image for post
Image for post

A single instance of Fn

One of the most important goals of an open source project is to create a simple and solid user experience. For many projects, this means an easy path from “initial experience” (aka local, single server, etc.) to production deployment.

The Fn Project team works hard on both of these goals. The initial experience is two steps, first installing the CLI:

curl -LSs https://bit.ly/2B7x4zD | sh

Then starting the Fn server using the fn start command.

And that’s it. You now have the Fn server running locally and ready for some serverless magic! You can find the full documentation here.

Distributed Fn

A single instance of Fn server is easy to run, good for demos, presentations, developing functions, and learning the project. It was never meant to be a production deployment. That’s where a bit of configuration turns the same Fn server into a distributed deployment. …


Image for post
Image for post

Intro

From the very beginning, I was looking for the most effective ways to run Python serverless functions. It means that while being a part of the team and open source community I committed myself to deal with all known issues related to the performance of Python serverless functions. This post is all about dealing with the performance issues and ways to diagnose them. Please note that this post may appear to be useful not only for serverless folks but for Python developers in general.

Note

At this particular moment, Fn support lots of different runtimes officially and still more runtimes are not being supported officially but with a concept of an “init images” can be used right away without submitting any bits of contribution to the Fn source. …


I’d like to continue writing about new features of the Fn Project. This time I will tell you more about what is going on with Fn Project development and why you should keep an eye on it constantly.

Image for post
Image for post

Say goodbye to v1!

As a team, we are committed to delivering a high-quality open source project. We spend a year since our first announcement on making Fn the best open source FaaS platform. So, what is this all about? Today, we will look at some important underlying changes related to the Fn Server API… The Fn Server API v1 (aka “v1”) is no more! The Fn Server API v1 was all about a very common use case, i.e. …


Image for post
Image for post

At the beginning, Fn platform offered several officially supported FDKs. As time passed, more FDKs were introduced and supported by the Fn CLI.

The goal of an FDK is pretty straightforward — hide Fn-to-function protocol intercommunication along with providing a simple to use programming interface. The goal is to make the UX the same no matter which programming language a developer picks to write serverless functions.

Testing

Fn CLI (see fn test) provides the first barrier of the serverless function testing by creating a configurable interface for executing black-box testing. Let’s take a look at test.json :

{
"tests": [
{
"input": {
"body": {
"name": "Johnny"
}
},
"output": {
"body": {
"message": "Hello Johnny"
}
}
},
{
"input": {
"body": ""
},
"output": {
"body": {
"message": "Hello World"
}
}
}
]…


Image result for fn project logo

Welcome back! This particular guideline is a part of Fn’s contribution, development, and usage series.

Previous posts:

In this post I’d like to cover:

  • Communication between Fn and function (both transport and a request framing)
  • Purpose of the development kits

How does Fn communicate with functions?

Your function runs inside a container and uses the container’s STDIN to read serialized requests, STDOUT to return a serialized response and STDERR to write all logs. In order to establish communication with functions, the Fn server utilizes native Docker APIs to work with container IO streams. Fn writes serialized requests on the function container’s STDIN and listens for a serialized response from the function process inside of the container’s STDOUT. …

Denis Makogon

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store