Articles

With software products becoming just a bunch of micro-services and third-party APIs mashed together, it’s more crucial than ever to get their structure in order.

GraphQL already did this at its inception by coming up with a whole specification that describes how APIs of its type should behave. In the RESTful API landscape, things were a bit more wild west. However, even if not all backend devs know it, there are a number of specifications for REST APIs as well.

Source de l’article sur DZONE

Having a lightweight protocol which delivers messages over low bandwidth or unreliable networks is the foundation for a system that can facilitate the transports of data in near real time.

MQTT is one such protocol which designed to overcome following limitations:

Source de l’article sur DZONE

When you are creating a RESTful API, it’s easy to get overwhelmed by all the different things you need to take into consideration: throttling, REST verbs, security, authentication, input validation, etc., so it’s easy to forget about the more subtle issues that can make a lot of difference in the long run. Most of the topics described above were already discussed (extensively if not exhaustively) elsewhere, so I’ll try to give my take on how to create a readable API for developers to consume. It’s a more subtle and less-discussed topic that can have a significant impact on the success of your API. After all, an API that no one can read, no one will use.

Use a convention for endpoint URLs and method names: plural vs singular – pick one. There is nothing worse than trying to fetch information from /api/v1/orders/{id} and debugging this forever just to find out that this is the only place where you have chose to use /api/v1/order/{id} (singular instead of plural) as the endpoint URL.

Source de l’article sur DZONE

Do you want to implement an HTTP server, but do you not want to take any risk of writing a full-fledged HTTP server? Developing an HTTP server with full capability is not a trivial task. But Java has got a solution to this kind of problem. Java supports an in-built HTTP server. By just writing 100 lines of code, we can develop a somewhat-decent HTTP server that can handle HTT$$anonymous$$ET and POST requests. We can also leverage it to handle other HTTP commands as well.

HTTPServer class

Java SDK provides an in-built server called HttpServer. This class belongs to com.sun.net   package. 

Source de l’article sur DZONE