rabbitmq / rabbitmq-objc-client

RabbitMQ client for Objective-C and Swift
https://rabbitmq.com
Other
241 stars 84 forks source link

Should we support open-source Swift for Linux? #14

Closed camelpunch closed 8 years ago

camelpunch commented 8 years ago

Points of interest:

base58ed commented 8 years ago

It'll be useable across the platforms if we use open source Swift. Is there any logical argument for the otherwise? No. Even better, use Swift Package Manager and let the project mature with the open source compiler and package manager.

I don't see any advantage in carrying object implementation. The language is practically used on iOS/OSX platforms where a swift implementation (or a thin Swift proxy to translate unsupported swift features to obj-c) would do.

Swift is going to have it's own open source cross-platform foundation library anyways. So either use Apple Foundation library and plan to refactor later or either rely on OS identifier macros and refactor with Swift Foundation later.

But all in all, using an open source swift compiler with swift package manager will open up this library and rabbitmq for swift users on all platforms.

briancroom commented 8 years ago

Hi @nimtiazm, thanks for your interest in the project! I'm not on the development team, but was involved in the discussions when it was decided to use Objective-C for this project, so I can provide some insight.

There are a few things that made Objective-C an attractive choice for the project at this time:

Additionally, the cross-platform advantages of Swift wouldn't be available yet anyway, because key dependencies of the project are either unavailable (e.g. CocoaAsyncSocket) or very immature (Foundation) on non-Apple platforms.

Down the road a bit further, when the Swift ABI reaches stability, the stdlib isn't required to be shipped directly by apps anymore, and the Swift Corelibs projects like Foundation and libdispatch are closer to production-readiness, the benefits of using Swift for cross-platform capabilities will be much clearer.

In the meantime, it would be helpful if you could keep a look out for a cross-platform Swift library providing functionality similar to CocoaAsyncSocket which would be a requirement before we could even consider migrating to Swift.

camelpunch commented 8 years ago

Closing as I think this answers the question. We'll definitely be looking at this down the road.

mackoj commented 7 years ago

It coud be great if you could consider revisiting this decision

michaelklishin commented 7 years ago

@mackoj this client won't move to Swift. Nothing except for the lack of time prevents us from developing an identical, and even better, client in Swift.

adib commented 6 years ago

@briancroom Vapor Sockets seems to be promising. Failing that there's a number of swift libraries offering sockets and asynchronous handling.

Having a Swift/Linux client for RabbitMQ would be great for server-side scenarios.

michaelklishin commented 5 years ago

An update since this question keeps coming up (e.g. in #165).

This client is implemented in Objective-C and that won't change. A pure Swift might be an option but likely will have to use a different set of I/O dependencies. I don't know when our team would have the cycles to work on that.

This is open source software, though, so you are welcome to contribute a prototype.

funcmike commented 1 year ago

Hi, If anyone is still looking for RabbitMQ client working on Linux I'm making one: https://github.com/funcmike/rabbitmq-nio. It's very early days - any help will be appreciated.

helje5 commented 1 year ago

Objective-C works just fine on Linux FWIW. Since like forever (e.g. both OpenGroupware.org and ScalableOGo.org are server side ObjC examples that run on Linux since about 1999). GNUstep-base is a pretty great Foundation implementation that should ship w/ most Linux's by default (and there is also libFoundation, which I worked on, but is less complete).