Data Science & Analytics, Experience Sharing, NoSQL Databases, SQL Databases

Highly Scalable Systems

I was being asked to look into this topic called highly scalable systems. Instantly, I diverted my attention to my IT team for more insights. As far as I know, this topic covers many areas, it could be storage, processor cores , memory and etc, from hardware to software. Looking at the data volume nowadays, how to design a highly scalable system is important. So, from where I should start first?

Let me try to understand the term “highly scalable”.  It means flexibility to scale. What is scale? It means can change. In short, it is flexibility to change. In most of the cloud services are now scalable. 

We need to build a solution, uniquely and dedicated to the project.

Next, I moved to focus on database scaling. The first thing it prompts up is the horizontal and vertical scaling. If you have read the MongoDB document, you will find this topic too. I picked up one of the plain text explanations from the stackoverflow website.

Horizontal scaling means that you scale by adding more machines into your pool of resources whereas vertical scaling means that you scale by adding more power (CPU, RAM) to an existing machine.

https://stackoverflow.com/questions/11707879/difference-between-scaling-horizontally-and-vertically-for-databases

Usually, when we do vertical scaling, it requires some downtime to increase the resources and restart server to complete this process. Meanwhile, horizontal scaling just adding another machine in the system, it is highly used in the tech industry. This will decrease the request per second rate in each server.

To segregate the requests, equally to each of the machine (example, application server), you need to add load balancer which would act as reverse proxy to the web servers.

Advertisements
Experience Sharing, Python

Day 5: Boolean in Python

Boolean is either true or false. This data type can take one of this two values only. In Python, its keyword is True or False. It is case-sensitive. The compiler will throw an error if the value is not follow the lettercase. A value of True corresponds to an integer value of 1, and will behave the same. A value of False corresponds to an integer value of 0.

Experience Sharing, Korea - Busan City, Korea - South Korea, Korean Food

Day 3: Saturday’s Brunch at Jagalchi Market

I spent my next 1.5 hours enjoying my brunch at this quiet restaurant runs by a family. The main reason I stepped into this restaurant because they can speak a little English which could help me in food ordering. I still need some English to converse.

I did not take the picture of the main entrance of the restaurant. So, I missed out the restaurant’s name. I will google it and update the name and address again. And of course, the menu has its name too. 

I saw a couple inside this restaurant. Both of them could be from either Malaysia or Singapore. I did not sit around them and I chose to sit further away on the tatami floor dining area. 

It was pretty comfortable to sit here, breezing cold with wind coming from the main entrance. I took a while to see through the menu and decided to order their set meal, the grilled fish set meal for one person. Again, there is no issues for me to order 1 person portion.

It took quite a while for them to cook the dishes and as usual they served me with the side dishes first and free flow of plain water. The weather was cold and still they served me cold water. I wondered if I could have warm water.

Tada, my grilled fish was served. I did not know what kind of fish it was and it tasted just alright, not salty at all and did not smell stinky. Initially, I did feel that the whole portion of the set meal was quite little. However, half way eating the grilled fish, I started to feel full. 

Then, I started to dive into my kimchi soup and took a few spoons. It was sweet and tasty, not spicy at all. I believed the soup based was made of fish bones, again with plenty of kimchi and pickled radish cooked with cucumber and some fish meat, I did find it delicious and go well with my plain rice.

The weather was quite cold and my grilled fish very soon started getting cold and I sped up my eating to make sure I finished my fish and the soup before getting cold. The ahjumah was quite friendly to help me to replenish the kimchi while I was slightly being entertained by the two young kids, the grandsons of the ahjumah. The kids cannot speak English but they are not shy at all.

Experience Sharing, Korea - Busan City, Korea - South Korea, Korean Food

Day 3: Saturday’s Morning at Jagalchi Market

I woke up at the usual hour on my lovely first Saturday in Busan. Since, the place I stayed did not provide breakfast, I decided to swap my itinerary to visit Jagalchi Market (자갈치시장) instead of going for a morning drink at  the Jeongnangak House and cafe hopping after that somewhere in the city.

The journey from my place began at Daeyeon Station to Jagalchi Station at Line 1 took about an hour and I needed to change my train at Seomyeon Station. Upon exiting the station at Exit 10, I followed a group of ahjumah (aunties) to the market entrance.

If you ever missed the entrance, you will not miss this huge sign of the Jagalchi Market. The interesting and fishy journey began inside the few stories high of seafood market. I did not spend much time inside the market because I did not like the fishy smell at all. 

I could not take the smell anymore and decided to walk the outside wet market, hoping it is much better with open-air market. The atmosphere at the open-air market is different and I found myself walking along the market to find interesting seafood products. There are a lot of these similar stalls here and I am sure you will able to find one good stall to buy the freshest seafood. I took a picture of one of the stalls which the ahjumah was shouting at us to look at her seafood at her stall.

Since it is freshest seafood place, I did not see any reasons to miss out any seafood meals here. I started my breakfast with a gigantic fishcake and a grilled fish set at one of the restaurants around this market area. 

As I walked passed the stalls, I found a little push cart selling fried stuff. It was operated by a couple and I bought a stick of fish cake from them. It was the fake crab meat wrapped with fish paste, seaweeds and corn, deep fried and served hot. It was 6 inches long. It costs me 2,000₩. Besides this fishcake, they sell other deep fried stuff. 

Then, I walked further down to check out food for my early brunch. I saw a few stalls inside the wet market selling seafood set including snow crab, king crab, oysters and etc. I could not make up my mind whether I wanted to try the snow crab or leave it for later day before I go back to Seoul, so I kept walking to decide. Also, I walked passed a stretch of food stalls selling similar food, the pork meat soup with pig blood. I am not a fan of pig blood, so I walked away and found myself back to the original main road. 

Still, undecided what I wanted to eat while I was still biting my fish cake, I bumped into a row of seafood restaurants again. Along this stretch of restaurants, I found one with English menu and I gave it a try.

Check out my next article which I will share my review of the food of that restaurant. 

Korea - South Korea

Day 2: Mission Partially Achieved

My day two in Busan did not able to cover my intention to visit the 
Geumjeongsanseong Fortress (금정산성) due to heavy rain when I reached the 
Oncheonjang Station. It was a day which weather forecasted it would rain. I will leave this place for my next visit to Busan and hopefully I can do a full hiking session there. Also, I skipped to visit Busan Citizen Park and the Jeonpo Cafe Street in Seomyeon.

Beomeosa Temple is a great temple, good place to visit and less crowded. You can really spend some time walking around and relaxing. I felt great to include this into my itinerary. My lunch at Gupo Guksu is also another good discovery although I walked too much to locate the restaurant. It was a hilly road up to the restaurant, make sure you take a bus instead to save your energy going up.

When the weather is bad, it is really inconvenient, however, I have a great discovery at Seomyeon Station, where the underground shopping center has plenty of stuff which we can buy. Besides shopping, Seomyeon is also a place full of great food and the price is not expensive too.

Korea - Busan City, Korea - South Korea, Korean Food

Day 2: Eating Street Food in Busan

After walked for an hour or so and the food in my stomach digested, I found myself landed nearby a street full of street food. The hawkers sell almost the same food, same price along that street which no cars can pass through. Many Koreans love to eat here as it is quick, easy and convenient.

I think it can be quite merry as well when you eat with a group of few people, standing together, surrounding the pushcart and eat during the cold season. But, it does not mean you cannot having your street food alone.

It is interesting to hop on at any of the stalls, eat the hot and spicy tteokbokki, (떡볶이) and steamed fish cake.

If you wish to try those stalls which you can sit inside the tent (similar to those you see in the Korean drama), you can find it here too. Personally, I did not try this in any of my visit, but they do look interesting. I did not walk further down to check what food do they sell. I would love to try it one day when I re-visit Busan with another person travelling with me. Solo trip sometimes can be quite hard to try to many different food.

Experience Sharing, Python

Day 4: Numbers in Python

Something great picked up after reading about Numbers in Python. The number can be a whole number (int), a number with decimal (float), a float using scientific notation, with e indicating the power of 10. Example: float4 = 1.5e2 which will give 150.

When we use numbers to perform the division, there are two different scenarios can happen. When we divide two numbers, we get an integer as result. However, when two numbers did not divide evenly, the result of the division is truncated into integer. The quotient is rounded down to a whole number. It turns out to be quite surprising when we expect the result to be a decimal.

To yield a float as the result, what we can do is to change either the numerator or the denominator (or both) to be a float. Example,
quotient1 = 7./2
quotient2 = 7/2.
quotient3 = 7./2.

However, we cannot use a variable with period. Example, we cannot put cucumber. 
It will give a syntax error because a period after a variable name do not do what we want to do in the example below:-

cucumbers = 100
num_people = 6
whole_cucumbers_per_person = cucumbers/num_people
print whole_cucumbers_per_person
float_cucumbers_per_person = float(cucumbers)/num_people
print float_cucumbers_per_person

Alternatively, we can convert the result using the float() method. Example, 
float(cucumbers).