« first day (1860 days earlier)      last day (3102 days later) » 

11:00 PM
I'm not against docker, but it won't solve shit of your code can't be run in multiple processes and actually be scalable
 
docker hasn't anything to do :P
 
@Luggage Was talking about planning for scalability down the line, ass
 
@LightFlow The main advantage of Docker is that the environment prod runs on is the same as testing/local/etc.
which is a BIG win.
 
I wasn't trying to be an ass, but docker helps automate deployment. You need somethign that can be deployed to multiple machines for it to help
 
We just had something go down because prod !== dev
 
11:01 PM
docker doesn't magically let you throw moew machines at any program and make it scale
 
@Luggage I didn't think you were trying to be an ass! (Ok, sorry. I'll stop now)
 
heh :)
 
anyway, as @SomeKittens said I have to run my own tests to be sure, the only problem is that I'm too lazy right now to write everything again with web sockets :P
 
you, hopefully, only need to re-write one hghly localized piece of code
 
Well, long polling is certainly the wrong choice
 
11:03 PM
your websocket/long polling decision should not even be know to the rest of the code
 
@copy explain why
 
we already did
it uses less resources.
also it's newer and all new things are better. :)
 
Like Docker
 
not docker again :P hahaha
 
shh
 
11:05 PM
@LightFlow They use less resources and they're not a hack
 
Just stream raw TCP
 
and since you are using node, you have socket.io. it's a simple choice.
socket.io falls back to long polling if needed. the best of both
 
They also encourage the right model for a chat: Pushing instead if pulling
 
and what about the maximum concurrent connections? that's the only problem
 
and.. what's the other thing that abstracts socket.io and others?
 
11:07 PM
@LightFlow When using long polling you also have to keep a connection open
 
100 shouldn't be a problem, but you'll eventually want your app to be able to run as multiple processes at once and share sessions
when you do that you can scale up your concurrent connections. And it's also handy for zero-downtime restarts, etc
 
by the way, I saw somewhere that stackoverflow uses web sockets
 
you're using it right now
it's everwhere.
I use websockets a dozen times before getting out of bed int he morning
 
Websockets made my food today
 
but as I remember (I can't find the post right now) stackoverflow was using atleast 6 different servers to handle all these connections
oh
40
Q: Sockets used by Stack Overflow

Bhushan FirakeWhat kind of sockets does Stack Overflow use for the realtime reputation updates? Is it something like Netty-Jetty, Solr or SignalR? Are they using web sockets implemented in C#?

 
11:12 PM
Clearly you didn't get the answer you wanted from us.
 
no, I got the answer and thanks for that ;)
I just want to be sure that everything is going to scale well in the future
 
@LightFlow you will not reach SO scale.
 
I don't want a bad decision to destroy me :P
 
stop thinking about scaling. At all.
 
@SomeKittens not with that attitude
 
11:15 PM
You're trying to figure out how to get an elephant into your car when all you have is a couple of wheels and an axel.
 
The onyl bad decision is making the websocket/long polling choice hard to change
 
@SomeKittens I think about scaling constantly
 
becaseu that implies you are leaking concerns all over the place
 
Make it run, make it run well, make it run fast. IN THAT ORDER.
@LightFlow then you're doing it wrong unless you work for a company that's IPO'd
 
I could replace socket.io in my app with another libray in a day, if I had to
that's the goal. write code that you can change when you learn more
 
11:17 PM
@SomeKittens To be fair, it's better to make the right decision now
 
@copy Agreed. But the question is "What works best?" not "What scales better?"
and WS is the clear winner.
 
@SomeKittens errrr, no I care about scalability
 
Oh, yeah
No you don't
 
@LightFlow No you don't
 
You just don't know it yet
 
11:19 PM
what if a massive wave of users sign up the next day? I know it sounds crazy but anyway
 
@LightFlow it sounds crazy because it is.
 
If you really care, start reading up on load balancers and distributed systems and stuff like that
 
haha :P
 
@Luggage YOU SAID YOU WEREN'T RECORDING AND I WAS DRUNK ENOUGH TO TRUST YOU
 
11:22 PM
I'm always recording. Court order.
 
@Luggage hahahaha
Also, is it safe and scalable to use web sockets for everything? (instant messaging, notifications, etc, etc)?? Won't this be more resource hungry?
 
We may have to go from 0 ws connections to couple hundred thousand soon
 
you only need some socket for all traffic
 
@LightFlow Websockets are better for all of those things
 
I hate the fact that using web sockets the connection opens and closes as the user navigates in different pages (correct me if i'm wrong) :P
 
11:28 PM
@LightFlow Use a SPA
 
and long polling will, too.
so no loss
 
@SomeKittens what is a SPA? :P
 
Single Page App
technically the same page (no reloads, no new connections).
 
Serrated Plastic Aparatus
 
iframes?
 
11:29 PM
@LightFlow no, just smart JS
Think messenger.com - it's not reloading the page every time you switch chats.
 
hm.... that might be a good idea
 
Every use 'ajax' to update part of your page?
A SPA app is doing that for everything (and a some attention to the back button)
 
is there any drawback in using SPA?
 
only in your experience with it. if you come from a server-generated page world of, say, php, asp, jsp, etc, then it may feel odd.
but my app is ASP and I love it
 
@LightFlow Everything's a tradeoff. SPA is more frontend-heavy.
 
11:32 PM
Ohh and if your site is for random visitors, and SPA might load slow
if it's an internal company app that people use all day (my situation) that is no issue at all
 
@lug
 
@LightFlow Relatively complex topic
 
@Luggage no, it's for everyone
 
ohh, ok, then.
thanks.
 
@copy yeah haha :P
 
11:34 PM
Like e-commerce?
or... an SO replacement..
 
something like a public forum let's say
 
ohh, porn.
 
hahahahahahahahah :P
 
push porn..
 
porn is good
 
11:35 PM
so.. just start making it, but refactor it as you refine your knowledge
 
then I have to refactor it continuously :P
 
Yup.
 
that's always a good rule
 
You obviously lack some experience, so that's the only way
 
I first wrote this app in php
 
11:37 PM
even those that have been doing it for decades don't choose all the right things in a new project
 
if you don't think your code from 6 months ago is utter shit, you haven't learnt enough
 
we must all refactor
 
then someone said to me the benefits of node.js and the I rewrote it all over again in Javascript
 
I love refactoring.
My clients get a lot of unbilled time from me as I re-do things that I don't like or when I want to make thigns more consistent or remove duplicate code.
 
@LightFlow that's basically how a career as a software dev works
 
11:39 PM
And no matter what you do, someone in the future will inherit your code, shit all over it and start again.
 
last month I saw a scalibility problem in the way I was storing messages and I wrote everything again
 
#prematureoptimisation
 
this is a really tiring process
 
maybe you don;t like programming
come out of the closet.
 
or maybe you just need to get into the mindset that good enough for now is good enough
 
11:41 PM
I love programming but I feel tired that nothing stays the same in my code
 
2 mins ago, by SomeKittens
@LightFlow that's basically how a career as a software dev works
you either have to find a new career or get used to it
things change, learn 'em
 
and YOU change.
 
ask dumb questions to smart people. Read a lot. Write a lot.
 
I have the next 3 big refactors that I want to do in my head already
and that's exciting
it shouldn't be tiring
 
hahaha thanks guys!!
 
11:42 PM
remasturing.
 
time for web sockets!!!
 
have fun.
 
This is why people embrace TDD; if you take a test first approach, you are always refactoring something, and you are less likely to feel like refactoring is some sort of destructive process.
 
although now I have a dilemma about the SPA :P
what is a TDD??
 
oh,h i just rip all the wires out when I refactor and spend all day pluggin gthem back in. I don't mind getting dirty
 
11:45 PM
^ this. But tests are always there to make sure
 
speaking of which.. back to ripping out the remaining coffeescript
 
TDD is Test Driven Development. Basically, you write Tests first, even before you have code to make them pass. Then you write just enough code to make that test pass, while ensuring that all the other tests continue to pass. Then, you refactor the code as necessary.
Then you write another test, and go through the cycle again.
 
I don't want to talk about tests for the same reason I don't want to talk about my diet or exercise habits.
 
@Claies thanks for the info ;)
 
@Luggage Wrote tests for Gustav and they proved useful
 
11:47 PM
Ohh, I don't doubt it.
 
though we'll see if I end up doing another stop-the-world refactor and have to throw them all away
I did one but I kept the legacy way because it still had some utility
 
I'g go back to my old job for free if I only got to do stop the world refactors
The only time I was ever happy
 
you end up doing a lot of little refactors along the way, instead of one gigantic refactoring of an entire module
 
I tried to find a "kid playing in cables" image and but only found way worse images than I wanted :(
like injuries, etc
 
Yep :)
 
@LightFlow you have kids yourself?
 
@SomeKittens not at all, I am a kid myself :P
 
oh, good!
lots of time to learn
 
I'm only 22
 
11:52 PM
oh, less of a kid than I thought.
 
wear a condom
 
/me turns "over the hill" next month
 
so you keep your free time..
 
@Luggage hahahahaha
 
@LightFlow You're not a kid then
 
11:53 PM
I've been in rooms like that; and they tend to have 3 or 4 cables for every one that is necessary
 
@KendallFrey I look really younger :P
 
@Claies It's called redundancy. Lern u sum hardware ;)
 
there is a difference between redundancy and idiocy
I'm serious, I've been in network rooms where you can follow a cable from a switch to a patch panel to another switch to another patch panel back to the first switch.
 
that's a buffer.
 
@Claies hahaha
anyway one last question, regarding web sockets, is it better to have a single page application in order to avoid the open-close of the connections or not? will it scale?
 
11:56 PM
My server room is a cloud.
because I be smokin' so much
 
@LightFlow What problem do you currently have?
 
@SomeKittens angst
 
@SomeKittens currently I have no problems, I'm just worried about future problems
 
@LightFlow oh, you sure do!
your problem is that you only have 100 users
that's no way to run a business^H^H^H side project
 
must be very specific porn.
 
11:58 PM
what if they get multiplied? :P
yeah, porn:P
 
the question you should be asking is not "What if 100,000 people try to sign up tomorrow?" but rather "How do I get 100,000 people to sign up tomorrow?"
it's a lot easier to make a scalable thing that no one uses than something that actually needs to scale.
 
I'm not asking this :P
 
@LightFlow then you're asking the wrong questions.
 

« first day (1860 days earlier)      last day (3102 days later) »