Need advice about which tool to choose?Ask the StackShare community!

Apex

333
113
+ 1
0
Serverless

1.3K
1.2K
+ 1
26
Add tool

Apex vs Serverless: What are the differences?

  1. Execution Environment: Apex runs on the Salesforce platform, which provides a dedicated environment for executing code, while Serverless functions are executed in ephemeral containers that are spun up on-demand by cloud providers like AWS or Azure.
  2. Scalability: Apex relies on the resources available within the Salesforce environment for scalability, while Serverless scales automatically based on demand without the need for manual intervention.
  3. Billing Model: In Apex, customers pay for the resources allocated by Salesforce, whereas Serverless follows a "pay-as-you-go" model where customers are only charged for the resources consumed during execution.
  4. Management of Infrastructure: With Apex, developers have limited control over the underlying infrastructure as it is managed by Salesforce, while Serverless allows developers to focus solely on writing code without the need to manage servers or infrastructure.
  5. Event-driven Architecture: Serverless functions are typically event-triggered, responding to specific events or requests, while Apex code in Salesforce is often executed in response to user interactions within the CRM system.
  6. Cold Start Times: In Serverless, there can be a delay in the cold start times when a function is invoked for the first time, compared to Apex where the execution time may be more predictable due to a dedicated environment.

In Summary, the key differences between Apex and Serverless lie in their execution environments, scalability, billing models, infrastructure management, event-driven architectures, and cold start times.

Decisions about Apex and Serverless

When adding a new feature to Checkly rearchitecting some older piece, I tend to pick Heroku for rolling it out. But not always, because sometimes I pick AWS Lambda . The short story:

  • Developer Experience trumps everything.
  • AWS Lambda is cheap. Up to a limit though. This impact not only your wallet.
  • If you need geographic spread, AWS is lonely at the top.
The setup

Recently, I was doing a brainstorm at a startup here in Berlin on the future of their infrastructure. They were ready to move on from their initial, almost 100% Ec2 + Chef based setup. Everything was on the table. But we crossed out a lot quite quickly:

  • Pure, uncut, self hosted Kubernetes — way too much complexity
  • Managed Kubernetes in various flavors — still too much complexity
  • Zeit — Maybe, but no Docker support
  • Elastic Beanstalk — Maybe, bit old but does the job
  • Heroku
  • Lambda

It became clear a mix of PaaS and FaaS was the way to go. What a surprise! That is exactly what I use for Checkly! But when do you pick which model?

I chopped that question up into the following categories:

  • Developer Experience / DX 🤓
  • Ops Experience / OX 🐂 (?)
  • Cost 💵
  • Lock in 🔐

Read the full post linked below for all details

See more
Get Advice from developers at your company using StackShare Enterprise. Sign up for StackShare Enterprise.
Learn More
Pros of Apex
Pros of Serverless
    Be the first to leave a pro
    • 14
      API integration
    • 7
      Supports cloud functions for Google, Azure, and IBM
    • 3
      Lower cost
    • 1
      Auto scale
    • 1
      Openwhisk

    Sign up to add or upvote prosMake informed product decisions

    What is Apex?

    Apex is a small tool for deploying and managing AWS Lambda functions. With shims for languages not yet supported by Lambda, you can use Golang out of the box.

    What is Serverless?

    Build applications comprised of microservices that run in response to events, auto-scale for you, and only charge you when they run. This lowers the total cost of maintaining your apps, enabling you to build more logic, faster. The Framework uses new event-driven compute services, like AWS Lambda, Google CloudFunctions, and more.

    Need advice about which tool to choose?Ask the StackShare community!

    What companies use Apex?
    What companies use Serverless?
    See which teams inside your own company are using Apex or Serverless.
    Sign up for StackShare EnterpriseLearn More

    Sign up to get full access to all the companiesMake informed product decisions

    What tools integrate with Apex?
    What tools integrate with Serverless?

    Sign up to get full access to all the tool integrationsMake informed product decisions

    What are some alternatives to Apex and Serverless?
    Java
    Java is a programming language and computing platform first released by Sun Microsystems in 1995. There are lots of applications and websites that will not work unless you have Java installed, and more are created every day. Java is fast, secure, and reliable. From laptops to datacenters, game consoles to scientific supercomputers, cell phones to the Internet, Java is everywhere!
    AWS Lambda
    AWS Lambda is a compute service that runs your code in response to events and automatically manages the underlying compute resources for you. You can use AWS Lambda to extend other AWS services with custom logic, or create your own back-end services that operate at AWS scale, performance, and security.
    Azure Functions
    Azure Functions is an event driven, compute-on-demand experience that extends the existing Azure application platform with capabilities to implement code triggered by events occurring in virtually any Azure or 3rd party service as well as on-premises systems.
    Google Cloud Functions
    Construct applications from bite-sized business logic billed to the nearest 100 milliseconds, only while your code is running
    Cloud Functions for Firebase
    Cloud Functions for Firebase lets you create functions that are triggered by Firebase products, such as changes to data in the Realtime Database, uploads to Cloud Storage, new user sign ups via Authentication, and conversion events in Analytics.
    See all alternatives