Commit Graph

988 Commits

Author SHA1 Message Date
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
17bbfa0cdf Merge branch 'multi-stage-builds' into 'master'
Moving dep builds into Dockerfile and multi-stage builds.

Closes #36 and #39

See merge request !31
2017-06-06 15:02:08 -07:00
Travis Reeder
f628e39490 Moving dep builds into Dockerfile and multi-stage builds. 2017-06-06 15:02:08 -07:00
Denis Makogon
0276a1c156 Merge branch 'func_status' into 'master'
[Feature] Function status

See merge request !15
2017-06-06 14:12:50 -07:00
Denis Makogon
3f065ce6bf [Feature] Function status 2017-06-06 14:12:50 -07:00
Denis Makogon
6334f44a72 Merge branch 'update-source' into 'master'
Updating source to funcy/functions_go

See merge request !41
2017-06-06 12:41:28 -07:00
Denis Makogon
28e484a370 Updating source to funcy/functions_go 2017-06-06 22:40:48 +03:00
Travis Reeder
ebb0889869 Merge branch 'functionc_go' into 'master'
Update functions_{lang} tool to recent git source

See merge request !38
2017-06-06 10:03:56 -07:00
Denis Makogon
1a2a805740 Update functions_{lang} tool to recent git source 2017-06-06 19:50:33 +03:00
James Jeffrey
7e02597142 Merge branch 'chad-update-tutorial' into 'master'
adding rust, fixing python/php, adding ability to detect rusts src/main.rs file. Updates all tutorials as well.

See merge request !39
2017-06-05 15:52:31 -07:00
Chad Arimura
dd816dece6 dont upset the java peeps 2017-06-05 14:29:56 -07:00
Chad Arimura
c8fab6f224 changed mind, back to hello-{lang} for better naming of tutorial 2017-06-05 14:27:30 -07:00
Chad Arimura
fea5fbf7b0 update gitignore, remove func.yaml and gitignore for php 2017-06-05 14:15:14 -07:00
Chad Arimura
d72343a697 update all hello examples to use /{language} as the default route instead of /hello, also renamed hello.payload.json to sample.payload.json 2017-06-05 14:07:44 -07:00
Chad Arimura
17bbef04f5 adding rust, fixing python/php, adding ability to detect rusts src/main.rs file 2017-06-05 12:32:23 -07:00
James Jeffrey
b62a73b408 Merge branch 'fix_ignore' into 'master'
Ignore only fn file in fn

See merge request !37
2017-06-02 08:47:14 -07:00
James
b29e4c2564 Ignore only fn file in fn 2017-06-02 08:45:16 -07:00
Travis Reeder
9c67c5024f Added glides files just in case. 2017-06-01 14:30:09 -07:00
Travis Reeder
87ef24fe04 Updated dependencies and fixed issue with fn dependending on version from api. 2017-06-01 13:45:24 -07:00
Matthew Gilliard
77ca8a22b5 Merge branch 'java-support' into 'master'
First iteration of support for Java

See merge request !34
2017-06-01 02:19:37 -07:00
Mukhtar Haji
cd0b68dfb7 First iteration of support for Java 2017-06-01 02:19:37 -07:00
Denis Makogon
82d612a754 Merge branch 'hofn-id' into 'master'
Hot fn ID

See merge request !30
2017-05-31 22:50:31 -07:00
Denis Makogon
007f1982fc Hot fn ID 2017-05-31 22:50:31 -07:00
Travis Reeder
102d025332 Merge branch 'patch-1' into 'master'
Propogate ${FN} outside of `functions/test.sh` script

See merge request !33
2017-05-31 11:58:59 -07:00
Denis Makogon
42b80c19ba Propogating ${FN} outside of test.sh script 2017-05-31 01:12:09 -07:00
Travis Reeder
cbec2d7c12 Updated deps 2017-05-30 16:19:35 -07:00
James Jeffrey
c7a5bae587 Merge branch 'chad-gitlab-url-change' into 'master'
Chad gitlab url change

See merge request !28
2017-05-30 11:34:22 -07:00
James Jeffrey
22dff9b45e Merge branch 'chad-ux-updates' into 'master'
changing url in install script

See merge request !26
2017-05-30 11:32:30 -07:00
Reed Allman
2224aa823a Merge branch 'fix-run-env-vars' into 'master'
Fix run env vars passed in via command line to test locally and updated docs to match.

Closes #29

See merge request !19
2017-05-30 10:54:34 -07: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
Travis Reeder
7b408468fa Added hello image. 2017-05-30 09:52:44 -07:00
James Jeffrey
2518898b65 Merge branch 'fix-lb-test' into 'master'
Address broken tests

Closes #46

See merge request !29
2017-05-30 08:50:53 -07:00
Denis Makogon
31b4ac4516 Address broken tests 2017-05-30 08:50:53 -07:00
Chad Arimura
49d397293b global url replace 2017-05-29 17:10:47 -07:00
Chad Arimura
065c5fef68 test webhook to MM, fixing release.sh URL 2017-05-29 08:50:41 -07:00
Chad Arimura
af95509912 changing url in install script 2017-05-28 18:43:31 -07:00
Chad Arimura
04008c71fd Merge branch 'update-release-scripts-for-gitlab' into 'master'
Updated release scripts to use GitLab.

See merge request !25
2017-05-27 17:53:20 +00:00
Travis Reeder
9618e23238 Now makes sure the tree is clean so it won't push anything you aren't expecting. 2017-05-27 10:19:40 -07:00
Travis Reeder
f93ec459a3 Updated release scripts to use GitLab. 2017-05-27 10:16:46 -07:00
Travis Reeder
37b53a5820 functions: 0.3.7 release [skip ci] 2017-05-27 10:10:21 -07:00
Travis Reeder
d3b713cf16 functions: 0.3.6 release [skip ci] 2017-05-27 10:08:14 -07:00
Travis Reeder
71b66091df functions: 0.3.5 release [skip ci] 2017-05-27 09:47:08 -07:00
Travis Reeder
9ba22989f8 functions: 0.3.4 release [skip ci] 2017-05-27 09:41:11 -07:00
Chad Arimura
49838565c4 Merge branch 'chad-add-fn' into 'master'
adding mac, moding readme

See merge request !24
2017-05-27 15:09:57 +00:00
Chad Arimura
a9233bde03 adding mac, moding readme 2017-05-27 08:08:56 -07:00
Chad Arimura
ab8c2f508a Merge branch 'chad-add-fn' into 'master'
modifying install shell script and moving binary

See merge request !23
2017-05-27 14:56:19 +00:00
Chad Arimura
814553423d modifying install shell script and moving binary 2017-05-27 07:54:48 -07:00
Chad Arimura
53390d0601 Merge branch 'chad-add-fn' into 'master'
adding fn bin

See merge request !22
2017-05-27 14:40:35 +00:00
Chad Arimura
ad793653c8 few words 2017-05-26 22:00:56 -07:00
Chad Arimura
75356d1936 slight update to hot functions docs 2017-05-26 21:59:19 -07:00