-
Notifications
You must be signed in to change notification settings - Fork 131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provider model for IStreamable #70
Comments
IntentPerhaps we should outline the intent of introducing HistoryI was wondering if there was already a provider implementation available from one of the product groups using Trill (like Stream Analytics)? Perhaps they're not generic enough, but something battle-tested like that might serve as good reference. Even if us external folks can't see it, perhaps you could review or interview and share any insights they had. Open Questions
I would say mirroring the existing API (keeping it homomorphic—am I using that term right?) would allow developers to seamlessly switch between code and code-as-data modes of using Trill. It would be delightful for Other QuestionsWhere would you like feedback on specific changes? On the commit, on a new PR for the provider branch (which you'd open), or inline here? For example… SubscriptionsI was going to ask if IQStreamable<int> subject = ctx.Subject<int>("my-counter");
IQStreamable<int> query = subject.Where(val=> val % 2 == 0);
IDisposable subscription = query.Subscribe(val => Console.WriteLine($"Got an even: {val}")); Otherwise, what were your thoughts how the subscription API might look?
|
A few answers: Q: Will the Q: Is there an already-existing provider somewhere within Microsoft that we could learn from? Q: Will IQStreamable inherit from IStreamable? Q: Regarding SubscribeAsync etc. |
Requirement 1: Create an analogue to IQueryable or IQbservable for IStreamable.
That means having a new interface, IQStreamable, and a provider class, IStreamProvider, that can build up an expression in LINQ and then evaluate it later. The expression is inspectible and manipulable just like other LINQ expressions.
Requirement 2: Ensure that the provider can stand independently of the engine.
Not only would this allow someone to implement an engine to the Trill API with different characteristics, but it would also allow the API implementation to evolve independently of the API if it needs to.
Biggest open question: Do we precisely mirror the existing IStreamable API, or do we instead try to implement API 2.0 with lessons learned?
For the most part, we are incredibly proud of our API. However, there are a few places where we would make changes if we could. Those places are:
The text was updated successfully, but these errors were encountered: