notjack
2017-6-26 15:43:22

@ben did you have more comments on https://github.com/racket/rackunit/pull/41 or shall I merge?


ben
2017-6-26 16:30:57

go merge!


notjack
2017-6-26 16:31:17

huzzah!


samth
2017-6-26 21:06:53

@mflatt since the rktio changes, this test and a few like it have been failing on and off: http://drdr.racket-lang.org/41014/pkgs/racket-benchmarks/tests/racket/benchmarks/shootout/typed/echo-non-optimizing.rkt


samth
2017-6-26 21:07:08

I realize that’s not the most helpful diagnostic information


samth
2017-6-26 21:09:45

It’s also not clear if this is a concurrency bug in the tests that just started happening because of your changes, or if it’s a real bug in Racket


mflatt
2017-6-26 21:11:09

@samth Is port number 8888 reserved in DrDr for that test?


samth
2017-6-26 21:12:02

It’s the only occurrence of 8888 in racket/racket


mflatt
2017-6-26 21:12:11

I guess non-registration would be a listen error anyway


samth
2017-6-26 21:12:18

is there a reservation mechanism in DrDr that I’ve forgotten about?


mflatt
2017-6-26 21:12:50

There’s some list of ports somewhere. Maybe it’s not actually registered other than being in the list.


mflatt
2017-6-26 21:13:12

Looking at that test, though, isn’t there a race between the client starting and the server listening?


samth
2017-6-26 21:16:33

it does look like a race



samth
2017-6-26 21:18:43

I’ll add some synchronization


zenspider
2017-6-26 21:34:53

@samth what’s the racket’y way of doing that? I don’t find an equivalent to C/unix select, which is what I’d normally reach for…


samth
2017-6-26 21:35:15

@zenspider sync is the equivalent of select


samth
2017-6-26 21:35:28

but in this case I think I can just start the client later


samth
2017-6-26 21:36:10

no, that’s wrong too


zenspider
2017-6-26 21:36:29

heh. sure.


zenspider
2017-6-26 21:36:58

hrm. sync is on any data you send through the channel?


zenspider
2017-6-26 21:37:10

that’s nice


samth
2017-6-26 21:37:30

sync is very nice


samth
2017-6-26 21:37:39

and more composable than select


zenspider
2017-6-26 21:38:12

but break is an exception, not some sort of event you send through?


zenspider
2017-6-26 21:38:28

hrm… I can’t tell how the break stuff gets fired


zenspider
2017-6-26 21:41:26

is it more idiomatic to send off a break-thread to all your child threads or to send through some sort of stop datum/event to all of them?


samth
2017-6-26 21:43:06

@zenspider why would you need to do that?


zenspider
2017-6-26 21:43:57

thinking of the worker model… fire off a pool of threads to do work, throw them things to work on via sync, then when you’re done shut them down by telling them to stop somehow


zenspider
2017-6-26 21:44:07

might be backwards thinking in racket land


samth
2017-6-26 21:44:35

mostly you do thread-per-connection


notjack
2017-6-26 21:52:21

worker thread pools are more useful when stopping and starting threads is expensive and the resource overhead per-thread is significant


notjack
2017-6-26 21:52:56

for green thread systems like racket’s that’s typically not the case


samth
2017-6-26 21:53:20

right, I use pools of Racket places in some situations


samth
2017-6-26 21:53:24

since those are expensive


notjack
2017-6-26 21:53:55

a package providing a nice place-pool abstraction might be useful


notjack
2017-6-26 21:55:19

@samth out of curiosity, do you know of any multicore webservers written in racket with places?


samth
2017-6-26 21:55:53

I think I’ve seen examples, but not that I recall offhand


jaz
2017-6-26 21:59:03

@notjack I’ve played around with that idea in the past. I think it would be a bit more straightforward if a tcp listener could be sent over a place channel.


notjack
2017-6-26 22:03:08

@jaz how’d it work out? my first impression is that it seems like individual places should be responsible for binding to OS ports, but I haven’t really done more than idly daydream about the problem


jaz
2017-6-26 22:05:54

@notjack I never took the idea very far :slightly_smiling_face:

You definitely could have different places bind to different ports, but then you’d need a proxy layer in front of that, right? You can also leave a single place in charge of accepting connections and handing them off to workers (which is what I was toying around with), but that seems like a bit lightweight of a task for a place.


notjack
2017-6-26 22:06:57

proxy layer would definitely be needed, yes


notjack
2017-6-26 22:07:10

specifically I was thinking of how to make a Racket web service with the SEDA architecture https://en.wikipedia.org/wiki/Staged_event-driven_architecture


senthil
2017-6-26 22:34:57

@senthil has joined the channel


notjack
2017-6-27 01:23:02

@ben :party: :party: :party: https://github.com/racket/rackunit/pull/48


samth
2017-6-27 01:46:21