|
Careful Drums posted:so i need to make a dead simple api. it has only one endpoint, and the result is going to be a json object with a name and a date and a time. it will accomplish this by querying some database table full of datetimes and names and returning the next closest one in the future. if its honestly that simple who cares just pick the language you know and host it in my butt (the cloud). you can host .NET shits on not-azure.
|
# ? Nov 29, 2014 03:33 |
|
|
# ? Jun 12, 2024 00:41 |
|
GrumpyDoctor posted:when did "api" start meaning "rest api" Well "rest api" now means "api that returns JSON over HTTP"
|
# ? Nov 29, 2014 03:36 |
|
fleshweasel posted:if its honestly that simple who cares just pick the language you know and host it in my butt (my butt). you can host .NET shits on not-azure. you could, but why would you? azure is so staggeringly trivial
|
# ? Nov 29, 2014 03:43 |
|
MononcQc posted:Well "rest api" now means "api that returns JSON over HTTP" same
|
# ? Nov 29, 2014 03:53 |
|
Subjunctive posted:writing lock-free code is for people who think doing exception safety in C++ was for casuals and make strict-aliasing jokes at dinner parties. go channels
|
# ? Nov 29, 2014 04:01 |
|
Series DD Funding posted:go channels are they lock-free? I thought they were just a traditional message queue. neat.
|
# ? Nov 29, 2014 04:04 |
|
Subjunctive posted:are they lock-free? I thought they were just a traditional message queue. neat. the whole point of go is concurrency so i dont know why you would think that
|
# ? Nov 29, 2014 06:05 |
|
necrotic posted:the whole point of go is concurrency so i dont know why you would think that lock free does not mean "you don't have to use mutexes directly in your code", it means a malicious thread scheduler can't stop the progress of your code
|
# ? Nov 29, 2014 08:46 |
|
necrotic posted:the whole point of go is concurrency so i dont know why you would think that because you can have lots of concurrency without lock-free structures? why couldn't go's channels have a lock protecting the queue, with the channel flows racing freely other than manipulation of the queue itself? is there a semantic element to the channel model that requires lock-free implementation? e: in fact, if I'm following this golang-dev thread correctly, they abandoned the lock-free implementation of channels because the complexity didn't pay for itself; that certainly matches my experience! Subjunctive fucked around with this message at 11:34 on Nov 29, 2014 |
# ? Nov 29, 2014 11:29 |
|
b0lt posted:lock free does not mean "you don't have to use mutexes directly in your code", it means a malicious thread scheduler can't stop the progress of your code If the thread scheduler is malicious isn't your OS completely hosed and compromised anyway
|
# ? Nov 29, 2014 15:48 |
|
I think that may be an obtuse way of saying that there is no time that the thread scheduler can halt one thread in order to cause all other threads to also halt
|
# ? Nov 29, 2014 18:20 |
|
And that's just an obtuse way of saying there are no critical sections
|
# ? Nov 29, 2014 18:21 |
|
that is, no global locks? or am I confused
|
# ? Nov 29, 2014 18:23 |
|
Or local locks. You know, lock free.
|
# ? Nov 29, 2014 18:25 |
|
pseudorandom name posted:Or local locks. Ayy
|
# ? Nov 29, 2014 18:28 |
|
Oh, I get what you're asking -- when I said "all other threads" I meant all other threads participating in your lock free algorithm, not all threads in general
|
# ? Nov 29, 2014 18:34 |
|
pseudorandom name posted:Oh, I get what you're asking -- when I said "all other threads" I meant all other threads participating in your lock free algorithm, not all threads in general I think I get it; though this is not my area of expertise at all
|
# ? Nov 29, 2014 19:07 |
|
MononcQc posted:Well "rest api" now means "api that returns JSON over HTTP"
|
# ? Nov 29, 2014 22:19 |
|
MononcQc posted:Well "rest api" now means "api that returns JSON over HTTP" Same as agile means "ad-hoc planning of no particular structure"
|
# ? Nov 29, 2014 22:55 |
|
necrotic posted:the whole point of go is concurrency so i dont know why you would think that locks are hard to get right, amusingly enough lock free code is even harder to write than locks edit: https://view.officeapps.live.com/op/view.aspx?src=http://twvideo01.ubm-us.net/o1/vault/gdc09/slides/GDC09_Dawson_Lockless_Programming.ppt this is
|
# ? Nov 29, 2014 22:57 |
|
I don't get how lock-free message queues could really help. If your thread's doing nothing, it's going to be waiting for a wake-up so you've got to do a system call anyway. If you're under load, the thread's doing a lot of stuff so you're probably not going to contend anyway (because you'd send messages in batches). And I think you'd use a spin-lock just under the principle of things. Or is the idea of lock-free message queues that there's less latency under load (when sending messages across different threads, of course) because you're pushing messages to the other thread immediately instead of queuing them locally and sending them in a batch?
|
# ? Nov 30, 2014 00:18 |
|
sarehu posted:I don't get how lock-free message queues could really help. If your thread's doing nothing, it's going to be waiting for a wake-up so you've got to do a system call anyway. If you're under load, the thread's doing a lot of stuff so you're probably not going to contend anyway (because you'd send messages in batches). And I think you'd use a spin-lock just under the principle of things. That sums up LMAX Disruptor pattern. The "common problem" of too many cores to use, so lets have some spinning waiting for a message. I actually heard my boss suggest adding a verb to a REST interface so that "different things could be requested". Using directories or just the name of the item was too obvious apparently.
|
# ? Nov 30, 2014 01:18 |
|
The simplest way to solve such a problem is to use a consensus algorithm such as Paxos or Raft, and this was the direction I was going to take. However implementing consensus algorithms is hard. Actually it is so hard that often years are needed for implementations to stabilize. At some point I noticed something that makes the work of Redis Cluster nodes simpler, that is, information about hash slots is always idempotent. If hash slot 5 is served by A, and later because the configuration changes hash slot 5 is served by B, nodes don't need to know what happened, everything they need is that the configuration for an hash slot was updated. This changes everything basically: agreement protocols are able to take a state machine synchronized by running the same sequence of operations in every node. If the state machine is deterministic, then the internal state will be the same in all the nodes eventually. However all the state Redis Cluster needs, for a given slot, can be embedded into a single packet. Because of this we don't need a log of operations stored on disk, nor a way to make sure to fetch all the operations still not fetched, or to figure out what should be applied and what not, all the state can be copied in a single message. In short Redis Cluster does not require a full agreement protocol so I stolen just what I needed from Raft, and tried to figure out the rest.
|
# ? Nov 30, 2014 02:15 |
|
- the simplest way is to use something that works - but things that work are really hard to implement - and these tested methods take a while to shake out edge cases - so i copied what i could take and improvised the rest because who cares
|
# ? Nov 30, 2014 02:16 |
|
so redis is a perfectly adequate memcached alternative, and antirez is a better C programmer than i am, but drat he's adorable when he writes about distributed systems and persistence
|
# ? Nov 30, 2014 02:43 |
|
goddamn it antirez, quorum systems and eventually consistent stuff don't have the same semantics at all
|
# ? Nov 30, 2014 03:37 |
|
MrMoo posted:That sums up LMAX Disruptor pattern. The "common problem" of too many cores to use, so lets have some spinning waiting for a message. Oh, so it spins when idle instead of waiting for a pipe or eventfd notification? Or god forbid, a POSIX condition variable? Rad. e: Incidentally back in barebones multi-core memcache persistence days of RethinkDB, sarehu fucked around with this message at 04:16 on Nov 30, 2014 |
# ? Nov 30, 2014 04:14 |
|
sarehu posted:e: Incidentally back in barebones multi-core memcache persistence days of RethinkDB, this is either a really, really serious kernel bug, or you were using ubuntu
|
# ? Nov 30, 2014 16:50 |
|
Notorious b.s.d. posted:this is either a really, really serious kernel bug, or you were using ubuntu we used to have the same issue doing JS benchmarking in the browser: the CPU would step down during load of the next phase, and screw up the numbers. similarly, if the GPU stalls out the CPU in the Rift's rendering model, we can see step-down leading to the next frame being missed and things getting nauseating.
|
# ? Nov 30, 2014 18:34 |
|
wpf folks: i'm doing an app that has to output currency and i want to be able to change textbox formatting based on the currency selected. my thought was to use a converter and somehow bind the combobox value (which is bound to a property in my viewmodel) where the user selects the currency to the window culture and pass that to the converter so i can get the correct currency symbol and put it in the textbox. is this the right way to do it? if so, uh, how do i actually do it?
|
# ? Nov 30, 2014 18:56 |
|
Blinkz0rz posted:wpf folks: i'm doing an app that has to output currency and i want to be able to change textbox formatting based on the currency selected. Use Haskell.
|
# ? Nov 30, 2014 19:20 |
|
sarehu posted:Use Haskell.
|
# ? Nov 30, 2014 21:02 |
|
my coworkers have started up a lunchtime thing for us to learn us some Golang. im excite
|
# ? Nov 30, 2014 22:47 |
|
terrible way to waste your lunch time
|
# ? Nov 30, 2014 22:48 |
|
Notorious b.s.d. posted:this is either a really, really serious kernel bug, or you were using ubuntu It was Ubuntu.
|
# ? Nov 30, 2014 23:34 |
|
sarehu posted:RethinkDB, [...] congrats
|
# ? Dec 1, 2014 03:40 |
|
sarehu posted:
sounds like you were having a poo poo time so congrats
|
# ? Dec 1, 2014 04:10 |
|
Blinkz0rz posted:wpf folks: i'm doing an app that has to output currency and i want to be able to change textbox formatting based on the currency selected. you could use an IMultiValueConverter to do it that way but this might be a question for the grey thread
|
# ? Dec 1, 2014 04:16 |
|
Was wondering why people were congratulating shrughes until I realized it wasn't shrughes.
|
# ? Dec 1, 2014 04:17 |
|
|
# ? Jun 12, 2024 00:41 |
|
Suspicious Dish posted:Was wondering why people were congratulating shrughes until I realized it wasn't shrughes. http://forums.somethingawful.com/showthread.php?threadid=2773485&pagenumber=392&perpage=40#post426637272 edit: fwiw i have been through too many terrible jobs which have broken me as a person, and i do not wish this upon other people, even if they're a more-rational-than-thou jerk tef fucked around with this message at 04:42 on Dec 1, 2014 |
# ? Dec 1, 2014 04:23 |