Using c++ for Librehealth installer for multi threading


(Naveen) #1

The installation time of the current installer is around 5-8 minutes, this could be improved by making multi threading on the installation process.PHP doesnt provide multithreading support for now, so alternatively we could use any other language which offers this support.I choose to build with c++ but here is the effects of c++

Pros: 1.Performance improvement 2.No addtional dependanices

Cons: 1.Need to compile it for each platform whenever we change the code. 2.Does not work in shared hosting enviroinments where exec() is blocked by the provider

Looking for suggestions to choose the alternative language

@r0bby @teryhill @aethelwulffe @tony


(Robby O'Connor) #2

I am opposed to this. You can do this using Python/Ruby/Golang – or even Rust and it’s safer. Multithreaded code is almost always a disaster and C++ is the wrong tool as it offers very few safeties.


(Tony McCormick) #3

No thank you. 5-8 minutes install time is nothing. Put your effort into getting the Updater to work form TAGGED releases of tested code instead.


(Priyanshu Sinha) #4

PHP do provide support for multi threading, but it is restricted to CLI applications. However as @tony mentioned, 5-8 minutes for one time installation is feasible.


(mua laurent) #5

@pri2si17, @tony i tested with with current setup (GSoC proposal) and everything being rationale the setup gives exactly a 6mins 10s install to reach the filling of initial info and can get to 8mins if user is good enough in typing his info