Skip to content

Instantly share code, notes, and snippets.

@izhar
izhar / totango_scim_support_v1.md
Last active July 31, 2019 09:12
Totango User Lifecycle API SCIM support
def _hello_world_aggr(request, context):
"""
Aggregates the parameters to a single comma separated string.
:param request: iterable sequence of bundled rows
:return: string
"""
params = []
logging.info('hello_world_aggr called')
# Iterate over bundled rows
for request_rows in request:
import com.google.cloud.dataflow.sdk.io.Read;
...
static class FormatToCanonical extends DoFn<Entity, String> {
@Override
public void processElement(ProcessContext c) {
create a json payload which consists of
some data extracted from the DS Entity
and the original Entity data in a 'raw_payload' field
}
public class Raw2Bigquery {
...
...
public static void main(String[] args) {
DataflowPipelineOptions options = PipelineOptionsFactory.create()
.as(DataflowPipelineOptions.class);
...
Pipeline mPipeline = Pipeline.create(options);
...
@izhar
izhar / tsung-digest.md
Last active December 5, 2017 15:53
Tsung getting started

###Benchmarking the system

We'll use tsung to benchmark the system.

####Tsung quick install

$ sudo apt-get install -y build-essential erlang gnuplot libtemplate-perl
$ sudo apt-get update
$ wget http://tsung.erlang-projects.org/dist/tsung-1.5.1.tar.gz

It is recommeded to read the 'Introduction' section in rest_api.md before continuing here.

Websockets Connection URL

It is possible to connect to sigserv websockets with three URLs:

  • ws://HOST:PORT/v1/sub/GID/SID/TID1,TID2,TIDn?clear=0|1&timeout=T&idle_timeout=TI&verbose=0|1&aon=0|1 - Subscribe as GID + SID to topics TID1, TID2, ... TIDn
  • ws://HOST:PORT/v1/sub/GID/SID?clear=0|1&timeout=T&idle_timeout=TI&verbose=0|1&aon=0|1 - Subscribe as GID + SID
@izhar
izhar / gist:5626740
Last active December 17, 2015 14:48
https://github.com/nivertech/sigserv/blob/master/doc/api/ws_api.md