News for hackers. Stuff that matters.
Re:Web Architecture 101 by aaavl2821 on Thursday July 12, 2018 @04:26PM (#17518321)
I'd love to see more tutorials / examples of implementing some of these concepts. Maybe I'm looking in the wrong place, but most tutorials I see are just super simple apps and don't deal with load balancing, services, data pipelines etc.

For people who are working in non-tech jobs but teaching themselves programming so they can build useful tools for themselves, colleagues and customers, I think there's a big gap in learning tools. Often these ppl can have enterprise users out of the box bc they understand needs and know people, but can only make hackish solutions that are useful but don't scale well or aren't sufficiently secure. These ppl don't have CS backgrounds and don't code for a living, so going straight into docs can be really overwhelming even if it's the "right" thing to do, esp if it's an architectural choice or security issue where the documentation may not be as straightforward

Re:Web Architecture 101 by duxup on Thursday July 12, 2018 @05:09PM (#17518634)
Amen, web content to learn from wise security, back end stuff, architecture doesn't get enough coverage.

There are so many super simple app tutorials that are an island to themselves that might get your other super simple app going, but they don't even give lip service to any deeper concepts or what is going on the back end.

I have a theory that the volume of basic copy this code type tutorials is because they are really resume fodder.... I've run through some tutorials that are downright misleading IMO, and I could tell that as a noob myself.

I was playing with one recently that I wondered, hey can I make it do X too? But the code was laid out and ran so wonky that it was just easier for me to start fresh on my own. It was a react tutorial and even running it as provided it ran but react was all wtfareyodoing.jpg in the console... right out of the tutorial... come on.

I wish people would quit it with the code tutorials as resume content.

As for security I finished a boot camp recently and I asked about security, the answer "We really don't address security."

I have a networking background so I could see a lot that was missing that folks really should know...but not even given lip service.

Re:Web Architecture 101 by rubber_duck on Thursday July 12, 2018 @05:20PM (#17518716)
I'm guessing, but IMO when you're dealing with load balancing, services and data pipelines you're at a scale where you should be able to hire qualified people to do the job so the docs are geared towards that audience.
Re:Web Architecture 101 by aaavl2821 on Thursday July 12, 2018 @05:55PM (#17518949)
You're probably right re load balancing, data pipelines and some services, but i think security is important regardless of scale, esp if it's an enterprise app.

Even simpler concepts like structuring and deployment of larger apps, database migration, creating dev, staging and production environments, test development etc would be really useful. These things are important even at low scale, and generally absent from tutorials. Learning this on your own without mentors or CS background creates lots of issues

Re:Web Architecture 101 by cs02rm0 on Friday July 13, 2018 @02:22AM (#17520884)
I've seen comments on this article elsewhere around load balancing not being needed until you're at scale, but do others not put it in quickly, not for volume, but for availability?
Re:Web Architecture 101 by rubber_duck on Friday July 13, 2018 @05:00AM (#17521473)
Again - when you need something to be available you probably want someone who knows what he's doing from start setting it up.

Not saying you can't or shouldn't do it but it's not surprising that there's not a lot of newbie friendly tutorials for such things.

Re:Web Architecture 101 by fgonzag on Sunday July 15, 2018 @02:56AM (#17534116)
Setting up HA LBs isn't hard though. Two load balanced IPS in your DNS hitting each external load balancer IP, LBs have keepalived configured with two floating VIPs each. I learnt that on the fly when having to build an HA service without the economic resources usually associated with doing so. ( Databases and routers/firewalls were a whole different beast though)
Re:Web Architecture 101 by mehblahwhatevs on Thursday July 12, 2018 @06:22PM (#17519108)
I too am in great need of things like that.

I'm a mobile dev developing an app that I think I'm going to quit my job for to work on full time. I'm 33 and in over a decade of doing mobile (and front-end web) programming I've never worked on a personal project that showed as much promise as this one has for me, both financially and from a fulfillment standpoint.

However the prospect of wrangling the back-end and all the new things I need to do around deploying, scaling, containers, separation of services: cache, API, queue, DB, and making it all secure on top of that is giving me pause and making me less confident the more I read :(

Re:Web Architecture 101 by mnm1 on Thursday July 12, 2018 @08:00PM (#17519594)
Nah, don't let that discourage you. You can probably start with a Postgres backend that will serve as your db, full text search, data warehouse, and even job queue. Load balancers in front of your stack are available from aws, etc. and are easy to set up. The rest, like a caching redis server, actual job queue, etc. you can add as you go if it becomes needed. Some language stacks let you run async operations and queues in the server itself which may be enough. There is no need for containers or complicated deployment processes. If you're on the JVM, for example, just create an uberjar and run that. Focus on things that actually bring value to your business and use the simplest, most minimal solution everywhere else. Don't give up on your idea because you feel overwhelmed. Good luck.
Re:Web Architecture 101 by stevoski on Friday July 13, 2018 @05:46AM (#17521633)
You've described the exact approach I've used for my B2B SaaS.

Initially we had a web server (two actually, to achieve zero-downtime deploys) and a database.

A few months later, we introduced Redis for caching. This was much earlier than I expected we'd need to - these days as soon as a web app gets traction, it starts attracting scammers, spammers, and manipulators who put unexpected load on your system.

Just this week, we've finally added a worker server to run long running tasks. Until this week, Java's brilliant Executors were handling this for us in a background thread.

A Java uberjar, deployed to AWS's Elastic Beanstalk, is an approach I'd highly recommend for anyone wanting to get version 1 of their web app deployed.

Re:Web Architecture 101 by testb on Friday July 13, 2018 @01:42AM (#17520751)
Was about to write this exact reply. A single database and web server goes surprisingly far.
Re:Web Architecture 101 by collyw on Friday July 13, 2018 @04:33AM (#17521371)
If you have a reasonable idea of what you are doing.
Re:Web Architecture 101 by nucleardog on Friday July 13, 2018 @11:37AM (#17523824)
Even if you don't, throwing some more hardware at it can still get you pretty far with a decent ROI in the early stages.
Re:Web Architecture 101 by mehblahwhatevs on Friday July 13, 2018 @02:47PM (#17525639)
thanks for the advice - yes I'm on the JVM w/ spring boot.

I suppose I may be overcomplicating things with trying to do it "the right way" right out of the gate. I guess the "perfect is the enemy of done" saying comes into play here.

Re:Web Architecture 101 by hackermailman on Thursday July 12, 2018 @09:31PM (#17519912)
Experiment with abstracting the shit out of RabbitMQ to solve any business logic problem. I'm in a different CS field than web development but whenever I've had to implement something business related it almost always was just highly abstract message brokering with React hacked together UI. I learned UI from reading lecture notes on 'Human Computer Interface' design from the plenty of university courses around offering this subject http://www.cs.cmu.edu/~bam/uicourse/05863fall17/schedule.htm...

For learning web app APIs all I did was search Google Scholar for 'API design' and read whatever was available. Joshua Bloch has a good paper on API design. As for scaling, containers, concurrency ect look at Elixir w/Phoenix framework instead, or Erlang w/Yaws and just run it on a cheap FreeBSD comanaged box or deploy Phoenix to Heroku. BEAM will take care of the scaling. There's books around https://pragprog.com/book/lhelph/functional-web-development-...