kraken-php / framework

Asynchronous & Fault-tolerant PHP Framework for Distributed Applications.
http://kraken-php.com
MIT License
1.12k stars 59 forks source link

Why Kraken not compatible with Windows OS? #43

Closed vanloc0301 closed 7 years ago

vanloc0301 commented 8 years ago

I don't know any issues happen with Kraken is not compatible with Windows OS.

Can you explain about that?

khelle commented 8 years ago

The components themselves are compatbile with Windows system, but the Framework as a whole is not 100% compatible. The reason for that is there is no Windows system adapter implemented under Kraken\Util\System which is crucial for multi-processing. I didn't find a way of creating a new, fully separated and daemonized process using Windows commandline that would be able to return me the pid of the process and won't start in windowed mode. I tried to workaround this with writing Go drivers, but it was still impossible to do. I believe for Windows Kraken would need to use some external *.dll file that enables this kind of an API, but I am not aware of something like that at the moment.

Golpha commented 8 years ago

http://php.net/manual/en/book.win32service.php

slider23 commented 8 years ago

Please try Visual Basic scripts. https://msdn.microsoft.com/en-us/library/ateytk4a(v=vs.84).aspx or https://msdn.microsoft.com/en-us/library/d5fk67ky(v=vs.84).aspx .

khelle commented 8 years ago

@Golpha @slider23 Thank you for both of your feedback. I tried working with WshShell once, but I was not able to solve my issue. However I don't remember now what the exact problem with WshShell was, so I might try it once again. Also, win32service looks proimising, I will definietely look into that too.

tsdarky commented 7 years ago

Long time ago I was playing with deamons on Windows, hope that this mini tutorial will help :)

khelle commented 7 years ago

Since most of the features of Kraken 0.5 works on Windows, and the parts which are not supported can be replaced with different configuration (such as using threads instead of processes in current containers or processes without SSH connections), this issue is no longer relevant.