petegoo / pushqa Goto Github PK
View Code? Open in Web Editor NEWAn HTTP push messaging library with oData and Linq subscriptions for server side filtering of reactive events
License: MIT License
An HTTP push messaging library with oData and Linq subscriptions for server side filtering of reactive events
License: MIT License
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.
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.
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.
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.
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.
Stock Ticker sample no longer works!
The grid used for the stock sample throws an exception when you navigate away to another sample.
There's some nasty bugs in 0.4.0.0 that were fixed on 0.4.0.2.
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.