Commit Graph

334 Commits

Author SHA1 Message Date
Dave Syer
fa55ebab16 Compiler warnings 2018-05-02 10:55:24 -04:00
Oleh Dokuka
4b85e89992 Fix docs with regard to Flux.interval
Also provide ability to run with `Flux.interval(Duration)` in
compiled scripts

Fixes gh-174
2018-05-02 07:19:08 -04:00
Dave Syer
eaea89532c Add documentation for compiler configuration properties 2018-05-02 06:17:28 -04:00
Dave Syer
b59b43ddc5 Only expose Publisher via FunctionCatalog
Flux.from() is cheap and can be used to marshal the inputs everywhere
internally. With this change users ought to be able to register any
function of any Publisher type.
2018-05-01 12:06:34 -04:00
Dave Syer
fb04324ac9 Factor out a new strategy for wrapper type detection
Using this strategy libraries could be developed for supporting
Flux-like libraries (e.g. kstreams) that are not actually
reactive streams implementations.
2018-05-01 12:06:29 -04:00
Dave Syer
ebd1646308 Push deployer configuration out of autoconfig
It tends to pop back into function apps where it is not needed
otherwise. Users that want to use the library need to import
the FunctionConfiguration directly using the
@EnableFunctionDeployer convenience annotation..
2018-04-25 17:37:55 +01:00
Dave Syer
7fa0ed7b6b Replace deployer with a simpler library
Instead of an app, it is now a library with some utilities
(principally ApplicationBootstrap) for launching a Spring Boot
application, extracting a function, and registering it in the
FunctionRegistry.
2018-04-25 12:44:20 +01:00
Dave Syer
59f94c1533 Fix potential issue when Message is not available but not needed
If an isolated function doesn't have Message in its classpath, we
will never actually need to instantiate that class. This change
makes sure we check first.
2018-04-25 07:27:33 +01:00
Dave Syer
8cf3d7bc5a Add some WebMvcTest support
Fixes gh-156
2018-04-24 16:15:42 +01:00
Dave Syer
6c58fe0c4d Fix shadowJar configuration
See gh-170
2018-04-24 14:45:02 +01:00
Dave Syer
04f917c113 Make it explicit that stream does not depend on a web server 2018-04-24 14:18:45 +01:00
Dave Syer
0f8c1ce860 Make Jackson optional in web adapter
There is now a JsonMapper strategy with implementations and
autoconfiguration for Gson and Jackson. If Jackson is present
it is preferred (just like in Spring Boot).

Fixes gh-150
2018-04-24 11:57:47 +01:00
Dave Syer
73cf5d418a Update to Boot 1.5.12 2018-04-24 10:25:21 +01:00
Dave Syer
57c05970e5 Use concurrent hash map in function catalog 2018-04-24 10:23:22 +01:00
Dave Syer
2df5dcc992 Compiler warnings 2018-04-24 09:46:48 +01:00
Dave Syer
ea5811fbe2 Add repository declarations to azure sample
Fixes gh-148
2018-04-24 09:31:08 +01:00
Dave Syer
7df650fce0 Exclude older nastier version of AWS api jar
There is only one version of amazon-kinesis-deaggregator available
in Maven Central, which is unfortunate because it brings in an
older version of the AWS events API, which in turn has a very bad
version range specification, causing the whole AWS internet to
be downloaded for each build.

I also made the deaggregator optional, which will help. Users that
want to include it shoudl consider doing the same exlcusion.

Fixes gh-171
2018-04-24 09:22:48 +01:00
bishoy
0e41b8acc5 Support incoming application/x-www-form-urlencoded content
Fixes #129
2018-04-24 08:55:22 +01:00
Dave Syer
c2568ccabe Compiler warnings 2018-04-16 16:39:37 +01:00
Dave Syer
98cf4dc06e Revert to snapshots 2018-04-16 16:22:02 +01:00
Dave Syer
d1bcb7d142 Update to 1.0.0.M6 2018-04-16 16:04:31 +01:00
Dave Syer
74b80c069c Update to thin launcher 1.0.10 2018-04-16 15:51:41 +01:00
Dave Syer
f61c31512c Remove AWS BOM
We can revisit this later, but I don't like the way it works at the
moment (too many dependencies in there and we only use a handful).
2018-04-16 14:30:13 +01:00
Halvdan Hoem Grelland
2c6f71d275 Add support for aggregated Kinesis records in SpringBootKinesisEventHandler
The current implementation of SpringBootKinesisEventHandler only handles
non-aggregated events. Attempting to process aggregated events caused
ungraceful failure.
This commit fixes that by de-aggregating any events before performing
conversion. Non-aggregated events are still handled transparently.
In addition, detection of Message<T> input is performed, and
output messages are wrapped accordingly.
2018-04-16 11:40:36 +01:00
trisberg
344ee9a689 Upgrade boot versions
- 1.5.10 to 1.5.11

- 2.0.0 to 2.0.1
2018-04-06 21:07:21 +01:00
Dave Syer
7e53a74474 Update README 2018-03-26 10:09:54 +01:00
Dave Syer
5aeba1ea96 Convert Consumer<Foo> to Function<Flux<Foo>,Mono<Void>>
This results in a better experience for users because the consumer
that they write is only applied to a Flux that is subscribed to
by the framework once. It gives better control over the flow of
foos, e.g. if some component wants to subscribe on a thread.
2018-03-26 10:06:13 +01:00
Dave Syer
a1b624b28a Inspect bean class if it is available
Avoids instantiating beans if not necessary, and allows user to
provide Function as a @SpringBootApplication (for instance), or
more generally as a source to the application context (as opposed
to being component scanned).
2018-03-21 11:09:57 +00:00
Dave Syer
0bd71e61e0 Extract common logic in invokers into base class 2018-03-20 17:40:06 +00:00
Dave Syer
9012143093 Share unrouted messages amongst consumers and functions 2018-03-20 16:42:01 +00:00
Dave Syer
0be5f14766 Provide new config options for streams enabling composition
User can switch off source or sink behaviour (the default is to bind
to input and output streams), and then configure the name of a
supplier (for a source) or consumer (for a sink).
2018-03-18 14:19:51 +00:00
Dave Syer
efc99d2af0 Revert to snaphots 2018-03-16 11:40:12 -04:00
Dave Syer
feb8f51c41 Update to 1.0.0.M5 2018-03-16 11:28:53 -04:00
Dave Syer
4272ce2f36 Fix surefire version so CI build works 2018-03-16 09:53:29 -04:00
Dave Syer
773dddbe68 Ensure composite wrapper type reflects reality
When a Supplier<Flux<Foo>> is composed with a Function<Foo,Bar>
the resulting handler (supplier) should have Flux as its output
wrapper still (the most general output wrapper type in the chain).
2018-03-16 08:35:21 -04:00
Dave Syer
47f86671ca Allow pipe as well as comma in function composition 2018-03-16 08:05:29 -04:00
Dave Syer
8ab4d61bb4 Align MVC handling between Spring 4 and Spring 5
A Spring Boot 2.0 app should behave the same as a Spering Boot 1.5
app with this change. The key thing was to change the return type
of the FunctionController and move the computation of single
valuedness for the output there (instead of trying to do it in the
return value handler, which isn't used in Spring 5).
2018-03-16 07:08:43 -04:00
Dave Syer
43e3cb4f27 Fix deployer tests to not use the Boot 2.0 sample 2018-03-15 09:22:51 -04:00
Dave Syer
9a2f21e051 Upgrade pojo sample to Boot 2.0 as integration test 2018-03-15 06:45:58 -04:00
Dave Syer
740a94b202 Make Gson special config conditional on Boot 1.5
That was the samples still work with Spring Boot 2.0.0.

Fixes gh-157 (but we should add some tests)
2018-03-09 12:17:24 +00:00
Dave Syer
5528659b4b Inspect bean definition more thoroughly for factory arguments
Fixes gh-153
2018-03-02 11:28:33 +00:00
Dave Syer
dc008cc24d Ensure a function is inspectable as itself and its wrapper
Since a function is wrapper in a FluxWrapper (and possibly also
an Isolated), the link is lost between the bean and the type
metadata without this change.
2018-03-01 09:10:14 +00:00
Dave Syer
955e99bfe3 Re-org so that default methods are used everywhere 2018-02-28 14:18:09 +00:00
Dave Syer
33b33adb4b Change FunctionCatalog to key off Class<?>
Makes it possible to support other "function" types in the future.
The user is always taking a risk with the lookup that the object
returned has the generic type desired (but that hasn't changed
with this commit). FunctionCatalog is a lot simpler as a result
and also a lot more flexible.
2018-02-28 14:18:09 +00:00
Kamesh Sampath
c11a4454ff Added links to OpenWhisk SCF examples
Signed-off-by: Kamesh Sampath <kamesh.sampath@hotmail.com>
2018-02-28 08:22:00 +00:00
Dave Syer
616e2825c6 Move FunctionCatalog into context module 2018-02-27 09:05:28 +00:00
Dave Syer
7bc6d7dfee Re-order type discovery and function wrapping
Otherwise the explicit types from the function registration are
not used.
2018-02-26 16:28:50 +00:00
Dave Syer
5203401e00 Use Void as input type for Supplier, etc. 2018-02-26 14:15:54 +00:00
Dave Syer
f9e4546070 Add convenience methods to FunctionType 2018-02-26 11:45:01 +00:00
Dave Syer
d95ab8f173 Migrate type computation logic to FunctionType 2018-02-26 10:57:45 +00:00