SignalR alpha for ASP.NET Core 2.0 released

Alpha version of SignalR for ASP.NET Core 2.0 available now
15 September 2017   1734

Alpha version of SiglanR for ASP.NET Core 2.0 released. 

What is SignalR?

ASP.NET SignalR is a new library for ASP.NET developers that makes it incredibly simple to add real-time web functionality to your applications. What is "real-time web" functionality? It's the ability to have your server-side code push content to the connected clients as it happens, in real-time.

SignalR can be used to add any sort of "real-time" web functionality to your ASP.NET application. While chat is often used as an example, you can do a whole lot more. Any time a user refreshes a web page to see new data, or the page implements Ajax long polling to retrieve new data, is candidate for using SignalR.

What's new?

Let's check main updates.

  • JavaScript/TypeScript Client
    • SignalR for ASP.NET Core has a brand-new JavaScript client. The new client is written in TypeScript and no longer depends on jQuery. The client can also be used from Node.js with a few additional dependencies.
      The client is distributed as an npm module that contains the Node.js version of the client (usable via require), as well as a version for use in the browser which can be included using a <script> tag. TypeScript declarations for the client included in the module make it easy to consume the client from TypeScript applications.
      The JavaScript client runs on the latest Chrome, FireFox, Edge, Safari and Opera browsers as well as Internet Explorer version 11, 10, 9. (Not all transports are compatible with every browser). Internet Explorer 8 and below is not supported.
  • Support for Binary Protocols
    • SignalR for ASP.NET Core offers two built-in hub protocols – a text protocol based on JSON and a binary protocol based on MessagePack. Messages using the MessagePack protocol are typically smaller than messages using the JSON protocol. For example a hub method returning the integer value of 1 will be 43 bytes when using the JSON based protocol while only 16 bytes when using MessagePack. (Note, the difference in size may vary depending on the message type, the contents of the message and the transport used – binary messages sent over Server Sent Events transport will be base64 encoded since Server Sent Events is a text transport.)
  • Support for Custom Protocols
    • The SignalR hub protocol is documented on GitHub and now has extension points that make it possible to plug in custom implementations.
  • Streaming
    • It is now possible to stream data from the server to the client. Unlike a regular Hub method invocation, streaming means the server is able to send results to the client before the invocation completes.
  • Using SignalR with Bare Websockets
    • The process of connecting to SignalR has been simplified to the point where, when using websockets, it is now possible to connect to the server without any client with a single request.
  • Simplified Connection Model
    • In the existing version of SignalR the client would try starting a connection to the server, and if it failed it would try using a different transport. The client would fail starting the connection when it could not connect to the server with any of the available transports. This feature is no longer supported with the new SignalR.
      Another functionality that is no longer supported is automatic reconnects. Previously SignalR would try to reconnect to the server if the connection was dropped. Now, if the client is disconnected the user must explicitly start a new connection if they want to reconnect. Note, that it was required even before – the client would stop its reconnect attempts if it could not reconnect successfully within the reconnect timeout. One more reason to remove automatic reconnects was a very high cost of storing messages sent to clients. The server would by default remember the last 1000 messages sent to a client so that it could replay messages the client missed when it was offline. Since each connection had its own buffer the memory footprint of storing these messages was very high.
  • Sticky Sessions Are Now Required
    • Because of how scale-out worked in the previous versions of SignalR, clients could reconnect and/or send messages to any server in the farm. Due to changes to the scale-out model, as well as not supporting reconnects, this is no longer supported. Now, once the client connects to the server it needs to interact with this server for the duration of the connection.
  • Single Hub per Connection
    • The new version of SignalR does not support having more than one Hub per connection. This results in a simplified client API, and makes it easier to apply Authentication policies and other Middleware to Hub connections. In addition subscribing to hub methods before the connection starts is no longer required.

 

ReSharper Ultimate 2018.3 Available

JetBrains work hard to make .NET coders happy - learn more about the latest and last 2018 update of popular tool
20 December 2018   498

JetBrains released last 2018 update for its .NET tools. In particular, the ReSharper Ultimate  received automatic annotation of arguments and definition of the code format, as well as TypeScript 3.0 support and earlier - Visual Studio 2019.

When calling methods, the code editor now annotates the value of the argument with the parameter name. This allows you to better understand what it is responsible for.

The developers have configured automatic detection and "alignment" of the code format. In addition, there was an autodetection of the style of the names used. Typically, ReSharper follows the naming conventions proposed by Microsoft. However, now, if the developer deviates from them, the editor himself adapts to the new principles and does not display warnings about the mismatch of names.

To simplify unit testing, the JetBrains team added a set of code verification methods with quick edits and tips for further actions depending on the context. In order for ReSharper to comply with information processing standards (FIPS, USA), the developers abandoned the md5 hashing algorithm and eliminated all cases of its use in the editor code.

Other key features:

  • ReSharper C ++: improved code refactoring, support for C ++ / CLI, work of Go to Declaration and Search Everywhere commands, error detection in templates.
  • dotCover: improved filter system. Now they are divided into two groups - runtime filters and result filters.
  • dotTrace: added tool integration to JetBrains Rider. Now you can configure and run profiling sessions, take snapshots and analyze them in the built-in viewer.
  • dotMemory: added a new condition for snapshot - if the amount of memory used exceeds a certain number of megabytes.
  • dotPeek: added support for decompiling more C # 7.x functions and copying the fully qualified name (FQN) character to the clipboard.

Get more info at official blog