rsocket / rsocket-net

.NET implementation of RSocket
Apache License 2.0
252 stars 42 forks source link

RSocketSample: need sample for use of SocketTransport & WebSocketTransport #31

Open AlexanderFlanchik opened 3 years ago

AlexanderFlanchik commented 3 years ago

Hi RSocket Team,

I am trying to create a very simple RSocketServer using .NET 5. I have seen the sample project RSocketSample and tried to replace LoopbackTransport with SocketTransport or WebSocketTransport. I have used .NET 5 worker template and put this logic to separate hosted service. But it does not work. Sample with SocketTransport falls at Server.ConnectAsync(), but WebSocketTransport sample starts normally. However, I cannot connect it through WebSocket - Chrome says "WebSocket connection failed" when I try to do let ws = new WebSocket('ws://localhost:59800') (I am using this port in server app). Could you please add samples of SocketTransport & WebSocketTransport use?

Thanks, Alex

q00Dree commented 2 years ago

Hi @AlexanderFlanchik.

Did you manage to figure out how to make a tcp or wss server? Could you show an example?

tpeczek commented 2 years ago

Hi @q00Dree, @AlexanderFlanchik,

Somehow this ended up on my radar :). Long time ago I've done a basic sample of RSocket Server on top of ASP.NET Core. It's a TCP server which is implementing IRSocketTransport on top of primitives for Non-HTTP Servers. Maybe it will be useful for you:

This reminds me that I should come back and check how RSocket.NET has grown.

q00Dree commented 2 years ago

Hi @tpeczek, I already read your title and tried server code - It works!. Thank you a lot!

AlexanderFlanchik commented 2 years ago

Hi @Artur,

we wanted to use RSocket with .NET WebSockets server. I don't have an example right now, we decided to use Spring Webflux implementation with Angular SPA and RSocket. It works properly. But I think that a working example of real-world .NET RSocket server implementation would be very interesting and helpful.

Thanks, Oleksandr

ср, 3 нояб. 2021 г. в 15:21, Artur Safiullin @.***>:

Hi @tpeczek https://github.com/tpeczek, I already read your title and tried server code - It works!. Thank you a lot!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/rsocket/rsocket-net/issues/31#issuecomment-959061159, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIPBV7VLBEB7KEGOIU4TTWDUKEZOXANCNFSM5BAJDA7A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

AlexanderFlanchik commented 2 years ago

Hi Tomasz,

thank you for your links, your RSocket Server template looks very interesting, could you please continue with your articles related to RSocket & .NET? For example, .NET 6 integration, client/server streaming, authentication, etc.

Thanks, Alexander

ср, 3 нояб. 2021 г. в 12:12, Tomasz Pęczek @.***>:

Hi @q00Dree https://github.com/q00Dree, @AlexanderFlanchik https://github.com/AlexanderFlanchik,

Somehow this ended up on my radar :). Long time ago I've done a basic sample of RSocket Server on top of ASP.NET Core. It's a TCP server which is implementing IRSocketTransport on top of primitives for Non-HTTP Servers. Maybe it will be useful for you:

- https://www.tpeczek.com/2019/08/trying-to-run-rsocket-server-with.html

This reminds me that I should come back and check how RSocket.NET has grown.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/rsocket/rsocket-net/issues/31#issuecomment-958815679, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIPBV7VPL2S3MCOH7YKF2WTUKEDKTANCNFSM5BAJDA7A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

tpeczek commented 2 years ago

Hi @AlexanderFlanchik,

I wasn't thinking about that, but in general it boils down to effort vs value as day is a finite amount of hours in a day. When I wrote that particular article I was evaluating the technology for one of my clients. As currently I have no clients with interest in this technology, it all depends if there is a general benefit for the community. I'm unable to tell if RSocket is becoming popular with .NET community and if they are people who would benefit from such a series.