Commit Graph

141 Commits

Author SHA1 Message Date
Seif Lotfy سيف لطفي
6f8e94629f server: Add global LRU for routes with keys being the appname + path (#472)
* Add global lru for routes with keys being the appname + path

* minor comment fixes

* remove duplicate entires from THIRD_PARTY

* Make sure that we lock and unlock on get, refresh and delete on the cache
2017-01-05 19:08:46 +01:00
Travis Reeder
1c8d12b09e Cleanup main (#470)
* main: clean up

* server: replace magical constants and use them for app name tracking
2017-01-03 14:59:26 -08:00
C Cirello
c48bd95fa6 server: stats endpoint (#468)
fixes #389
2017-01-03 21:39:29 +01:00
C Cirello
e3c85d3e7e server: shutdown endpoint (#466)
fixes #390
2016-12-29 20:19:42 +01:00
Pedro Nasser
4d7dde3486 change update from PUT method to PATCH (#440) 2016-12-14 17:22:44 +01:00
Pedro Nasser
2a09a1c2a2 listeners and special handlers improvements (#412)
* listeners and special handlers improvements

* update runnerListener methods

* typo
2016-12-13 19:40:48 +01:00
Pedro Nasser
49a7712e6b API improvements (#410)
* api improvements, remove global Api object and reduce gin dependency

* requested changes
2016-12-09 15:24:35 -02:00
C Cirello
d6a44b5ba4 functions: remove lru (#399) 2016-12-07 00:20:25 +01:00
Pedro Nasser
2c56e7975d Improve listeners and handlers (#350)
* improve listeners and handlers

* add to route handlers

* separate create/delete/update events

* removed useless interface
2016-11-29 00:00:12 +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
c14bc323f9 added ctx to datastore and improve mock (#329)
Added ctx to datastore and improved mock
2016-11-22 03:33:44 -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
Pedro Nasser
7aa1981fba Datastore refactor and added postgres tests (#259)
* fix apps & routes creation/update

* refactor datastore and added postgres tests

* added test-datastore and fixed circleci test
2016-11-14 15:03:10 -02: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
Travis Reeder
25f582b180 Updated README and simplified/cleaned up some code. 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
Pedro Nasser
2e12e2c700 Fix input async tasks + tests (#137) 2016-10-12 22:23:34 +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
Seif Lotfy سيف لطفي
fbcec6bf40 Depend on iron-io/runner instead of iron-io/worker (#124) 2016-10-05 20:42:12 +02:00
Carlos C
0ecb6ca5cc Add context do models.MessageQueue interface 2016-10-03 23:49:08 +02:00
Seif Lotfy
a8535120da async calls return the call_id/task_id 2016-10-02 22:38:51 +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
Henrique Chehad
06294b4b77 updated worker repository ref 2016-09-19 20:41:35 -03:00
Henrique Chehad
f4e8065cd9 server port comment about default/PORT env var 2016-09-19 16:58:24 -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
Pedro Nasser
c5025142bf route filter improvement 2016-08-13 19:25:07 -03:00
Travis Reeder
a0b025fb88 Small bug fix for special handlers. 2016-08-10 00:09:32 -07:00
Travis Reeder
8558d13f07 Added support for hooks to customize behavior. 2016-08-09 22:34:28 -07:00
Pedro Nasser
1eb88e794e fix routes router and tests 2016-08-07 16:45: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
5a13e2c0cc improv api, datastore, postgres, runner 2016-07-21 21:18:02 -03:00
Pedro Nasser
66fa3d4035 refactoring API and added dbs: postgres, bolt 2016-07-21 16:04:58 -03:00