Posts

Webpack Module Federation

With the rise of micro frontends, managing shared dependencies and dynamically loading modules across applications has become a significant challenge. Webpack Module Federation , introduced in Webpack 5, offers a seamless solution for building distributed applications by enabling multiple JavaScript applications to share and consume modules dynamically at runtime. Module Federation is a feature in Webpack 5 that allows independent applications to share code without requiring each application to bundle the same dependencies. This makes it possible to split applications into smaller, maintainable units. Following are some key features of module federation Runtime Module Sharing : Applications can load shared modules dynamically without bundling them. Reduced Bundle Size : Since dependencies are shared, there’s no need to duplicate them across applications. Independent Deployment : Different teams can develop and deploy micro frontends independently. Improved Performance : By av...

Google LevelDB with C

Image
LevelDB is a fast key-value storage library written at Google that provides an ordered mapping from string keys to string values.The library was written in C++ and developers have developed bindings for many languages such as C# and node.js. The db is using google's snappy compression library to decrease the on-disk size of LevelDB stores with minimal sacrifice of speed. In this post we'll talk about using LevelDB in an Ubuntu environment with C. First install snappy dependencies using following command. sudo apt-get install libsnappy-dev Get the latest copy of  levelDB from GitHub. git clone https://github.com/google/leveldb.git Execute the following set of commands to make and install the library on your Ubuntu environment.(the libleveldb.* is in the out-static now). cd leveldb/ make sudo scp -r out-static/lib* out-shared/lib* /usr/local/lib/ cd include/ sudo scp -r leveldb /usr/local/include/ sudo ldconfig man scp - r sudo ldconfig man scp -r If...

Writing java classes to perform queue and topic operations in IBM WebSphere MQ

Image
A WebSphere MQ queue is a named object on which applications can put messages, and from which applications can get messages.Messages are stored on a queue, so that if the putting application is expecting a reply to its message, it is free to do other work while waiting for that reply.Before a message can be put on a queue, the queue must have already been created. A queue is owned by a queue manager, and that queue manager can own many queues. However, each queue must have a name that is unique within that queue manager.Following you get an example of opening a queue to put message. MQQueueManager queueManager; //initialize the queue manager here MQQueue queue = queueManager.accessQueue("myqueue", CMQC.MQOO_OUTPUT); MQMessage mqMessage = new MQMessage(); //prepare message here queue.put(mqMessage); queue.close(); Below you get an example of opening a queue to get messages. MQQueue queue = queueManager.accessQueue("myqueue", CMQC.MQRC_READ_AHEAD_M...

Using SSL support for IBM WebSphere MQ Java Clients

Image
In the previous post we discussed about creating a basic connection with a queue manager.In this we'll focus on how we can add SSL support to the connection.First thing you need to do is to create a key repository for the queue manager.You can do this using the standard key management tool provided by the the IBM WebSphere MQ. In the second window make sure to tick the "stash password to a file" field.Next you need to add a certificate to this key database file.Select Personal Certificate section and click New Self Signed certificate.You ''ll be directed to the following window. The Key Label you enter needs in the future so make sure to insert a specific Key Label in the relevant field.Next thing need to do is create a Key Store file.Go to "Create a New Key Database File" and select DB-Type as jks. Now go to Signer certificate section and add the certificate you created to the key store file.Now copy the .kdb and .sth files to the S...

Writing Java classes to perform IBM MQ queue manager operations

Image
As you saw in earlier posts IBM WebSphere MQ is  messaging for applications. It sends messages across networks of diverse components. Your application connects to IBM WebSphere MQ to send or receive messages.IBM WebSphere MQ have a special set of structures called queue managers. Channels,queues,topics and all the components that we are going to discuss belong to a specific queue manager.So the first step of our programme is to establish a connection with a queue manager.In order to do this first we need to add the following three jars to our project. com.ibm.mq.allclient.jar providerutil.jar fscontext.jar These jars contain all the methods and constants that we need to initialize a connection with a queue manager.First we need to set up the environment for the connection.Look at the following code segment. MQEnvironment.hostname = "localhost"; MQEnvironment.channel = "mychannel"; MQEnvironment.port = 1414; MQEnvironment contains static fields tha...

Writing 3rd part connectors for wso2 esb

Image
A connector allows you to interact with a third-party product's functionality and data from your ESB message flow, enabling you to connect to and interact with the APIs of services such as Twitter, Salesforce, and JIRA. This means that if you have enabled the Twitter and Google Spreadsheet connectors in your ESB instance, your message flow could receive requests containing a user's Twitter name and password, log into the user's Twitter account, get a list of the user's followers, and write that information to a Google spreadsheet. You can use one or more connectors in order to manage generic use cases related to a business scenario that you may need to address. You can use the following maven archetype to generate the project template for a 3rd party connectors. Here you can change the artifactID to an artifactID you prefer. mvn org.apache.maven.plugins:maven-archetype-plugin: 2.4 :generate  -DarchetypeGroupId=org.wso2.carbon.extension.archetype  -Darchety...

Installing IBM WebSphere MQ 8.0 in Ubuntu

Image
IBM WebSphere MQ is messaging for applications. It sends messages across networks of diverse components. Your application connects to IBM WebSphere MQ to send or receive a message. IBM WebSphere MQ handles the different processors, operating systems, subsystems, and communication protocols it encounters in transferring the message. If a connection or a processor is temporarily unavailable, IBM WebSphere MQ queues the message and forwards it when the connection is back online.   What can IBM WebSphere MQ do for users?   IBM WebSphere MQ sends and receives data between your applications, and over networks. Message delivery is assured and decoupled from the application. Assured, because IBM WebSphere MQ exchanges messages transactionally, and decoupled, because applications do not have to check that messages they sent are delivered safely. You can secure message delivery between queue managers with SSL/TLS. With Advanced Message Security (AMS), you can e...