tenor / RestBus

Easy, Service Oriented, Asynchronous Messaging and Queueing for .NET
http://restbus.org
Apache License 2.0
366 stars 56 forks source link

.NET core 1.0 RTM #6

Open fleed opened 8 years ago

fleed commented 8 years ago

Any plan to make it compatible with .NET core 1.0 RTM?

idefa commented 8 years ago

.NET core version. RabbitMQ.Client has .NET Core version.

LonghronShen commented 8 years ago

I have made an experimental fork for supporting .NET Core RTM. See https://github.com/LonghronShen/RestBus Let's play with my port and see if we can merge it back to upstream.

tenor commented 8 years ago

Yes, RabbitMQ.Client now has stable .NET Core support. @LonghronShen I'll take a look at your fork over the weekend. Thanks everyone!

LonghronShen commented 8 years ago

@tenor Yeah, let's keep in touch to make it. I'm here all the weekend.

tenor commented 8 years ago

@LonghronShen I've pulled your changes into a new dot_net_core_1 branch. It looks good. I do have a few tweaks to make. I'm also compiling a bunch of questions regarding some of the changes. I'll get in touch soon.

LonghronShen commented 8 years ago

OK. In fact, I also have some questions about design detail, including a known bug. @tenor

tenor commented 8 years ago

@LonghronShen I've been integrating the changes you made in the dot_net_core_1 and it's going well.

Here are the questions I have:

  1. I see use of Microsoft namespaces like in hostExtensions.cs where Microsoft.AspNetCore.Builder namespace replaced RestBus.AspNet namespace. Did you run into any difficulties using non Microsoft namespaces?
  2. In the older code, there is a concept of a "Server" which is a bit different from a "Host". A Server is the default server for the application, such as Kestrel, which is defined in the StartUp.cs file or in a configuration file. Replacing the default server with RestBus' server means the application will only listen for requests via RestBus.

A Host on the other hand is an additional means of receiving requests, so you can have a Kestrel server and one or more RestBus hosts all servicing the same application.

Looking at HostExtensions.cs Line 60, it seems like you have combined these concepts. I've not been keeping up with all the changes the ASP.NET Core team have made to the framework but it looks like they have dropped the ApplicationLifeTime.Application[Stopped|Stopping].Register feature. Is that why you removed the extra hosts feature?

I can tell that this was a lot of work! Thanks for working on this feature.

LonghronShen commented 8 years ago

@tenor, Thank you for your response! Here is my thoughts:

1.I see use of Microsoft namespaces like in hostExtensions.cs where Microsoft.AspNetCore.Builder namespace replaced RestBus.AspNet namespace. Did you run into any difficulties using non Microsoft namespaces?

This is just because I think the ASP.NET Core Team now has a philosophy that says any extension to ASP.NET Core infrastructure should use their existing namespaces so that we can get all components as a whole. The .NET Core itself is actually based on the concept that just breaks down the whole classic .NET Framework into many small components delivered as NuGet packages, and when one installed several packages, he still feels as if using the full .NET Framework because all parts are connected by the original classic namespaces. So we can act like that as if we are part of the whole .NET Core ecosystem.

2.In the older code, there is a concept of a "Server" which is a bit different from a "Host". A Server is the default server for the application, such as Kestrel, which is defined in the StartUp.cs file or in a configuration file. Replacing the default server with RestBus' server means the application will only listen for requests via RestBus.

I do appreciate your original design. But just like what you said, I failed to keep the Host feature because ASP.NET Team removed the Server concepts, and ApplicationLifeTime mechanism is a little frustrating. So the problem has not been resolved yet.

Keep in touch, I also want the Multi Restbus Instances feature back.

fleed commented 7 years ago

Is the project still alive?

LonghronShen commented 7 years ago

Yeah, currently you can try the current master branch. It needs more tests.