web applications – Can a monolithic architecture provide more than one API?

Can a monolithic architecture provide more than one API?

Yes. An API is a interface for defining the interactions between multiple components, modules, systems, etc. The way you expose this API is separate from how it is implemented. Having a monolith doesn’t mean you expose just one API, it means that everything is built as a single, all in one solution. So one of the problem is this: if you expose two APIs from your monolith, and you make changes to one of them, when you deploy, you have to deploy the other one also because you have everything inside the same application. In a microservice architecture, you will have the APIs separated because that’s the point, and you can deploy them separately.

is running multiple processes/services still considered monolithic as long as the codebase is the same and is shipped as “one unit”?

Yes. If everything is built on the same code base, using the same platform, framework, etc, and deployed as one unit, it is still a monolith. Even if you have things defined in processes or services, if you make a change to one of them, you have to deploy everything. So basically, everything is impacted by your change in just one part of the monolith.

Just as an aside, even though you can build your monolith with multiple processes and services and keep the decoupled and without shared responsibilities, that’s not what usually happens. Because you have everything in one place, things tend to leak from one process/service to the other and you can easily end up with one tightly coupled mess of a code base.

Does using a monolithic architecture for your web application expose its backend services? Or is it possible for a monolith to provide the web app and another API as a gateway to the internal services?

How you expose your backend services or provide APIs is your choice. This choice and having a monolith are orthogonal issues.

web applications – Can a monolithic arquitechture provide more than one API?

I have been researching microservices and monolithic arquitechtures, and I can’t seem to find the answer to this question.

From my oversimplified understanding monolithic applications use the same code base for the whole application.

Does this mean that it can only provide onde API? Or is running multiple processes/services still considered monolithic as long as the codebase is the same and is shipped as “one unit”?

This question derives from a security standpoit: Does using a monolithic arquitechture for your web application expose its backend services? Or is it possible for a monolith to provide the web app and another API as a gateway to the internal services?

Sorry if I am rambling, but it really is late and this is really confusing me.

W3C’s payment request API

I’d like to integrate in some way the W3C’s payment request api. I found this module but it doesn’t work for Magento 2.4.0.

How can I implement it?

enter image description here

Storing files in a Django Rest Framework API

I am building a Web API with Django Rest Framework in the backend and PostgreSQL as a DB. I also want to store Documents (mostly PDFs and JPGs), which Users will upload to the system. I was thinking of storing the files directly in the server’s file system (MEDIA folder). Is this a good solution for a number of files which I think might be in the range of 1000 – 10,000 files (each 1 – 10 MB) so let’s say 100 GB at max.

rest – best practice posting complex object to api

i am trying to figure out what is the best practice on doing POST calls when creating new complex objects.

example assume this is the complex object i wish to send:

    "firstname": "John",
    "lastname": "Doe",
    "mainEmployer": {"name": "Imaginary LLC", "website": "www.imaginary.com"}

essentially the above is 2 models in one.

person model:

    "firstname": "John",
    "lastname": "Doe"

employment model:

    "personId": "whatever John Doe's unique ID in system is",
    "name": "Imaginary LLC",
    "website": "www.imaginary.com"

Is it better practice to send one at a time (multiple post calls), constructed in such way that employment model wait for successful creation of person model, and then sending it (with the updated ID), or should i bundle it all up into a single complex object as per first example and send it to a single api that will then disseminate it across multiple microservices.
Assume that person model and employment model sit within separate microservice.

So far I’ve seen cases for both single api call and multi api calls for individual objects.

node.js – ¿Algun servidor gratuito que soporte una api rest en node js y base de datos mysql?

Realice un servidor local el cual esta conectado a una base de datos mysql y toda esa api rest la tengo conectada a una aplicacion en ionic, quiero subir mi servidor node js a un hosting gratuito y que soporte mysql, utilice heroku pero me salio un error h10 y no pude solucionarlo, soy nueva en esto y es para un proyecto de la universidad, la idea es que yo genere la apk y toda esa informacion se puede ver desde la apk, pero tengo que subir el servidor a la nube, por favor saben de alguno que sea facil de utilizar, muchas gracias…

sharepoint rest api – How to wait for site design application is finished?

I use some site designs I apply through HTTP REST call.

Initially, I used the ApplySiteDesign function, which is synchronous.

However, it started to fails with some site designs. No error returned but nothing applied. I guess this is due to the number of actions, which is limited to 30 (red that somewhere, not in the doc :()

I then fallback to the alternative AddSiteDesignTaskToCurrentWeb function.

This method works for larger site design but is asynchronous.

Is there a proper way to wait for the end of the application ? The data returned by the function isn’t usefull (or at least I didn’t find how to use it).

If it matters, I perform this calls using PowerAutomate workflow.

As a workaround, I ended up by adding in my site designs, at the very end, the creation of a dummy column, and in my process, I loop trying to get the column (still through rest) until it’s success. Working, but quite ugly.

current workaround

sharepoint rest api – How to encode slash in field name of multi-select option?

I can’t find a way to update a multiselect with a slash in it. In my research because of the error message “Error in query syntax” the problem is somehow how I encode the field name which seems to be right as I can fetch the info for the option at all.

Fetching all types for the multi select

>>> get('https://<domain>/sites/<site>/_vti_bin/listdata.svc/MyListMyType')
{'Value': 'A',
 '__metadata': {
   'type': 'Microsoft.SharePoint.DataService.MyListMyType',
   'uri': "https://<domain>/sites/<site>/_vti_bin/listdata.svc/MyListMyType('A')"}},
{'Value': 'B/C',
 '__metadata': {
   'type': 'Microsoft.SharePoint.DataService.MyListMyType',
   'uri': "https://<domain>/sites/<site>/_vti_bin/listdata.svc/MyListMyType('B/C')"}},

Fetching the A option works fine

>>> get("https://<domain>/sites/<site>/_vti_bin/listdata.svc/MyListMyType('A')")
{'Value': 'A',
 '__metadata': {
   'type': 'Microsoft.SharePoint.DataService.MyListMyType',
   'uri': "https://<domain>/sites/<site>/_vti_bin/listdata.svc/MyListMyType('A')"}}

But fetching the B/C option fail with the same error like I got when tried to update an item.

>>> get("https://<domain>/sites/<site>/_vti_bin/listdata.svc/MyListMyType('B/C')")
{"error": {
  "code": "", 
  "message": "lang": "en-IN", "value": "Bad Request - Error in query syntax."}}}

And as we can see that is using the URL received in the first request. I have also tried a few different encodings like %2F but none seems to work for me.

How am I supposed to encode such a field?

keyboard shortcuts – Can Spotify information (song information – ‘liked’ or not) be escaped by the console logs rather than going through their web API?

I use a macOS program called AnyBar https://github.com/tonsky/AnyBar that displays different colored indicator dots based on what criteria you give it and I need to configure it.

I currently use it to notify me a trackpad gesture shortcut from a mac program called bettertouchtool (BTT) has went through (because it doesn’t always go through and I don’t want to go and check if it did).

I use AnyBar for finetuning Spotify playlists in the background (liking, deleting, moving to playlists, whatever) when watching something (because it gets really old looking at spotify gui.

This is how it looks when a gesture goes through, enough to notify me, but not distract from what I’m watching.

enter image description here

I’d like to do something more advanced and have it automatically change color lights depending on if the currently spotify song is ‘liked’ already or not (my system for recognizing songs I’ve played before).

I’m going to pay for help on freelancer or fiverr most likely because I don’t know coding but want to know what I’m pitching to them, will the info ‘liked’ state have to come from the web api and then work with a script, (I’ve used python3 scripts well in the past) or can I get it from console logs (which would make other applications easier too).