Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 30 11:45
    Tolkyria commented #646
  • Jan 30 11:44
    Tolkyria commented #646
  • Jan 16 14:09
    patrickboesch starred arenanet/api-cdi
  • Jan 16 03:23
    isand3r starred arenanet/api-cdi
  • Dec 09 2018 14:11
    queicherius commented #567
  • Dec 05 2018 16:57
    apoch closed #433
  • Dec 05 2018 16:57
    apoch commented #433
  • Dec 05 2018 16:53
    wafflebot[bot] unlabeled #527
  • Dec 05 2018 16:53

    apoch on master

    /v2/pvp/seasons: add .ranks. Merge pull request #535 from ar… (compare)

  • Dec 05 2018 16:53
    apoch closed #535
  • Dec 05 2018 16:53
    apoch closed #527
  • Dec 05 2018 16:45

    apoch on master

    add missing name tag to /v2/rac… Merge pull request #609 from Th… (compare)

  • Dec 05 2018 16:45
    apoch closed #609
  • Dec 04 2018 19:18
    darthmaim commented #640
  • Dec 04 2018 18:17
    apoch commented #640
  • Dec 04 2018 09:43
    darthmaim commented #640
  • Dec 03 2018 17:50
    Aonwy unlabeled #640
  • Dec 03 2018 17:49
    Aonwy closed #640
  • Dec 03 2018 17:47
    Aonwy labeled #645
  • Dec 01 2018 18:36
    strigefleur edited #645
smiley
@codemasher
anyone here?
lye
@lye
I've only used pthreads in C
threads aren't terribly hard as long as you model the dataflow sanely
smiley
@codemasher
i guess you need some deeper knowledge about system internals, eh?
lye
@lye
not really
smiley
@codemasher
ok
lye
@lye
for example, you could have N threads fetching data and pushing data to a shared queue where it gets popped off by another thread whose job is to push it into the database
typically producer-consumer setup with multiple producers
the important bit to note is that the only shared state between threads is the queue, which should be threadsafe (either using a mutex or a lock-free datastructure)
smiley
@codemasher
although i appreciate your explanation, this is already beyond me - i might need some time to wrap my head around that :D
(i've never studied or got taught in that stuff)
(my way of learning is: take an example, tear it apart to it's bones, distill the essence and then build something new from it)
windwarrior
@windwarrior
You should read about it, threading is quite interesting and often is something that is poorly understood :).
smiley
@codemasher
thats's why it is tempting for me, i always choose to create things, others shy away from because too hard :D
but i really want to use this thing as i can see the positive performance impact it would have
windwarrior
@windwarrior
Be ready for unexplainable probable concurrency bugs then
smiley
@codemasher
haha, no worries, i'm used to run into php bugs
like any known to man
lye
@lye
eh as long as you still to a CSP model concurrency is pretty easy (https://en.wikipedia.org/wiki/Communicating_sequential_processes)
smiley
@codemasher
windwarrior
@windwarrior
Oeeh formal verification
People often tell me its a joke outside of academia
smiley
@codemasher
huh, wtf, gitter? öö
lye
@lye
heh
Insults will be ignored.
smiley
@codemasher
haha
If you have any comments, suggestions or insults please forward them to krakjoe@php.net
also good
thats why i actually like the php folks :D
(that's a great line for any repo description^^)
because it's got that subtle "haters gonna hate" in it
windwarrior
@windwarrior
Doesnt PHP have a GIL like python?
smiley
@codemasher
Something being complex, or difficult, is no kind of justification for avoiding it. The complexity of anything should decrease as your knowledge increases, if it does not, then you are not taking in the right kind of information. This is the nature of learning.
wow, wise words
smiley
@codemasher
oh great, no need for reinventing the wheel, just add fancy https://github.com/krakjoe/pthreads/blob/master/examples/MySQLi.php
lye
@lye
FWIW, I definitely think curl_multi will outperform running a bunch of file_get_contents in separate threads
Also shame on you if you're running your own PHP boxes with allow_url_fopen enabled :P
smiley
@codemasher
does this even still exist in php7?
a reason, why i always used fsockopen back in the day when i made http://worldofpadman.net
we had no curl server side but suhoshin installed :D
so it was not only pretty hard to get into the server, but also out
lye
@lye
I dunno, I think we're still using php5 for the production stuff I run on the side
smiley
@codemasher
but i also think the curl_multi along with throttling is not much of a problem, unless you basically disable throttling by allowing an insane amount of concurrent requests
which causes those neat green spikes on /v2/items in your fancy log
lye
@lye
:D
does curl_multi have a request limit by default?
smiley
@codemasher
doesn't seem so
lye
@lye
I was under the impression that it ran all of them concurrently unless you asked it not to