In a client-server web or mobile application, a typical problem is updating the client when data on the server has changed or if a long-running background job has completed. Given that HTTP is a stateless protocol — consisting of requests initiated by the client and consequently responses from the server — it is common practice to call the server at regular intervals to check for data changes and update the client when it has. This is also known as API polling. …
Recently I was tasked with doing a security review of our Shopify integration and I wanted to go all the way in by building a Shopify App using Serverless technology. It proved to be quite a challenge, and I am sharing my learnings and code here with the hope of helping anyone else trying to figure this out.
Shopify, as you might be aware, is a popular E-Commerce platform. Shopify Apps are standalone web applications that integrate with Shopify through OAuth to extend its functionality or to provide custom behavior.
Recently I wrote about learning React and Python Flask and realized how much time it took to get my development environment up and running.
Getting all the tools and dependencies figured out, not to mention debugging deployment issues, dealing with code refresh, CORS, and database setup — it took me about a week to reach a state where if I wanted to try a feature or component in code, I could just open my editor, write it up and see it in action.
Finally, I decided to write a little startup project that you can also use to get up…
No multithreading required
The topic of this post is rather confusing but it is a simple trick to save yourself from lots of data preprocessing and multithreading. It does not solve all the preprocessing problems, but in certain situations it does wonders in terms of scalability and resource saving. Let me explain the problem and then the magic trick solution.
Imagine a situation where you need to show a daily status update to your customers when they login to your site or app, or perhaps you needed to display result of a task that they performed earlier. Another situation is…
A fan’s introduction to Redis
This is a Fan Post about Redis— but I promise you will learn a thing or two about caching, scalability, high-availability, synchronization and of course about Redis itself.
For the uninitiated; Redis may be known as an in-memory data store or an alternative to Memcache. That is as much correct as calling Batmobile just a car. Here is what Redis really is (paraphrasing from redis introduction page)
Redis is an in-memory data structure store, used as a database, in-memory cache and message broker. …
Background processing is a pretty standard way of improving the performance and response times of your web applications. What’s tricky is to have fine-grained control over the background processes. How many should you run? Can you scale them up or down? Can you control how much time it takes to finish those jobs?
Over the years, I have used multi-threading and cron jobs to run background tasks, but my favorite mechanism is to use async message queues.
RabbitMQ is a fairly popular asynchronous message broker that can handle millions of messages. …
Most engineering managers and leaders today, including myself, come from technology background and not necessarily from people or business management.
In a lot of cases, good software engineers are handed the mantle of responsibility with the assumption that they will pickup leadership skills on the job.
While we do seem to have a certain tactical advantage of understanding technology — leadership is a discipline in its own right and should be treated as such.
I thought it would be helpful to share some of the essentials, that I believe, every new engineering manager should know. This is not a complete…
I run a small blog at Effective Programmer, which, as the name suggests, is mostly about software engineering. Incidentally the number one question I field is not about software development, instead its about a career in game development, more specifically about mobile game development and how to get started.
Recently, for my Effective Programmer blog I wanted to showcase performance improvements for a RESTful API and I decided to use PHP. I realized that not everyone has a ready to go LEMP environment at their disposal. So, here is a simple guide on how to set one up quickly using Docker.
In case you don’t already know LEMP stands for Linux OS, with an Nginx (pronounced “Engine-X”) web server. A MySQL database and PHP as the programming language.
Note: The instructions below use Docker but in case that is not an option, you can follow this well written guide…
So when I decided to setup my own blog Effective Programmer, using WordPress, it was natural for me to build something that can be scaled to sustain hundreds of thousands of users per day. But of course I didn’t want to spend a ton of money doing it, preferably I would like to start for free.