Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Dapps and RPC server merge #5365

Merged
merged 9 commits into from Apr 3, 2017
Merged

Dapps and RPC server merge #5365

merged 9 commits into from Apr 3, 2017

Conversation

tomusdrw
Copy link
Collaborator

Part of #4474

  • Introducing fast minihttp server (around 5x faster on a single thread, with possibility to scale to any number of threads; requires dapps to be disabled)
  • Removed separate Dapps server and implemented dapps as RPC middleware
  • Removed all dapps-related flags (including dapps authorization that was borked anyway)

@tomusdrw tomusdrw added A0-pleasereview 🤓 Pull request needs code review. B7-releasenotes 📜 Changes should be mentioned in the release notes of the next minor version release. M4-core ⛓ Core client code / Rust. labels Mar 31, 2017
response.assert_status("HTTP/1.1 200 OK");
assert_eq!(response.body, "31\n{\"jsonrpc\":\"2.0\",\"result\":\"Hello World!\",\"id\":1}\n\n0\n\n".to_owned());
}
// TODO [Move to RPC tests!]
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, just noticed the TODO :)

@tomusdrw tomusdrw added A3-inprogress ⏳ Pull request is in progress. No review needed at this stage. and removed A0-pleasereview 🤓 Pull request needs code review. labels Mar 31, 2017
@tomusdrw tomusdrw added A0-pleasereview 🤓 Pull request needs code review. and removed A3-inprogress ⏳ Pull request is in progress. No review needed at this stage. labels Mar 31, 2017
@gavofyork
Copy link
Contributor

can't we have the dapps use the "fast minihttp server"?

@@ -25,7 +25,6 @@ serde_json = "0.9"
app_dirs = "1.1.1"
fdlimit = "0.1"
ws2_32-sys = "0.2"
hyper = { default-features = false, git = "https://github.com/paritytech/hyper" }
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉 🎉 🎉

if args.flag_ipc_off {
result.push(Deprecated::ipc_off());
if args.flag_dapps_pass.is_some() {
result.push(Deprecated::Removed("--dapps-pass"));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does json-rpc authentication work now? (I was not following your recent prs closely) :p

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nvm, I read pr description

@tomusdrw
Copy link
Collaborator Author

tomusdrw commented Apr 3, 2017

@gavofyork That would require quite some work to re-write current dapps stuff (but might be worth considering in the future).
Also minihttp is not really full-featured HTTP server, it's missing some stuff like streaming responses in chunks, handling cached requests properly and we rely on this for some parts of dapps server responsibilities (streaming hash-addresed content and caching it, streaming dapps packages, etc.).

@gavofyork gavofyork added A8-looksgood 🦄 Pull request is reviewed well. and removed A0-pleasereview 🤓 Pull request needs code review. labels Apr 3, 2017
@gavofyork gavofyork merged commit 2df4532 into master Apr 3, 2017
@gavofyork gavofyork deleted the dapps-rpc branch April 3, 2017 08:27
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A8-looksgood 🦄 Pull request is reviewed well. B7-releasenotes 📜 Changes should be mentioned in the release notes of the next minor version release. M4-core ⛓ Core client code / Rust.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants