Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
dupersaurus
Aug 1, 2012

Futurism was an art movement where dudes were all 'CARS ARE COOL AND THE PAST IS FOR CHUMPS. LET'S DRAW SOME CARS.'

Jewel posted:

What kind of db could a an mmo like WoW or eve be using? I know there's a lot of instancing and caching involved but it still seems like there's a high data throughput. Unsure if complicated queries are necessary, though.

I was involved with a (much smaller that wow) mmo a few years back, and I'm pretty sure it was some flavor of SQL. The whole game state is loaded on startup and kept in memory, so it's not like you have to be constantly pulling and pushing into the db.

Adbot
ADBOT LOVES YOU

leper khan
Dec 28, 2010
Honest to god thinks Half Life 2 is a bad game. But at least he likes Monster Hunter.

dupersaurus posted:

I was involved with a (much smaller that wow) mmo a few years back, and I'm pretty sure it was some flavor of SQL. The whole game state is loaded on startup and kept in memory, so it's not like you have to be constantly pulling and pushing into the db.

The MMOs I've worked on all used MSSQL. They weren't at WoW's scale, but there's nothing wrong with RDBMS. Especially when you know the form data should have (as with most problems in games).

Bob Morales
Aug 18, 2006


Just wear the fucking mask, Bob

I don't care how many people I probably infected with COVID-19 while refusing to wear a mask, my comfort is far more important than the health and safety of everyone around me!

Jewel posted:

What kind of db could a an mmo like WoW or eve be using? I know there's a lot of instancing and caching involved but it still seems like there's a high data throughput. Unsure if complicated queries are necessary, though.

Here's an old (2008) article about eve: http://highscalability.com/eve-online-architecture

They were using SSD's all the way back then :eek:

Plorkyeran
Mar 22, 2007

To Escape The Shackles Of The Old Forums, We Must Reject The Tribal Negativity He Endorsed
A brief glance at Blizzard's job page indicates that they use Oracle for everything account-related (payments, the authentication server, etc.) and MySQL+Cassandra+Couchbase for at least one game.

LP0 ON FIRE
Jan 25, 2006

beep boop

Gravity Pike posted:

By any chance, are all of the graphs going to be of sequential data? If so, a time-series database (like InfluxDB) may be a good choice. They have fast insert times, and are very fast to return or aggregate sequential data, but perform poorly with more general searches.

Yes they will! Good to know, thanks.

Opulent Ceremony
Feb 22, 2012

pr0k posted:

Any thoughts or pointers you guys had would be appreciated. This is a medium-term solution, in that I need something right goddamn now, but I can't get the devops people to spec what the solution *should* be yet, other than "something on the ETK stack."

I've been using ELK on a VM for almost a year now and am pretty happy with the solution. There is some configuration but it isn't ridiculous, to just start seeing your web server logs is simple (you might need to find a custom parsing script for your web server as I needed to for IIS, but I think Logstash has Apache and a few others built in). Kibana is great for quickly building graphs of various things, although it does have some annoying limitations at the moment like only being able to select one time period at a time for your dashboard when you might like some widgets to be counting monthly, others daily, etc.

Steve French
Sep 8, 2003

It's also quite likely that the Amazon provided elasticsearch solution will not work well for you; it's fairly hobbled. Specifically, last I checked a few months ago it was an old version, and EC2 classic only, no VPC. Don't ask me why they are releasing new features that don't work in the VPC, but they did.

csammis
Aug 26, 2003

Mental Institution
Trigonometry question!

I've got a camera with a circular fisheye lens whose API returns an image and a set of "normalized coordinates" which describe a polygon mapped onto the surface of the sphere. The API documentation doesn't go into detail but my guess is that the "normalized coordinate" is a polar coordinate normalized to [0, 1]. My goal is to produce a dewarped rectilinear image with the polygon coordinates mapped onto the the corresponding locations in the new image. I've got the image dewarping done but I'm having a hard time reasoning about the coordinate mapping. Here's my problem: the algorithm I'm using for the image dewarping maps output coordinates to what the corresponding input coordinates are in the source image. Googling hasn't yielded anything that shows me how to take a given coordinate in the source image and figure out where in the destination it goes.

I might not even be using the right terms to describe the problem. Trig and geometry in general were easily my worst math subjects and it's taking me a while to get back up to speed. Can anyone give me some pointers?

TooMuchAbstraction
Oct 14, 2012

I spent four years making
Waves of Steel
Hell yes I'm going to turn my avatar into an ad for it.
Fun Shoe
I'm not sure I fully understand the problem, but in general what you're looking to do is invert the transformation that you have. Can you share the algorithm that you want to reverse?

Jabor
Jul 16, 2010

#1 Loser at SpaceChem

csammis posted:

Trigonometry question!

I've got a camera with a circular fisheye lens whose API returns an image and a set of "normalized coordinates" which describe a polygon mapped onto the surface of the sphere. The API documentation doesn't go into detail but my guess is that the "normalized coordinate" is a polar coordinate normalized to [0, 1]. My goal is to produce a dewarped rectilinear image with the polygon coordinates mapped onto the the corresponding locations in the new image. I've got the image dewarping done but I'm having a hard time reasoning about the coordinate mapping. Here's my problem: the algorithm I'm using for the image dewarping maps output coordinates to what the corresponding input coordinates are in the source image. Googling hasn't yielded anything that shows me how to take a given coordinate in the source image and figure out where in the destination it goes.

I might not even be using the right terms to describe the problem. Trig and geometry in general were easily my worst math subjects and it's taking me a while to get back up to speed. Can anyone give me some pointers?

Generally speaking, if you're dewarping something like a raster image, you're going to be taking every pixel coordinate in the output and sampling what the input looks like at the corresponding input position. So that's why most dewarping algorithms are going to be coded that way.

It sounds like you're wanting to go the other way - to take a handful of points in the warped coordinate space, and figure out where they would be in a hypothetical un-warped original image. So perhaps you might find a fisheye warping transformation more useful than the reverse dewarping transformation.

sarehu
Apr 20, 2007

(call/cc call/cc)
Ultimately once you have two pairs or coordinates you can do the assignment either way, you "merely" need to fill in untouched pixels.

But you have

targetx = midy + (maxmag - y) * cos(-x / maxmag)
targety = midx + (maxmag - y) * sin(-x / maxmag)

So you want to find x and y, given targetx and targety. I'm on a phone so let p = maxmag - y and q = -x/maxmag.

That means p*cos(q) = targetx-midy, p*sin(q) = targety - midx. Thus p = sqrt((targetx-midy)^2 + (targety-midx)^2), and q = atan2(targety-midx, targetx-midy). (p is the radius and q is the angle, that's your basic Cartesian->polar coordinate transformation.)

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



sarehu posted:

That's just an API. With that API you could do a "Schwatzian transform" as Perlers might call it, there's a Wikipedia page.

Oh hey that's at least something to google. Thanks

quote:

cmp_to_key's return value presumably throws the objects into a wrapper type that implements the desired comparison, you can always implement such a thing yourself.

Yeah, I looked it up out of curiosity and it just wraps every key in a class that implements the Python equivalent of a comparable object by calling the comparison function on self.wrapped_key, other. Pretty straightforward now that I've seen it done.

LP0 ON FIRE
Jan 25, 2006

beep boop
What are your thoughts of using Aerospike for a database vs Cassandra or MongoDB? Aerospike claims to beat them both on all fronts, but I'm afraid they are desperately feeding me propaganda.

leper khan
Dec 28, 2010
Honest to god thinks Half Life 2 is a bad game. But at least he likes Monster Hunter.

LP0 ON FIRE posted:

What are your thoughts of using Aerospike for a database vs Cassandra or MongoDB? Aerospike claims to beat them both on all fronts, but I'm afraid they are desperately feeding me propaganda.

If you're reading their marketing material instead of third party analysis on real data then you're being fed propaganda.

LP0 ON FIRE
Jan 25, 2006

beep boop

leper khan posted:

If you're reading their marketing material instead of third party analysis on real data then you're being fed propaganda.

I was looking at some links provided by a Stack Overflow answer:

Aerospike vs Cassandra

Aerospike vs Redis and Mongo

Aerospike Benchmarks

The last link is from Aerospike.com

e: So the first link does state some drawbacks

LP0 ON FIRE fucked around with this message at 19:11 on Jul 18, 2016

Eela6
May 25, 2007
Shredded Hen
I like Python but want to gain more experience with statically typed, compiled languages.

I know a little C and can at least read Go.

Where should I look?

nielsm
Jun 1, 2009



Eela6 posted:

I like Python but want to gain more experience with statically typed, compiled languages.

I know a little C and can at least read Go.

Where should I look?

C++, C#, perhaps Rust, Haskell

Languages that will also let you enjoy strict typing discipline but probably not be practical for normal use:
Pascal (mainly Delphi derived variants), OCaml, Ada

TooMuchAbstraction
Oct 14, 2012

I spent four years making
Waves of Steel
Hell yes I'm going to turn my avatar into an ad for it.
Fun Shoe
I kind of feel like Java ought to be mentioned as a strongly-typed language that's still used all over the loving place, but it's definitely not a sexy new language any more (if it ever was).

ultrafilter
Aug 23, 2007

It's okay if you have any questions.


Java's boring as hell, but knowing it'll get you a job.

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

I use Django + Django Rest Framework to make REST API's all the time.

Just for the sake of learning something new, what's something in some other language that does the same sort of things that I should look at?

Asymmetrikon
Oct 30, 2009

I believe you're a big dork!
ASP.NET Web API for C# is quite good.

jiggerypokery
Feb 1, 2012

...But I could hardly wait six months with a red hot jape like that under me belt.

If a recruiter asks you if you have "Exposure to software development utilising rational databases such as Oracle/MySQL" do you correct them or do you roll with it and say you are more familiar with irrational databases, but find rational ones more reasonable?

TooMuchAbstraction
Oct 14, 2012

I spent four years making
Waves of Steel
Hell yes I'm going to turn my avatar into an ad for it.
Fun Shoe

jiggerypokery posted:

If a recruiter asks you if you have "Exposure to software development utilising rational databases such as Oracle/MySQL" do you correct them or do you roll with it and say you are more familiar with irrational databases, but find rational ones more reasonable?

They wouldn't get the joke, so why bother making it? Recruiters are not software developers; they're just handed a set of buzzwords to look for. A "rational" database totally sounds like a plausible thing if you aren't familiar with the jargon.

Lonely Wolf
Jan 20, 2003

Will hawk false idols for heaps and heaps of dough.
You should correct anyone who claims MySql is rational.

(If they're going to be rewriting your resume, you should correct so they don't put that on your resume. If they're just talking, nod politely and ignore it.)

Bob Morales
Aug 18, 2006


Just wear the fucking mask, Bob

I don't care how many people I probably infected with COVID-19 while refusing to wear a mask, my comfort is far more important than the health and safety of everyone around me!

We were talking with a vendor, and PHB looked over at the sales guy and said "Does your database use tables?"

Not sure if he was trying to sound relevant or what.

LP0 ON FIRE
Jan 25, 2006

beep boop
I'm highly doubting this, but does anyone know any cases where Neo4j is used entirely for a larger scale application database?

KernelSlanders
May 27, 2013

Rogue operating systems on occasion spread lies and rumors about me.

Bob Morales posted:

"Does your database use tables?"

No, ours has columns

baquerd
Jul 2, 2007

by FactsAreUseless

TooMuchAbstraction posted:

They wouldn't get the joke, so why bother making it? Recruiters are not software developers; they're just handed a set of buzzwords to look for. A "rational" database totally sounds like a plausible thing if you aren't familiar with the jargon.

Also, don't correct them, they're not going to understand and will take back to the hiring manager that you didn't have a firm grasp on rational databases.

leper khan
Dec 28, 2010
Honest to god thinks Half Life 2 is a bad game. But at least he likes Monster Hunter.

baquerd posted:

Also, don't correct them, they're not going to understand and will take back to the hiring manager that you didn't have a firm grasp on rational databases.

It's also indicative of the type of place where there's an incompetent in a position of minor authority that will "correct" valid terms with whatever nonsense lives in their broken mind.

Guaranteed HR isn't arguing semantics of terms if an engineer tells them it's something other than what they were saying previously. People in recruitment are shockingly good at parroting.

jiggerypokery
Feb 1, 2012

...But I could hardly wait six months with a red hot jape like that under me belt.

I'm not actually looking for work so I won't even bother responding. It just caught my eye and made me giggle when I was deleting emails. Thought the thread might enjoy it too haha

TheresaJayne
Jul 1, 2011

Bob Morales posted:

We were talking with a vendor, and PHB looked over at the sales guy and said "Does your database use tables?"

Not sure if he was trying to sound relevant or what.

I guess he was trying to determine if it was a nosql offering or standard relational db

AARO
Mar 9, 2005

by Lowtax
Which thread would be correct to post about an issue with a site running on Wordpress with Godaddy hosting?

TooMuchAbstraction
Oct 14, 2012

I spent four years making
Waves of Steel
Hell yes I'm going to turn my avatar into an ad for it.
Fun Shoe

AARO posted:

Which thread would be correct to post about an issue with a site running on Wordpress with Godaddy hosting?

Crappy Construction Tales? :v:

Hughlander
May 11, 2005

LP0 ON FIRE posted:

What are your thoughts of using Aerospike for a database vs Cassandra or MongoDB? Aerospike claims to beat them both on all fronts, but I'm afraid they are desperately feeding me propaganda.

We had a pilot program with them must have been 4 years ago when they were desperate for early success. We eventually decided not to go with them but I can't imagine the experience is still very relevant given how fast a startup tech should move in 4 years.

LP0 ON FIRE
Jan 25, 2006

beep boop

Hughlander posted:

We had a pilot program with them must have been 4 years ago when they were desperate for early success. We eventually decided not to go with them but I can't imagine the experience is still very relevant given how fast a startup tech should move in 4 years.

Yes I see that they've been moving up in the ranks rather quickly. After more research it seems as though so many databases can work great just depending on your needs, and businesses often use combinations of different databases, and we'll probably do the same.

LP0 ON FIRE fucked around with this message at 17:15 on Jul 25, 2016

Eeyo
Aug 29, 2004

I primarily do physics programming, so large mathematical expressions come up a lot.

Is there any kind of general strategy to minimize computation time for large expressions with many parts? Think something with a several term numerator and denominator, involving powers of some quantities and also some grouping too.

Is it best practice to group everything up into one evaluation? Or should I build up the different parts over several evaluations into partial parts? Can compilers optimize large mathematical expressions at all?

I expect the answer is in general no, but I figured someone else may have thought a lot about this.

raminasi
Jan 25, 2005

a last drink with no ice
What language?

Eeyo
Aug 29, 2004

It's fortran since my boss only knows fortran (he literally used to code with punch cards). C/C++ are pretty easy to get working with fortran however.

This gets deployed on a cluster where fortran/C/C++ are the only real options.

TooMuchAbstraction
Oct 14, 2012

I spent four years making
Waves of Steel
Hell yes I'm going to turn my avatar into an ad for it.
Fun Shoe

Eeyo posted:

Is there any kind of general strategy to minimize computation time for large expressions with many parts?

I don't think this is something that realistically you're going to be able to improve on compared to what the compiler does. Compilers are really smart these days (usually). Your best bet to improve performance is to try to do less math, not to do the math differently.

(Of course, that's a lot harder...)

Adbot
ADBOT LOVES YOU

sarehu
Apr 20, 2007

(call/cc call/cc)
For starters you'll want to avoid duplicating work, avoid expensive math operations in favor of cheaper ones. Like, you know, do 0.5*sin(2*x) instead of sin(x)*cos(x), because that's less work.

Also think about the performance of your memory access patterns -- how many cache misses will you have? Will cache accesses be in order so that they can get prefetched? And you aren't doing anything really awful like using a linked list? Edit: For example, instead of an array of (x,y,z) points, it can be faster to have three arrays, especially if some loop doesn't touch one of the coordinates. Or for the needs of some SIMD instruction.

There's also things like, the CPU can do so-many additions and so-many multiplications at the same time, so you could improve performance in some situations by choosing an operation with a more even mix. It could also help if you imagine the CPU trying to execute operations in parallel -- (w * x * y * z) which parses as (((w * x) * y) * z) might be slower than ((w * x) * (y * z)), since the latter can do two multiplications simultaneously. (Of course with floating point you do get a different numerical result, which is why an honest compiler can't do that as an optimization. Edit: Maybe Fortran can, I wouldn't know.)

Also think about whether you could take advantage of SIMD instructions.

sarehu fucked around with this message at 21:54 on Jul 26, 2016

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply