This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-09-04
Channels
- # beginners (14)
- # boot (28)
- # chestnut (9)
- # cljsrn (18)
- # clojure (64)
- # clojure-conj (1)
- # clojure-dusseldorf (45)
- # clojure-finland (4)
- # clojure-gamedev (1)
- # clojure-greece (8)
- # clojure-italy (22)
- # clojure-russia (4)
- # clojure-spec (19)
- # clojure-uk (38)
- # clojurescript (49)
- # code-reviews (2)
- # component (12)
- # core-async (3)
- # cursive (3)
- # data-science (2)
- # events (4)
- # fulcro (394)
- # heroku (3)
- # hoplon (16)
- # immutant (11)
- # jobs (5)
- # lein-figwheel (1)
- # lumo (18)
- # off-topic (8)
- # om (11)
- # other-languages (1)
- # overtone (1)
- # pedestal (7)
- # portkey (62)
- # protorepl (1)
- # re-frame (40)
- # reagent (41)
- # ring-swagger (5)
- # spacemacs (5)
- # unrepl (5)
- # yada (12)
Error loading class portkey.LambdaStub: class java.lang.ExceptionInInitializerError
java.lang.ExceptionInInitializerError
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
Caused by: com.esotericsoftware.kryo.KryoException: Unable to find class: clojure.core.specs.alpha$fn__24
Serialization trace:
pred (clojure.spec.alpha$spec_impl$reify__751)
val (clojure.lang.Delay)
specs (clojure.spec.alpha$and_spec_impl$fn__869)
cform (clojure.spec.alpha$and_spec_impl$reify__875)
value (java.util.concurrent.atomic.AtomicReference)
state (clojure.lang.Atom)
at com.esotericsoftware.kryo.util.DefaultClassResolver.readName(DefaultClassResolver.java:160) ...
that’s why clojure.core.specs.alpha$fn__24
didn’t made it to the other side of the net
@tatut btw really good job on SpecQL, when/if I can revisit DataFrames support in Powderkeg I will look at it in closer details
I tried by simply returning an (s/explain-str ::my-spec some-data)
from the lambda and it worked fine
great success! I now have a lambda that does a specql query and outputs an HTML page with the results..
probably wouldn’t do this in production, I’m just doing a simple polling app for a dev meetup we are hosting next week
I’m simply using a connection map without any connection pooling, that’ll do for this example
It seems it is a common use-case, so much so that AWS has a tutorial for it http://docs.aws.amazon.com/lambda/latest/dg/vpc-rds.html
had (defn answer [poll-id option-id])
and tried to mount with path “/answer?poll={poll-id}&option={option-id}” and got an exception about unmapped arguments
in the python of example, connection is created on top level, so pooling/keeping connection alive for a while is ok idea
there was someone in audience that pointed me to Zappa (a python serverless library, haven't looked at it)
but neat to find out a reference for pg connection pool server such as pgbouncer in that post
my specql using lambda: https://3ekj3mh91k.execute-api.eu-central-1.amazonaws.com/repl/results?poll=1
musing: thinking about a story for automatic stage switch for XCD (extreme continuous deployment)
It looks like portkey doesn’t support POST, i’m getting {"message":"Missing Authentication Token"}
when trying to POST to a portkey URL
doing side effects with GET requests is suboptimal, any thoughts on how easily it could be added?
@tatut it’s hardcoded atm https://github.com/portkey-cloud/portkey/blob/master/src/main/clojure/portkey/aws.clj#L21
on post, have to see if request template needs change https://github.com/portkey-cloud/portkey/blob/a93e3d012a0aaa6a3d8e1998fc8a02dbcd21b08d/src/main/clojure/portkey/aws.clj#L47
aws has SAML and authorization lambda, existing ring auth mechanism might not fit, would have to see what ring middleware is actually useful
to figure out what should belong to mappings in the api gateway, what done by a lambda
could you put the :method and :content-type into the function metadata, so that it is colocated with the definition