Adult Content Warning

This community may contain adult content that is not suitable for minors. By closing this dialog box or continuing to navigate this site, you certify that you are 18 years of age and consent to view adult content.

Programming -- shell / java / c# / python / ada / lisp

Discussion in 'Technical Board' started by Nettdata, Dec 1, 2009.

  1. redbullgreygoose

    redbullgreygoose
    Expand Collapse
    Disturbed

    Reputation:
    2
    Joined:
    Oct 19, 2009
    Messages:
    498
    Okay, I think I got it. I appreciate the explanation. After I build these DJANGO apps I'll probably look into learning that next.
     
  2. Nettdata

    Nettdata
    Expand Collapse
    Mr. Toast

    Reputation:
    2,869
    Joined:
    Feb 14, 2006
    Messages:
    25,785
    Simply stated:

    Server-based = spin up a server with 2 CPU's, 8GB of RAM, 150GB of hard drive... run an app in it, 24x7, waiting for user to hit it... you're paying for it regardless of whether it's being used or not, and it will max out at some amount of traffic because of those server specs. It's like a remote machine you're renting in the Cloud. (Cloud just means "someone else's computer"). Billed at something like $150/month, regardless of use.

    "Serverless" basically means you break down your app into small pieces, and then store those pieces of application code in the cloud. Those code snippets are run only when requested by an end user. Those snippets are run in one of the bazillion available resources doing nothing at AWS. You pay only for the times that the code snippet is run. You basically have zero limitations on scale, as you're bound by the resources available by AWS... literally you could have millions of people hit your app simultaneously. Each time that lambda is hit, it's like $0.0005 or something like that, plus whatever monthly cost of your storage (S3) is (usually a few bucks per gig per month for storage).
     
  3. Nettdata

    Nettdata
    Expand Collapse
    Mr. Toast

    Reputation:
    2,869
    Joined:
    Feb 14, 2006
    Messages:
    25,785
    Serverless is all the rage, for sure... but it's not a magic bullet. It can work for some things, but is not the solution for others.

    For instance, the financial brokerage I'm building out now is not suitable (we're using Java Spring running in Kubernetes for that), but the Facebook survey bots we're doing for another client are definitely perfect for Serverless.

    There are some nuances around it that take some time and experience to learn, for sure, but it's pretty easy to dig into and learn.
     
  4. redbullgreygoose

    redbullgreygoose
    Expand Collapse
    Disturbed

    Reputation:
    2
    Joined:
    Oct 19, 2009
    Messages:
    498
    That seems to be a pattern with a lot of programming. It always seems difficult at first but eventually I manage to figure it out.
     
  5. redbullgreygoose

    redbullgreygoose
    Expand Collapse
    Disturbed

    Reputation:
    2
    Joined:
    Oct 19, 2009
    Messages:
    498
    There was a time when it seemed I would never understand functions.
     
  6. Nettdata

    Nettdata
    Expand Collapse
    Mr. Toast

    Reputation:
    2,869
    Joined:
    Feb 14, 2006
    Messages:
    25,785
    lol

    Totally get it... consider "serverless" to be "function-based programming"
     
  7. redbullgreygoose

    redbullgreygoose
    Expand Collapse
    Disturbed

    Reputation:
    2
    Joined:
    Oct 19, 2009
    Messages:
    498
    Well, if learning sever-less programming is cheaper, then it's a priority for me. I expect to finish building this database, commit to git hub and go find some tutorials.
     
  8. Binary

    Binary
    Expand Collapse
    Emotionally Jaded

    Reputation:
    388
    Joined:
    Oct 21, 2009
    Messages:
    4,079
    The interesting part about serverless is that it's not much to learn, it's more just a shift in your mind about how the program operates.

    In a lot of programming, you make a bunch of assumptions about variables being available to store data for later retrieval, or writing off little things to disk that you'll need, or making calls to other areas of the program that you expect to be active.

    With serverless, the programming doesn't change, but those assumptions need to be modified. Your function flat-out disappears when it's done with its chore, and each function don't run inside a larger context, it's completely impossible to know what order or time different functions run in, so you need to be very explicit about handling data, calling other functions, etc. I mean, much of this is how you should be developing anyway, but given the number of code chunks I've seen with sleep(10) in them...
     
  9. redbullgreygoose

    redbullgreygoose
    Expand Collapse
    Disturbed

    Reputation:
    2
    Joined:
    Oct 19, 2009
    Messages:
    498
    So it's all functions? In python, for instance, it only uses the standard library? Do you import any modules?
     
  10. Nettdata

    Nettdata
    Expand Collapse
    Mr. Toast

    Reputation:
    2,869
    Joined:
    Feb 14, 2006
    Messages:
    25,785
    Go take a look at the tutorials by AWS... they do a great job introducing you to the process with some good sample code.
     
  11. redbullgreygoose

    redbullgreygoose
    Expand Collapse
    Disturbed

    Reputation:
    2
    Joined:
    Oct 19, 2009
    Messages:
    498