(Note: this is part the salvation of my old blog, that a catastrophic event has recently happened me, I’m very sad now, and I will make an postmortem later)

I kind of like Nuxt.JS.

Despite it being kind of mediocre in architecture, and in each update it always break my app, I still think it is the authentic answer of Vue to Next.JS in the React land.

It has a lot of plugins, asynchronous loading and modules…The only thing I missed is a server backend to handle business logic.

Yet, universal application didn’t account for this and forces you to separate it into another domain, I know it has a good intention but this is kind of fussing for me. Did this mean I have to separately start two different Node applications at once? …


(Note: this is part the salvation of my old blog, that a catastrophic event has recently happened me, I’m very sad now, and I will make an postmortem later)

Why?

I loved how NextCloud have rich functionalities that they had such a good plugin ecosystem, but I also want SeaFile level kind of speed, that it is well known how slow NextCloud syncs via WebDAV.

However there are never such integration, and probably never will. And I think that NextCloud as frontend + SeaFile as backend is a good idea…

So, this is the abomination I made. A Docker app that runs SeaDrive and NextCloud…


(Note: this is part the salvation of my old blog, that a catastrophic event has recently happened me, I’m very sad now, and I will make an postmortem later)

雖然一直用緊嗰隻rock64係小巧玲瓏,一直根植係我嘅router附近日日俾我嘅Seafile強暴,但都唔代表無問題存在。

而且佢隻Gigabit速度遠遠達不上預期,加上個USB3係開頭速度快慢慢火葬場,慢到係USB2上嘅速度都頂唔住。

結果我個samba可以最快60MiB/s,跌到低至10MiB/s不等。我已經頂唔順。

所以講得冇錯,平嘢無好嘢,所以ARM都唔多見係好嘢嚟😂

有見及此,我決定用我三個月前剩低嘅士啤,外加$700港紙(Money money money, must be funny…),整咗隻Ghetto 4-Bay NAS。(當然全部用嘅都係山寨貨同洋垃圾😒又話平嘢無好嘢)

舊server spec: arm64 4C4T Cortex-A53 (RK3328), 4GB LPDDR3

新server spec: amd64 8C16T Xeon E5–2660, 8GB DDR3 ECC

驟眼睇落好似無咩嘢喎,普通server upgrade姐?開post做咩呢?係咪諗住炫富?

問題就嚟啦,我原本rock64嘅software同toolchain全部都係arm64喎…

我唔單止要處理OMV,仲有Seafile,Transmission,Plex,MariaDB + MongoDB,NodeBB,Nginx…

最大問題係,Seafile嘅cluster全部都係small files嚟,就算我做咗一次GC犧牲舊嘅revision縮細,都唔一定可以確保一日內transfer走曬啲cluster…50G咁多嘅small files喎大佬

所以今次負責data migration真係有啲頭痛。果然已經establish好咗嘅嘢無人想掂,姐係同香港IT一樣。

我諗咗三隻方案,可能會有更好,希望可以集思廣益下。


(Note: this is part the salvation of my old blog, that a catastrophic event has recently happened me, I’m very sad now, and I will make an postmortem later)

終於成功migrate啦~今日搞咗成q日啦。

到最後我都係做咗Plan A,姐係將啲config同data抄走落新嘅server到,但係我做咗啲小變種。

咁究竟我係點做嘅呢

我將啲config同data抄走,然後將佢Dockerize,之後再restore一個個container,而呢個恢復過程幾乎係無縫交接。

而且用Docker我可以isolate走啲port,呢家除咗完全唔駛煩俾人port knock之外(因為所有container都係係一個圍爐NAT,係host完全無expose呢個port),

更加唔駛煩會唔會俾人用0day搞: 就算俾你pwn咗,你都係得個殼。

今次我終於見識到Docker嘅強大。

(Originally Published Date: 2018–12–18T13:39:50.416Z)


Image for post
Image for post

I always like the concept of reactive programming, since they’re more intuitive and you can write less code, to do awesome things!

However, reactive programming always come with performance and memory penalty. It’s also damn hard to debug (as it’s non-deterministic).

But since we have powerful computers nowadays, and we have advanced debuggers, I guess we could neglect the cost of it, even on mobile, we usually have more than 4 cores, 2 gigs of RAM, and together they could compensate the performance loss, at least it won’t be sluggish and bloated, and we could also make sure no unintended side effects will come into our application. …


Hello Medium! So this is my first story, but I would like to get straight into the game.

I’m kinda frustrated I’m required a physical Mac and iPhone to do iOS React Native development.

I mean, I have MacBook and iPhone, I do have it. And I had to share my repo to my MacBook then run my React Native Builder and React Native Packager, which is kinda verbose and lame. Boo.

Besides, I want to work in a workstation😂, I have a Xeon workstation and it’s sad I had to say goodbye to my keyboard and mouse and hence goodbye to productivity. …

About

Steve “Stefan” Fan

A mad lad

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