More and more as time goes by, I find myself explaining some basic math concepts while talking about what I do or what I am interested in.
I’m not here to criticize the knowledge of physics or mathematics of the average person you might meet, but just to take some time to try to explain how very basic math
concepts work together. And eventually, build important physics concepts. (and eventually rule the world we live in?)
This is mostly inspired by talks with members of my family. One could not understand what equations and derivatives were. Another had no idea how position and velocity were related.
Finally, the last one didn’t know what a PDE (as if it wasn’t complicated enough without acronyms) was, and God forbid what Navier-Stokes could even be.
I did write some of this down, mostly how I wanted the math to work together. Apart from this, this would be a pretty accurate transcription of how I would explain this
orally to whoever’s climbing next to me during an easy multi-pitch where you join more for the views and the discussion than the climbing itself.
Equations
It’s pretty bold to start what I’m calling an intro to mathematics with such an intimidating word as equation. I think that for most people who have grown further and further from math,
the word equation kind of crystallizes everything they hate about math. Let’s change that.
In its simplest form:
\[x=2\]
is an equation. Some will argue with you that it’s not (mostly boring and annoying people), but let’s say it is. Let’s take a step back. In this equation, $x$ is what
we call the unknown, and we could call $2$ the known part. When solving an equation, you simply want to find what the unknown is, given what you know. Here, it’s pretty simple.
I am sure 99% of you can do it: $x$ must be equal to $2$.
Another way to look at it would be:
\[x-2=0\]
Obviously, if we say that $x=2$, we do have $2-2=0$, so that works. Yeah! In fact, in an equation, we can add the same number to both sides of the equation, and
the result holds true. For example:
I’m writing $\rightarrow$ more to symbolize a chain of thought. Given the audience, I don’t want to use other symbols that may have other significations in other contexts.
So, you solved an equation. Yeah again. We can also multiply (or divide) the two sides of our equation (we can’t divide by 0 though, you remember that, right?).
For example:
$x$ is equal to $2$, again. (Quickly realize in your head that indeed, 3 times 2 does equal 6).
Let’s take it up a notch:
\[x^2 = x \times x = 4\]
Yes, you are right. $x$ is again equal to $2$ (because 2 times 2 equals 4, yeah). But, what is $-2$ times $-2$? 4. Yes. Yeah? Does that mean that some equations
have more than one solution? Yes, absolutely. A super interesting way to think about equations is to plot them on a graph. For example, let’s get back to equation $(2)$:
We can see that our line crosses the number 6 at $x=2$, which solves our equation!
Same for equation $(3)$, we have:
Obviously our 2 solutions, at $x = 2$ and $x=-2$. So yeah, equations can have more than one solution. Worse than that, if you take a look at the plot above, you can see that the $-1$ line does not have any solution. It never crosses our equation. So the following equation:
\(x^2 = -1\) does not have any solution.
Well, hm, in fact, it does have solutions. But they’re not real so they can’t hurt you. And it’s probably better if we don’t talk about them here.
Equations can be as complex as you want them to be. In our case here, we don’t want that complexity. We simply want to understand the concept of unknown, and what it means to solve an equation. However, as you may have noticed here, our unknown is a number. It can be equal to 2, or to anything, as long as it solves the problem we were given.
But what if this unknown was now a function?
Functional Equations
What the heck is a function?
Let’s take a box and call it $f$. That box is pretty simple: you give it a number and it returns another number to you. For example, if that box is your government, you give it $x$ your salary, and it returns to you $0.5x$, your new salary! (Yeah?) Let’s say that box is a time converter for New York: you give it 10 and it returns 16 (the current time in Paris).
Well, those are functions. In the first case, we had $f(x) = 0.5x$.
Notice how I did not write the second one as it would be too complex for any reader actually reading what the heck a function is.
Here, $x$ is not the unknown anymore, it’s a variable. It represents any number. You write $f(x) = 0.5x$ so that you can write $f(0) = 0$ or $f(2) = 1$.
Let’s imagine a super simple functional equation. That is, the unknown is now a function itself!
\[f(x) -2 = 0\]
Well, you guessed it. Our function here is very, very, very simple: $f(x) = 2$. That means that this box will always return 2, no matter what we give it.
A more complex one could be:
\[f(x+y) = f(x) + f(y)\]
where $x$ and $y$ are both variables. This means that we have $f(0) = f(0+0) = f(0) + f(0) = 2f(0)$. Or: $f(0) = f(1 + -1) = f(1) + f(-1)$. And so on and so on. Let’s keep that in the back of our mind, and talk about something crucial: derivatives.
Deri-what?
The derivative of a function is also a function. Yes. More specifically, it’s the function that tells us how our original function is “evolving”. You remember $x^2 = 4$, right? We had the following plot:
Well, on the left of 0, our function seems to decrease. After that, it increases. Well, the derivative of $x^2$ tells us exactly that.
Let’s introduce an almost rigorous definition, just for the sake of simple calculations. We can define the derivative of $f$ by:
\[\frac{f(x+h) - f(x)}{h}\]
when $h$ gets super small. Like smaller than the smallest number you can think of. (Yes, it always exists). Let’s investigate the function $f(x) = 2x$ and plot it:
We can see that this function is negative before $0$ and positive after. It actually tells us how our main function $x^2$ is moving: it’s decreasing before $0$, and increasing after. Why, you ask? Because $f(x) = 2x$ is the derivative of $x^2$! Let’s show it quickly:
which is equal to $2x$ when $h$ gets closer and closer to 0.
But why do we have this relationship between the sign of the derivative and how the main function is evolving? One way to look at it is to represent the derivative as a simple linear function. Let’s plot the line that goes through $f(x+h)$ and $f(x)$, and let’s reduce $h$:
We can see that as $h$ gets smaller and smaller (and thus B gets closer and closer to A), the line becomes the tangent to our function at point A. This is the best straight-line approximation to our function at that point. Because of that, it makes sense that if our function is decreasing, then our line is decreasing as well. But for such a simple function, one can easily say if it’s decreasing or not, thanks to the sign of its director coefficient. But in this case, you may ask what its coefficient is? Well… \(\frac{f(x+h) - f(x)}{h}\) of course, our derivative!
And here you are, you see how its sign and the main function shape are related.
Derivatives? In equations??
Yes, that is also possible. As a side note, we denote the derivative of a function with a prime: $f’$. One of the most famous differential equations is $f’ = f$ (and f(0) = 1). Yes, we also add those extra conditions because differential equations can have an infinity of solutions. So by adding a small extra constraint, we can define exactly one solution.
In this case, it’s $f(x) = e^x$ where $e$ is the Euler constant.
Differential equations can be more complex than regular equations, but they still live (mostly) in the realm where one can find and define solutions. It gets more tricky when we start to be even more challenging:
One can define a function with more than one variable. For example: $f(x,y) = x^2+3y$. It’s a simple 2-variable function, but it can already lead to more complex equations. First of all, how do you define its derivative? What variable do you use? That’s why we defined partial derivatives…
A partial derivative of a function of several variables is its derivative with respect to one of those variables, with the others held constant: $\frac{\partial f}{\partial x}$ is the partial derivative of $f$ with respect to $x$. In the very simple previous case, we had:
You take an equation, you add functions in the mix, you put some of their partial derivatives on the side and there you have it: a proper PDE (partial differential equation). For example:
(with some initial conditions as well, of course).
But you can still be more complex: your function could be 2 or 3 dimensional. That is to say, your function could return a vector (or list of numbers if you want) instead of just a single number.
That’s the case of the velocity in fluid dynamics, for example. Velocity is defined across the $x$, $y$ and $z$ axes, and thus is a 3-dimensional vector. Pressure is not; it’s simply a number (still defined in 1, 2, or 3 dimensions depending on our use case). We could define more and more operations such as $\frac{\partial f}{\partial x}$ but it would take a lot of time. You can just keep in mind that any sign you don’t recognize is most of the time a mix of additions and partial derivatives.
Knowing all of that, you can reach the king of all PDEs: the flow motion of incompressible Newtonian fluids is described by the Navier-Stokes (NS) equations:
where $t \in [0,T]$ is the time, $\vec{v}(x,t)$ the velocity, $p(x,t)$ the pressure, $\rho$ the fluid density, $\eta$ the dynamic viscosity and $\vec{I}$ the identity tensor.
Even now, we don’t always know if a smooth solution to this equation exists. So how do we solve it? How can Formula 1 racing teams make super precise simulations to improve their cars?
Well… you think outside the box and you don’t solve it. You just try to find a solution that is close enough, and that isn’t too bad.
This blog post contains a small introduction to Finite Element Methods and Graph Neural Networks. This may or may not be to serve as future support for a paper.
Videos of predictions from our models are available here.
Finite Element Methods
Partial differential equations can be very, very complicated. To some extent, they are still one of the biggest mysteries in physics and mathematics. We often do not know the exact solution for a particular equation, and are thus forced to find a way to approximate it.
A popular method to achieve this is the finite element method. It consists of subdividing a domain into small parts, called finite elements. This space discretization produces an object called a mesh: a set of points and edges similar to a graph.
Instead of considering the equation in a continuous domain, we consider it instead on our mesh: on each node live some values of interest (such as the velocity, the pressure, etc.).
The easiest way to create a mesh is to simply create a uniform grid. For example, let’s take a simple rectangle, and create a mesh on it:
We also print each node with different colors based on certain values (let’s say the pressure, for example). One can immediately see why a uniform grid may not be the best way to create a mesh: a lot of the orange nodes are redundant. On the other hand, some pairs of nodes display a huge gap in values: we should add extra points between those.
Another important consideration is the fact that in order for the information to flow between each node, it could be interesting to add extra edges between nodes.
This leads to the creation of a much more optimized mesh than a simple uniform grid. This mesh is then used as a support to approximate a solution of the partial differential equation. It means that we minimize an approximation error, on each node, of a candidate function into the equation.
While this method now offers very strong results in a vast variety of fields (fluid flow, heat transfers, electromagnetism, etc.), it can also be very slow. The action of meshing a domain can be tedious, especially if it needs to take place at each temporal time step, and the iterative process of reducing the approximation error can take a long time as well.
Given these considerations, one can start to wonder if Neural Network Models could help achieve similar accuracy, while being much faster at inference time. As an example, let’s consider a triplet of nodes from our original mesh:
We then build a dataset by placing this triplet in various conditions, and solving our equation using the Finite Element Method:
In each case, we actually get a vector for each node and edge. These vectors can then be considered as inputs for a Neural Network such as a Multilayer Perceptron:
Graph Neural Network
Given a graph (i.e., a set of nodes and edges), we need to imagine a process that lets us update the vectors living on each node and edge. One way to do so is to consider each edge, concatenate its values with those from the nodes attached to it, and process these into a new vector.
Similarly, one can also process the value of a node by selecting edges connected to it and then processing those in a Multilayer Perceptron.
This process is called a Message Passing step. The information flows from each node into connected edges, and then from all edges to all connected nodes. To put it simply, information travels from all nodes to their direct neighbors.
But one may ask, what will happen if we repeat this operation? Will we transfer information to more distant neighbors? Well, yes, each message passing step expands the information flow to neighbors distant by one more step. That means that in theory, if the two most distant neighbors are linked by 10 edges, 10 message passing steps will allow each node of the graph to receive information from every other node.
We saw earlier how we used the Finite Element Method to create a dataset of different use cases. Let’s go back to our rectangular mesh, and use them to train a Graph Neural Network. In practice, a Graph Neural Network is simply $n$ Message Passing steps, one after the other.
On each node and edge of our mesh (or graph) lives a vector that encapsulates a lot of information. We update all of these vectors with our Message Passing steps and get an updated mesh: this is our prediction.
We then compare this prediction to the ground truth and compute a loss by subtracting the values on each node:
This method lets us train a Graph Neural Network to replicate the results from the Finite Element Method. While the training can be long, the inference time is much quicker than its classical counterpart (100 to 1000 times quicker!). If we take into account the initial cost of training a model, this means that after around 100 simulations, it starts to be more interesting to train a Graph Neural Network!
Speaking of inference, the network makes its predictions in an autoregressive fashion:
It means that at each step, the output of the model is now used as the input to generate the next prediction. This process is then repeated for the number of desired time steps.
Conclusion
You can find videos of predictions from our models in the section below. You can also read a much more detailed paper about our models here: Multi-grid Graph Neural Networks
While it is obviously more dense than this overly simplified blog post, we hope it is easily understandable even for people who do not gravitate around either CFD, Finite Element Methods, or Graph Neural Networks.
We released our first version of Flaneer in mid-March 2021.
Since then, we have conducted several tests with small entities, such as Game Development or Post-production Studios and signed several clients.
We also launched a test with a French engineering University: MINES Paristech - PSL.
While this test took place 9 month ago, we believe this is an amazing example to show for a few reasons:
It showcases how students and teachers can work and collaborate together remotely, without investing in expansive laptops,
A good user experience is everything: students worked much more in a simple, ready to use and powerful environment,
By using heavy software and GPUs in the cloud, we show how students, but more generally, engineers, can work and reduce their IT costs,
The goal was simple: give access to engineering software (Fusion360, Abaqus, 3DExperience, Paraview, internal tools & python scripts) with the computing power needed (32GB RAM & a GPU per student) everywhere.
Given the sanitary context in Paris at the time, this last point was crucial: students had to work even if the school was closed.
The mission of each students group was to build a drone, from its conception to making it fly!
The solution we provided was for each student to remotely access a Virtual Machine running on Windows via a streaming protocol. Software were already installed, and files & folders were managed with our custom file system management.
While each beta test so far was a success, we use the example of MINES Paristech - PSL to dive deep into the usage & feedbacks of each student, mainly because this is the first one that was conducted at length (from March 24 to April 28) and at scale (~100 students & teachers).
Usage
First, let’s have a look at the raw numbers. Students launched 1584 streaming sessions, each of them lasting 3.2 hours on average. Overall, students used Flaneer for more than 5000 hours, with around 10% of the usage during the weekend. Even if the students’ official hours were from 9 am to 5 pm, we still record many sessions outside of this time range.
A large portion of the sessions took place on Wednesday & Monday when working with professors or tutored. However, on Friday (personal project time) or during the rest of the week (even weekends), we can observe a lot of sessions being streamed. (40% of them!)
It shows that a tool like Flaneer allows students to work more freely and when they need to (or where they need to).
We believe Flaneer is the right tool to allow collaboration between students or between a student & a teacher. In our case, one can join the session of someone else & start working with him directly. Even more, if a student gets stuck using software, someone can immediately help him no matter where he is.
We counted 229 requests to join the session of another person, aka. 229 times where Flaneer helped two people work together.
Number of invocation of the “join another session” function
We strongly believe that sharing a session, and software per se, is the right way to collaborate. This solves hundreds of use cases, especially in a hybrid era when more & more will want to work from wherever they want.
One could ask if Flaneer was used by the entire batch of students or not; let’s dive into that matter. We launched sessions for 77 distinct students, each launching between 1 & 55 sessions, streaming between 3 & 212 (!) hours. On average, students used Flaneer for 61 hours, launching on average 19 sessions
75% of the students used Flaneer for more than 20 hours
90% of the students used Flaneer for more than 10 hours.
25% of the students spent more than 85 hours on Flaneer!
Bugs & Reports
We used a slack channel & a live chat on our web app to talk directly with teachers & students. Everyone at Flaneer is a firm believer in self-onboarding & direct customer relations.
That means that using Flaneer should be as simple as it can get and that whenever something is not going according to plan, anyone can directly talk to use and get an answer (yes, that’s even true at 3 in the morning - we have pretty loud alarms & slack bots).
Most of the requests were solved in under 5 minutes, but we present here the requests that took above 5 minutes to get resolved or answered:
Only one issue took more than 20 minutes to get solved (we found a significant bug with the reset_password function that time). The other issues are available below:
→ No sessions were available: the student had to wait for ~10/15 minutes before a new one was available. This did not happen very often. (cf image below)
→ The session freeze. This was easy to solve most of the time, simply by closing the browser tab & reopening it.
→ Some files were deleted from the student session. That is the most problematic bug we had.
Feedbacks
We received over fifty feedbacks from this beta test, and 95% of them were super positive. Regarding the overall quality of Flaneer:
50% of the students rated it a 5 out of 5
44% a 4 out of 5
6% a 1,2, or 3 out of 5.
We can also dive deeper into what the students liked & disliked. The most significant pain points we solved for the students are:
The file management system, allowing them to keep & store files outside of their computer
A life-saving solution when the laptop is a Chromebook or not good enough
Using software without downloading & managing them
How easy it was to use Flaneer
Being able to work anywhere & to switch computers seamlessly
Flaneer lets us achieve the type of teaching we want to do. We are not limited anymore by hardware or by long & complex talks with the IT department. Every teacher can now set up a workspace for their class in a matter of minutes. - Elie Hachem, Head of the Computing & Fluids Research Group @CEMEF - MINES Paristech
Now, we also have to look at what went wrong:
Some issues with the file management system, resulting in files being deleted for some users
Some latency issues
The streaming quality was sometimes too low (480p)
We were aware of some of these issues; we also believe that we still have a lot to work on regarding the sessions’ shortcuts while it did not come out. We were limited by streaming only in a browser, but the client version of our protocol now solves that!
We also worked closely with several professors working on this test and solved license server issues for them.
Conclusion
9 months later, we are still using the same recipe:
The simplest user experience we can provide
Software in the cloud, for everyone
Collaboration, no matter the tools or the software people are using
Providing support and feedbacks to our customers minutes or seconds after they need them
and are going for a lot more!
What’s your opinion about education & virtualization ? Feel free to comment or send me an email, I would love to have a chat with you!
Stay tuned for exciting Flaneer updates in the near future 🚀
You can also read more about us here: https://www.flaneer.com/blog/join-flaneer-engineering-team
Most of Flaneer services are hosted on AWS. That means that whether it is user data, files, or virtual workstation, it will be hosted on an AWS server. This article will dive into how we do it, how we make sure it is as secure as it can be, and how it will evolve over time.
Saying that everyone is concerned about their data and privacy seems obvious. At Flaneer, we’re working with multiple layers of sensitive data:
a company’s files system, such as Google Drive or One Drive
a team’s data and connection information
a user’s virtual workstation, aka its work, streaming over the internet
It is a necessity to build a safe and secure place for users to work.
The goals of this article are multiple. First, what is AWS and why do we consider it as a secure option? Then, how do we make it even safer? Finally, when will we switch to another cloud provider, especially a European one?
How do we work with AWS?
How do we work with AWS?
When you want to code something, be it a SaaS or a website, you will need to write code that will interact with a server. This server can store data or run some code. The critical part here is understanding where this particular server is and who is taking care of it. Most of the time, two solutions are possible (and being a startup working in infrastructure, trust me, it is not always an easy choice).
Solution 1: The company (here Flaneer, yours truly) will buy and manage its own hardware. This is a self-hosting solution.
Solution 2: The company (still Flaneer) will rent servers from someone else (a cloud provider). This is a cloud solution. While another company is renting you servers, they cannot access them. Only you are allowed to access and interact with them.
At this point, you probably guessed it: AWS was one of the possible cloud-provider we could go with. Other candidates are often:
GCP (Google Cloud Platform)
Azure (Microsoft)
and less often:
AliCloud (Alibaba)
Oracle
OVH
and even some very small and local ones. However, the smaller the provider, the less reliable and flexible it will be. It will also be much harder to scale up (or down, that happens sometimes).
This is why we went with AWS. It is the biggest cloud provider in the world and the one we felt the most comfortable to start with. Before diving into how we work with AWS, we think this might be a good time to answer some of the questions we often get asked while onboarding customers.
Why AWS and not another cloud provider?
AWS is probably the safest cloud provider out there. Security being our number one priority, it seemed like a no-brainer, and it still seems like it.
AWS is the most reliable cloud provider globally, with less than 2 hours of downtime per year. This is huge and can directly remove some cloud providers from the equation (looking at you OVH).
The amount of services AWS offers is massive. This allows our engineering team to quickly (that means less time than to make lunch — although that would depend on where you live and what you consider a good lunch (looking at my co-founder and his healthy Burger King habit here)) try and iterate on new solutions.
While not European, AWS has a lot of data centers in the world (cf Image 1). This allows us: 1. to easily use the closest servers to our customers; 2. to make sure these closest servers are actually close to the customer. On that note, since: Flaneer uses a French entity in Europe, and that most Flaneer users are European: this forces AWS to respect GDPR.
Why are we not self-hosting?
When you think about it, this makes a lot of sense, especially for a startup building a new infrastructure service from scratch. This would allow us to offer much lower prices and to customize much more the hardware we can offer.
However, this is extremely CapEx intensive and requires many skills that two recently graduated engineers did not have at the beginning. Messing with RaspberryPI, and building small clusters will not allow you to build massive infrastructure, trust me on that one.
However (trust our geeky side on that), we will work on that at some point during Flaneer’s life.
Why are my data safe & secure?
You can read extensively about why AWS is secure here: https://aws.amazon.com/security/?nc=sn&loc=0.
As an example:
AWS supports more security standards and compliance certifications than any other offering, including PCI-DSS, HIPAA/HITECH, FedRAMP, GDPR, FIPS 140–2, and NIST 800–171, helping satisfy compliance requirements for virtually every regulatory agency around the globe.
We talked a lot about how AWS is safe. But it is as safe as you make it. If you make a mistake, AWS will not save you: this is why we are extra cautious with every service we use. We’ll dive more into this subject in the next part.
What do we do with AWS?
At Flaneer, we use a lot (and by a lot, I mean it) of AWS services. We want to give a brief overview of the main ones and how they are related to our user’s data and privacy.
You can read more about how we use AWS and we make it as secure as possible here in
We are transforming IT Management to make it faster, simpler and accessible to everyone!
At Flaneer, we are building:
a new sort of computer that will change what software can do
an infrastructure capable of supporting our customers’ needs worldwide
tools to empower artists & workers around the world
We are trying to build an engineering team that reflects on these values: a simple and transparent infrastructure and development environment.
Being an engineer at Flaneer is simple. It means joining a small team of passionate engineers. Some of us worked at Amazon or Adore Me, others are open source contributors to large project such as Tor. But we all have one thing in common: we like to move fast, learn thing every day, and redefine software. We seek to maximise not only self productivity, but combined team productivity.
Does this sound like you?
Hungry and wants to change the way software are used — unstoppable with the right tools.
Bored and frustrated at big companies; feel held back by red tape, bureaucracy and poor decision making.
Consider yourself a generalist & enjoy being so: you are not tied down to a specific area, and are eager to learn new things every day.
Seeks to maximise not only self productivity, but combined team productivity, by communicating asynchronously.
Intellectually curious and loves learning.
We currently rent a private space at WeWork — Paris, but we mostly work remotely.
We are serious about competitive compensation and equity.