Differences between Azure Functions and Logic Apps

Azure functions

Logic Apps

Developer Experience

Azure Functions code is written in JavaScript, C#, F#, Node.js, Python, PHP, Batch, Bash, and PowerShell. The code can be written in Azure Portal or as Azure Function project in VS 2017

In Logic Apps, workflows are created with an easy-to-use visual designer, combined with a simple workflow definition language in the code view.
Connectivity Azure Functions have the concept of triggers, input and output bindings. Most of these bindings connect your Azure Functions to other Azure services, such as Event Hubs, Storage, DocumentDb, etc. The HTTP binding is probably the most popular one, as it allows the creation of serverless API’s.

Logic Apps connects to an enormous variety of cloud / on-premise applications, going from Azure and Microsoft services over SaaS applications and social media to LOB systems.Each connector comes with an API connection, that stores the required credentials in a secure way. These API connections can be reused from within multiple Logic Apps

Exception Handling In Azure Functions, you have the typical try/catch options available. If you want to enable retries, you need to do the plumbing yourself. No resume / resubmit capabilities out of the box

Logic Apps provides out-of-the-box functionality that allows you to configure automatic retries on every action. In case this doesn’t solve the problem, the workflow gets a failed status and can be resubmitted after human intervention

Networking When using Azure Functions within an App Service Plan, you have more convenient hybrid connectivity options that reside on the network level. App Service Plans offer support for many networking options like Hybrid Connections, VNET Integration and App Service Environment. Azure Logic Apps can connect to on premises resources via the On Premises Data Gateway, that needs to be installed on premises.
        Deployment With new functions template in VS 2017, the user can create function as a .NET project with class attributes used to define functions behavior. It also support CI/CD through VSTS Build and Release definitions Logic Apps also have built-in support for ARM (Azure Resource Manager) deployments, through for example Visual Studio Release Management.
Debugging Azure Functions can be easily developed and debugged on your local box or you can attach the debugger to a function deployed in Azure Logic Apps run only in the cloud, as it has a dependency on Microsoft-managed connectors. As a consequence, you cannot debug, test or run Logic Apps locally.
Monitoring Each Azure Function comes with a Monitor tab, where you can see the execution history. There is also a live event stream that shows the almost real-time processing statistics in nice graphs. On top of that, there’s full integration with Application Insights, where you can take advantage of the powerful Analytics queries.

In Logic Apps, you have a nice overview of the previous runs and their corresponding outcome. You can filter this history, based on a time period and the resulting run status. The monitoring view of a workflow run is the same as the designer view, which makes it very intuitive. For each action, you can see the status and all inputs/outputs. With one button click, you can enable integration with OMS, where you can search on tracked properties.

Billing Azure Functions, you have two options qua pricing. You can opt for a fixed cost of an App Service Plan. In that option you reserve compute power on which you can run Azure Functions and other App Services. The second option is completely serverless, with a consumption plan based on resource consumption (memory/s) and number of executions.

Logic Apps has a pure pay-per-usage billing model. You pay for each action that gets executed. It’s important to be aware that you also need to pay for polling triggers, which can be a hidden cost. If you want to benefit from the capabilities of the Integration Account, you should be aware that this comes with a fixed monthly bill.

Security Azure Functions has a similar concept of API keys as described in logic Apps section. The API key can be shared for the whole Function App (host key) or you can create a specific one for your Function. If you run your Azure Function in an App Service Plan, you can leverage its codeless authentication functionality with Active Directory, Google, Facebook, etc. Azure Function Proxies can be a light-weight alternative of full-blown API Management, to add security on top of your HTTP triggered Functions. In order to access a Logic App with the HTTP trigger, the client must include a Shared Access Signature in the URL. The signature is generated via a secret key that can be regenerated at all time. There is also the ability to restrict access, based on incoming IP addresses. To add more authorization logic, you can put Azure API Management in front of it.

Reference

Advertisements
Posted in Misc. 1 Comment »

BizTalk: Start EDI batches through SQL Script

Here is the script to start all EDI batches for a given Sender and Receiver Party. the script inserts PAM control messages in database which will trigger EDI batching Orchestration in BizTalk

DECLARE @i int = 47 --start batch Id
WHILE @i <= 80 --end batch id
BEGIN
exec edi_PAMBatchingLogDelete @BatchId=@i,@IgnorePendingControlMessages=0
SET @i = @i + 1
END


INSERT INTO [BizTalkMgmtDb].[dbo].[PAM_Control]
([EdiMessageType]
,[ActionType]
,[ActionDateTime]
,[UsedOnce]
,[BatchId]
,[BatchName]
,[SenderPartyName]
,[ReceiverPartyName]
,[AgreementName])
SELECT 0,
'EdiBatchActivate',
GetDate() as 'ActionDateTime',
0 as 'UsedOnce',
bd.Id,
bd.[Name],
[SenderPartyName],
[ReceiverPartyName],
a.Name
FROM [BizTalkMgmtDb].[tpm].[BatchDescription] bd
join [BizTalkMgmtDb].[tpm].Agreement a on bd.OnewayAgreementId = a.ReceiverOnewayAgreementId

Posted in Misc. Tags: , . Leave a Comment »

Utility vs Strategic Projects

 

A Utility project is where underlying business process is not the differentiator, e.g. Payroll process, every company want it but a better payroll process does not give your business edge over your competition.

The way you staff, run, and budget a strategic project is entirely different to how you do a utility project. For utility projects the biggest risk is some kind of catastrophic error – you don’t want to miss payroll. So you need enough attention to make sure that doesn’t happen, but other than that you want costs to be as low as possible.

However with strategic projects, the biggest risk is not doing something before your competitors do. So you need to be able to react quickly. Cost is much less of an issue because the opportunity cost of not doing something is far greater than costs of software development itself. Usually only 5-10 percent of projects are of strategic type.

Since the definition of utility is that there’s no differentiator, the obvious thing is to go with the package. For a strategic function you don’t want the same software as your competitors because that would cripple your ability to differentiate. Often people realize this and buy a package for a utility project, but then spend huge amounts of money customizing this – which is just as wasteful. My view is that for a utility function you buy the package and adjust your business process to match the software. Usually this is politically infeasible, so the workaround is to put a low grade software team to work on it, provide enough care to avoid catastrophe.

[via Martin Fowler]

What you really need

 

Researchers have found that owning a fast car, a large home and having a good job may only make you happy if those around you are less well off.

It’s too easy to compare ourselves with those around us. (And television gives us a chance to make false comparisons: We see what “normal” people have in commercials and in various programs, and we subconsciously begin to want these things too.)

But even if you know that you oughtn’t compare your life with others, it can be tough to exercise self-control. It’s easy to get swept up by materialism, especially if all of your friends are into it. (If they all have iPhones, you want an iPhone. If they all wear expensive clothes, you want expensive clothes.)

You have to make a conscious effort to not care about what they own and do. Instead, focus on your goals and your needs. What you want or need to own shouldn’t be defined by what other people have; it should be based on what you want to do in life, and what brings you intrinsic happiness.

Believe it or not, much of what we “want” is simply society’s desires in disguise. And because many of our desires lack authenticity we often don’t have the motivation necessary to take the steps needed to reach our destination

How do we know if our wants are real or an illusion? You must determine that, by having a conversation with yourself.

Why Do I Want This?

Are you helping someone just so you can get something back? Or are you helping just for the sake of helping? It’s perfectly OK to have personal goals but don’t lie about your motives in the process.

Am I Willing To Put The Work In?

Are you willing to put in the time and effort to make this goal a reality? Will you be willing to sacrifice along the way? Do you want badly enough to give up your weekends?

[via this and this]

Posted in Misc. 2 Comments »

What makes me happy

Recently, someone came up to me on a plane to KL and looked rather shocked. He asked, ‘How come a millionaire like you is travelling economy?’ My reply was, ‘That’s why I am a millionaire.’ He still looked pretty confused. … Many people have been brainwashed to think that millionaires have to wear Gucci, Hugo Boss, Rolex etc and sit on first class in air travel. This is why so many people never become rich because the moment that earn more money, they think that it is only natural that they spend more, putting them back to square one.

The truth is that most self-made millionaires are frugal and only spend on what is necessary and of value. That is why they are able to accumulate and multiply their wealth so much faster. I refuse to buy a first class ticket or to buy a $300 shirt because I think that it is a complete waste of money. However, I happily pay $1,300 to send my 2-year old daughter to Julia Gabriel Speech and Drama without thinking twice.

Somehow, when you did not have to build everything from scratch, you do not really value money. This is precisely the reason why a family’s wealth (no matter how much) rarely lasts past the third generation. Thank god my rich dad foresaw this terrible possibility and refused to give me a cent to start my business.

Then some people ask me, ‘What is the point in making so much money if you don’t enjoy it?’ The thing is that I don’t really find happiness in buying branded clothes, jewelry or sitting first class. Even if buying something makes me happy it is only for a while…it does not last. material happiness never lasts, it just give you a quick fix. After a while you feel lousy again and have to buy the next thing which you think will make you happy. I always think that if you need material things to make you happy, then you live a pretty sad and unfulfilled life.

Instead, what make ME happy is when I see my children laughing and playing and learning so fast. What makes me happy is when I see by companies and trainers reaching more and more people every year in so many more countries. This happiness makes me feel really good for a long time, much much more than what a Rolex would do for me.

[via Adam Khoo]

Posted in Misc. 2 Comments »

Things to Adopt in Life

 Health:
 
 1. Drink plenty of water.
 2. Eat breakfast like a king, lunch like a prince and dinner like a beggar.
 3. Eat more foods that grow on trees and plants and eat less food that is manufactured in plants.
 4. Live with the 3 E’s — Energy, Enthusiasm, and Empathy.
 5. Make time to practice prayer, meditation and yoga.
 6. Play more games.
 7. Read more books
 8. Sit in silence for at least 10 minutes each day.
 9. Sleep for 7 hours.
 10. Take a 10-30 minutes walk every day. And while you walk, smile.

 Personality

 11. Don’t compare your life to others’. You have no idea what their journey is all about.
 12. Don’t have negative thoughts or things you cannot control. Instead invest your energy in the positive present
moment.
 13. Don’t over do. Keep your limits.
 14. Don’t take yourself so seriously. No one else does.
 15. Don’t waste your precious energy on gossip.
 16. Envy is a waste of time. You already have all you need.
 17. Forget issues of the past. Don’t remind your partner with his/her mistakes of the past. That will ruin your
present happiness.
 18. Life is too short to waste time hating anyone. Don’t hate others.
 19. Smile and laugh more.
 20. You don’t have to win every argument.
Agree to disagree.

 Society

 21. Call your family often.
 22. Each day give something good to others.
 23. Forgive everyone for everything.
 24. Spend time with people over the age of 70 & under the age of 6.
 25. Try to make at least three people smile each day.
 26. What other people think of you is none of your business.
 27. Your job won’t take care of you when you are sick. Your friends will. Stay in touch.
 

Life

 28. Do the right thing!
 29. However good or bad a situation is, it will change.
 30. No matter how you feel, get up, dress up and show up.
 31. The best is yet to come.

Excerpt: Dan Pink on the surprising science of motivation

There is a mismatch between what science knows and what business does. And here is what science knows. One: Those 20th century rewards, those motivators we think are the natural part of business, do work, but only in a surprisingly narrow band of circumstances. Two: Those if-then rewards often destroy creativity. Three: The secret to high performance isn’t rewards and punishments, but that unseen intrinsic drive. The drive to do things for their own sake.The drive to do things cause they matter.

Let me give you an even more radical example of it. Something called the Results Only Work Environment. The ROWE.  Created by two American consultants, in place at about a dozen companies around North America. In a ROWE people don’t have schedules. They show up when they want. They don’t have to be in the office at a certain time, or any time. They just have to get their work done. How they do it, when they do it, where they do it, is totally up to them. Meetings in these kinds of environments are optional.

What happens? Almost across the board, productivity goes up, worker engagement goes up, worker satisfaction goes up, turnover goes down. Autonomy, mastery and purpose, These are the building blocks of a new way of doing things

[via TedTalk]