-
Notifications
You must be signed in to change notification settings - Fork 5k
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
Cache rpc results #326
Comments
👍 Would love to see this behavior implemented in web3. Due to provider idiosyncrasies, would love the polling interval be configurable. |
What about a chain re-org where the latest block changes? This would make the cache obsolete right away, so i would rather wait.. |
re-org invalidates cache, seems pretty straightforward
not sure what you mean EDIT: absolute -> obsolete, ok I get it.
is there a gh issue for this or something to follow? |
Which is only one part and a proposal, but we are discussing a pushing API EDIT, its actually only about internal events. For the real new push API exists no issue for now. |
what do you think of http long polling for blocks? |
Would require changes on both node and web3. We are already going another route (push). |
@frozeman what protocol are you going to push over? |
@kumavis Bit late to the discussion but the answer we settled on is WebSocket. geth 1.4.x has WebSocket support and there are RPC methods for subscribing to push events on the connection. Push events are sent as JSON-RPC notifications. |
@fjl thanks |
Those are the relevant threads: |
i've been working on some alternate web3 providers that let a user run a dapp without setting up and running a node. We've noticed some dapps trigger very aggressive polling for state. Since our network requests can take a little longer to resolve, we've seen significant improvements by caching network results. The setup looks like this:
we're implementing this at the provider level, but seems like something that everyone could benefit from at the web3 level
thoughts? would you merge a PR based on this?
The text was updated successfully, but these errors were encountered: