fsprojects / FSharp.CloudAgent

Allows running F# Agents in a distributed manner using Azure Service Bus.
http://fsprojects.github.io/FSharp.CloudAgent/
The Unlicense
39 stars 14 forks source link

feature request - support for Service Bus for Windows #5

Closed JonnyBoats closed 9 years ago

JonnyBoats commented 9 years ago

"Service Bus for Windows Server is a set of installable components that provides the messaging capabilities of Windows Azure Service Bus on Windows. Service Bus for Windows Server enables you to build, test, and run loosely-coupled, message-driven applications in self-managed environments and on developer computers. Service Bus queues offer reliable message storage and retrieval with a choice of protocols and APIs. Building on the same foundation as queues, Service Bus topics provide rich publish/subscribe capabilities that allow multiple, concurrent subscribers to independently retrieve filtered or unfiltered views of the published message stream." http://msdn.microsoft.com/en-us/library/dn282144.aspx

NOTE: There may be minor incompatibilities between the DLL versions used by Windows and Asure - see: https://code.msdn.microsoft.com/windowsapps/service-bus-explorer-f2abca5a

isaacabraham commented 9 years ago

So I've had a go at just getting Windows SB installed - even that's proving to be a pain. Hopefully I'll get somewhere over the xmas break with this...

JonnyBoats commented 9 years ago

Thank you for working on this.

isaacabraham commented 9 years ago

Good news. I've just tried this out using Windows Service Bus 1.1 locally. It alls seems to just work out of the box. I've done some limited testing for both actors and workers with basic and resilient agents - all seems to work.

Service Bus 1.1 docs are here http://msdn.microsoft.com/en-us/library/dn282144.aspx. But essentially after you install Windows Service Bus 1.1, you connect using a connection string as follows: -

Endpoint=sb://<machine name>/ServiceBusDefaultNamespace;StsEndpoint=https://<machine name>:9355/ServiceBusDefaultNamespace;RuntimePort=9354;ManagementPort=9355

where is the machine running the service.

You can get the connection string by opening the Service Bus Powershell and entering get-SBClientConfiguration. Unfortunately, the Visual Studio Azure Service Bus add-in doesn't work with SB1.1 (only 1.0), and the latest version of Service Bus Explorer doesn't either. However, the older version (2.1.3.0) of it does, and it's (bizarrely) bundled as a zip inside the latest version. With this you can create queues etc. as normal.

There's no difference to your code - it's just the connection string that changes.

Let me know how you get on.