Saturday, June 13, 2020

Apigee Learning and references.

At work there's an ongoing project to expose our existing set of Rest API's to outside world. The chosen product for API management is apigee. I wanted to learn more about this product and started looking around. 

I am documenting the set of resources that I completed: 

To get started create a trial account on apigee, google has been pretty kind with the eval accounts. One can be created by going to this link here

You'll get an activation link on the email entered and then once the account is activated google will provision a tenant (not sure if this is the right word here may be Organization may be a better word) for you. 

It takes a little bit of time to complete the provision but be patient and let google do the hard work for you :)

Once I had my eval Organization created, I followed steps here. Following the steps gives you an idea about the layout of the apigee UI. I highly recommend going through the Basic Concepts section too. 

I also found that there's a leaning track (again not sure if I am using the right word) on Coursera which has a set of courses which targets API development with apigee. 

(I have not completed this yet but hopefully I will and then update this post about how this course was). 

Tuesday, June 02, 2020


Implementing a client for an http PATCH route got me confused that which is the correct way to implement. 

Here are couple of links which helped me grasp this concept:

Another one:

Here's the package which was used to implement the server as well as client for the http PATCH:

Thursday, October 03, 2019

Async and Await notes

- Await Keyword introduces continuation which is executed after the async operation 
- The coninuation is executed on the original context in this example that is the UI thread. 
- The await keyword introduces a coninuation allowing to get back to original context. 
- Marking a method as async introduces the capability of using the await keyword to leverage the asynchronous principles. 
- Avoid async void at all cost 
- Using Async void is allowed only for Event HAndlers 
- Methods marked as async taks will automatically have a Task returned without explicitly having to return anything,  then the caller can await the Task 
- If we do not use await keyword on async methods the inner exceptions will be swallowed. Always use the await keyword to validate your tasks. 
- Exceptions occuring in an async void cannot be caught 
- Do Not 
- No Async void 
- Avoid .Result or .Wait 

- Do 
- Async and Await together 
- Always return a Task from an Async method 
- Async and await all the way up. 

- Task Represents an asynchronous operation 
- Task.Run() queues the work passed as the action to run on a different thread by using the thread pool 
- Before Loading 
- Task.Run() queues the work which completes instantly 
- After Loaded --> Executes immediately after Task.Run()
- A task can easily for block the UI so be very careful when wrapping synchronos code and make sure it does not contain blocking code
- ContinueWith creates a continuation which runs asynchronously this means that it also returns a Task. 
- Calling the Result property on a task is not a problem as long as the task has finished its asynchronous operation. 
- A big difference between using await and ContinueWith is the fact that ContinueWith is not back on the original context.
- In case of ContinueWith if there's an error in the async operation then we need to define the TaskContinuationOptions to specify what needs to be done in case of exception. 
- Using await together with try and catch is recommended and does not wrap exception in an aggregate exception. 
- Whenever you use the ContinueWith make sure to validate tasks even when not using async and awat by chaining on a continuation, 
- CancellationTokenSource is used to signal that you want to cancel the operations that utilize the token.
- CancellationTokenSource is coupled with CancellationToken which is passed to async operations to indicate that operation is cancelled or not. 

Friday, June 22, 2018

Basics of git and setting it up with VSCode

  1. Course from Pluralsight :
  2. Installer from the following link:
  3. Setting VS code as a default editor from the Link:
Have been learning about GIT and a lot of good links were shared by my colleagues, to get a good introduction to git I bought this ebook:

Follwing links are easy to read and useful to have consistency across the team: 
Associating Text Editors with Git

Git Log pretty formatting

Advanced Git Logs

A Note about git commit messages:

How to Write Commit Messages

Data Integrity of Git is pretty well described in the talk: 

Tuesday, August 29, 2017

Building a docker Image with iis and pre-requisites

Steps to do: 

- Run the container with the command  docker run -it 4f222 cmd.exe 
- Image which is run here microsoft/windowsservercore
- this should open the command prompt 
- then the navigate through the command prompt (to c:\ProgramFiles\powershell\powershell.exe) to get a powershell command prompt
- In the powershell execute: Install-WindowsFeature -Name Web-Server, Web-Mgmt-Tools
- Above commnand should enable IIS Server on the container and also install management tool for that 
- To test the successful installation of the web-server try executing the iisreset in the prompt, you should be able to see the iisreset message then. 
- To know the full folder name of the docker image we need to run the command: docker inspect -f '{{.Id}}'  e9bb03ced109(ContainerID)
- Best option is to mount a folder to the image and then have it as a part of the image so that it can be accessed within the image. 
- command to run in the mount mode: docker run -it 4f222 powershell.exe --mount type=bind,source=c:\Hackathon,target=c:\Hackathon (Some how this did not work today)
- Trying another suggestion form StackOverflow:
- Container name is required to execute the command, to get the container name: 
docker ps --format "{{.Names}}"
- Modified command for this machine: 
docker cp c:\Hackathon sharp_euclid:c:\Hackathon

Tuesday, June 13, 2017

Containers on Windows

Learning stuff about containers and trying to figure out how to run a webapi inside them. 

Links which I am referring as I am moving forward: 

Here's a link talks about creating VM with containers on Azure:

Run command for the docker has many switches: 

Wednesday, July 09, 2014

Web.config Transformation Syntax for Web Project Deployment Using Visual Studio

Needed to do some work on the web.config transformations, I was finding difficulty in locating the complete set of functions which can be set to either xdt:Transform or on xdt:Locator. \

Finally found a cool link on msdn which served my purpose: 

Another link which helped: