How we handle your logos using S3 FileManager
Since the beginning, we added the capability to upload a logo to visually identify you and your API. In order to support this feature, we designed an interface defining basic operations on the uploaded images: load, save, move and delete.
The first implementation was simple and fast to deliver: an abstraction of the local filesystem. This was fine during the development phase, on our laptops. However, it was not possible to scale with this solution as every server would have his own copy of the files locally.
Singleton design pattern on FileManagerFactory, with a single static instance that creates an instance of FileManager based on the class name found in a text file (a Properties configuration file).
In this way, when we create different Tomcat instances, each of them will have a static FileManagerFactory to access the same storage.
While this simple library fits our needs for the project, it may not be the best fit in every case. In case you find it useful, check out the github repo here: https://github.com/Mashape/file-manager
One area of improvement would be using a dependency injection pattern instead of a singleton, or perhaps to avoid the fallback to the default filename ”filemanager.properties” when a getInstance() is called.
If you like this, remember, to fork it!
When it comes to APIs, there’s a lot of jargon out there. The meaning of certain terms isn’t always obvious, and API providers sometimes use different ones to
This post will show you how to get Unirest-java running on your Android projects. Unirest is a lightweight HTTP client library with port available in many languages. This is a
Managing dependencies for your Java applications is difficult, unless you have Maven! Maven is an Apache build manager for Java projects. In this post, we will use a Maven
Here’s a list of resources on how to make REST calls in different languages. (We also have this list of 40+ tutorials on how to create an API in