Skip to content

Nhse o40 orkv.i141 silvermachine#3

Open
martinsumner wants to merge 83 commits into
openriak-4.0from
nhse-o40-orkv.i141-silvermachine
Open

Nhse o40 orkv.i141 silvermachine#3
martinsumner wants to merge 83 commits into
openriak-4.0from
nhse-o40-orkv.i141-silvermachine

Conversation

@martinsumner

Copy link
Copy Markdown
Contributor

Switch HTTP API to use SilverMachine not WebMachine/Mochiweb.

Intentions are:

  • improve performance of common requests, especially with significant volumes of index entries and/or user object metadata;
  • simplify the callbacks required within the application;
  • only implement the basics of HTTP, the full extent of rules (i.e. equivalent webmachine decision_core) may be implemented in the callbacks, but aren't applied by default;
  • allow for streaming on both inbound request bodies as well as outbound response bodies, to ready support for file upload/downloads;
  • simplify the task of providing SSL handshake information to the application

WIP.  A framework of modules and functions for SliverMachine.
Apply only to new files, or heavily altered files so that broader change history is maintained.
Also add callback module and unit test the sending of responses both streamed and whole.
Plus some further testing/formatting
Retain mohijson2 and mochinum to ease transition
Where URI starts "/" will add a leading <<>> to the split path - which is confusing and easy to forget about.
Also provides functions for converting Last Modified Date in KV GET.
No intention to support trailer fields.  Cannot merge with headers, as headers already processed by callback.

Actually looking at trailer fields provides further risk (how many should be supported, should they be included in content size etc).

@hmmr hmmr left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Overall, designing this riak component as a pared-down http server, with no attempt to present it as a general purpose http server outside of riak, is clearly the right approach. A handful of non-critical issues; otherwise, ready to approve.

Comment thread test/riak_api_web_ets_store.erl
Comment thread src/riak_api_web_handler.erl Outdated
Comment thread src/riak_api_web_headers.erl
Comment thread src/riak_api_web.erl Outdated
Comment thread src/riak_api_web.erl
Comment thread src/riak_api_web.erl Outdated
Comment thread src/riak_api_web.erl
Comment thread src/riak_api_web.erl Outdated
f34nk and others added 7 commits May 18, 2026 14:18
Add a regression test for the empty acceptor pool case after max pool use and worker exits.
Register the new module in the erlfmt file list.
Only decode after splitting, and return halt errors on decode failures
Comment thread src/riak_api_web_headers.erl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants