MongoDB for RESTful Service

In the past few days the temperature in the Twin Cities of Minneapolis and St. Paul has been lower than average. The days have been cloudy and rainy. Today the sun might peak in the afternoon and the temperature will hopefully reach 55 F. On the positive side the forecast for Saturday is sunny and temperatures in the low 70s. Hopefully will be able to grill and spend a few hours outside walking.

In this post I will cover interacting with MongoDB using Node.js via the Mongoose module. I will not say much about Installing MongoDB on Windows or Using the MongoDB Shell due to the fact that I have covered such topics on previous posts. I am using the Windows 10 OS due to the fact that several tools I use to generate the post are installed in this Windows machine. You can follow just as well if you decide to use Linux. The installation instructions provided by MongoDB are well written and are easy to follow. Continue reading “MongoDB for RESTful Service”

Node.js in Production

It is a partly sunny Sunday in the Twin Cities of Minneapolis and St. Paul. Currently I am waiting for my wife to get ready to go out for a walk. Yesterday it was cloudy and sprinkled on and off all day. Towards the end of the day it cleared up but we were not in the mood to walk given that we were watching movies at home.

Spoke on the phone with my youngest son. He and his wife were driving to Wisconsin from Indiana to check out a few homes today. He got a job in the area and the family is moving in a month or two. Seems like a house that matched their expectations came on the market last week and they are hoping will meet and exceed their expectations. Will find more about it later this afternoon when they drive back home. Continue reading “Node.js in Production”

Promise to Async and Await

Yesterday on snail mail I received a pin from the Red Cross. Apparently I have given blood 16 times so far. That adds up to two gallons of blood. Planning on continue to donate in the foreseeable future.

As you can tell based on the code we will be using for this post, I am a fan of Ian Fleming’s spy novels staring James Bond. I read all his books when I was growing up. Have watched all the James Bond movies and own a DVD collection of all the titles that have been released of 007.

To start we have a set of functions written in JavaScript Continue reading “Promise to Async and Await”

JavaScript Promise

I have been asked why I am dealing with RESTful services in JavaScript. My idea is to create a set of services that implement sets of APIs (e.g., DICOM storage server) using different programming languages (e.g., C#, Java, and JavaScript). Once that is done will decide on a single service implementation implemented using microservices written in different programming languages. The API for such RESTful server will be determined at the time. As you can see there is some logic behind this madness. If possible, I will then deploy the same set of microservices in a couple public platforms (e.g., AWS and Azure). Continue reading “JavaScript Promise”

Basic RESTful Service – Part II

It is a rainy and stormy day in the Twin Cities of Minneapolis and St. Paul. All is well with rain, but I do shutdown my computers as soon as we get lightning. Have my computers connected via different power supplies, but on more than one occasion I have lost multiple components. So as soon as I hear thunder, I immediately shutdown and read until the storm subsides.

I worked in 2-hour blocks. At the end of the second block I went up and prepare tea. My wife and I have this morning ritual. What was unique today is that a rafter of wild turkeys was in our backyard. Last Friday the tom had two females and they were stopping traffic on the parkway. Today the rafter has grown to include seven females. There are several large parks and dozens of lakes and ponds in this area. We see turkeys year round. Continue reading “Basic RESTful Service – Part II”

Bootstrap Jumbotron

It is a beautiful Saturday in the Twin Cities of Minneapolis and St. Paul. My wife and I will be going for a 5 mile walk later this morning.

Today I woke up around 04:00 AM. It was somewhat warm at home. Turned off heating and opened a window. Since then the inside temperature had dropped to a more comfortable 68 degrees F.

This morning I read a post titled The Middle Class is being Disrupted by the One Percent by Michael K. Spencer on Medium. The post is quite interesting to me. The reason being is that I have been thinking and discussing with friends and family similar ideas. Something needs to be done by companies and governments before Capitalism and Democracy becomes a chapter in a history book. Continue reading “Bootstrap Jumbotron”

Basic RESTful Service – Part I

One can use different programming languages, frameworks and libraries to develop a RESTful web server which exposes the same API. In this post I will implement a RESTful server using JavaScript, Express, and npm libraries.

Given that one needs to start with some level of requirements, we will use the following short and simple statement:

“Implement a very simple RESTful API for a storage server that supports store, query, retrieve and delete operations using DICOM data”. Continue reading “Basic RESTful Service – Part I”

Node.js Issue – RESOLVED

A couple days ago the temperature in the Twin Cities of Minneapolis and St. Paul rose up to 70 F. Yesterday the highs were in the upper 50s. Today the temp is going to go as high as 34 F and will be raining and snowing. Not sure how much snow and rain we will be getting. Hopefully things will not flood.

I am working with micro services and Node.js in order to streamline a storage server currently implemented by three monolith services. We will be going the hybrid route for a while. Eventually all will be implemented with Docker and possibly running on a public cloud (i.e., AWS or Azure). Continue reading “Node.js Issue – RESOLVED”

About JavaScript – Part I

This morning I received a message from a discussion forum for the Graph Analytics for Big Data from the University of California San Diego by Coursera. I completed the course last year.

I tend to post now and then when I really see a need. Since then at least three students have used the contents of the post and were kind enough to leave me a message. I do appreciate it. Hope it helps fellow students even if they were in a hurry and did not have time to leave a thank you note. Feels good, what can I say. Continue reading “About JavaScript – Part I”