<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Cédric Foellmi</title>
    <description>The latest articles on Forem by Cédric Foellmi (@onekiloparsec).</description>
    <link>https://forem.com/onekiloparsec</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3092%2F226224.png</url>
      <title>Forem: Cédric Foellmi</title>
      <link>https://forem.com/onekiloparsec</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/onekiloparsec"/>
    <language>en</language>
    <item>
      <title>A thousand deployments later...</title>
      <dc:creator>Cédric Foellmi</dc:creator>
      <pubDate>Mon, 29 Jul 2019 06:08:12 +0000</pubDate>
      <link>https://forem.com/onekiloparsec/a-thousand-deployments-later-4i5j</link>
      <guid>https://forem.com/onekiloparsec/a-thousand-deployments-later-4i5j</guid>
      <description>&lt;p&gt;[Originally published &lt;a href="https://onekiloparsec.dev/2019/07/28/a-thousand-deployments-later/"&gt;in my blog&lt;/a&gt;].&lt;/p&gt;

&lt;p class="has-drop-cap"&gt;A bit more than four years after its inception, two years after its real start, a thousand  deployments, about 10 000 commits, more than 1200 unit and integration tests, more than 100 REST API endpoints, &lt;a href="https://www.arcsecond.io"&gt;Arcsecond.io&lt;/a&gt; is approaching v1.0. What a journey, &lt;a href="https://onekiloparsec.dev/2015/12/29/the-story-of-6-years-of-development-of-iobserve/"&gt;again&lt;/a&gt;!&lt;/p&gt;

&lt;p&gt;The more I code arcsecond.io, the more I love it, and feel confidence for the years to come. Since the beginning, I knew this endeavour would last for multiple years, and not just be a hobby project. After all, I've been developing a &lt;a href="https://apps.apple.com/us/app/iobserve/id424693907"&gt;macOS app called iObserve&lt;/a&gt; for more than 8 years. Thus, I built Arcsecond.io with these long-term objectives: maximum reliability, permanent deployment capability, permanent clean and tested code. And of course: utmost care for the feedback of users and astronomers worldwide. For this, I knew I will have to learn and master whatever it needs, whatever its complexity or technological layer, and develop and master the permanent operations of a pretty nice full-stack software system. This article explains the important choices in the technical stack used in arcsecond.io.&lt;/p&gt;

&lt;p class="has-drop-cap"&gt;Let me start by showcasing a bit one thing I am pretty proud of today. Although I am very happy to have ported the core of my macOS app iObserve on the web (&lt;a href="https://www.arcsecond.io/iobserve"&gt;check it out&lt;/a&gt;), one of the coolest feature of arcsecond.io today is &lt;strong&gt;Worldwide Observing Activities&lt;/strong&gt;, that is, the possibility to &lt;strong&gt;know in real-time&lt;/strong&gt; what is being observed in the (largest but not only) observatories in the world, and some scientific satellites! &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Tqr3DDGm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://onekiloparsec.dev/wp-content/uploads/2019/07/Screenshot-2019-07-27-at-14.47.31-1024x685.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Tqr3DDGm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://onekiloparsec.dev/wp-content/uploads/2019/07/Screenshot-2019-07-27-at-14.47.31-1024x685.png" alt="" class="wp-image-455"&gt;&lt;/a&gt;Live observing activities occuring worldwide and in space!&lt;/p&gt;

&lt;p&gt;Even better: you can subscribe to it, and be notified right away if something matches your subscription. Say, you want to be notified when the HST starts an observation, or when an Programme is being performed for a given observer, or when a telescope instrument is being used, or when a region of the sky is being observed, etc. Boum. You've got mail! How cool is that? &lt;/p&gt;

&lt;ul class="wp-block-gallery columns-2 is-cropped"&gt;
&lt;li class="blocks-gallery-item"&gt;
&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--qzPMRO08--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://onekiloparsec.dev/wp-content/uploads/2019/07/Screenshot-2019-07-27-at-20.59.21-1024x677.png" alt="" class="wp-image-467"&gt;Example of a mail for a SWIFT observation
&lt;/li&gt;
&lt;li class="blocks-gallery-item"&gt;
&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--rr7QsX_h--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://onekiloparsec.dev/wp-content/uploads/2019/07/Screenshot-2019-07-27-at-21.00.48-1024x733.png" alt="" class="wp-image-468"&gt;Example of a mail for a La Silla Observatory observation
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To achieve this result, it is a long effort, and a rather lengthy list of decisions, optimizations, trials and errors. But the result is what I wanted: even if the user experience is not perfect (some links aren't always here, aren't always pointing to complete info etc), its potential is clearly enormous. Now, I have to "fill" it with more connectors.&lt;/p&gt;

&lt;p&gt;Ok, let's dive in. &lt;strong&gt;We'll start with the backend, then move on with the infrastructure, the frontend and finally the code organisation.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;The backend&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--BedUck9_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://onekiloparsec.dev/wp-content/uploads/2019/07/Screenshot-2019-07-27-at-17.31.59-1024x685.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--BedUck9_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://onekiloparsec.dev/wp-content/uploads/2019/07/Screenshot-2019-07-27-at-17.31.59-1024x685.png" alt="" class="wp-image-462"&gt;&lt;/a&gt;Ok, not the most beautiful webpage of the Internet. But its beauty is what's inside.&lt;/p&gt;

&lt;p&gt;The backend server is written with &lt;a href="https://www.djangoproject.com"&gt;Django&lt;/a&gt; 2.2 and Python 3.7 Originally, arcsecond.io started with Django 1.5 or something, and Python 2. The migration to Python 3 was made more than a year ago, and it was clearly a good choice. Almost no third-party libraries broke during the migration. At the beginning, I evaluated the possibility to use &lt;a href="https://palletsprojects.com/p/flask/"&gt;Flask&lt;/a&gt; instead of Django. But Django comes with a lot of things built-in, in particular its automatic admin portal, which proved to be invaluable over time.&lt;/p&gt;

&lt;p&gt;The design choice of the backend was to make a RESTful purely data-centric server. Hence, the rather obvious choice was to use the fantastic &lt;a href="https://www.django-rest-framework.org"&gt;Django REST Framework&lt;/a&gt;. It is an essential part of arcsecond.io. It is not the purpose of this article to explain REST principles, but simply let me say &lt;em&gt;it is a mindset&lt;/em&gt;, and the DRF allows you to deploy this way of doing with lots of ease. &lt;/p&gt;

&lt;p&gt;One of the key reason of using Python in the backend was obviously its seamless integration with scientific and astronomical libraries. In particular, it wouldn't be possible without &lt;a href="http://astropy.org/"&gt;AstroPy&lt;/a&gt; (and its affiliated packages) and &lt;a href="https://numpy.org"&gt;NumPy&lt;/a&gt;. Once arcsecond.io is making some benefits (hopefully some day!), I will redirect part of it to help fund these projects.&lt;/p&gt;

&lt;p class="has-drop-cap"&gt;The projects declares 52 direct dependencies (among which &lt;code&gt;django-cors-headers&lt;/code&gt; for managing HTTP headers easily, &lt;code&gt;django-cryptography&lt;/code&gt; to encrypt some model fields, &lt;code&gt;django-otp&lt;/code&gt; to protect the production admin route with 2FA, &lt;code&gt;django-allauth&lt;/code&gt; and &lt;code&gt;django-rest-auth&lt;/code&gt; to handle the complex process of auth, &lt;code&gt;django-storages&lt;/code&gt; to handle multiple storages remotely, &lt;code&gt;psycopg2&lt;/code&gt; to talk to the PostgresQL DB, &lt;code&gt;&lt;a href="https://2.python-requests.org/en/master/"&gt;requests&lt;/a&gt;&lt;/code&gt; and &lt;code&gt;&lt;a href="https://pyvo.readthedocs.io"&gt;pyvo&lt;/a&gt;&lt;/code&gt; to ease the writing of the multiple connectors...). &lt;/p&gt;

&lt;p&gt;More importantly, the backend relies on&lt;code&gt;&lt;a href="http://www.celeryproject.org"&gt;celery&lt;/a&gt;&lt;/code&gt; and &lt;code&gt;&lt;a href="https://github.com/django/channels"&gt;channels&lt;/a&gt;&lt;/code&gt; (with the ASGI &lt;code&gt;&lt;a href="https://github.com/django/daphne"&gt;daphne&lt;/a&gt;&lt;/code&gt; server), two libraries of crucial importance.&lt;/p&gt;

&lt;p&gt;Celery is a distributed task queue. When I was a newbie at the very beginning of this full-stack journey, I asked myself: Why would I need such a thing? Until I realised that a lot, if not most, of the activity of a backend server could be different from serving HTML pages or serialized data. In arcsecond.io the activity is not stable enough to say if the background Celery worker is more important than the Dahne server. However, with permanent parsing of Data Archives, such as ESO's,  Gemini's and HST's, as well as Satellite schedules such as Swift's, and the creation of a permanent flux of observing activities, a great part of the load of the "arcsecond.io" backend is occuring in the background tasks handled by Celery.&lt;/p&gt;

&lt;p&gt;The second library is the official Django-supported project to handle more than just HTTP requests, but also WebSockets. And even if we have only one read-only WebSocket route opened in arcsecond.io so far (the live activities here: &lt;a&gt;api.arcsecond.io/activities/live&lt;/a&gt;), the migration from a simple WSGI pure-HTTP server (it was gunicorn for a longtime) to &lt;code&gt;channels&lt;/code&gt; and &lt;code&gt;daphne&lt;/code&gt;, was not a simple one. We had 2 main difficulties. One was that the &lt;a href="https://github.com/django/channels_redis"&gt;&lt;code&gt;channels_redis&lt;/code&gt;&lt;/a&gt; library (providing the backing store for the &lt;code&gt;channels&lt;/code&gt; layer of the server) &lt;a href="https://github.com/django/channels_redis/issues/125"&gt;had a bug&lt;/a&gt; that was causing the creation of numerous connections in our infrastructure, way beyond what is expected. For a long time we had various errors pointing in various directions, without knowing the true cause of the problem. But once fixed (recently), the result was quite impressive!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--eFsQySPe--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://onekiloparsec.dev/wp-content/uploads/2019/07/Screenshot-2019-07-07-at-22.12.07-1024x766.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--eFsQySPe--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://onekiloparsec.dev/wp-content/uploads/2019/07/Screenshot-2019-07-07-at-22.12.07-1024x766.png" alt="" class="wp-image-457"&gt;&lt;/a&gt;Evolution over time of the number of Redis connections used by our channels / daphne server. See how dramatic the effect of a bugfix had.&lt;/p&gt;

&lt;p&gt;The second difficulty was to understand the underlying mechanism of WebSockets, and how one could provide automatically and similarly serialized JSON data. In other words, how to use our carefully crafted REST serializers to format the data in the WebSocket tube the same way it was for HTTP requests. We use the open-source (very early-stage but clean and well written) &lt;a href="https://github.com/hishnash/djangochannelsrestframework"&gt;djangochannelsrestframework&lt;/a&gt; library for that.&lt;/p&gt;

&lt;p&gt;As for the tests, we use the &lt;a href="https://pytest.org/en/latest/"&gt;pytest&lt;/a&gt; library, with the standard python mocks when necessary, and these additional and &lt;em&gt;very&lt;/em&gt; useful libraries:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="http://stevepulec.com/freezegun/"&gt;freezegun&lt;/a&gt; : to easily write tests anywhere you want in time,&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://factoryboy.readthedocs.io/en/latest/"&gt;factory_boy&lt;/a&gt; : to easily create dozens of instances during your tests setup,&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/edwinlunando/django-naomi"&gt;django-naomi&lt;/a&gt; : to easily see in a browser during development what the emails your backend sent look like,&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/kevin1024/vcrpy"&gt;vcrpy&lt;/a&gt; : to very easily replay the "cassettes", that is, replay real network requests.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;The infrastructure&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--1peC7_Tz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://onekiloparsec.dev/wp-content/uploads/2019/07/Screenshot-2019-07-27-at-17.56.29-1024x225.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--1peC7_Tz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://onekiloparsec.dev/wp-content/uploads/2019/07/Screenshot-2019-07-27-at-17.56.29-1024x225.png" alt="" class="wp-image-464"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Arcsecond.io has two servers: one for the backend, and one for the frontend. The two are deployed on the well-known &lt;a href="https://en.wikipedia.org/wiki/Platform_as_a_service"&gt;PaaS&lt;/a&gt; &lt;a href="http://heroku.com/"&gt;Heroku&lt;/a&gt;. Why Heroku? Well, because a colleague of mine, when I was working back in Switzerland, just mentionned it's the easiest way of deploying a server. And it is still mostly true today, I am very happy of this decision (even if today I would consider using a serverless stack, amazed by the products of &lt;a href="https://zeit.co"&gt;zeit.co&lt;/a&gt; for instance).&lt;/p&gt;

&lt;p&gt;Some of the many advantages of using Heroku:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Large marketplace of one-click-installation add-ons for bazillions of auxiliary services (storage, logging, monitoring...)&lt;/li&gt;
&lt;li&gt;Deploy with a simple &lt;code&gt;git push&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;A very easy-to-use CLI allowing you to interact and connect to your servers.&lt;/li&gt;
&lt;li&gt;A very easy way to have your hostnames using certificates (using &lt;a href="https://letsencrypt.org"&gt;letsencrypt&lt;/a&gt;)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So here is the infrastructure of arcsecond.io:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A Daphne server (one Heroku dyno - 7$/month),&lt;/li&gt;
&lt;li&gt;A Celery instance for a background worker (one Heroku dyno - 7$/month),&lt;/li&gt;
&lt;li&gt;A celery-beat scheduler (one Heroku dyno - 7$/month),&lt;/li&gt;
&lt;li&gt;A production &lt;a href="https://www.postgresql.org"&gt;PostgresQL&lt;/a&gt; DB instance, automatically backed up every hour  - 9$/month,&lt;/li&gt;
&lt;li&gt;A basic &lt;a href="http://papertrailapp.com/"&gt;Papertrail&lt;/a&gt; instance for logging,&lt;/li&gt;
&lt;li&gt;A basic &lt;a href="https://sendgrid.com"&gt;Sendgrid&lt;/a&gt; instance for sending emails,&lt;/li&gt;
&lt;li&gt;A basic &lt;a href="https://redislabs.com"&gt;RedisCloud&lt;/a&gt; instance for the backing store of the Daphne server,&lt;/li&gt;
&lt;li&gt;A basic Heroku Redis instance for the HTTP cache,&lt;/li&gt;
&lt;li&gt;An &lt;a href="https://expressjs.com"&gt;Express.js&lt;/a&gt; server for the frontend (one Heroku dyno - 7$/month),&lt;/li&gt;
&lt;li&gt;Multiple Amazon S3 buckets for the storage of the data (price follows data volume),&lt;/li&gt;
&lt;li&gt;The domains are bought on the french cloud provider &lt;a href="http://ovh.com"&gt;ovh.com&lt;/a&gt; (~40$ / year for a &lt;code&gt;.io&lt;/code&gt; domain),&lt;/li&gt;
&lt;li&gt;I used to pay the Pro level of &lt;a href="https://github.com"&gt;GitHub&lt;/a&gt; to store private repositories, but then it became free,&lt;/li&gt;
&lt;li&gt;There are also 2 other free Heroku dynos used for the staging environnements (one for the back, one for the front).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Total price: about 40$ + S3 storage (+ a bit of googlemaps...) every month! One could say it's not much and it's a lot at the same time. 40 bucks for all these services is not much indeed. But these are mostly first or second-level entries of the services, and as soon as some money flows in, I will move up the level of some of them. &lt;strong&gt;Thanks to Heroku it will be as simple as moving a cursor!&lt;/strong&gt; It's "a lot" in the sense that for now, arcsecond.io is totally free for everyone. &lt;/p&gt;

&lt;p&gt;There is one key part of the infrastructure that is not mentionned yet: &lt;a href="http://circleci.com/"&gt;CircleCI&lt;/a&gt;. The code of the backend is never pushed in production directly. It always goes through the automatic testing and deployment by CircleCI on a staging environment, then on production.&lt;/p&gt;

&lt;p&gt;As for the frontend, the code is not going through an external CI service, for one  reason. The Javascript code is split in various private &lt;a href="https://nodejs.org/en/"&gt;NodeJS&lt;/a&gt; modules (see below), and I couldn't wrap my head around the idea to pay an additional Amazon EC2 instance to hold a &lt;a href="http://verdaccio.org"&gt;Verdaccio&lt;/a&gt; server, or use the premium mode of &lt;a href="http://npmjs.com/"&gt;npmjs.com&lt;/a&gt; "just for 5 small JS libs". So I use a Verdaccio server that runs on my iMac at home.&lt;/p&gt;

&lt;p&gt;So far, I count about 750 deploys for the backend, and 260 for the frontend.&lt;/p&gt;

&lt;p&gt;One couldn't finish this part without mentionning the use of the fantastic crash-reporter &lt;a href="http://sentry.io/"&gt;Sentry&lt;/a&gt;. The richness and the ease of use of this tool is really great, and its help to find and correct bugs is invaluable. Even if Django comes with an automatic emailing when an error occurs (all 500 status code ends up in my Inbox), Sentry helps you read the code stack and identify more clearly what happened. And it also provides very easy management of problems, grouping identical ones, alerting when closed ones reappear etc.&lt;/p&gt;

&lt;p class="has-drop-cap"&gt;This "software system" is in production since more than a year now, and has handled already quite a few visit spikes (hello &lt;a href="https://www.producthunt.com/posts/arcsecond"&gt;ProductHunt.&lt;/a&gt;..). It is ready to support a much larger load without having to change its underlying organisation.&lt;/p&gt;

&lt;h2&gt;The frontend&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--HLN7Hrqa--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://onekiloparsec.dev/wp-content/uploads/2019/07/Screenshot-2019-07-27-at-17.59.13-1024x685.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--HLN7Hrqa--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://onekiloparsec.dev/wp-content/uploads/2019/07/Screenshot-2019-07-27-at-17.59.13-1024x685.png" alt="" class="wp-image-465"&gt;&lt;/a&gt;I never imagined I could build up such a complex view in the browser.&lt;/p&gt;

&lt;p&gt;The frontend is a &lt;a href="https://vuejs.org"&gt;Vuejs&lt;/a&gt; &lt;a href="https://en.wikipedia.org/wiki/Single-page_application"&gt;Single-Page Application&lt;/a&gt; (SPA). The discovery of Vue.js was simply a life-saver. Originally, the frontend of arcsecond.io was written with AngularJS, the first version of the now-called &lt;a href="http://angular.io"&gt;Angular&lt;/a&gt; frontend framework (wich is one of the  Trilogy, with Vuejs and &lt;a href="https://reactjs.org"&gt;Reactjs&lt;/a&gt;). But the codebase was enormous for the result, and hard to maintain. I tried at least 5 times to migrate to Angular 2, but always failed. And the JSX language of Reactjs appeared to me like a frightning thing and a prohibitive cost to pay (I still find it is a terrible idea for readibility). &lt;/p&gt;

&lt;p&gt;Then came Vuejs. Simple. Easy to learn. Natural. No cruft, no crazy syntax (simple &lt;code&gt;v-&lt;/code&gt; prefixes like &lt;code&gt;v-if&lt;/code&gt;, compared to &lt;code&gt;*ngIf&lt;/code&gt; for Angular – really, guys?), a textbook example of how a documentation must be written and displayed (yeah, Python my friend, your documentation is damn difficult to &lt;em&gt;work with&lt;/em&gt;). Then came the v3 of the Vuejs &lt;a href="https://cli.vuejs.org"&gt;Command-Line Interface&lt;/a&gt;. Oh man. Even the migration of the project from its original shape to the Vuejs-CLI v3 organisation was a breeze. And thanks God, it abstracts away all &lt;a href="https://webpack.js.org"&gt;Webpack&lt;/a&gt; insane complexity (for non-frontend developers, webpack is crazy difficult to learn). To me, Vuejs is what the web development should have always been.&lt;/p&gt;

&lt;p&gt;The tests are written with &lt;a href="https://jestjs.io"&gt;Jest&lt;/a&gt;, and &lt;a href="https://vue-test-utils.vuejs.org"&gt;vue-test-utils&lt;/a&gt;. I have made several attemps with &lt;a href="https://www.cypress.io"&gt;Cypress&lt;/a&gt; to make end-to-end tests, but I had trouble installing a stable version on my iMac. Moreover, one could go a long way with Jest, so I am concentrating on unit tests for now. &lt;/p&gt;

&lt;p&gt;One last piece that could be categorized as "frontend" in the sense of being a consumer of the APIs and their data is the Arcsecond Command-Line-Interface (CLI), open-source and &lt;a href="https://github.com/arcsecond-io/cli"&gt;freely available&lt;/a&gt; on GitHub. For a long time I thought it was enough to provide REST APIs of interesting data, I would not commit myself to another Python script / module like every scientist on this planet... But reality is stronger, and I am very happy to have build such tool. It helps integrate api.arcsecond.io more easily into custom workflows.&lt;/p&gt;

&lt;h2&gt;The organisation of the code &lt;/h2&gt;

&lt;p&gt;To that day, the backend repository contains 4200 commits, and the frontend repository 4900. Yes, I tend to make a lot of microcommits. The project started for real only two years ago, when I was able to really craft a serious beyond-hello-world frontend app for the long-term. The first commit of the Vuejs frontend was made on Tuesday February 28, 2017. But the first commit of the Python backend was on Tuesday Apr 15, 2014! (Always good to start a project on Tuesdays.)&lt;/p&gt;

&lt;p&gt;In the code, I have 295 Vuejs components (&lt;code&gt;.vue&lt;/code&gt; files) that allow to build a webapp, which weights 3.1 MB in the end. It is not using Server-Side-Rendering (&lt;a href="https://ssr.vuejs.org"&gt;SSR&lt;/a&gt;) so far, and it's pretty difficult to transform it right now (I have special handlers for dynamic routes for Organisation Portals...). But I intend to increase at least the number of pages using prerendering (see SSR link above). On the backend, even if there is only one "arcsecond" Django monolyth app, the code is split into 24 different Django subapps (which all have their own models, serializers, views, urls, sometimes tasks and/or connectors...). &lt;/p&gt;

&lt;p&gt;Yes, the backend app is a monolyth, even if the industry is breezing with microservices. Actually, given the amount of relationships between all the models, the real work of development and its operations appeared to me &lt;em&gt;a lot easier&lt;/em&gt; within a monolyth, rater than distinct microservices. I am alone (Eric my friend and partner mostly helps with advices, tests and comments), and arcsecond.io is a kind of product that requires an large amount of development first before starting to be useful. I just can't spend more time to something else than development.&lt;/p&gt;

&lt;p&gt;For the IDEs, I use the pro version of &lt;a href="https://www.jetbrains.com/pycharm/"&gt;PyCharm&lt;/a&gt; since the beginning for the backend (~80$/year). For the frontend I tried &lt;a href="https://www.sublimetext.com"&gt;Sublime&lt;/a&gt;, &lt;a href="https://atom.io"&gt;Atom&lt;/a&gt;, &lt;a href="http://vscode"&gt;VSCode&lt;/a&gt;, &lt;a href="https://www.jetbrains.com/webstorm/"&gt;WebStorm&lt;/a&gt; over the years, and finally use PyCharm too, since it has an excellent Vuejs plugin. Finally, I couldn't commit so fast and so easily, and find the history of the changes so quickly without the excellent Git client &lt;a href="https://www.git-tower.com/mac"&gt;Tower&lt;/a&gt; (~65$/year – that's quite a lot just to make commits... but I see Tower more like both a debugging and a management tool at the same time).&lt;/p&gt;

&lt;p&gt;The GitHub repositories (repos, in the developers jargon..) are organised as follow:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A single arcsecond-back repo for the backend, sometimes with the help of forks of open-source libraries,&lt;/li&gt;
&lt;li&gt;An arcsecond-front repo for the frontend, but using 6 private repos for custom Vuejs libaries,&lt;/li&gt;
&lt;li&gt;The &lt;a href="https://github.com/onekiloparsec/AA.js"&gt;AA.js open-source repo&lt;/a&gt; for the Astronomical Algorithms,&lt;/li&gt;
&lt;li&gt;The &lt;a href="https://github.com/arcsecond-io/cli"&gt;Arcsecond CLI&lt;/a&gt; open-source repo,&lt;/li&gt;
&lt;li&gt;The &lt;a href="http://github.com/arcsecond-io/public-issues/issues"&gt;public-issues&lt;/a&gt; repo to collect and work on public issues, found by my or users.&lt;/li&gt;
&lt;li&gt;The &lt;a href="https://github.com/arcsecond-io/standard-stars-catalogues"&gt;standard-stars-catalogues&lt;/a&gt; repo for holding an open-source and reliable source of standard stars catalogues.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That's it. Thanks for reading down to these lines! I hope you had learn a bit what it takes to start a "small but growing" project that grabs quite a large fraction of your daily awake time.&lt;/p&gt;

&lt;p&gt;–– Clear skies to all!&lt;/p&gt;

&lt;p&gt;P.S. The beautiful image of the starry night is from G. Hüdepohl (&lt;a rel="noreferrer noopener" href="http://atacamaphoto.com/"&gt;atacamaphoto.com&lt;/a&gt;)/ESO. &lt;/p&gt;

</description>
      <category>fullstack</category>
      <category>python</category>
      <category>vue</category>
      <category>astro</category>
    </item>
    <item>
      <title>How many LOCUM do you have?</title>
      <dc:creator>Cédric Foellmi</dc:creator>
      <pubDate>Tue, 06 Nov 2018 08:15:22 +0000</pubDate>
      <link>https://forem.com/onekiloparsec/how-many-locum-do-you-have-2ng4</link>
      <guid>https://forem.com/onekiloparsec/how-many-locum-do-you-have-2ng4</guid>
      <description>&lt;p&gt;Traders have "AUM", which is an acronym for Assets Under Management. I found it interesting to measure my "LOCUM"... that is, my Lines of Codes Under Management. &lt;/p&gt;

&lt;p&gt;I am writing software for my own hobby for a long time. It started long ago with small macOS Dashboard widgets. But it all ended up in a large macOS (+iPad) pro app called iObserve (v1). Since I started to port that app to the web, into a Vue.js webapp with a Django RESTful backend, using my own open-sources libraries, things became slightly more complicated. &lt;/p&gt;

&lt;p&gt;But how complicated? This morning, I made a quick table of my projects, and counting the lines of codes for each of them (using the powerful &lt;a href="https://github.com/AlDanial/cloc" rel="noopener noreferrer"&gt;cloc&lt;/a&gt; tool).&lt;/p&gt;

&lt;p&gt;I discarded the code for demo projects, concentrating solely on source code. Moreover, I ignored code that I didn't write myself, but that is sometimes included in my projects.&lt;/p&gt;

&lt;p&gt;So here it is: 23 projects, and about 156 kilo-cloc. Not bad. That macOS app is still quite imposing, but account only for a half of the total now. What is interesting that spliting key components into dedicated and smaller projects make indeed easier to develop these specific items, making then more powerful. But still, it increases the overall complexity, isn't it?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/http%3A%2F%2Fonekilopars.ec%2Fwp-content%2Fuploads%2F2018%2F11%2Flocum.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/http%3A%2F%2Fonekilopars.ec%2Fwp-content%2Fuploads%2F2018%2F11%2Flocum.jpeg" alt="@onekiloparsec LOCUM"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To me, working on these projects is like having a big city of my own, and walking accross the streets I've built. There is a down town where I spend a lot of time, sometimes spending hours to have buildings straight and well aligned (read: make unit tests). There are suburbs I need to travel to sometimes, to check something, or bring something back. There are also cosy places I am happy to stumble upon again, and others which are less welcoming because I know I can't ignore the fact it must be rebuilt, or refreshed, or updated.&lt;/p&gt;

&lt;p&gt;And you? How many LOCUM do you have? What does it teach you?&lt;/p&gt;

&lt;p&gt;(Cover Image Credits: &lt;a href="https://unsplash.com/photos/pTCcJSBOTxY" rel="noopener noreferrer"&gt;https://unsplash.com/photos/pTCcJSBOTxY&lt;/a&gt;)&lt;/p&gt;

</description>
      <category>cloc</category>
      <category>devcities</category>
      <category>mentalhealth</category>
      <category>discuss</category>
    </item>
    <item>
      <title>Only one thing truly matters. Push. Things. In. Production.</title>
      <dc:creator>Cédric Foellmi</dc:creator>
      <pubDate>Tue, 07 Nov 2017 13:14:17 +0000</pubDate>
      <link>https://forem.com/onekiloparsec/only-one-thing-truly-matters-push-things-in-production-ej2</link>
      <guid>https://forem.com/onekiloparsec/only-one-thing-truly-matters-push-things-in-production-ej2</guid>
      <description>&lt;p&gt;This post could be summarised as "Stop talking, start delivering" but it would be a little too simplistic. It's a small "what do you feel?" post to see whether my feeling is shared among devs or not.&lt;/p&gt;

&lt;p&gt;My feeling is this. We are overwhelmed with information, sometimes of great quality. And some good people spend hours writing very good starter tutorials, and I read them a lot here at dev.to but also in many other places (thanks to all). In some rarer cases, I find some really helpful articles that go well beyond "hello world" and is relevant to some of my current dev difficulties. Usually, I always find an answer to my problem. &lt;/p&gt;

&lt;p&gt;Moreover, I often feel I should also participate to this sharing: provide insightful readings to fellow devs, in blog posts where I expose the various problems I had in the past in my dev life. Or maybe give speeches in conferences. But what should I write/talk about? I tend to avoid having very specific problems, and if I stumble upon one, I look for working around it. (Okay sometimes, I have to [re-]write some third-party libs to fix stuff). &lt;/p&gt;

&lt;p&gt;I have one specific/personal problem though. I have giganormous personal projects. I am having monster fun at making them. But I can't afford having too difficult problems. I must be very efficient to actually deliver something. I've developed a kind of "code-as-as-unix-daemon" spirit, where I can start (and stop!) coding in no time, while still handling kids and family time... &lt;/p&gt;

&lt;p&gt;And this point of efficiency is so intense that this blog post is the first (and maybe the last?) of a long list of unfinished unpublished drafts about unclear subjects that will actually... be pushed "in production"! Because I have only one thing that matters, and that I really love: pushing my stuff in production.&lt;/p&gt;

&lt;p&gt;And you? What's your feeling? Do you share some bits of what is described here?&lt;/p&gt;

&lt;p&gt;P.S. For those interested in what I am doing, here is the visible parts of my ongoing current activity: &lt;a href="https://www.arcsecond.io" rel="noopener noreferrer"&gt;https://www.arcsecond.io&lt;/a&gt; and &lt;a href="https://api.arcsecond.io" rel="noopener noreferrer"&gt;https://api.arcsecond.io&lt;/a&gt;&lt;/p&gt;

</description>
      <category>philosophy</category>
      <category>delivery</category>
      <category>passion</category>
      <category>discuss</category>
    </item>
    <item>
      <title>Hi, I'm Cédric Foellmi, a.k.a. onekiloparsec</title>
      <dc:creator>Cédric Foellmi</dc:creator>
      <pubDate>Mon, 13 Feb 2017 15:06:15 +0000</pubDate>
      <link>https://forem.com/onekiloparsec/hi-im-cdric-foellmi-aka-onekiloparsec</link>
      <guid>https://forem.com/onekiloparsec/hi-im-cdric-foellmi-aka-onekiloparsec</guid>
      <description>&lt;p&gt;I have been coding for many years, hm... it started probably around 1997-1998 for real.&lt;/p&gt;

&lt;p&gt;You can find me on GitHub as &lt;a href="https://github.com/onekiloparsec" rel="noopener noreferrer"&gt;onekiloparsec&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;You can find me on Twitter as &lt;a href="https://twitter.com/onekiloparsec" rel="noopener noreferrer"&gt;onekiloparsec&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I live in Grenoble, in France.&lt;/p&gt;

&lt;p&gt;I work for Motion Recall, a VR startup.&lt;/p&gt;

&lt;p&gt;I have a Ph.D. in astrophysics.&lt;/p&gt;

&lt;p&gt;I mostly program in these languages: Swift &amp;amp; Python&lt;/p&gt;

&lt;p&gt;I develop apps and services for astronomers worldwide in my spare time (mostly in night hours). Most notably &lt;a href="https://www.onekilopars.ec/iobserve" rel="noopener noreferrer"&gt;iObserve&lt;/a&gt; and &lt;a href="http://www.arcsecond.io" rel="noopener noreferrer"&gt;arcsecond.io&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I am currently learning more about Unity3d.&lt;/p&gt;

&lt;p&gt;Nice to meet you.&lt;/p&gt;

&lt;p&gt;P.S. &lt;em&gt;onekiloparsec&lt;/em&gt; is a pseudo I crafted after spending a lot of time on a tiny but fascinating question: the distance of the galactic black-hole GRO J1655-40. You can find out more &lt;a href="https://arxiv.org/abs/0812.4232" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>introduction</category>
    </item>
  </channel>
</rss>
