Fork me on GitHub
#onyx
<
2017-04-26
>
devth00:04:26

has there been any work / thinking on rate limiting? i found https://clojurians-log.clojureverse.org/onyx/2016-07-06.html – sounds like maybe something that was being considered.

michaeldrogalis00:04:28

@devth Rate limit in which sense? Reading data into Onyx?

devth00:04:09

probably doesn't make sense to rate limit on the output side

michaeldrogalis00:04:05

@devth We don’t have any official support on that. If you want to put a design proposal together I’d be happy to take a look at it.

devth00:04:41

ok, sounds good. just starting to think about it

gardnervickers12:04:30

@devth The problem I see with Onyx controlling rate limiting at the ingest versus the user just doing it in their output or sync function is that they end up doing the same thing, backpressuring to your input source.

devth14:04:26

yep, makes sense. starting to look at a new alpha product from google: Cloud Tasks that will apparently have rate limiting support.

gardnervickers12:04:32

Rate limiting is also specific to what you’re writing to. Different systems have different performance/cost profiles for either the # of items inserted or the # of transaction made.

jetmind14:04:54

Hey folks! I have a weird question about lazy sequences processing in onyx. Let’s imagine I have a task which returns a segment containing lazy seq:

{:numbers (for [i (range 10)] i)}
and the downstream task which uses this lazy seq:
(reduce + (:numbers segment))
Would the lazy seq be realised before handing the segment to a task downstream or when it’s actually used in the downstream task? Maybe both variants are possible depending on the assignment of tasks to peers?

michaeldrogalis14:04:29

@jetmind The segment is sent over the network to the next peer, probably on another machine, so it’s realized.

jetmind14:04:57

That’s what I thought. The reason I asked is because I have a flow condition which reports exception and a task name it appeared in to sentry and I see a downstraem task name there, but stack trace indicates error inside the lazy seq in the upstream task.

michaeldrogalis15:04:40

@jetmind Can you rephrase that? I’m a bit confused to what you’re describing.

jetmind15:04:34

@michaeldrogalis Basically what I’m saying is that our error tracking system shows stack trace which indicates the error happened while realizing a lazy sequence (which is created in task1) and it seems as if this seq is realized in the task that follows the task1 and not in the task1 itself. I get the name of the task I’m sending to the error tracking system when exception happens from (-> event :onyx.core/task-map :onyx/name) in the post-transform hook.

michaeldrogalis15:04:18

@jetmind There’s one thing that might make this possible, but I’d have to check.

michaeldrogalis15:04:34

We’re using Nippy to serialize some types of data between networked machines

michaeldrogalis15:04:00

It wouldn’t surprise me if Nippy had some tolerance for freezing/thawing lazy seqs.

jetmind15:04:18

ok, I feel less insane now)

michaeldrogalis15:04:22

I know that sounds weird, but I also recently learned that it propagates metadata too. Heh.

michaeldrogalis15:04:34

Haha, yeah we’ll figure it out

jetmind15:04:52

cool, thanks for your help!

michaeldrogalis15:04:48

:lazy-seq       (repeatedly 1000 rand)
 :lazy-seq-empty (map identity '())

michaeldrogalis15:04:52

That’s in it’s example README.

jetmind15:04:47

As far as I understand it’s still realizing the seq before serialization, there’s no magic, right?

(def frozen (nippy/freeze {:lazy (for [i (range 3)] (do (println i) i))}))
0
1
2
So I’m not sure I understand why realization appears as if it is done from the downstream task

michaeldrogalis15:04:52

I don’t have time to dig deeper, but I can try to help some more later. That’s certainly odd behavior.

jetmind15:04:03

Sure, thanks! I think I’ll just realize the seq manually in the first task, but it would be great to understand why this is happening in the first place.

jetmind15:04:20

I depend on the task name to get some more data to report feedback to related systems and this behavior breaks things

michaeldrogalis15:04:28

Totally makes sense. If possible, can you open an issue with a minimal reproduction?

michaeldrogalis15:04:46

I know that’s a bit harder with these sorts of system, but if you can trim it down at all I’d greatly appreciate it.

jetmind15:04:03

Sure, I’ll try to trim it down later

lellis17:04:15

Hi all, can i use resume-point in onyx 0.9.15.0?

michaeldrogalis17:04:55

@lellis No, resume points are a 0.10 feature.

lellis17:04:13

And with 0.10 i can't use onyx-http right @michaeldrogalis?

michaeldrogalis17:04:08

@lellis Right. We still need to figure out an appropriate way to deal with unreliable HTTP targets. Frequent non-200's will cause the message stream to make poor progress since the 0.10 architecture deals with failure by rewinding input streams.

michaeldrogalis17:04:46

If you can shift dealing with that concern into your application, it’s simple to bring this plugin up to 0.10 compatibility.

lellis18:04:00

I got thus error when upgrade to "0.10.0.0-beta12"

Exception in thread "main" java.lang.NoSuchFieldException: builder, compiling:(onyx/storage/s3.clj:36:61)
Any tip? Nvm, libs conflict.