Skip to content

Instantly share code, notes, and snippets.

View TrentBrown's full-sized avatar

Trent Brown TrentBrown

View GitHub Profile

Keybase proof

I hereby claim:

  • I am TrentBrown on github.
  • I am trentbrown (https://keybase.io/trentbrown) on keybase.
  • I have a public key whose fingerprint is 9FB2 E711 23DD 72D6 6297 E606 97AA 6976 0382 6886

To claim this, I am signing this object:

@TrentBrown
TrentBrown / RedundantTerracottaServer.md
Created June 26, 2013 21:51
Redundant Terracotta Server

Adding Redundant Terracotta Server

FileThis uses a service called Terracotta for session management and as a cluster-wide lock manager to protect certain resources that can be shared by multiple processes and hosts. Terracotta is built for high availability environments and can easily handle the kind of loads that we put on it. To get the benefit of its architecture, however, there must be two or more instances in its server pool, and we currently have only one. We plan to provision, configure, and test a second one before completing our contract.

@TrentBrown
TrentBrown / GenerateGui.md
Last active December 17, 2015 20:29
Generating a GUI from FileThis "question" data

The following two files may be helpful in understanding how to go about generating a GUI from the FileThis "complex" question data, and in constructing an answer string from what the user enters:

QuestionDialogMediator.as

ComplexQuestionMediator.as

These are taken from the FileThis Flex web client. Both files define classes that mediate between passive presentation views and data models.

The first manages a user dialog view whose content will contain one of several view/mediator pairs, depending on the type of question that has been posed. See the onRegister method of the QuestionDialogMediator class.

@TrentBrown
TrentBrown / QuestionDialogMediator.as
Created May 29, 2013 02:11
QuestionDialogMediator
package com.filethis.main.view
{
import com.filethis.main.controller.AnswerQuestionCommand;
import com.filethis.main.controller.ConnectSourceConnectionCommand;
import com.filethis.main.controller.DeleteSourceConnectionsCommand;
import com.filethis.main.model.AllQuestionsProxy;
import com.filethis.main.model.ApplicationProxy;
import com.filethis.main.view.components.AskUserToFixQuestionView;
import com.filethis.main.view.components.ComplexQuestionView;
import com.filethis.main.view.components.CredentialsQuestionView;
@TrentBrown
TrentBrown / ComplexQuestionMediator.as
Last active December 17, 2015 20:28
ComplexQuestionMediator
package com.filethis.main.view
{
import com.filethis.main.view.components.ComplexQuestionView;
import com.filethis.model.vo.SourceConnectionVO;
import com.filethis.model.vo.QuestionVO;
import com.adobe.serialization.json.JSONDecoder;
import com.filethis.utils.StringUtil;
import com.filethis.view.components.TextInputFileThis;
import flash.utils.ByteArray;
@TrentBrown
TrentBrown / ComplexQuestionSchema.md
Last active March 4, 2016 21:06
FileThis Complex Question Schema

FileThis Complex Question Schema

When the kind property of Question resources has the value complex, the question property of the resource will have a JSON value that describes how the question parts must be posed to the user. This document defines the schema of those values and also the schema of the expected answer to the questions parts.

The schemas below are defined using JSON Schema.

Examples can be validated against schemas here.

Complex Question Schema:

@TrentBrown
TrentBrown / NotificationAPI.md
Last active July 25, 2016 21:19
FileThis Notification API

FileThis Change Notification

FileThis provides a notification system which allows clients to receive notifications when the resources exposed in our API change state (eg. accounts, connections, etc).

Each subscription to the notification system specifies a resource pattern that closely matches the REST paths used by the FileThis Resource API.

When a subscriber responds successfully to a notification request, the set of resource change notifications in the request will all be removed from the FileThis notification queue. If the client does not respond, or responds with a failure code, FileThis will try again to deliver the notifications, with an exponential-backoff to increase the interval of time between attempts.

The schemas below are defined using JSON Schema.

@TrentBrown
TrentBrown / SidecarSchema.md
Last active December 17, 2015 14:19
Sidecar Schema

Metadata JSON Schema Version 2

The following is defined using JSON Schema.

Examples can be validated against schemas here.

{
    "$schema": "http://json-schema.org/draft-04/schema#",
@TrentBrown
TrentBrown / FileThisResourceAPI.md
Last active December 17, 2015 14:19
FileThis Resource API

#FileThis Resource API

##Introduction

This document defines a subset of the FileThis REST API necessary and sufficient for partner integration.

The schemas for the request and response bodies below are defined using JSON Schema.

Examples can be validated against schemas here.