Azure Service Bus Messaging

https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-messaging-overview

 

Service Bus messaging: flexible data delivery in the cloud

Service Bus is a brokered, or third-party communication mechanism. This is similar to a postal service in the physical world. Postal services make it very easy to send different kinds of letters and packages with a variety of delivery guarantees, anywhere in the world.

Service Bus supports two distinct messaging patterns: Azure Relay and Service Bus Messaging.

The WCF Relay component of Service Bus is a centralized (but highly load-balanced) service that supports a variety of different transport protocols and Web services standards

The relay service supports traditional one-way messaging, request/response messaging, and peer-to-peer messaging. It also

WCF Relay provides many benefits, but requires the server and client to both be online at the same time in order to send and receive messages

 

In contrast to the relay scheme, Service Bus Messaging, or brokered messaging can be thought of as asynchronous, or “temporally decoupled.” Producers (senders) and consumers (receivers) do not have to be online at the same time. The messaging infrastructure reliably stores messages in a “broker” (such as a queue) until the consuming party is ready to receive them

 

The core components of the Service Bus brokered messaging infrastructure are queues, topics, and subscriptions. The primary difference is that topics support publish/subscribe capabilities that can be used for sophisticated content-based routing and delivery logic, including sending to multiple recipients. These components enable new asynchronous messaging scenarios, such as temporal decoupling, publish/subscribe, and load balancing. For more information about these messaging entities, see Service Bus queues, topics, and subscriptions.

Utility for using DataTools Kleber

The DPID is the Australia Post, Delivery Point Identifier. This is an 8 digit number that is unique to every address in Australia, generated by validating against Australia Post’s PAF (Postal Address File).

Requirement : We have to fetch DPID for a bunch of addresses –Shown in the screenshot below.In the below sheet the DPID column is empty and requires to be filled in an automated way:

before

Output: We have the DPID entered for the above bunch of addresses –Shown in the screenshot below.It was possible using the tool :

http://kleber.datatools.com.au/

after

To achieve this we have to send to Kleber a  bach of addresses (less than 50 at a time as Kleber can process only 50)

 

  1. The code below first open the Source Excel sheet
  2. Counts how many are there. Breaks them into batches of 20(in this case)
  3. Reads 20 each and sends 20 to kleber to verify the address and fetch the DPID
  4. the results from kleber is concatenated into a single string
  5. Once all the addresses have been verified the application opens the destination excel sheet and writes the result to it.

MVC JTable implementation

My tryst started with creating a simple MVC application for adding and editing data for our cleints.
However we wished to reduce the number of pages the user will have to trverse in the application .Hence
after some research came across JTable a free tool that allows users to expans and contract the area of
vision by clicking on images .Refer to site and ::
Also the editing / adding and deleting of data was possible using modal popup.

All is very easy to setup and forumulate using the demos that are listed in the site ::
However while doing the project from scratch I came across the following challenges and learnings,

Demos dont tell us about linking to a database table.

Updating a single record from the UI.Record instaed of Records

Returning a JSON with var variable.

Nullable datetime values

sending parameters to the Controller

Authorization of users

Combo box with multiple select–add and edit

 

Generate All possible Combination of objects/elements in an array :Javascript

Problem at hand   :

Create possible combinations from the below array :

[‘1′,’2′,’4′,’8’]

Answer :

[1], [2], [4], [8], [1,2], [1,4], [1,8], [2,4], [2,8], [4,8],[1,2,4], [1,2,8], [1,4,8], [2,4,8], [1,2,4,8]

The way to do is available here :

https://gist.githubusercontent.com/axelpale/3118596/raw/52adf4ad133a2faeb3ddc6c9b8b20132158e29f0/combinations.js

However the next part of the issue is to generate a unique number for each of the above combinations  with the numbers in RED blow

itemcombine[1]= [1],

itemcombine[2]= [2],

itemcombine[4]= [4],

itemcombine[8]= [8],

itemcombine[3]= [1,2],

itemcombine[5]= [1,4],

itemcombine[9]= [1,8],

itemcombine[6]= [2,4],

itemcombine[10]= [2,8],

itemcombine[12]= [4,8],

itemcombine[7]= [1,2,4],

itemcombine[11]= [1,2,8],

itemcombine[13]= [1,4,8],

itemcombine[14]= [2,4,8],

itemcombine[15]= [1,2,4,8]

So my fork is here :