These are chat archives for Ruhrpottpatriot/GW2.NET

19th
Sep 2015
Steven Liekens
@StevenLiekens
Sep 19 2015 08:40
@SamHurne I saw that you had concurrency issues with the mumble link layer
do you think this is something that should be handled by the library?
Steven Liekens
@StevenLiekens
Sep 19 2015 08:50
@Ruhrpottpatriot let's update the implementation progress table with new endpoints from this page https://api.guildwars2.com/v2
Steven Liekens
@StevenLiekens
Sep 19 2015 09:36
@Ruhrpottpatriot can you hide the restsharp package from search? it's not supported as of 1.0.0
there's no restsharp code anywhere in 1.0.0 or newer
and I still want us to drop the IServiceClient stuff and replace it with System.Net.Http stuff
Robert Logiewa
@Ruhrpottpatriot
Sep 19 2015 12:18
Hiding the R# package is not possible I'll upload a small update that only changes the version requirement of the package to below 1.0 That should fix the problem.
Robert Logiewa
@Ruhrpottpatriot
Sep 19 2015 12:30
As for release notes: If you add a release via GitHub itself you can set release notes. That is what we should do.
shurne
@SamHurne
Sep 19 2015 12:34
About the mumble link concurrency issue: I guess I'm not really sure... it looks like you can read from the mumble link memory-mapped file at the same time as the client is writing to it, causing serialization issues. What should be the behavior of the library if that occurs? Catch it and try again? Catch it and return a null value? Catch it and re-throw?
Robert Logiewa
@Ruhrpottpatriot
Sep 19 2015 12:38
I vote for a behaviour similar to Entitiy Framework: Throwing an exception. This is what I'd expect if I wanted to try to access an object already in use
@StevenLiekens I can't access the notes for the releases somehow
shurne
@SamHurne
Sep 19 2015 12:45
Also, should we start creating Issues in Github to help track all these various topics? Some of them aren't necessarily "issues", but it's common to use Issues to keep track of general work items. Perhaps we should also move over some of the work items from codeplex?
Robert Logiewa
@Ruhrpottpatriot
Sep 19 2015 12:48
sure we can do that
btw @SamHurne, did you see arenanet/api-cdi#93
shurne
@SamHurne
Sep 19 2015 12:54
Yup, good PR. Knowing something is broken because the schema changed would definitely be an improvement.
Robert Logiewa
@Ruhrpottpatriot
Sep 19 2015 12:56
Could you comment on it too? Seems a bit lonely there with only me and Iye :)
On a sidenote: When I query v2/commerce/listings/{id}, could you call the topmost result a tradingpostItem?
I.e. the result I get back when I call, e.g. https://api.guildwars2.com/v2/commerce/listings/24
shurne
@SamHurne
Sep 19 2015 13:06
Yea, maybe "TradingPostItem", "ItemListings", or "ItemTradingPostListings"? If you call the topmost result of /v2/commerce/prices/{id} "ItemPrices", I'd name v2/commerce/listings/{id} "ItemListings"
or maybe TradingPostItemPrices and TradingPostItem... idk. It should probably be consistent/related for the 2 endpoints though
Robert Logiewa
@Ruhrpottpatriot
Sep 19 2015 13:08
In the schema I called it tradingpostItem and the others listing and listingCollection
that seemed like a reasonable choice
shurne
@SamHurne
Sep 19 2015 13:09
That seems fine to me
Robert Logiewa
@Ruhrpottpatriot
Sep 19 2015 13:12
So v2/commerce/listings schema done
now the other two
Robert Logiewa
@Ruhrpottpatriot
Sep 19 2015 13:33
damn the exchange schema was challenging.
validating ["coins","gems"] is a tad more complex
shurne
@SamHurne
Sep 19 2015 15:20
Just a heads-up, I'm in the process of creating Issues in GitHub for the ones that were in Codeplex (with links of course). You guys are more than welcome to close out any that aren't applicable anymore.
shurne
@SamHurne
Sep 19 2015 15:44
Hmm alright, so I moved a few, but there are a couple more that have some pretty extensive discussion... see https://gw2dotnet.codeplex.com/workitem/1317, https://gw2dotnet.codeplex.com/workitem/1246, https://gw2dotnet.codeplex.com/workitem/1239, and https://gw2dotnet.codeplex.com/workitem/1221. Are these still applicable? If so, I can move them as well, but thought I'd check on those ones first.
Steven Liekens
@StevenLiekens
Sep 19 2015 16:45
I'd say the Link header issue is still very relevant
right now we still use PageContextPatchUtility
Steven Liekens
@StevenLiekens
Sep 19 2015 16:51
what it does is use the requested page index and the X-Page-* response headers to calculate first/last/previous/next page numbers
normally you would just get these values from the Link header
but we don't have the tools to parse that header
@Ruhrpottpatriot yes you can hide packages
either on nuget.org or by running nuget.exe delete
it doesn't delete the package, but it hides it from search
Robert Logiewa
@Ruhrpottpatriot
Sep 19 2015 16:54
@StevenLiekens I could hide the package, but seeing as some people would want to use the old version (not sure why, but this might be the case), I just uploaded a R# package that has the requirement of < 1.0. With that there is no possibility to install it with a greater version.
Steven Liekens
@StevenLiekens
Sep 19 2015 16:55
okay
Robert Logiewa
@Ruhrpottpatriot
Sep 19 2015 16:56
@SamHurne As for the discussions, not yet copied. Just make an initial post which links to codeplex and any further discussion is done on GitHub.
I changed the version info on appveyor to be in line with Semantic Versioning. New version info now looks like 1.2.0+{build}
Robert Logiewa
@Ruhrpottpatriot
Sep 19 2015 17:15
@StevenLiekens How do we retrieve the header in our current library? Currently too stupid to find it in our code
mafflerbach
@mafflerbach
Sep 19 2015 17:27
good evening all
shurne
@SamHurne
Sep 19 2015 17:29
Good afternoon!
(because everyone lives in EST time, right? :stuck_out_tongue:
mafflerbach
@mafflerbach
Sep 19 2015 17:34
nope nope nopeididope ^^ hmm i am in thee fuutuure coughing EST +6
Robert Logiewa
@Ruhrpottpatriot
Sep 19 2015 17:36
EST... that is this strange time zone used in the USA? right CEST all the way :smile:
So yes, good evening
^^
mafflerbach
@mafflerbach
Sep 19 2015 17:43
finally normal people here ^^
shurne
@SamHurne
Sep 19 2015 17:43
Ha. I see how it is
So I think I've copied over the issues from codeplex, feel free (anyone) to double-check that I didn't miss anything
Robert Logiewa
@Ruhrpottpatriot
Sep 19 2015 17:45
Ok, call me crazy, but I just started on a link header parser
mafflerbach
@mafflerbach
Sep 19 2015 17:45
you are crazy ;o)
Robert Logiewa
@Ruhrpottpatriot
Sep 19 2015 17:45
this might be a good idea to get out my logic and Discrete mathematics notes to revisit regular expressions
Well at first I'll only be doing the link header
Maybe I'll add the others later
mafflerbach
@mafflerbach
Sep 19 2015 17:46
do we talking about profan http headers ?
Robert Logiewa
@Ruhrpottpatriot
Sep 19 2015 17:47
not quite
example: Link: </v2/items?page=11&page_size=20>; rel=previous, </v2/items?page=13&page_size=20>; rel=next, </v2/items?page=12&page_size=20>; rel=self, </v2/items?page=0&page_size=20>; rel=first, </v2/items?page=2258&page_size=20>; rel=last
so we can compute the links we need for pagination
right now we are doing it via the X- Headers
mafflerbach
@mafflerbach
Sep 19 2015 17:51
meh.
Robert Logiewa
@Ruhrpottpatriot
Sep 19 2015 17:52
It'll probably be the most simple parser I have ever written :)
mafflerbach
@mafflerbach
Sep 19 2015 17:56
there is not a webdav library that supports so crapy task ?
Robert Logiewa
@Ruhrpottpatriot
Sep 19 2015 17:56
apparently not
Steven Liekens
@StevenLiekens
Sep 19 2015 17:56
what does webdav have to do with it?
Robert Logiewa
@Ruhrpottpatriot
Sep 19 2015 17:56
or it is totally overblown with other features
mafflerbach
@mafflerbach
Sep 19 2015 18:00
öhm cause of the url i thougt it's a webdav thingie
This message was deleted
Robert Logiewa
@Ruhrpottpatriot
Sep 19 2015 18:00
It's a simple HTTPHeader
btw, you can edit your messages
just use the three dots to the right
Steven Liekens
@StevenLiekens
Sep 19 2015 18:01
here's the actual spec https://tools.ietf.org/html/rfc5988
idk what that other site is
Robert Logiewa
@Ruhrpottpatriot
Sep 19 2015 18:01
It's the same spec
your site was temporarily unavailable
Steven Liekens
@StevenLiekens
Sep 19 2015 18:02
it's crazy to me that they need to write a 22 page long RFC for just 1 response header
Robert Logiewa
@Ruhrpottpatriot
Sep 19 2015 18:02
^^
Steven Liekens
@StevenLiekens
Sep 19 2015 18:02
clearly that header is complete bullshit
nobody should ever use it, then we don't need to parse it
Robert Logiewa
@Ruhrpottpatriot
Sep 19 2015 18:12
meh, I'm going to write a small parser for that and we'll be done with it
mafflerbach
@mafflerbach
Sep 19 2015 18:13
in php its really simple ^^
Robert Logiewa
@Ruhrpottpatriot
Sep 19 2015 18:15
in c# too
just get the thing from the WebHeaderCollection and run a bit of string manipulation over it
mafflerbach
@mafflerbach
Sep 19 2015 18:16
for you ^^ I need probably 8 hours :D
Robert Logiewa
@Ruhrpottpatriot
Sep 19 2015 18:16
I'm basically done with it
Steven Liekens
@StevenLiekens
Sep 19 2015 18:16
you're gonna end up with a regular expression that breaks as soon as they change a comma
Robert Logiewa
@Ruhrpottpatriot
Sep 19 2015 18:16
yes I know
mafflerbach
@mafflerbach
Sep 19 2015 18:16
why reg ex ?
Link: </v2/items?page=11&page_size=20>; rel=previous, </v2/items?page=13&page_size=20>; rel=next, </v2/items?page=12&page_size=20>; rel=self, </v2/items?page=0&page_size=20>; rel=first, </v2/items?page=2258&page_size=20>; rel=last
split at ,
Robert Logiewa
@Ruhrpottpatriot
Sep 19 2015 18:17
that is only half the work
mafflerbach
@mafflerbach
Sep 19 2015 18:17
then split at ;
Steven Liekens
@StevenLiekens
Sep 19 2015 18:17
because anything else is too difficult and time consuming to write
okay yeah
you could do that
Robert Logiewa
@Ruhrpottpatriot
Sep 19 2015 18:17
the things we need:
/v2/items
Steven Liekens
@StevenLiekens
Sep 19 2015 18:17
split on commas, semicolons and equal signs
Robert Logiewa
@Ruhrpottpatriot
Sep 19 2015 18:17
/v2/items
page_size=20
mafflerbach
@mafflerbach
Sep 19 2015 18:18
okay it could be unstable
Robert Logiewa
@Ruhrpottpatriot
Sep 19 2015 18:18
page=11
Steven Liekens
@StevenLiekens
Sep 19 2015 18:18
and then get the right indexes
Robert Logiewa
@Ruhrpottpatriot
Sep 19 2015 18:18
and much more
@StevenLiekens That is what I basically did
still it's volatile
Steven Liekens
@StevenLiekens
Sep 19 2015 18:18
is it?
Robert Logiewa
@Ruhrpottpatriot
Sep 19 2015 18:18
yesh, if they bork the header
Steven Liekens
@StevenLiekens
Sep 19 2015 18:18
are the indexes not always the same?
Robert Logiewa
@Ruhrpottpatriot
Sep 19 2015 18:18
but more solid than regex that is granted
mafflerbach
@mafflerbach
Sep 19 2015 18:18
okay i thougt you need only the linkpath and value splitting
Steven Liekens
@StevenLiekens
Sep 19 2015 18:18
assuming that they won't change the format
Robert Logiewa
@Ruhrpottpatriot
Sep 19 2015 18:19
if they stay with RFC5988
why should they
Did I say, that I hate C# enums?
mafflerbach
@mafflerbach
Sep 19 2015 18:19
cause they can :P
Steven Liekens
@StevenLiekens
Sep 19 2015 18:19
I mean if we can split on separators and then hardcode the indexes then I would use that instead of regex
who doesn't hate enums?
they're broken by design
Robert Logiewa
@Ruhrpottpatriot
Sep 19 2015 18:20
at least those based on integers
c++ has some nice enums
Steven Liekens
@StevenLiekens
Sep 19 2015 18:20
it's the one thing java actually does better
Robert Logiewa
@Ruhrpottpatriot
Sep 19 2015 18:20
which they stole from c++
^^
Steven Liekens
@StevenLiekens
Sep 19 2015 18:20
I don't know c++
it looks complicated
shurne
@SamHurne
Sep 19 2015 18:21
It can be a massive pain. I do a ton of c++ at work
Robert Logiewa
@Ruhrpottpatriot
Sep 19 2015 18:21
yeah
it can
Eric Lippert did a good list on his bottom 10 c# features
and I mostly agree with him there
see point 4
oh and number 1
the one thing they stole from java which absolutely makes no sense whatsoever
mafflerbach
@mafflerbach
Sep 19 2015 18:23
maybe all 10 points ? ;)
Robert Logiewa
@Ruhrpottpatriot
Sep 19 2015 18:23
they all have their purpose on that list
I don't agree with him on 5 though
I like the type first system
Although I like Haskells system too
why can't more people use Haskell?
mafflerbach
@mafflerbach
Sep 19 2015 18:25
.oO(should i scrap all images, nah i dont think so)
Robert Logiewa
@Ruhrpottpatriot
Sep 19 2015 18:25
why? Haskell is great. So many possibilities
quickSort :: Ord a => [a] -> [a]
quickSort []     = []                               -- The empty list is already sorted
quickSort (x:xs) = quickSort [a | a <- xs, a < x]   -- Sort the left part of the list
                   ++ [x] ++                        -- Insert pivot between two sorted parts
                   quickSort [a | a <- xs, a >= x]  -- Sort the right part of the list
QS in Haskell
Steven Liekens
@StevenLiekens
Sep 19 2015 18:26
"Dishonorable mentions" lol
Robert Logiewa
@Ruhrpottpatriot
Sep 19 2015 18:26
so short, so beautiful
Steven Liekens
@StevenLiekens
Sep 19 2015 18:27
oh jeez
mafflerbach
@mafflerbach
Sep 19 2015 18:27
Infinite Diversity in Infinite Combinations
Robert Logiewa
@Ruhrpottpatriot
Sep 19 2015 18:40
GODDAMNYOU whitespace
Steven Liekens
@StevenLiekens
Sep 19 2015 18:41
still parsing link headers?
Robert Logiewa
@Ruhrpottpatriot
Sep 19 2015 18:42
I was looking why my unit test failed
seems I missed a whitespace
Steven Liekens
@StevenLiekens
Sep 19 2015 18:42
oh
Robert Logiewa
@Ruhrpottpatriot
Sep 19 2015 18:43
now I'm improving the code. I's a mess
but We'll probably get away with two .cs files
Steven Liekens
@StevenLiekens
Sep 19 2015 18:45
I can't find the code snippet that I wrote that downloads the entire items database in ~30 seconds
and I can't remember how I did it
Robert Logiewa
@Ruhrpottpatriot
Sep 19 2015 18:45
it's on codeplex I think in one of the discussions
Steven Liekens
@StevenLiekens
Sep 19 2015 18:45
I know, but I talk so much that I can't find it now
Robert Logiewa
@Ruhrpottpatriot
Sep 19 2015 18:46
^^
Steven Liekens
@StevenLiekens
Sep 19 2015 18:46
I found it
mafflerbach
@mafflerbach
Sep 19 2015 18:54
okay i dont get it. could it be, that i blocked from the api as spammer or bot ? And in this case throws the api an exception ?
Steven Liekens
@StevenLiekens
Sep 19 2015 18:55
what's the exception?
mafflerbach
@mafflerbach
Sep 19 2015 18:57
o.O i'am not getting an exception
but erm maybe the problem ist, that i build without symbols ?
oh dear i'am a totaly noob, that i'am to afraid to ask so basic question.
Robert Logiewa
@Ruhrpottpatriot
Sep 19 2015 18:59
there are no stupid questions
only stupid answers
so ask away
oh, and can somebody hit me please? I made the most stupid mistake ever
again it's the whitespace
Of course it cannot work
FINALLY!
it works
Steven Liekens
@StevenLiekens
Sep 19 2015 19:02
I think my food is here
frikn finally
hey tell me
Robert Logiewa
@Ruhrpottpatriot
Sep 19 2015 19:04
^^
Steven Liekens
@StevenLiekens
Sep 19 2015 19:04
does Task.WaitAll(IEnumerable<Task>) cause all tasks to run immediately?
Robert Logiewa
@Ruhrpottpatriot
Sep 19 2015 19:04
err w8
Steven Liekens
@StevenLiekens
Sep 19 2015 19:04
or does it evaluate them one by one?
Robert Logiewa
@Ruhrpottpatriot
Sep 19 2015 19:04
I think all run immediately
mafflerbach
@mafflerbach
Sep 19 2015 19:04
okay - simple case: WPF App - I would like fill a listBox with Image and desc. The hardcoded thing is running. but if i try it to fill with the items (https://github.com/Ruhrpottpatriot/GW2.NET/wiki/Items) i get in the logs The thread 0x3474 has exited with code 0 (0x0).
Steven Liekens
@StevenLiekens
Sep 19 2015 19:05
that's just normal .NET runtime output
not an error
mafflerbach
@mafflerbach
Sep 19 2015 19:05
btw Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Steven Liekens
@StevenLiekens
Sep 19 2015 19:05
don't worry about that stuff
Robert Logiewa
@Ruhrpottpatriot
Sep 19 2015 19:06
@StevenLiekens Why not use Task.WhenAll()?
mafflerbach
@mafflerbach
Sep 19 2015 19:06
hmm kay. but i dont get an normal exception
hmm Step into: Stepping over non-user code 'WpfApplication1.App.InitializeComponent' maby this is a point
Robert Logiewa
@Ruhrpottpatriot
Sep 19 2015 19:08
InitializeComponent has to run
on that step all your controls, etc. are initalized
paste your wpf code here
and post the gist in the chat
@StevenLiekens @SamHurne Care to look at the initial version of the parser: https://gist.github.com/Ruhrpottpatriot/8d725dbc5d7b6cf67d24
It really only does one thing: Parse the link header for us...
your lib installed via NuGet
Robert Logiewa
@Ruhrpottpatriot
Sep 19 2015 19:17
Damn, it's been a long time since I coded vanilla WPF
so here is a small tipp upfront, which does not have to do much with your problem, but should still be helpful: Go to MVVM
use a framework such as CaliburnMicro
MVVM has so many advantages over vanilla WPF it's not even fair anymore
mafflerbach
@mafflerbach
Sep 19 2015 19:20
okay at this point i should commit, that i start with c# yesterday ^^ so i don't know the state of the art frameworks ^^
Robert Logiewa
@Ruhrpottpatriot
Sep 19 2015 19:21
even better, you are not tainted with previous knowledge :)
mafflerbach
@mafflerbach
Sep 19 2015 19:22
Im trying to understand the crude magic stuff and the pixie dust of the autogenerate App magic ^^
previouse knowledge: 10 Years PHP ^^ so OOP i the basic is not the problem.
the generic stuff is a litle bit confusing ^^
Robert Logiewa
@Ruhrpottpatriot
Sep 19 2015 19:25
Generics are your bread and butter in C#
If you do more stuff with C# you will learn to hate PHP because it does stuff so stupid
mafflerbach
@mafflerbach
Sep 19 2015 19:26
^^
Robert Logiewa
@Ruhrpottpatriot
Sep 19 2015 19:27
Oh, and if you are at it: Learn LINQ
it ties in very well with generics and makes stuff so much easier and more readable
for example:
This message was deleted
becomes
mafflerbach
@mafflerbach
Sep 19 2015 19:27
Yeah my Visual studio told me that, too :)
Steven Liekens
@StevenLiekens
Sep 19 2015 19:28
can you change the Enum.TryParse stuff to handle the case where it returns false please?
Robert Logiewa
@Ruhrpottpatriot
Sep 19 2015 19:28
@mafflerbach Ah me bad example
Do you have resharper?
mafflerbach
@mafflerbach
Sep 19 2015 19:28
jop
Robert Logiewa
@Ruhrpottpatriot
Sep 19 2015 19:28
@StevenLiekens Sure I can
Steven Liekens
@StevenLiekens
Sep 19 2015 19:29
also I think that .Remove(0, 5) is semantically equal to .Substring(5)
Robert Logiewa
@Ruhrpottpatriot
Sep 19 2015 19:29
In this particular example, as written, it's a bit hard in LINQ
but you sure can optimize it by hand
@mafflerbach So the problem I see is mostly the time
you are downloading images and that takes a lot more time
mafflerbach
@mafflerbach
Sep 19 2015 19:32
ahh
okay
Robert Logiewa
@Ruhrpottpatriot
Sep 19 2015 19:32
you retrive the names just fine
but the images run forver
mafflerbach
@mafflerbach
Sep 19 2015 19:33
image transfer
so i should cache them
Robert Logiewa
@Ruhrpottpatriot
Sep 19 2015 19:33
a) you shouldn't start the whole think at app start. So add a button and do the thing on the button event
mafflerbach
@mafflerbach
Sep 19 2015 19:33
btw scrap
Robert Logiewa
@Ruhrpottpatriot
Sep 19 2015 19:33
b) Use the async version
c) Convert your app to MVVM and don't use vanilla WPF
mafflerbach
@mafflerbach
Sep 19 2015 19:34
but i thoug i geth only 10 items per page
pageSize: 10, pageIndex: 0
Robert Logiewa
@Ruhrpottpatriot
Sep 19 2015 19:34
yeah, but you are still transferring 10 images
mafflerbach
@mafflerbach
Sep 19 2015 19:35
but 10 images insize in 64x64
i dont have only isdn
Robert Logiewa
@Ruhrpottpatriot
Sep 19 2015 19:36
@StevenLiekens In your eyes, what should be the default for the relationship enum?
Steven Liekens
@StevenLiekens
Sep 19 2015 19:37
I'm going crazy
the same code that used to run in 30 seconds now runs in 96 seconds
what's up with that?
Steven Liekens
@StevenLiekens
Sep 19 2015 19:44
actually I just ran the same code again and this time it took 161 seconds
so that has to be the server, right?
Robert Logiewa
@Ruhrpottpatriot
Sep 19 2015 19:47
probably
mafflerbach
@mafflerbach
Sep 19 2015 19:52
i'm going now to bed , i wish you a good night wave
Robert Logiewa
@Ruhrpottpatriot
Sep 19 2015 19:52
cya
@StevenLiekens See this updated gist: https://gist.github.com/Ruhrpottpatriot/8d725dbc5d7b6cf67d24
Steven Liekens
@StevenLiekens
Sep 19 2015 19:55
Unknown is typically the first value
the one with int value 0
Robert Logiewa
@Ruhrpottpatriot
Sep 19 2015 19:56
Yeah, will change that later.
Going off to get something to eat and watch a film
Steven Liekens
@StevenLiekens
Sep 19 2015 19:56
okay
ttyl
Robert Logiewa
@Ruhrpottpatriot
Sep 19 2015 19:56
@SamHurne Look at the parser too, will ya?
cya
Steven Liekens
@StevenLiekens
Sep 19 2015 20:20
I think that no amount of linq will save us if they decide to change the format
as long as the format stays the same, hardcoded indexes should be fine
Steven Liekens
@StevenLiekens
Sep 19 2015 20:33
hey @SamHurne I updated my pull request
it's fast now
like, really really fast
shurne
@SamHurne
Sep 19 2015 20:33
Yes, yes it is!
Steven Liekens
@StevenLiekens
Sep 19 2015 20:34
but I don't know why it was slow
something in WPF that I'm not familiar with
that limits the number of connections to one host
shurne
@SamHurne
Sep 19 2015 20:34
Yea, I wasn't aware that was happening myself
I suspect those changes will have an impact on the application's performance as a whole
Steven Liekens
@StevenLiekens
Sep 19 2015 20:36
you might want to turn it down a bit
maybe int.MaxValue is a bad idea
shurne
@SamHurne
Sep 19 2015 20:37
Yea, I'm going to do some measurements and testing -- had the same thought
Steven Liekens
@StevenLiekens
Sep 19 2015 20:37

I'm getting a lot of these

GW2PAO.vshost.exe Warning: 0 : 2015-09-19 22:36:17.1721|WARN|GW2PAO.API.Data.ItemsDatabaseBuilder|Failed to retrieve items page 155 of 226.
GW2PAO.vshost.exe Warning: 0 : 2015-09-19 22:36:17.1911|WARN|GW2PAO.API.Data.ItemsDatabaseBuilder|Failed to retrieve items page 156 of 226.
GW2PAO.vshost.exe Warning: 0 : 2015-09-19 22:36:17.1911|WARN|GW2PAO.API.Data.ItemsDatabaseBuilder|Failed to retrieve items page 157 of 226.
GW2PAO.vshost.exe Warning: 0 : 2015-09-19 22:36:17.1911|WARN|GW2PAO.API.Data.ItemsDatabaseBuilder|Failed to retrieve items page 158 of 226.

which by the way has nothing to do with the actual page being requested
it's not page 155
it's whatever page would be the 155th page to complete
Steven Liekens
@StevenLiekens
Sep 19 2015 20:44
actually that error is another client side thing
sockets timing out
A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 64.25.47.16:443
Steven Liekens
@StevenLiekens
Sep 19 2015 21:18
okay this is probably just me being stupid but I can't get NLog to log exceptions
shurne
@SamHurne
Sep 19 2015 21:20
logger.Error("it blew up!", ex);?
Steven Liekens
@StevenLiekens
Sep 19 2015 21:21
it definitely doesn't print them to the output window
where's the log file?
oh there's no file target?
shurne
@SamHurne
Sep 19 2015 21:24
For the PAO, logs are thrown into a Logs folder next to the .exe
Steven Liekens
@StevenLiekens
Sep 19 2015 21:25
ooooooooh
okay thanks
no still nothing
it logs the message but not the excepton
Steven Liekens
@StevenLiekens
Sep 19 2015 21:33
NLog looks pretty broken to me
:D
shurne
@SamHurne
Sep 19 2015 21:35
Hmmm, you can always do logger.Error("it blew up! {0}", ex.ToString());, but yea, I don't know why it's not just printing the exception like it says it will
Maybe it's an issue in the version I'm using - 3.2
Steven Liekens
@StevenLiekens
Sep 19 2015 21:38
maybe
but I think it expects additional configuration
like you need to tell it how to format the exception
or it prints nothing at all
Steven Liekens
@StevenLiekens
Sep 19 2015 21:45
ehh I give up
I don't know how to tamper with timeout values at the socket level
let's just all agree not to send 200 requests at the same time
shurne
@SamHurne
Sep 19 2015 21:46
:thumbsup: Sounds good to me
Steven Liekens
@StevenLiekens
Sep 19 2015 21:46
or let's switch to System.Net.Http.HttpClient and hope that it does not have the same problem
shurne
@SamHurne
Sep 19 2015 21:55
Confirmed that NLog does not log the actual exception unless it's included in a target's layout, which it isn't by default (which is silly!)
Steven Liekens
@StevenLiekens
Sep 19 2015 22:07
almost as silly as the fact that NLog.dll references System.Windows.Forms
wanna know why? to support the RichTextBox control in winfoms as a logging target
shurne
@SamHurne
Sep 19 2015 22:08
Nice
So, I think I'm satisfied with the PR on the PAO at this point. Any other changes your making on it before I merge it in and set the limit to 20?
Steven Liekens
@StevenLiekens
Sep 19 2015 22:09
yeah
shurne
@SamHurne
Sep 19 2015 22:09
K
Steven Liekens
@StevenLiekens
Sep 19 2015 22:09
logging the exception when task.IsFaulted
instead of logging meaningless page numbers
but, I still don't know how to configure NLog to do that
shurne
@SamHurne
Sep 19 2015 22:10
Gotcha. I just commited the change required to the NLog.config file to make it actually log exceptions. So feel free to use the exception-logging methods
Steven Liekens
@StevenLiekens
Sep 19 2015 22:10
ok hold on
Steven Liekens
@StevenLiekens
Sep 19 2015 22:21
okay it should be good to go now
I stopped getting socket timeouts when I changed the connection limit to 20
I don't know what the default is... I think 2?
shurne
@SamHurne
Sep 19 2015 22:24
Yea, must be something low like that
Steven Liekens
@StevenLiekens
Sep 19 2015 22:25
hey I think you can control the degree of parallelism for Parallel.For by passing ParallelOptions
it seems very likely that it would default to the number of cores
Steven Liekens
@StevenLiekens
Sep 19 2015 22:31
I just realized something
they use IIS for load balancing and whatnot
when we hit socket timeouts, that's their IIS actively refusing connection requests
as in basic DOS prevention
shurne
@SamHurne
Sep 19 2015 22:34
o.O that definitely can't be a good thing to do
Steven Liekens
@StevenLiekens
Sep 19 2015 22:34
it's probably a default setting
shurne
@SamHurne
Sep 19 2015 22:34
(us hitting it with 200 connections)
Steven Liekens
@StevenLiekens
Sep 19 2015 22:34
I don't see why not :D
shurne
@SamHurne
Sep 19 2015 22:35
I guess I don't really know -- it just sounded bad