Salesforce Evergreen

Salesforce Evergreen

Last week was Salesforce’s annual Dreamforce conference in San Francisco. It’s when over 100,000 Salesforce fans descend upon the city to listen to the latest innovations from Salesforce. I was unable to attend this year, but followed along closely at home to the announcements. The one that stood out to me in particular was not Salesforce Blockchain, Einstein Voice or Customer 360 – it was the Salesforce Evergreen announcement. For me could be the real game changer.

 

The Impact of Serverless

To understand why, you have to perhaps take a step back. Look at how the rise of AWS and in particular, the AWS Lambda and the serverless paradigm has impacted development.

Take the following example – you want to upload an image in Salesforce against a case both before and after work is completed. These images should be stored off platform in Amazon S3. You want to have both the original and a thumbnail, with the thumbnail being displayed on the case. Whilst uploading the images to S3 could be done via Apex in Salesforce, the resizing must be done off platform currently. So how do we do this and where?

 

Heroku

We can either have an endpoint available on a platform like Heroku with a dyno running, or have a Lambda function that will run whenever called. That’s the key difference here, we have to have the Heroku dyno (at least 1) running to handle requests whereas with Lambda we are only paying per executed function. (Note this example is based upon a Lambda example from AWS you can read about here.) Whilst I am a big fan of Heroku, use cases like this lend themselves more to Lambda for running small jobs and repetitive functions where there is no need for a full web server framework to be setup, just receiving and processing some data from an event.

Such scenarios are becoming more common as organisations want to connect more pieces of their process seamlessly. This has driven a number of people towards using serverless based solutions to handle these simple problems – they just need the code to run and perform the action. Many organisations are also working to modularise their systems into more discrete functional blocks, often referred to as microservices. I’ve written before on Salesforce and Microservices and spoken on the topic previously at Dreamforce 2015 and Dreamforce 2017.

Previously, the conversation has always been how to make Salesforce interact nicely with serverless systems, or how to rearchitect parts of your existing Salesforce setup to operate in a more modular way. As soon as some more complicated processing was required (such as image resizing) you were forced off platform and had to decide which platform to use. How would you manage security and authentication? How could you invoke the new service – API via code or a Platform Event? You couldn’t think of doing all this on Salesforce – until now.

 

Enter Evergreen

Salesforce Evergreen is a new toolkit that will allow developers to write small functions and microservices using Apex, Java and Node.js which can be invoked natively from within Salesforce using both declarative and code based tools, as well as having native visibility to the platform – so no need to manage authentication.

Salesforce Evergreen Architecture

Taking our previous example, instead of a service running off platform, whether Heroku or AWS, we could now have a small set of functions that are called directly from the declarative tools in Salesforce. Whenever a case is closed. upload the images from Salesforce to S3, process these images and update the case. No additional infrastructure needed, no authentication required, all on a single platform.

This is truly game changing, by allowing developers to build these functions using existing languages in Java and Node.js, you are enabling the developer to utilise all of the existing ecosystem of functionality out there. For example, npm, the package ecosystem for Node.js, has somewhere in the region of a million packages, covering all types of functionality – csv parsing to providing random jokes. Almost all of these libraries become available for use alongside your existing Salesforce applications with all the plumbing and authentication done for you! You simply add in what you need, leveraging the existing tools and off you go.

Similarly, if you have an existing complex function in Java from an existing application, you can migrate that to become an Evergreen function and deploy it for use from within Salesforce! As wonderful a language as Apex is there are some things that it cannot do or that Java or Node.js will be a better tool for, now you can leverage these languages to do more with your Salesforce data.

 

Summary

The new Evergreen toolkit is going to make a huge difference to what is possible for Salesforce developers. It opens up exciting new possibilities which should lead to some incredible new solutions. I am already signed up for updates from Salesforce on the Developer Preview. And I will be looking ahead for different applications for this toolkit for our customers. If you want to read more, Salesforce have posted a blog here.

Share this post:

Facebook
Twitter
LinkedIn
Shopping Basket