Is there any Qpid Dispatch Router windows version?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Is there any Qpid Dispatch Router windows version?

mohank-2
Hi,

We are mainly in to Windows application development.

We got suggestion to use Qpid Dispatch Router to scale up the AMQP
connections(i.e. connections are b/w 5000 - 10000)

As per the documentation QPID Dispatcher "Note : Dispatch Router will not
build
on Windows."

Is there any Windows Qpid Dispatch Router version to install OR is there any
way to install the same in Windows.

Thanks,
Mohan



--
Sent from: http://qpid.2158936.n2.nabble.com/Apache-Qpid-users-f2158936.html

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Is there any Qpid Dispatch Router windows version?

Jiri Daněk
Hi, a long time ago, i saw Dispatch running in Windows Subsystem for Linux.
That could be a practical option. The rest of this email is more or less
far fetched speculation from me.

Another possibility would be Cygwin environment (which would provide POSIX
Threads, and OpenSSL, and such)

Finally, i saw there even are some POSIX Threads libraries for Windows
itself. One more thing, threading in Dispatch is compartmentalized into
functions in a single file, so maybe that file could be replaced with a
windows specific one.

Besides posix Threads and maybe OpenSSL, another dependency is Linux epol
proactor in Qpid Proton, that is used by Dispatch. It might be possible to
use the IOCP or libuv versions of the proactor, but that's something that
is not normally done.

https://en.m.wikipedia.org/wiki/Windows_Subsystem_for_Linux

https://en.m.wikipedia.org/wiki/Cygwin


On Mon, Jan 4, 2021, 06:57 mohank <[hidden email]> wrote:

> Hi,
>
> We are mainly in to Windows application development.
>
> We got suggestion to use Qpid Dispatch Router to scale up the AMQP
> connections(i.e. connections are b/w 5000 - 10000)
>
> As per the documentation QPID Dispatcher "Note : Dispatch Router will not
> build
> on Windows."
>
> Is there any Windows Qpid Dispatch Router version to install OR is there
> any
> way to install the same in Windows.
>
> Thanks,
> Mohan
>
>
>
> --
> Sent from:
> http://qpid.2158936.n2.nabble.com/Apache-Qpid-users-f2158936.html
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Is there any Qpid Dispatch Router windows version?

Gordon Sim
On 04/01/2021 09:34, Jiri Daněk wrote:
> Hi, a long time ago, i saw Dispatch running in Windows Subsystem for Linux.
> That could be a practical option. The rest of this email is more or less
> far fetched speculation from me.

Running as a docker container could be another option.


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Is there any Qpid Dispatch Router windows version?

Jiri Daněk
On Tue, Jan 5, 2021, 10:32 Gordon Sim <[hidden email]> wrote:

> On 04/01/2021 09:34, Jiri Daněk wrote:
> > Hi, a long time ago, i saw Dispatch running in Windows Subsystem for
> Linux.
> > That could be a practical option. The rest of this email is more or less
> > far fetched speculation from me.
>
> Running as a docker container could be another option.
>

I was hesitant to propose this, because Docker on Windows involves a Linux
virtual machine which runs the actual program. Docker just provides
convenient UI around it.

But I imagine it could be actually practical setup, especially because of
the friendly Docker UI, which makes things so much more convenient that
running a VM on a Windows host yourself.

>
Reply | Threaded
Open this post in threaded view
|

Re: Is there any Qpid Dispatch Router windows version?

Jiri Daněk
Visual Studio supports multiple compilers! Besides MSVC it is also possible
to use Clang, and supposedly GCC with Visual Studio 2019 [1]. This is good,
because it somewhat reduces the number of incompatible things that would
have to be fixed to compile Dispatch on Windows.

I just spent some time trying to compile on Windows 10 with Clang. I had to
change 22 files, usually small changes fixing header-file includes,
replacing POSIX constructs with either a no-op implementation (e.g. the
backtrace printing in alloc_pool.c) or with Windows-compatible
implementations that I was able to find on the internet (full-StackOverflow
development is a thing!). In total, I've touched 22 files and managed to
get it to compile, but not (yet) to link, since I sometimes just threw in
function declarations without implementations; I did that especially for
pthreads.

There are projects like PHP or PostgreSQL that implement various
multiplatform shims to support both POSIX and Windows in a single codebase.
That is possibly a great source of inspiration.

The largest area missing on Windows was pthreads, and the second largest
functions about system clock and time. All threading code is in
threading.c; time code is spread out more. There are reimplementations of
pthreads for Windows, I am sure something with a suitable licence can be
copy-pasted in. Licence is a problem. Dispatch may not vendor on any
GPL-licensed code.

Next up, there are likely going to be problems with making the tests work.
I did not get to trying that, so I don't know how hard that might be.

All in all, porting the C code for Windows looks quite doable, but it
pollutes the code with multiplatform constructs and indirection (including
platform-dependent versions of headers). I imagine having to care about
Windows would slow down POSIX development; the maintenance costs are
undeniable. Few well-placed macros could even make it work on MSVC, but
again, macros make things harder to work with.

Personally, I feel that supporting Windows does not pay off for the Qpid
Dispatch project as a whole. I haven't seen any user interest, except this
thread. The IOCP proactor in Proton might benefit though, since Dispatch
would exercise the Windows code. Compiling under Cygwin and maintaining
that ability is probably a better practical proposition anyways, if there
is inclination to support something on Windows. Or maybe just using Linux
for Dispatch. Azure will run Linux just fine. But all that is just my
personal opinion.

[1]
https://docs.microsoft.com/en-us/cpp/build/clang-support-msbuild?view=msvc-160