Fork me on GitHub
#onyx
<
2015-07-22
>
robert-stuttaford07:07:41

@michaeldrogalis: hi simple_smile i’ll try to stick around on here all day. likely catch you in the next couple hours or otherwise in your morning much later on

noisesmith14:07:22

I am going through the flat-workflow example and I am getting a schema validation error from my version of this entry in the catalog https://github.com/onyx-platform/onyx-examples/blob/0.6.x/flat-workflow/src/flat_workflow/core.clj#L30

noisesmith14:07:57

the schema is looking for :onyx/medium Keyword which is not provided in the example

noisesmith14:07:25

I've slightly adapted the example (and will try the original now) but the changes I have made should not affect this

noisesmith14:07:42

I see :onyx/medium set for input / output stuff, but what should it be when specifying :onyx/type :function ?

noisesmith14:07:28

never mind, I figured it out, I was transcribing and accidentally supplied :onyx/ident in the catalog entry where I should have supplied :onyx/fn

michaeldrogalis14:07:34

@noisesmith: Cool, glad you got it figured out. How have things been going in general?

noisesmith14:07:55

I got hung up on kafka (bad error reporting, the overly verbose log output actually made it harder to figure out what was going on) which was a precondition to using onyx in my project. I have that sorted out now and am this close to actually using onyx in anger.

michaeldrogalis14:07:27

Kafka's a toughie to get a handle on.

michaeldrogalis14:07:51

Are you guys using replication and partitioning, too?

noisesmith14:07:44

No, not really. I don't think my tech lead realized what he was signing up for when he told me to use kafka, and he left for vacation after speccing that.

noisesmith14:07:24

"we wanted a nice snack, so we built a high-throughput state of the art cookie factory, and set up a garage with a fleet of delivery vehicles"

noisesmith14:07:49

so now we have this nice infrastructure, if we ever actually needed it...

michaeldrogalis14:07:02

Sounds about right. Almost seems like you could have used something like Durable Queue?

noisesmith14:07:34

devops guy is still pushing for replacing kafka with sqs

michaeldrogalis14:07:13

What do people do when they want to test locally with SQS?

noisesmith14:07:38

there's an in-memory impl

noisesmith14:07:57

which of course has even worse performance (not that sqs is even meant to be fast in the best of cases)

michaeldrogalis14:07:04

Oh good. A few years ago I used it and that didn't exist. Nice.

noisesmith14:07:26

In our use case we could use something pretty low tech actually. The client doesn't expect the data to come back immediately (lag times in the order of minutes are fine), and is smart enough to retry if it doesn't get a result after some period of time also.

michaeldrogalis14:07:53

At least you're onto the fun part of the project now 😛

noisesmith14:07:53

classic back-burner batch job stuff

noisesmith15:07:17

onyx is looking nice so far - I have yet another type of logging in my repls

noisesmith15:07:00

(stack traces, printlns, java logger output, timbre output, and now color-coded stack traces sometimes as well)

noisesmith15:07:58

it's actually kind of useful because I can tell by the shape / color of the text which part of the app is talking, lol

michaeldrogalis15:07:52

0.7.0 should be out in about 3 weeks. We're shipping a very large performance increase.

noisesmith15:07:46

any particular places where the api is changing?

michaeldrogalis15:07:42

The general public API is the same. We switched the plugin multimethod interface to a protocol though

michaeldrogalis15:07:07

Pretty straightforward migration. We're trying hard not to break backwards compatibility, but now is the time to do it

noisesmith16:07:45

are zookeeper warnings about end of stream exceptions when running onyx.api/submit-job and failing to unregister MBean when doing the various shutdowns normal, or a sign I have something set up wrong?

noisesmith16:07:31

I see the full expected results of the workflow, and I can re-run it (getting the same warnings, and still seeing the correct result)

michaeldrogalis16:07:16

That's funny. I'm debugging a Zookeeper end-of-stream exception for another project right now. No, it's a sign that something is wrong.

michaeldrogalis16:07:35

It's not necessarily fatal, but it's not good. Something is stopping its listener too soon.

michaeldrogalis16:07:10

That might be a shutdown order thing in your case

michaeldrogalis16:07:26

Make sure you take down the peers, then the group, then the env - in that order.

noisesmith16:07:06

@michaeldrogalis: also, as I track the bug further, I notice unnamed anonymous functions in my stack, would pull requests that add names go anonymous functions eg. (fn it-does-foo [] ....) likely be accepted as prs?

noisesmith16:07:16

cool, because that makes the stack traces just a little bit easier to understand

michaeldrogalis16:07:17

Nothing worse than seeing blah$what$ahhh$

noisesmith16:07:36

oh wait, that would be the wrong name for that function - it's actually doing something totally different

noisesmith16:07:43

but general idea stands

michaeldrogalis16:07:49

Oh, I didnt click the link - for some reason I thought that was just an example. But right, the approach is welcomed

michaeldrogalis16:07:55

@noisesmith: Btw, I dont know what the level of secrecy on your code is, but if you can get permission to add me to your repo, that's how I typically help diagnose road blocks with companies if that ever happens.

michaeldrogalis16:07:08

Gist's are working just as well these days, though

michaeldrogalis16:07:37

Most of the problems are recurring misunderstandings of how something works, so we can usually guess what's wrong pretty quickly.

robert-stuttaford17:07:53

how much do you know about BlockingQueue?

michaeldrogalis17:07:17

What seems to be the problem again, if you don't mind?

robert-stuttaford17:07:18

that’s what Datomic’s tx-report-queue is. i’ve no prior experience with it, but basically, that’s what we need to turn into an onyx input

robert-stuttaford17:07:34

so, the async chan we currently use is getting in the way (i think)

robert-stuttaford17:07:09

we write stuff to it and sometimes we see activity immediately, and sometimes we have to write a whole lot of stuff before it does anything

robert-stuttaford17:07:22

like there’s a disconnect between what’s going in and what’s coming out of the async chan

robert-stuttaford17:07:28

it’s a (chat 100) at the moment

robert-stuttaford17:07:38

as you might imagine, this is making testing unreasonably difficult to do

robert-stuttaford17:07:57

as we can’t tell what the issue is - are flow conds failing, or is it just stuck in the nether?

michaeldrogalis17:07:06

Have you fully removed Onyx from the equation? e.g. are you just connecting the BlockingQueue to a core.async channel and testing there?

robert-stuttaford17:07:38

yeah, so separately we have the same async chan without a buffer as a logging output to show us what the txor is writing

robert-stuttaford17:07:41

and that prints as it happens

robert-stuttaford17:07:30

i don’t actually know what the root cause of this non-determinism is, so my intuition tells me to simplify. it makes sense to me that we can forego the async chan and just have the tx-queue produce inputs directly

michaeldrogalis17:07:47

Yeah, I would definitely do that

robert-stuttaford17:07:13

ok. i have to go play Lego for 10 mins and then put my 5yr old to bed. and then i’ll be back simple_smile

noisesmith18:07:11

I'm looking at the examples (starting with the "flat workflow" example because I think that's the simplest), and I'm wondering - if I want to adapt it to keep running and listening to jobs, would the sensible thing be to create a go block or future that repeatedly calls take-segments!, or is there an existing abstraction that should be used?

michaeldrogalis18:07:12

@noisesmith: You can use the Leiningen template to get to that sort of state

michaeldrogalis18:07:22

It packages everything up into a "dev environment" that can be reused

michaeldrogalis18:07:34

@robert-stuttaford: Hey, sorry I need 30 minutes for lunch. Ill brb

noisesmith18:07:40

OK, cool - lein new onyx appname I assume?

michaeldrogalis18:07:49

lein new onyx-app your-app-name

robert-stuttaford18:07:51

i found clojure.core/seque which apparently lets you treat a BlockingQueue like a lazy sequence

noisesmith18:07:46

@michaeldrogalis: turns out all I needed was to remove the :done from the queue of tasks that the example queues up.

michaeldrogalis18:07:53

Oh, that's what you were asking - yes. Make sure you drain the output channel though, otherwise puts will eventually block

noisesmith18:07:19

nice (that was the cause of the issue that led to "... I think" above, so I am good

noisesmith18:07:28

everything hunky dory

noisesmith18:07:32

thanks again for the help

noisesmith18:07:15

nice, looks like I'll have proof of concept working on one peer by EOD, can start doing the multiple process / multiple machine thing tomorrow with any luck...

noisesmith18:07:22

after kafka, this is very easy

robert-stuttaford19:07:03

sorry, michaeldrogalis, i’m on a call with Matt, talking new tasks for Onyx

michaeldrogalis19:07:38

@robert-stuttaford: No problem, I'm here for a few more hours.

michaeldrogalis19:07:50

We're probably in the worst 2 possible time zones to catch each other, heh.

robert-stuttaford19:07:58

yeah timezones are -ing killing me. i’ve got a guy in Novosibirsk, one in Samara (both in Russia) and then Matt in Chicago

robert-stuttaford19:07:18

and two young kids who have their own ideas about how long things should take 😁

michaeldrogalis19:07:26

That's a handful. If you want to send me a detailed email, I can try to give some advise.

robert-stuttaford19:07:33

ok, just about done with Matt

michaeldrogalis19:07:40

Also if you run out of steam, I can take a crack at it myself. Np.

robert-stuttaford19:07:02

the ultiimate solution is probably going to be dead simple. i just suck at BlockingQueues

michaeldrogalis19:07:07

Let us hope so. 😄

michaeldrogalis19:07:12

(I think it will be)

robert-stuttaford19:07:10

ok. are you able to talk voice at all, michaeldrogalis ?

robert-stuttaford19:07:15

or are you at work?

robert-stuttaford19:07:45

i think i might have to ask your help here... i’m a little out of my depth on this one

robert-stuttaford19:07:46

the goal: every time a (.take tx-r-q) has a transaction result, put all the (unrolled) datoms from :tx-data on the queue to the next task

robert-stuttaford19:07:50

it’s the same as what would happen for any other queue consumer

robert-stuttaford20:07:10

the queue is the originator of the action, rather than some imperative code in the input plugin reading from a known source of data

michaeldrogalis20:07:38

My suggestion, and I've done this a few times as in the Kafka source, is to background a thread that reads from the queue and puts it onto a channel. Let Onyx work with the channel when it tries to do reads.

michaeldrogalis20:07:42

You're on the right track there.

robert-stuttaford20:07:31

ok, so that’s basically what we’re doing now. but it’s producing jarring results

robert-stuttaford20:07:51

should it be possible to see a 1:1 input:processing relationship?

robert-stuttaford20:07:59

as we give it stuff, event by event, it does stuff?

robert-stuttaford20:07:07

perhaps we’re just doing it wrong

michaeldrogalis20:07:55

Right, you should be seeing that

michaeldrogalis20:07:09

Ill pull in your code tonight and check it out myself

robert-stuttaford20:07:04

i’ll save you some effort and produce a clean repo for you to muck around in

robert-stuttaford20:07:39

this gives us the double benefit of an open-sourceable trapperkeeper + onyx + datomic starter kit for whoever wants one

michaeldrogalis20:07:49

That'd be super, thanks

robert-stuttaford20:07:55

retweet fodder 😁

michaeldrogalis20:07:32

Need some more blog posts from other folks. 😛

robert-stuttaford20:07:51

blogging. wish i had time for that sort of thing

michaeldrogalis20:07:24

Reading - who has time for that. I just close my eyes and bang on my keyboard for 8 hours

robert-stuttaford20:07:17

you have a very smart forehead!

robert-stuttaford20:07:26

thanks, as ever, michaeldrogalis - i’ll get that sample prepared and sent to you asap

robert-stuttaford20:07:40

it’ll assume you have a transactor with mbrainz db in it

michaeldrogalis20:07:44

Cool, thanks! Hope to get you over this roadblock as quick as we can

robert-stuttaford20:07:10

catch up with you soon!

michaeldrogalis20:07:18

K. Take it easy man. See ya!

robert-stuttaford20:07:20

now i’m going to go murder my pillow

michaeldrogalis20:07:45

Enjoy 😛 Catch you