useOfRoutines/

directory
v6.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 2, 2023 License: MIT

README

Example use of routines

To go back to Vostok: here.


Introduction

The code here is about illustrating the gains of using concurrent routines, and how the framework helps following what happens within each routine.

Top


Building the project & starting the server

To build

go build -i -o $GOPATH/src/bitbucket.org/oscaroscar/vostok/examples/useOfRoutines/bin/useOfRoutines -v bitbucket.org/oscaroscar/vostok/examples/useOfRoutines/go

To run:

cd $GOPATH/src/bitbucket.org/oscaroscar/vostok/examples/useOfRoutines && ./bin/useOfRoutines -config=conf/example.dev.localhost.json

One-liner for building and restarting right away (assuming the previous cd has been run):

go build -i -o bin/useOfRoutines -v ./go && ./bin/useOfRoutines -config=conf/example.dev.localhost.json

Top


To test

curl http://localhost:10101/routineexample?action=normal
curl http://localhost:10101/routineexample?action=parallel

Top


Let's see what's happening

  • Without surprise, the parallel version of the same program finishes much sooner.

Top


Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL