Sunday 16 December 2018

Salesforce Best Release Management Exp

1.What is release management?
Release Management is the process responsible for planning, scheduling, and controlling the build, in addition to testing and deploying Releases.

2.What are the different types of releases you suggest in Salesforce Agile Projects?    

  • BAU (Business As Usual) Release : Whenever there is no dependency/new implementation can go with this release,Generally this happens for every sprint on  Mid of the day - Wed

  • MR (Monthly) Release : Whenever there is dependency on existing system like integrations or others should go with this release.So that both the teams can perform integration and regression testing.It happens generally on  Weekend - Sat


3. How do you collaborate between different teams for release?Ex:10-15 teams.
-->Design Meetings : This is 1st initial step should be in place to have a successful collaboration across different teams.
In this meeting generally  Product Owners & Architects will join discuss on the new requirements they are going to implement and list the affected common objects / code.The details will be highlighted and captured in the confluence documentation for reference across teams.
-->Release Meetings :
  • Fortnightly [In case sprint is 2 weeks]
  • Monthly
-->Release Management Checklist :Every team who is participating in the release of particular BAU /MR should fill the details of checklist.Ex:
  • Sprint number,
  • User Stories ,
  • Code /Schema changes, 
  • Common code/schema changes


4. What is the deployment flow?


Note : Create a separate branch for each environment and code merge should be taken care from moving from one environment to other and all the environment base code pulled from Master branch.

5. Which of the above environments are common across the teams?
  • SIT
  • UAT
  • Pre-Prod
  • Prod

6. Give your project release management flow ?
  •    Github as Code Repository
  •    GoCD pipeline for Continuous Delivery - [Branch Code → GoCD → Sandbox] -  This can be scheduled also.
  •    Beyond Compare used for code merge

7. Any suggestion for deployment?
Please take care of Profile deployment,Profile should have complete metadata from production and on top of that merge the new changes

8.  What is the rollback plan ?
Since many teams changes packaged and deploying together ,reverting specific project changes is difficult.Few workarounds.

1.Design wise should have flag basis option to disable the running of the code in case of deployment failure.

2.Deploy a quick or hot fix / missing component through changeset to make successful deployment
   

Thursday 13 December 2018

Streaming API - PushTopic

1. What Salesforce Streaming API?
The Salesforce Streaming API is a simple way to push relevant data to your users in real-time, instead of having to refresh the screen to get new information.

This allows a user to get information without having to perform any action to retrieve it, essentially pushing new data to the screen.


2. Event-Driven (Pub/Sub) VS Point-Point Architecture Best Fit?

Event-Driven [Push Technology]
Point-Point [Pull Technology]
At some point enterprise system grows much and more complex and where decoupling of service is needed.There event driven architecture is the best fit.

When your infrastructure only has a few components, point to point integration can seem like a lightweight way to connect everything together.

3. What are the Streaming API events?

Event
Details
PushTopic  
PushTopic events track field changes in
Salesforce records and are tied to Salesforce records.
Generic
Generic events contain arbitrary payloads.



4. Explain Streaming API PushTopic event?

You can use Streaming API to keep your external source in sync with your 
Salesforce data with PushTopic events and Change Data Capture events.

Streaming API lets you process business logic in an external system in 
response to data changes in Salesforce.

Ex: Notify a fulfillment center whenever an opportunity is updated.

PushTopic Supported Objects :
Supports all Custom Objects & Below mentioned Standard Objects

Campaign
ContractLineItem
Case
Lead
Entitlement
ServiceAppointment
Account
Quote
ServiceContract
Contact
QuoteLineItem
WorkOrder
Opportunity
-
WorkOrderLineItem
Task
-
LiveChatTranscript

PushTopic Important Points :

1.The SELECT  statement's field list must include Id
2.Only 1 object per query is allowed
3.Aggregate queries or Semi-Joins aren't supported
4.Subscribers receives all stored events after the events specified by its replayId value and new events.
5.Limit the stream of events to only those events that match a subscription filter,Only PushTopic has this feature ,Same is not available in Generic /Platform Events.
6.Clients & Timeouts  - As a supported in the Bayeux protocol
  •   Socket timeout : 110 Seconds
  •   Reconnect timeout : 40 Seconds


PushTopic Governor Limits: Refer
PushTopic Implementation Example :
1.Apex :

PushTopic pushTopic = new PushTopic();
pushTopic.Name = 'ContAddUpdate';
pushTopic.Query = 'SELECT Id,Name,AccountId,MailingCity,MailingStreet'+
          'FROM Contact Where AccountId = 016F000032XRPhQAO';
pushTopic.ApiVersion = 43.0;
pushTopic.NotifyForOperationCreate = true;
pushTopic.NotifyForOperationUpdate = true;
pushTopic.NotifyForOperationUndelete = true;
pushTopic.NotifyForOperationDelete = true;
pushTopic.NotifyForFields = 'Referenced';
insert pushTopic;

2.WorkBench: Publish & Subscribe - Change Data Capture on records






How to delete PushTopic :

There are 2 options,Either deactivate /delete 

Deactivate :
PushTopic pt = new PushTopic(Id='0IFD0000000008jOAA', IsActive = false); update(pt);
Delete : Apex
List<PushTopic> pts = [SELECT Id FROM PushTopic WHERE Name = 'Channel'];
Database.delete(pts);

Delete : Workbench
Select queries -> Streaming Push Topics -> select your push topic --> Details --> Delete




Saturday 1 December 2018

Salesforce Microservices


1. What is Microservice?

  • Microservice is self contained process that provides unique business capability.
  • Microservice is responsible for its own data model and data
  • Microservice communicate each other through REST/Messaging Queue

2. Microservice Architecture?



Note: This architecture mainly used by E-Commerce application

Ex: Amazon

3. Monolithic Architecture?

Monolithic Architecture is like a big container where in all the software components of an application are assembled together and tightly packaged.

Drawbacks : Over time,Coupling becomes tighter and tighter


Note: Still many company's are using this architecture
Ex: Facebook

4. What are the Pros And Cons Microservice Architecture?


SNO
Pros
Cons
1
Loosely coupled
Distributing computing adds complexity and slows down initial development
2
Decoupling to provide scaling
Inter-service communication complicates development,Potentially unreliable connections require fault tolerance
3
Language Neutral - Can be written in any language and framework ,Each can be communicated with REST/Messaging queue
Testing can be more complicated,When needs to test entire enterprise application
4
Independent Development & Deployment
Inter-service security & Identity Management
5
Scalable

6
Updatable

7
Fault Isolation - [Even though other connected service is having issue the current service will not break]



5. Salesforce Sales/ Service Cloud built on Microservice Architecture?


No,But Salesforce supports connecting to Microservices built on other technology and can built custom Microservice using APEX

6. Companies using Microservices ?


7. References :