Questions tagged [web-services]
Web services are software systems designed to support interoperable machine-to-machine interaction over a network.
604
questions
-1
votes
1
answer
99
views
How are first-time users signup requests authenticated?
I have a web service. When a user makes a request, traefik first redirects it to my users micro service, to pass through an authentication function.
The token (or username+password, on first request) ...
0
votes
2
answers
295
views
Is this service considered "an API"? Could it benefit from being Restful?
I'm confused about the meaning of API, specially in the context of REST. I'm thinking of one example.
My company creates an application that runs on a server (the "backend"). (JavaScript in ...
1
vote
2
answers
125
views
Microservice Granularity: Should a service ever be broken into smaller services with a shared database?
I'm trying to understand the size of a micro service.
Fake situation: Data is read 1,000,000 times for every write. So when you scale out you generally only care about scaling out for the 'GET' ...
-1
votes
2
answers
261
views
How to deal with upsert PUT requests in a Spring Boot web application without crossing service and controller layers?
I've got a pretty simple web service that I need to add a PUT endpoint for that can handle upserts. This application is primarily a middleware layer to handle logging, caching and instrumentation in ...
0
votes
0
answers
432
views
Dealing with third party api rate limit when using multiple services
I have 1 api key that has a rate limit 1000req/1min.
I would like to somehow use 50% of that limit in service 1 and 50% of that limit in service 2. Let's say they're just 2 separate processes using ...
0
votes
2
answers
106
views
Scheduled Task in webservice
The requirement is to trigger certain tasks (API calls) periodically for each user. But the frequency (time between triggers) is not fixed, the user can change it.
In my existing solution I maintain a ...
-1
votes
2
answers
166
views
What are the benefits of HTTP statuses compared to custom JSON based protocol?
I am currently developing a service and a client and I use HTTP statuses for communicating certain info.
For example, I have a POST /vikings endpoint that starts a long running process to create a ...
1
vote
3
answers
217
views
Is it OK for a public web service to use a database user with rights to execute DDL statements to access its underlying, exclusive database?
I wrote a Java web service using Spring that handles REST calls from
the Internet.
The web service uses a Postgres database underneath to store, modify and read data.
The Postgres database is used ...
-1
votes
1
answer
70
views
How do I authenticate API request when I dont have credentials for the other end
I am developing an app in which I have to fetch data through company provided APIs. All the authentication is done on their end, so I don't have to build my own APIs.
However, There are some ...
1
vote
1
answer
1k
views
How do you pass enums between microservices, without need to have copies of enums in different services?
I'm working with microservices, and I see an issue.
There are two services, that transfer info between each other via jsons. Because of this, we have to store our enums in strings, and serialise-...
0
votes
2
answers
888
views
JWT logout: Sharing blacklisted invalid token among services
I am working on a microservices project involving 4 services - Auth Service, Service-A, Service-B and Service-C.
All the services are implemented using Spring Boot.
The Auth Service is responsible for ...
0
votes
1
answer
2k
views
Blacklist JWT tokens or whitelist JWT tokens
I am working on a Spring Boot web application. The REST APIs are secured by JWT tokens. Currently I have only access token generated (not implemented refresh token concept).
My question is related to ...
0
votes
2
answers
538
views
Does PUT need to be idempotent?
It has been said that "PUT is idempotent":
The difference between PUT and POST is that PUT is idempotent: calling it once or several times successively has the same effect (that is no side ...
0
votes
2
answers
73
views
What's the right way to handle authentication of users across 2 web applications
There are 2 independently functioning web applications. Web-app1: (Flutter+Django+Postgres). Web-app2: (Angular+Spring+Postgres). Each of the web-apps has its own user database and are functioning ...
0
votes
1
answer
47
views
Validating REST API requests against previous requests as part of a larger process
I am building a REST API for warehouse inventory picking.
I have a very shallow understanding of REST, so to me that just == stateless and try to make your URL mappings nouns instead of verbs.
The ...
-1
votes
1
answer
2k
views
How do I know if my nodejs application is stateless or not?
According to documentation from PM: https://pm2.io/docs/runtime/guide/load-balancing/
To make use of its load balancing feature which uses node's clustering to spawn multiple node processes, I need a ...
5
votes
2
answers
2k
views
What is the benefit of having separate web servers and application servers?
Most of the web applications that I have seen developed in my organisation , have the following components :
JS App (from browser) -> Web server -> Service(s)/Application server(s) -> ...
0
votes
1
answer
254
views
How do Asynchronous Webserver (FastApi, Quart etc.) handle many Requests better than synchronous Webservers
I started using Pythons async features and want to fully understand their use cases. I see webserver like FastApi or Quart which use async features. How are they working different from webservers like ...
0
votes
1
answer
2k
views
What would you name the different DTOs for the methods "GetUser" and "AddUser"?
I have a web service with the methods GetUser and AddUser, and some DTOs (Data Transfer Objects)
GetUser: retrieves user information, as a DTO called UserGet
DTO AddUser: takes a DTO called UserAdd, ...
28
votes
5
answers
6k
views
I'm not seeing 'tightly coupled code' as one of the drawbacks of a monolithic application architecture
One of the most common things I see when discussing pros/cons of microservice vs monolithic architecture is that monolithic applications have, or always trend toward, 'tight coupling.'
To be honest, I'...
8
votes
2
answers
1k
views
How does user authorization work in a Microservice architecture
I'm learning how to design a Microservice architecture. For example, here is a simple Microservice architecture:
I'm kind of confused by the Account Service.
As we know, for a web service, normally ...
2
votes
1
answer
823
views
Best approach for developing a stateful computation-heavy application with a rest-api interface using python?
I want to develop an end-to-end machine learning application where data will be in GPU-memory and computations will run on the GPU. A stateless RESTfull service with a database is not desirable since ...
1
vote
1
answer
76
views
Ordering of analytical events
My team is working on an analytics system for the web app. The web app has a service-oriented architecture, and all events are gathered in one centralized analytics service. The system is sending ...
0
votes
1
answer
691
views
Design a correct microservices architecture with data relations
I just started thinking about building a microservices architecture for learning purposes.
I understood that microservices are split, and they should be independent, even when storing data, but what ...
-2
votes
1
answer
309
views
Handling Legacy Database with Spring Boot Java
We are given a task to create an Web Service API for a mobile application. The problem is we have to use a legacy database that is not normalized and its very tedious to work with. We are accustomed ...
1
vote
2
answers
730
views
Can a monolithic architecture provide more than one API?
I have been researching microservices and monolithic architectures, and I can't seem to find the answer to this question.
From my oversimplified understanding, a monolithic applications uses the same ...
1
vote
1
answer
143
views
Consuming complex JSON service that does not have schema
Hi I have this weird situation where I have a JSON producing service that represents a very complex object graph and this bject graph does not have a JSON schema that it is based on. The reason for ...
1
vote
1
answer
317
views
Architecting multiple codebases calling our public API + private API for first-party applications
Currently, we have the issue where we have two codebases (API & Website) calling the same database (along with some duplicate business logic) and we want to streamline this so all requests are ...
4
votes
3
answers
625
views
Why not use SQL to query an API instead of GraphQL?
nalzok posted an interesting question over a year ago: "Why not use SQL instead of GraphQL?".
Respondents seem to suggest three main problems:
One should not directly expose one's database ...
0
votes
4
answers
664
views
When to throw error in response vs save error in database for POST API
I am creating a API to create Personnels of X city. Assume that there is a generalised service for creating personnel of any city and I want to call this service for X city personnels from my API.
...
0
votes
1
answer
544
views
Is this an anti-pattern to have a service have both APIs and listening to events?
I am planning to make a service which will have simple REST APIs and will have a database in backend. I also wanted to add a logic to listen to notifications emitted by other service and there is some ...
1
vote
1
answer
88
views
Multiple webservices on a single port
I am developing a webservice, which offers different services, but currently under different ports. Existing services like GitHub or GitLab also several services, but I am wondering how they can ...
-1
votes
1
answer
312
views
How does a robust http server handle requests?
I have written many http(s) servers in Node.js and just take for granted that I can receive many requests and all IO operations are async. However, now I would like to try and implement an HTTP server ...
1
vote
1
answer
184
views
Sending an xml message as the payload to a web api
I have been tasked writing a "fire-and-forget" push web application, that can push high-volume XML messages (of several types) to multiple client endpoints over the internet (HTTPS). I don't need a ...
2
votes
3
answers
3k
views
@OneToMany relationship in a microservice environment
I am coming from a typical monolithic background and I've been experimenting a lot with Spring Framework. I have also build some simple microservices communicating with each other etc.
Now I want to ...
5
votes
2
answers
3k
views
Multiple DTOs vs Single DTO vs primitives
I'm wondering what's the best approach, and its advantages, when specifying parameters for the Web Service methods. Best to explain it through examples.
In my (SOAP) WebService, used by a Xamarin ...
0
votes
2
answers
129
views
Should there be a separate service for creating asynchronous job?
Say, our team owns 3 services, one is responsible for creating persons, other is responsible for creating buildings, and 3rd one is responsible for creating jobs. Also, we have one website, which is ...
-2
votes
1
answer
139
views
DIY email service vs MailChimp and pals
I need to set up newsletter signup for a site.
Initially, I was eyeing services like MailChimp and SendPulse, but I'm not comfortable with their prices and I'm not really keen on sort of giving up ...
3
votes
2
answers
3k
views
Combining PUT and POST on the same resource
I have the resource OrderRequest which I guess can be qualified as process. The OrderRequest can be create of update. The create should be idempotent, because creating the same order request 2 times ...
1
vote
2
answers
412
views
Multiple thread invocation in Rest Web Service
I have a scenario in our Web Application.
GUI invokes a REST web wervice and further web service calls a procedure. However, the procedure returns data properly for most of the scenarios. In some ...
1
vote
0
answers
61
views
Handling 3rd party OAuth2 tokens
After some extensive research I still don't know how to properly implement the following case. I think this question answers something similar, but I'm not 100% sure (Should client have access to 3rd ...
1
vote
1
answer
336
views
Is it a common pattern to put create/update/archive as one process?
Traditionally it's assumed that we should treat create read update delete as separate concepts. However, I have noticed that the following pattern seems more usable for certain contexts [create, ...
0
votes
2
answers
136
views
Should I create one large initial event or break down in smaller events?
I'm experimenting with event sourcing for an application we haven't build yet. No, I won't implement this without any thought, I'm just experimenting.
My domain model looks somewhat like this. The ...
1
vote
1
answer
135
views
JEE Gps Tracking System Design
I have created a real-time GPS tracking web-based system using Java Servlets as a backend solution whereas the front end is using javascript with ajax requests and WebSockets. (Both the front and ...
0
votes
3
answers
462
views
how to build microservices that also have GUIs
In a microservices architecture where each component does one thing, how do you handle GUI logic? How do you avoid building a front end web application that has a lot of smarts built into it where it ...
0
votes
3
answers
752
views
How to calculate the costs for an on-prem API request in terms of money?
My manager asked me how much it costs (in money, currency, $) to make a REST API request from our client application to one of our services. We do not use cloud, we have on-prem servers.
The payload ...
115
votes
17
answers
24k
views
Why should 'boneheaded' exceptions not be caught, especially in server code?
I am confused because in quite a few places I've already read that the so-called 'boneheaded' exceptions (ones that result from bugs in code) are not supposed to be caught. Instead, they must be ...
-3
votes
2
answers
161
views
Options for managing a multi-purpose web service?
I have a web service that serves two purposes.
On a weekly basis, it syncs records from the GIS DB to a workorder management system's database.
On a continual basis, it serves up the records to a ...
4
votes
4
answers
1k
views
How to model correctly a non persistent action via REST API
Hi I have a Order this order needs to be sent to an order system. There are several oprations that can be performed.
Create
Modify
Check-Modification (this happens on existing order)
Simulate ...
3
votes
1
answer
190
views
Alternative architecture for multi-instance, client-to-client message relay/broker
Research leads me to believe the most common architecture for a multi-instance (horizontally-scaling) message relay service (the typical example being an instant messenger/chat service) is to ...