Tag archive for: interprocess communication

How to use Java to check whether a domain exists without any external libraries

You wanted to buy a domain for your personal website. You found a whois service and it told you that your domain is available. You are elated and tried to acquire the domain through your favourite registrar. However, your registrar told you that the domain had already been taken.

Isn’t that frustrating? Well, it happened to me once and I was determined never to use the whois service of those unscrupulous sites ever again.

So how can you check whether a domain name is available by yourself? When you have a computer at hand, you can find several ways to do so. In this post, I share how you can check whether a domain exists with the Java programming without using any external libraries.

How to upload a file via a HTTP multipart request in Java without using any external libraries

There was this situation when there was a need for my applet to send some log files (generated by some desktop application) on the remote clients.

To keep my applet lean, I chose to implement this file upload function by sending a HTTP multipart request when my applet loads on the remote client’s browser. Policies were in place to ensure that my applet was able to read the log files and send them back to a web server which will collect the log files.

This post documents how I can upload a file by sending a HTTP multipart request in Java without using any external libraries. For the sake of brevity, I used the server endpoint that I had discussed earlier to accept the file from the codes that will be mentioned in this post.

How to send HTTP GET request with Java without using any external libraries

There was this time when I need to build a program to check whether my web server is running fine. To determine that my web server is running fine, I wrote a Java applet that sends a HTTP GET to one of my web resources when the applet runs for the first time. And to keep the applet light, I look into Java in-built features for sending HTTP GETs to my server. This post documents a proof of concept that I did to communicate with my server endpoint via HTTP GET using Java in-built features.

How to send message from Java applet to web page via jQuery

In an attempt to save development time on reworking the RIAs from a old system, a business decision was made to reuse the Java applets on a newer system.

The newer system utilizes jQuery at the front end to fulfill modern user interactivity requirements.

This post documents a proof of concept that I did for the powerful Java applets to communicate with the front-end of the newer system.

How to ensure that your user only runs one instance of your C# program

There are times when we want to limit our users to run an instance of our C# program at any one time. Such situations can be applicable for network monitoring tools, messaging applications, web server monitoring application and etc. In this post, I discuss how we can achieve that via the mutual exclusive (Mutex) mechanism available in C#.

Sending a file and some form data via HTTP post in C#

A few weeks back, I wrote some logic to send a file and a from a windows client over to a Java server endpoint. There are a few ways to do that: via application protocols like FTP and HTTP or even implementing a custom protocol using TCP/IP. Since the Java server was already serving HTTP requests and that HTTP requests can usually get through firewalls quite easily, I chose the HTTP protocol.