Commit Graph

42 Commits

Author SHA1 Message Date
C Cirello
e3c85d3e7e server: shutdown endpoint (#466)
fixes #390
2016-12-29 20:19:42 +01:00
C Cirello
0cdd1db3e1 functions: fix goroutine leak in runner (#394)
* functions: fix goroutine leak in runner

* functions: ensure taskQueue is consumed after context cancellation
2016-12-06 16:11:06 +01:00
C Cirello
ac0044f7d9 functions: hot containers (#332)
* functions: modify datastore to accomodate hot containers support

* functions: protocol between functions and hot containers

* functions: add hot containers clockwork

* fn: add hot containers support
2016-11-28 15:45:35 -02:00
Pedro Nasser
867eb4b176 Changes on function/metric loggers (#343)
* initial fix logger

* dix DefaultFuncLogger

* fix runner and tests

* reverting: sending async task stdout to func logger
2016-11-27 16:36:40 -02:00
C Cirello
f6d19c3cc9 functions: performance improvements - LRU & singleflight DB calls (#322)
* functions: add cache and singleflight to ease database load

* runner: upgrade

* deps: upgrade glide files

* license: add third party notifications

* functions: fix handling of implicitly created apps

* functions: code deduplication

* functions: fix missing variable
2016-11-21 19:48:11 +01:00
Pedro Nasser
0343c4990c server.New signature changes and test fixes. (#324)
* ctx middleware should always be the first added to router

* plugable enqueue func, changed server.New signature

* fix tests

* remove ctx/ctx.Done from server
2016-11-21 17:11:01 +01:00
C Cirello
9d06b6e687 functions: common concurrency stream for sync and async (#314)
* functions: add bounded concurrency

* functions: plug runners to sync and async interfaces

* functions: update documentation about the new env var

* functions: fix test flakiness

* functions: the runner is self-regulated, no need to set a number of runners

* functions: push the execution to the background on incoming requests

* functions: ensure async tasks are always on

* functions: add prioritization to tasks consumption

Ensure that Sync tasks are consumed before Async tasks. Also, fixes
termination races problems for free.

* functions: remove stale comments

* functions: improve mem availability calculation

* functions: parallel run for async tasks

* functions: check for memory availability before pulling async task

* functions: comment about rnr.hasAvailableMemory and sync.Cond

* functions: implement memory check for async runners using Cond vars

* functions: code grooming

- remove unnecessary goroutines
- fix stale docs
- reorganize import group

* Revert "functions: implement memory check for async runners using Cond vars"

This reverts commit 922e64032201a177c03ce6a46240925e3d35430d.

* Revert "functions: comment about rnr.hasAvailableMemory and sync.Cond"

This reverts commit 49ad7d52d341f12da9603b1a1df9d145871f0e0a.

* functions: set a minimum memory availability for sync

* functions: simplify the implementation by removing the priority queue

* functions: code grooming

- code deduplication
- review waitgroups Waits
2016-11-18 18:23:26 +01:00
C Cirello
4e41cac6e2 functions: DB -> DB_URL / MQ -> MQ_URL and related docs (#258) 2016-11-09 17:02:32 -08:00
Carlos C
d5fb1afda7 Revert "Assert License (#224)"
This reverts commit a61c4dab78.
2016-11-06 09:25:12 -08:00
C Cirello
a61c4dab78 Assert License (#224)
* license: assert license for Go code
* license: add in shell scripts
* license: assert license for Ruby code
* license: assert license to individual cases
* license: assert license to Dockerfile
2016-11-05 23:33:07 +01:00
C Cirello
ae40a730f9 functions: remove viper config file (#221) 2016-11-04 14:41:06 -07:00
C Cirello
6b7886721d Fix supervisor dependency (#167)
Fixes #164
2016-10-14 13:17:34 +02:00
Travis Reeder
25f582b180 Updated README and simplified/cleaned up some code. 2016-10-13 20:24:06 -07:00
Travis Reeder
e85c7560c3 Added hello-go example to make example image faster. 2016-10-13 20:24:06 -07:00
C Cirello
df3d5b48ce Fix race condition during initialization (#163)
Currently, async workers are started before HTTP interface is available
to get their requests. It fixes by ensuring that async workers are
started after HTTP interface is up.

Essentially we are getting rid of an error message during bootstrap:

        ERRO[0000] Could not fetch task error=Get http://127.0.0.1:8080/tasks: dial tcp 127.0.0.1:8080: getsockopt: connection refused
2016-10-13 22:56:34 +02:00
C Cirello
34b4b25092 Log messages cleanup (#158) 2016-10-13 18:11:31 +02:00
Seif Lotfy سيف لطفي
006c01c97e Change default API URL from localhost to 127.0.0.1 (#153)
* Change host from localhost to 127.0.0.1

* change unit tests to also use 127.0.0.1 instead of localhost
2016-10-13 00:00:53 +02:00
Seif Lotfy سيف لطفي
b7bf73f5d2 Makefile (#122)
* Update Readme and add Makefile
* Skip stale tests (in wait for stdin support)

* Revert "Skip stale tests (in wait for stdin support)"

This reverts commit 228da3776503f40ca53df70a79a9e4a9c73fd8b5.
2016-10-06 20:46:29 +02:00
C Cirello
3ca137a01c Upgrade to Go 1.7 (#128)
* Upgrade to stdlib context package
* Modernized syntax
2016-10-06 20:10:00 +02:00
C Cirello
c6f81ff921 Unify env variables naming into constants (#127) 2016-10-06 02:01:11 +02:00
C Cirello
aa12f3c724 Add graceful shutdown support for async runners (#125) 2016-10-06 00:32:56 +02:00
Carlos C
1e62c2a403 Remove log.Fatal message preventing application start 2016-10-05 22:59:03 +02:00
C Cirello
eed5422c59 Fix configuration load from environment variables (#123)
Fix configuration load from environment variables
Fixed #119
2016-10-05 19:10:21 +02:00
Carlos C
bc3fba088f Fix start problem with two IronFunction colliding configurations
By default, BoltDB will hang while waiting to acquire lock to the
datafile, thus the users might find themselves waiting for something
but not what. The added timeout aims inform use about what's
happening.

Also this renames MQADR to TASKSRV, refactor configuration to read
environment variables. RunAsyncRunner now fills the gaps when
parsing TASKSRV.

Fixes #119
2016-10-04 23:57:43 +02:00
Carlos C
39a582e2dd Place srv.Run() last in the start up process
Smaller and simpler code, runner.RunAsyncRunner
2016-10-03 21:27:57 +02:00
Seif Lotfy
d8801d5be7 Refactor async runner and its reference and add unit tests 2016-09-30 23:29:59 +02:00
Seif Lotfy
f6f160cef9 Move async runner to runner file 2016-09-26 15:11:36 +02:00
Seif Lotfy
54f66c7b09 update glide 2016-09-26 12:59:18 +02:00
Seif Lotfy
92df53b144 Add support for Async worker 2016-09-24 10:06:57 +02:00
Seif Lotfy
b623fc27e4 Initial work on async functions 2016-09-24 10:06:51 +02:00
Pedro Nasser
a98b7e25d0 metric logger 2016-09-12 11:46:21 -03:00
Pedro Nasser
609d767c3f remove unnecessary config 2016-08-26 23:04:12 -03:00
Pedro Nasser
8b0d0f1e13 refactor runner 2016-08-21 19:40:08 -03:00
Travis Reeder
8558d13f07 Added support for hooks to customize behavior. 2016-08-09 22:34:28 -07:00
Travis Reeder
3d94fc64c9 Removed "name" from route, only need path. 2016-08-07 14:58:05 -04:00
Travis Reeder
40e1ebd434 Updates to fix against Titan changes and what not. 2016-08-07 14:10:31 -04:00
Pedro Nasser
d223abecd7 fixing log level 2016-08-01 19:32:34 -03:00
Pedro Nasser
dfc4be9861 refactor 2016-08-01 19:23:31 -03:00
Pedro Nasser
0facc5dbff rename package 2016-07-29 19:35:08 -03:00
Pedro Nasser
14cc57fd9c refactor runner using titan 2016-07-24 17:46:08 -03:00
Pedro Nasser
66fa3d4035 refactoring API and added dbs: postgres, bolt 2016-07-21 16:04:58 -03:00
Travis Reeder
2516ecde84 Bunch of cleanup and reorg 2016-07-17 20:52:28 -07:00