Skip to content

Commit

Permalink
V8
Browse files Browse the repository at this point in the history
Streaming all the way through the architecture to avoid 2gb limit in
win32. New Material-based simple ui.
  • Loading branch information
matt-farmer authored and matt-farmer committed Jan 17, 2017
1 parent 78e1d10 commit beb3310
Show file tree
Hide file tree
Showing 242 changed files with 21,026 additions and 1,448 deletions.
22 changes: 22 additions & 0 deletions app/napval/gonias.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# This is the *nix NIAS batch file launcher. Add extra validators to the bottom of this list.
# Change the directory as appropriate (go-nias)
# gnatsd MUST be the first program launched

if [ -f "nias.pid" ]
then
echo "There is a nias.pid file in place; run stopnias.sh"
exit
fi

#rem Run the NIAS services. Add to the BOTTOM of this list
# store each PID in pid list
./nats-streaming-server -sc nss.cfg & echo $! > nias.pid

# give the nats server time to come up
sleep 2

./napval & echo $! >> nias.pid

echo "Run the web client (launch browser here):"
echo "http://localhost:1325/nias"

33 changes: 33 additions & 0 deletions app/napval/napval.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// harness runs the validation services and web server
package main

import (
"github.com/nsip/nias2/lib"
"github.com/nsip/nias2/napval"
"log"
"runtime"
)

func main() {

log.Println("Loading default config")
log.Println("Config values are: ", lib.DefaultConfig)

poolsize := lib.DefaultConfig.PoolSize

log.Println("Loading ASL Lookup data")
napval.LoadASLLookupData()

log.Println("Starting distributor....")
dist := &napval.ValidationDistributor{}
go dist.Run(poolsize)
log.Println("...Distributor running")

log.Println("Starting web services...")
ws := &napval.ValidationWebServer{}
go ws.Run()
log.Println("...web services running")

runtime.Goexit()

}
51 changes: 51 additions & 0 deletions app/napval/napval.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# ============================================================================
# Basic Config
#
# ============================================================================

# Baseline year for DOB checks
TestYear = "2017"

# ValidationRoute = ["schema", "local","schema2", "dob", "id","asl", "psi", "numericvalid"]
ValidationRoute = ["schema", "schema2", "dob", "id","asl", "psi", "numericvalid"]

# Webserver port
WebServerPort = "1325"




# ============================================================================
# Advanced parameters
#
# ============================================================================
#
# how many records to validate before sending update message
# to web ui
TxReportInterval = 500
#
# number of validation error messages to show for
# review in web ui - can be set as high as 10k
# but graphs will be hard to navigate
UIMessageLimit = 1000
#
# for any given files how many validation errors to store
# for report download
TxStorageLimit = 10000
#
#
# ============================================================================
# Poolsize; number of worker processes to run concurrently
PoolSize = 3
# notes:
#
# best initial sizing is number of cores on machine -1; each core gets a
# processor chain, with one left for database processes.
#
# only run large poolsizes (> 30 workers) on mac/linux, tcp will throttle on
# windows.
# also note above poolsize 50 on mac increase ulimits from default (256) e.g.
# $ ulimit -n 2048
# otherwise tcp will run out of aviailable file handles
# ============================================================================

Binary file added app/napval/nias8help.pdf
Binary file not shown.
57 changes: 57 additions & 0 deletions app/napval/nss.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Define the cluster name.
# Can be id, cid or cluster_id
id: "nap-val"

# Store type
# Can be st, store, store_type or StoreType
# Possible values are file or memory (case insensitive)
store: "memory"

# Debug flag.
# Can be sd or stand_debug
sd: false

# Trace flag.
# Can be sv or stan_trace
sv: false

# Interval at which the server sends an heartbeat to a client,
# expressed as a duration.
# Can be hbi, hb_interval, server_to_client_hb_interval
# hb_interval: "10s"

# How long the server waits for a heartbeat response from the client
# before considering it a failed hearbeat. Expressed as a duration.
# Can be hbt, hb_timeout, server_to_client_hb_timeout
# hb_timeout: "10s"

# Count of failed hearbeats before server closes the client connection.
# The actual total wait is: (fail count + 1) * (hb interval + hb timeout).
# Can be hbf, hb_fail_count, server_to_client_hb_fail_count
# hb_fail_count: 2

# Define store limits.
# Can be limits, store_limits or StoreLimits.
# See Store Limits chapter below for more details.
store_limits: {
# Define maximum number of channels.
# Can be mc, max_channels or MaxChannels
max_channels: 10000

# Define maximum number of subscriptions per channel.
# Can be msu, max_sybs, max_subscriptions or MaxSubscriptions
max_subs: 1000

# Define maximum number of messages per channel.
# Can be mm, max_msgs, MaxMsgs, max_count or MaxCount
max_msgs: 1000000

# Define total size of messages per channel.
# Can be mb, max_bytes or MaxBytes. Expressed in bytes
max_bytes: 0

# Define how long messages can stay in the log, expressed
# as a duration, for example: "24h" or "1h15m", etc...
# Can be ma, max_age, MaxAge.
max_age: "1h"
}
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit beb3310

Please sign in to comment.