René's URL Explorer Experiment


Title: Review and suggestions · Issue #4 · stealthcode/RxJavaMulti · GitHub

Open Graph Title: Review and suggestions · Issue #4 · stealthcode/RxJavaMulti

X Title: Review and suggestions · Issue #4 · stealthcode/RxJavaMulti

Description: Although I don't see any use in my work for such multi-observables currently, the idea about having higher arity dataflows made me interested (scientifically) in this library. Here, I'd like to write some points I see about such library....

Open Graph Description: Although I don't see any use in my work for such multi-observables currently, the idea about having higher arity dataflows made me interested (scientifically) in this library. Here, I'd like to wri...

X Description: Although I don't see any use in my work for such multi-observables currently, the idea about having higher arity dataflows made me interested (scientifically) in this library. Here, I'd lik...

Opengraph URL: https://github.com/stealthcode/RxJavaMulti/issues/4

X: @github

direct link

Domain: patch-diff.githubusercontent.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Review and suggestions","articleBody":"Although I don't see any use in my work for such multi-observables currently, the idea about having higher arity dataflows made me interested (scientifically) in this library. Here, I'd like to write some points I see about such library.\n## Approach\n\nFirst, Instead of creating Bi- and Tri- Observables by hand, you can explore the possibility of code templating and static code generation, similar how many of the primitive-collections libraries (such as Trove or fastutil) do it.\n\nSecond, I suggest adopting the reactive-streams idioms instead of the RxJava 1.x idions. I don't see too much direct code reuse and since you'll need wrappers and converters anyway, you have the opportunity to avoid a few less-than-optimal decisions the RxJava API has made.\n## Primitives\n\nI'd start a new type hierarchy based on the reactive-streams idioms:\n\n``` java\ninterface {Arity}Publisher\u003cTi, ...\u003e {\n    void subscribe({Arity}Subscriber\u003cTi, ...\u003e s);\n}\ninterface SubscriberBase {\n    void onStart(Subscription s);\n    void onError(Throwable e);\n    void onCompleted();\n}\ninterface {Arity}Subscriber\u003cTi, ...\u003e extends SubscriberBase {\n    void onNext(T1 t1, ...);\n}\ninterface Subscription {  // or import reactive-streams directly\n    void request(long n);\n    void cancel();\n}\ninterface {Arity}Processor\u003cTi, ..., Ri, ...\u003e extends\n    {Arity}Subscriber\u003cTi,...\u003e, {Arity}Publisher\u003cRi, ...\u003e {\n} \n```\n## Queues\n\nSince most operators require some Spsc queue to operate and they are designed to transmit one element at a time, you'll need to extend the logic and API of the classical Queues.\n\n``` java\ninterface {Arity}Queue {\n    boolean offer(Ti, ...);\n    boolean poll(Action{k}\u003cTi, ...\u003e out);  // true if element was available\n    boolean peek(Action{k}\u003cTi, ...\u003e out);\n    boolean isEmpty();\n    int size();\n}\n```\n\nNote that indeed, using callbacks poses some overhead, but I think it is less than allocating some tuples for the classical queues.\n\nIn addition, the ring-buffer based Spsc queue implementation needs some slight changes regarding the element store: you can use the current indexing logic, but now that translates to k-times indexing into the underlying array (the power-of-2 remains), roughly:\n\n``` java\nObject[] array = new Object[powerOf2Capacity * 3];\n\nvoid offer(T1 t1, T2 t2, T3 t3) {\n    int offset = ((int)(producerIndex) \u0026 mask) * 3;\n    array[offset] = t1;\n    array[offset + 1] = t2;\n    array[offset + 2].lazySet(t3); // memory order: release\n    producerIndex++;\n}\nboolean poll(Action3\u003cT1, T2, T3\u003e out) {\n    int offset = ((int)(consumerIndex) \u0026 mask) * 3;\n    Object o3 = array[offset + 2]; // memory order: acquire\n    if (o1 == null { return false; }\n    Object o2 = array[offset + 1]; // read in opposite order\n    Object o1 = array[offset];\n    array[offset] = null;\n    array[offset + 1] = null;\n    array[offset + 2].lazySet(null);\n    consumerIndex++;\n    out.call((T1)o1, (T2)o2, (T3)o3);\n    return true;\n}\n```\n## Callbacks on the stream\n\nSince Java functions can't return more than one result, one can return a tuple for each 'column' and split the operators into many, or use the same trick as with queues and have an output callback:\n\n``` java\npublic final BiObservable\u003cR1, R2\u003e map(Action3\u003c? super T1, ? super T2, Action2\u003cR1, R2\u003e\u003e mapper) {\n    return lift(s -\u003e {\n        return new AbstractBiSubscriber\u003cT1, T2\u003e(s) {\n            @Override\n            public void onNext(T1 t1, T2 t2) {\n                mapper.call(t1, t2, s::onNext);\n            }\n            // ...\n        });\n    });\n}\n```\n","author":{"url":"https://github.com/akarnokd","@type":"Person","name":"akarnokd"},"datePublished":"2015-06-13T12:06:20.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/4/RxJavaMulti/issues/4"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:7074a6fe-dc3c-6866-12e1-e1d504f27c85
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idA03A:361504:304A5A3:4135F03:697306C2
html-safe-nonce64805ac90589554dcc2a034879f5e6171bbf9514536c48ee5aa6a7b8de2e4dfa
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMDNBOjM2MTUwNDozMDRBNUEzOjQxMzVGMDM6Njk3MzA2QzIiLCJ2aXNpdG9yX2lkIjoiNTE2Nzk1MTUxODQ0NjU4NTUzOCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacbebe33045879d17a0e3521352f3394a58c15cf0c4c496d64ea7e94e2c20cc350
hovercard-subject-tagissue:87993885
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/stealthcode/RxJavaMulti/4/issue_layout
twitter:imagehttps://opengraph.githubassets.com/e405d6b40e19058b40eeb4d9a2fdd89d19978346f884897e93a9839a3d92c1cd/stealthcode/RxJavaMulti/issues/4
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/e405d6b40e19058b40eeb4d9a2fdd89d19978346f884897e93a9839a3d92c1cd/stealthcode/RxJavaMulti/issues/4
og:image:altAlthough I don't see any use in my work for such multi-observables currently, the idea about having higher arity dataflows made me interested (scientifically) in this library. Here, I'd like to wri...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameakarnokd
hostnamegithub.com
expected-hostnamegithub.com
None44ab3188c1dcfe3be0f9c3feca2e04e14fb79f120939ce2395e4f15ab96ec1d4
turbo-cache-controlno-preview
go-importgithub.com/stealthcode/RxJavaMulti git https://github.com/stealthcode/RxJavaMulti.git
octolytics-dimension-user_id1455238
octolytics-dimension-user_loginstealthcode
octolytics-dimension-repository_id28906678
octolytics-dimension-repository_nwostealthcode/RxJavaMulti
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id28906678
octolytics-dimension-repository_network_root_nwostealthcode/RxJavaMulti
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasea5e2b48bd1260476599758f5d253b5d24092ab84
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://patch-diff.githubusercontent.com/stealthcode/RxJavaMulti/issues/4#start-of-content
https://patch-diff.githubusercontent.com/
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fstealthcode%2FRxJavaMulti%2Fissues%2F4
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fstealthcode%2FRxJavaMulti%2Fissues%2F4
Sign up https://patch-diff.githubusercontent.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=stealthcode%2FRxJavaMulti
Reloadhttps://patch-diff.githubusercontent.com/stealthcode/RxJavaMulti/issues/4
Reloadhttps://patch-diff.githubusercontent.com/stealthcode/RxJavaMulti/issues/4
Reloadhttps://patch-diff.githubusercontent.com/stealthcode/RxJavaMulti/issues/4
stealthcode https://patch-diff.githubusercontent.com/stealthcode
RxJavaMultihttps://patch-diff.githubusercontent.com/stealthcode/RxJavaMulti
Notifications https://patch-diff.githubusercontent.com/login?return_to=%2Fstealthcode%2FRxJavaMulti
Fork 0 https://patch-diff.githubusercontent.com/login?return_to=%2Fstealthcode%2FRxJavaMulti
Star 3 https://patch-diff.githubusercontent.com/login?return_to=%2Fstealthcode%2FRxJavaMulti
Code https://patch-diff.githubusercontent.com/stealthcode/RxJavaMulti
Issues 4 https://patch-diff.githubusercontent.com/stealthcode/RxJavaMulti/issues
Pull requests 0 https://patch-diff.githubusercontent.com/stealthcode/RxJavaMulti/pulls
Actions https://patch-diff.githubusercontent.com/stealthcode/RxJavaMulti/actions
Projects 0 https://patch-diff.githubusercontent.com/stealthcode/RxJavaMulti/projects
Wiki https://patch-diff.githubusercontent.com/stealthcode/RxJavaMulti/wiki
Security 0 https://patch-diff.githubusercontent.com/stealthcode/RxJavaMulti/security
Insights https://patch-diff.githubusercontent.com/stealthcode/RxJavaMulti/pulse
Code https://patch-diff.githubusercontent.com/stealthcode/RxJavaMulti
Issues https://patch-diff.githubusercontent.com/stealthcode/RxJavaMulti/issues
Pull requests https://patch-diff.githubusercontent.com/stealthcode/RxJavaMulti/pulls
Actions https://patch-diff.githubusercontent.com/stealthcode/RxJavaMulti/actions
Projects https://patch-diff.githubusercontent.com/stealthcode/RxJavaMulti/projects
Wiki https://patch-diff.githubusercontent.com/stealthcode/RxJavaMulti/wiki
Security https://patch-diff.githubusercontent.com/stealthcode/RxJavaMulti/security
Insights https://patch-diff.githubusercontent.com/stealthcode/RxJavaMulti/pulse
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/stealthcode/RxJavaMulti/issues/4
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/stealthcode/RxJavaMulti/issues/4
Review and suggestionshttps://patch-diff.githubusercontent.com/stealthcode/RxJavaMulti/issues/4#top
https://github.com/akarnokd
https://github.com/akarnokd
akarnokdhttps://github.com/akarnokd
on Jun 13, 2015https://github.com/stealthcode/RxJavaMulti/issues/4#issue-87993885
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.