Skip to content

Instantly share code, notes, and snippets.

Yaakov Breuer bryaakov

Block or report user

Report or block bryaakov

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View HomeController.scala
package controllers
import akka.util.ByteString
import{Inject, Singleton}
import play.api.mvc._
import play.api.http.HttpEntity
class HomeController @Inject()(cc: ControllerComponents) extends AbstractController(cc) {
bryaakov /
Last active Sep 20, 2018
HTTPS support in CM-Well: Phases

HTTPS support in CM-Well: Phases


In RDF, all elements are URIs. The Subject is somewhat special in the eyes of CM-Well, as it is the path of the Infoton. Other elements (Predicate, Object, and Quad/Graph) are preserved as they were ingested.

  • Note this has nothing to do with the way CM-Well is communicated with. A CM-Well Cluster can live in an http endpoint and ingest data which "https" exists in payload, and vice versa.

Phase 0 - The Way It Used to Be

In order to preserve the https protocol of Subjects, we used to mangle the path of the Infoton, adding a prefix of https. before the domain. While this was fully supported, it felt "ugly" and we wanted to choose a different representation.

bryaakov /
Last active Mar 13, 2018
Flatten JSON Design

Flatten JSON

// TODO: Rename feature. Suggestion: Dynamic Nested Indexing


  • CM-Well will allow indexing not only by Linked Data predicates, or plain field names (AKA meta/nn), but also by nested JSON attributes.
  • Those attributes will be supplied in a JSON format (see APIs below), and will be searchable using a "path" in the JSON structure (see Examples below).


  1. Indexing an Infoton with nested attributes: Upload a FileInfoton to the path of your document, with "application/x-cm-well-json" content type header.
bryaakov /
Last active Aug 31, 2017
[bloop to be] FileInfotons vs WebApp

This gist will become a bloop in once we have conclusions. For now this is only thoughts...

Dan pointed out ( we have an inconsistency when navigating using a webapp to a FileInfoton and then refresh the page. First, let's agree on four axioms:

  1. SPA navigation should be aligned with browser history.
  2. An ObjectInfoton, when requested without format query parameter, is wrapped with the default webapp.
  3. A FileInfoton, when requested without format query parameter, is returned according to its mime-type ("as is"). This imatate the behavior of a "regular" webserver providing static content as files.
  4. CM-Well has two built-in webapps, one is default, but they are only FileInfotons ingested upon an install/upgrade. Anyone can upload their own webapp. In other words, the UI is pluggable.

The inconsistency was inevitable when implemeting (1) and (3) straightforward...

You can’t perform that action at this time.