Skip to content

Stateless Service #89

Open
Open
@hughleat

Description

@hughleat

Making the service stateless would make everyone happy!
This feature req is more a place for thrashing out ideas.

Basic idea is that the service has a set of things, indexed by some hashes.
The client asks for operations to be done to a thing. The service does them and returns the results.

Two commands:

  • upload(blob): hash
    This uploads a blob of something to the service. We don't need to know what it is. The hash lets it be referred to thereafter.
  • apply(hash, function+): any+
    Apply some functions to the thing with the hash, in sequence (i.e. function composition). Return the result of each function.

A session might look like:

  • client: apply(h1, compile-to-bc, opt(-adce), ir-size, opt(-mem2reg), compile-to-bin, binary_size)
  • service: 404 - I don't recognise your h1!
  • client: upload(my-C-file)
  • service: h2. client can check it matches h1
  • client: apply(h2, compile-to-bc, opt(-adce), ir-size, opt(-mem2reg), compile-to-bin, binary_size)
  • service: h3, h4, 10KB, h5, h6, 8KB. I.e. Hashes for each command, query results for each query.
  • client: apply(h5, opt(-inline), compile-to-bin, binary_size)
  • service: h7, h8, 9KB. I.e. starting from an existing point, do something a little different.

The service would be responsible for caching command and query results to make things fast.

Not sure about time to live - especially for uploads.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions