Commit Graph

100 Commits

Author SHA1 Message Date
Travis Reeder
8c96d3ba2f Fixes async payload passing for #68. 2017-06-20 11:32:51 -07:00
Travis Reeder
c6a315ae7d Fixed up lambda-node to work with multi-stage changes. 2017-06-19 11:28:14 -07:00
Denis Makogon
52137e3b61 Update fn tool 2017-06-08 11:46:56 -07:00
Reed Allman
9edacae928 clean up hotf(x) concurrency, rm max c
this patch gets rid of max concurrency for functions altogether, as discussed,
since it will be challenging to support across functions nodes. as a result of
doing so, the previous version of functions would fall over when offered 1000
functions, so there was some work needed in order to push this through.
further work is necessary as docker basically falls over when trying to start
enough containers at the same time, and with this patch essentially every
function can scale infinitely. it seems like we could add some kind of
adaptive restrictions based on task run length and configured wait time so
that fast running functions will line up to run in a hot container instead of
them all creating new hot containers.

this patch takes a first cut at whacking out some of the insanity that was the
previous concurrency model, which was problematic in that it limited
concurrency significantly across all functions since every task went through
the same unbuffered channel, which could create blocking issues for all
functions if the channel is not picked off fast enough (it's not apparent that
this was impossible in the previous implementation). in any event, each
request has a goroutine already, there's no reason not to use it. not too hard
to wrap a map in a lock, not sure what the benefits were (added insanity?) in effect
this is marginally easier to understand and less insane (marginally). after
getting rid of max c this adds a blocking mechanism for the first invocation
of any function so that all other hot functions will wait on the first one to
finish to avoid a herd issue (was making docker die...) -- this could be
slightly improved, but works in a pinch. reduced some memory usage by having
redundant maps of htfnsvr's and task.Requests (by a factor of 2!). cleaned up
some of the protocol stuff, need to clean this up further. anyway, it's a
first cut. have another patch that rewrites all of it but was getting into
rabbit hole territory, would be happy to oblige if anybody else has problems
understanding this rat's nest of channels. there is a good bit of work left to
make this prod ready (regardless of removing max c).

a warning that this will break the db schemas, didn't put the effort in to add
migration stuff since this isn't deployed anywhere in prod...

TODO need to clean out the htfnmgr bucket with LRU
TODO need to clean up runner interface
TODO need to unify the task running paths across protocols
TODO need to move the ram checking stuff into worker for noted reasons
TODO need better elasticity of hot f(x) containers
2017-06-05 20:04:13 -07:00
Denis Makogon
3f065ce6bf [Feature] Function status 2017-06-06 14:12:50 -07:00
Denis Makogon
1a2a805740 Update functions_{lang} tool to recent git source 2017-06-06 19:50:33 +03:00
Travis Reeder
af918fdfe9 Fix run env vars passed in via command line to test locally and updated docs to match. 2017-05-30 10:54:34 -07:00
Denis Makogon
31b4ac4516 Address broken tests 2017-05-30 08:50:53 -07:00
Chad Arimura
75356d1936 slight update to hot functions docs 2017-05-26 21:59:19 -07:00
Travis Reeder
69f0201818 Some small cleanup to docs. 2017-05-26 18:54:26 +00:00
Travis Reeder
d115ad6d45 Cleaning up docs 2017-05-25 03:08:40 +00:00
Travis Reeder
9cc12b4b12 Remove iron... 2017-05-18 18:59:34 +00:00
Travis Reeder
0c6ca08a2f functions: 0.2.62 release [skip ci] 2017-05-15 14:04:01 -07:00
Travis Reeder
4b9bba352d Rename location. 2017-05-15 11:00:15 -07:00
Travis Reeder
d0ca2f9228 Moved runner into this repo, update dep files and now builds. 2017-04-21 07:42:42 -07:00
Travis Reeder
615ae5c36f Mass s&r: iron-io -> kumokit 2017-04-19 09:49:12 -06:00
Travis Reeder
10f3178ae9 Switching to new dep tool (#616)
* making things work

* #506 - Add ability to login to a private docker registry

* Rolling back "make things work" to test them out more.

* Rolling back "make things work" to test them out more.

* credentials from docker/config.json if ENV is missing

* should get docker auth info just in the init

* update glide lock

* update glide

* Switched to new go dep tool, glide is too frikin annoying.

* Updated circle builds to use dep

* Added GOPATH/bin to path.

* Added GOPATH/bin to path.

* Using regular make test, instead of docker one (not sure why it was using the docker one?).
2017-04-07 11:22:08 -07:00
Denis Makogon
7603e6e8fa Add idle_timeout to routes API (#603)
* Add inactivity_timeout to routes API

Closes: #544

* Fix failing datastore tests

* Rename inactivity_timeout to idle_timeout

* Update swagger doc

* Update hot fn doc

* Fix json tags

* Add function timeouts docs

* Rewording
2017-03-25 18:28:53 +01:00
Denis Makogon
c494bf051e Add MySQL docs (#602)
Closes: #596
2017-03-22 14:56:39 -07:00
Travis Reeder
ca18ae88fa Added Lambda Node support as part of the regular functions workflow. (#601)
* Added Lambda Node support as part of the regular functions workflow.

* Fixes for PR comments.
2017-03-22 21:41:27 +01:00
Travis Reeder
a0c40ee184 More doc fixes. 2017-03-21 16:45:53 -07:00
Travis Reeder
cfccf33c5d Updated docs, fixed broken links and moved things around. 2017-03-21 16:34:59 -07:00
Denis Makogon
5365241896 Add Docker remote API connection options (#584)
Fixes: #220
2017-03-13 18:23:56 +01:00
Goutham Veeramachaneni
fae66764b4 Config EnvVars passed without leading _ (#534)
* Earlier X=Y was passed as _X=Y

Signed-off-by: Goutham Veeramachaneni <cs14btech11014@iith.ac.in>
2017-03-03 16:17:00 -08:00
Derek Schultz
f7519527d2 update extensions doc (#563)
* fix trailing whitespace

* fix broken links and remove special handlers
2017-03-01 21:43:42 -08:00
Pedro Nasser
dea100d3d9 fn improvements: (#560)
- standardized required args validation
- routes create/update now prioritize args, over flags, over funcfile configuration
- removed deadcode
2017-03-01 17:55:48 -08:00
patrick
200ac4673a Update options.md (#541)
update readme.md
2017-02-24 19:12:05 -06:00
Travis Reeder
6119f07007 Fixes some route creation and updating bugs. (#526)
* Fixes some route creation and updating bugs.

* Updated README

* Added more info the quickstart

* Updated based on PR comments.

* Fixed based on comments.

* Updated per comments.
2017-02-24 16:04:04 -08:00
Alexander Shapiotko
abe09a26c7 docs for functions ui (#504)
* docs for functions ui

* update readme
2017-01-31 11:58:00 -08:00
Travis Reeder
ce26f665ea Middleware (#502)
* API endpoint extensions working.

extensions example.

extensions example.

* Added server.NewEnv and some docs for the API extensions example.

extensions example.

extensions example.

* Uncommented special handler stuff.

* First example of middleware.

easier to use.

* Added a special Middleware context to make middleware easier to use.

* Fix tests.

* Cleanup based on PR comments.
2017-01-30 23:43:23 +01:00
Travis Reeder
d5116397b6 API extension points (#473)
* API endpoint extensions working.

extensions example.

* Added server.NewEnv and some docs for the API extensions example.

extensions example.
example main.go.

* Uncommented special handler stuff.

* Added section in docs for extending API linking to example main.go.

* Commented out special_handler test

* Changed to NewFromEnv
2017-01-30 12:14:28 -08:00
Travis Reeder
e5ef5ee6da Added kubernetes and docker swarm to main TOC. (#497) 2017-01-24 11:20:51 -08:00
Derek Schultz
fccead2801 add link to openstack trigger example (#484) 2017-01-18 19:51:44 +01:00
Travis Reeder
9f19611e97 Changed $PWD to work on windows and linux/mac. (#437) 2017-01-02 12:24:17 -08:00
Lingxian Kong
73d4f1e180 Fix hot function example link (#469) 2017-01-02 08:01:44 +00:00
John Nguyen
0c3f527513 Fixes link for databases readme (#463)
* Fixes link for databases readme

* Adds privileged flag for containerd rights
2016-12-29 20:25:39 +01:00
C Cirello
2f0520521c all: rename hot containers to hot functions (#465) 2016-12-29 20:07:41 +01:00
Pedro Nasser
811689f923 API definitions and docs update (#457)
* fix: using bolt config/header update now overwrites

* api definitions and doc updates

* merge docs
2016-12-27 19:03:02 +01:00
Pedro Nasser
5a6ebb4e2f fn should show API errors messages (#450)
* fn should show API errors messages

* update functions_go

* update functions_go lock
2016-12-19 16:30:18 -02:00
Pedro Nasser
4d7dde3486 change update from PUT method to PATCH (#440) 2016-12-14 17:22:44 +01:00
Pedro Nasser
f03619d479 remove ifaces from doc (#430) 2016-12-13 13:36:56 -08:00
Pedro Nasser
32de7d5361 Improvements on API error, swagger and status code (#428)
* improvements on API error, swagger and status code

* missing validation

* removing typo

* fix if-within-if

* fix handle app delete
2016-12-13 19:18:52 -02: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
1389bfb1d3 add special handler docs (#408) 2016-12-12 16:04:25 -02:00
C Cirello
8a24cc432e doc: hot containers (#411)
* doc: hot containers

* doc: update with code review
2016-12-11 10:58:58 +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
Travis Reeder
e172a838c2 Fixed Route definition in swagger doc. (#405)
* Fixed Route definition in swagger doc.

* Changed swagger URL to petstore so we don't have to maintain it in swaggerhub and github anymore.
2016-12-07 20:33:34 +01:00
C Cirello
3b16b7f1d8 functions: application updates no longer accept name in the body (#391)
* functions: application updates no longer accept name in the body

AppUpdate was initially conceived as an upsert endpoint for apps.
It turns out that it created an inconsistency regarding updates:
updates with names divergent with URL would not actually change
application's name.

This commit atempts to address the issue by returning an HTTP
error when trying to update an application name. In swagger.yml,
application names are already `readOnly:true`. Thus there is no
change from expected behavior.

Fixes #380

* functions: use specific error value for name change
2016-12-07 19:54:21 +01:00
C Cirello
66d446b148 functions: returns HTTP error in case of route update attempt (#396)
Ensure that attempts to update route's path are properly handled
with a HTTP error. Moreover, updates swagger file to make it
explicit that routes are immutable.

Fixes #381
2016-12-07 19:54:09 +01:00
Pedro Nasser
91006a701e Update listener docs (#398)
* add listener docs

* removed TODO and added more listener info

* removing invalid route from appupdatelistener
2016-12-06 16:11:21 +01:00