Coder Social home page Coder Social logo

petegoo / pushqa Goto Github PK

View Code? Open in Web Editor NEW
51.0 15.0 10.0 2.19 MB

An HTTP push messaging library with oData and Linq subscriptions for server side filtering of reactive events

License: MIT License

C# 20.99% JavaScript 78.26% CSS 0.67% ASP 0.08%

pushqa's People

Contributors

meilke avatar petegoo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pushqa's Issues

Implement RxJs bindings

The .Net client currently allows conversion of expression trees to oData uri's and using AsObservable() it can project the incoming messages back into Rx.

We need a similar query uri generator and observable binding to RxJs.

Implement Azure Service Bus Topics and Subscription support

Currently in ServiceBus branch.

The Sql92 implementation should be easy enough but a few questions outstanding about the best approach for managing subscriptions.

There is no cleanup of subscriptions so if each Rx subscription generates a new SB Subscription (e.g. with a Guid as the name), how to clean these up? How to know when there are no more subscribers? Possibly with a custom Subject type that will remove the subscription when no more subscribers are present.

Take and Skip would have to be implemented client side.

Support for combining observables on the server: possible?

Looks like the API works really well with standard filtering by transforming the queries into OData format. But what about combining events?

Would it be possible to allow the client to combine events, and only receive them if the combination takes place on the server side first?

I assume that using the existing library, you'd have to perform this combination on the client side, which could be heavily inneficient in some scenarios.

Say you have 2 event streams and you want to get a new values once both have produced an output.

  • Stream 1: --------0--------0-------0--------
  • Stream 2: 0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-

In the above example, we'd only like to be notified once we have a result for each of them available, which would only happen once the "slower" stream 1 produces values.

If we combine on the client, we need to receive all the unnecessary events from Stream 2 first, and then once an event comes up from Stream 1, join them locally.

multiple subscriptions over one connection

Hiya my app uses one signalr connection to create multiple subscriptions to data from the server. As they go to different pages in the single page application these subscriptions change. Any idea if it would be possible to use pushqa in this kind of scenario? I want to be able to add and remove subscriptions from one connection.

Fix WPF Stock example

The grid used for the stock sample throws an exception when you navigate away to another sample.

Subscription conflicts due to statics in generic class

Your subscriptions ConcurrentDictionary is currently at the QueryablePushService class level. I think I stumbled on an issue with this. Take an app with 2 connections mapped. If a single client tries to subscribe to the two push service items (with the same connectionId), I think one subscription replaces the other.
app.MapConnection<QueryablePushService>("events", connConfig);
app.MapConnection<QueryablePushService>("log", connConfig);

[According to ReSharper...] Static objects in generic classes are shared regardless of the type of T. So QueryablePushService and QueryablePushService are sharing the same static instance of the dictionary, though it might not seem intuitive. I don't think that's what you intended. Subscribing to one while already subscribed to the other would cause the TryAddOrUpdate to run the update routine, replacing the other subscription.

I think you need to explicitly track {connectionId,subscription} on a per-type of T basis. I think this would need to go in a non-generic base class (e.g., QueryablePushService). Something along the lines of Dictionary<Type, ConcurrentDictionary<string, IDisposable>>.

Also, I think you need to make sure that you're disposing the IDisposables/subscriptions in case they are infinite sequences. So capture the out param on the TryRemove and call Dispose on it, and also modify your AddOrUpdate calls so that the third parameter disposes the one it's replacing. (x, y) => subscription.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.