Questions tagged [web-services]

Web services are software systems designed to support interoperable machine-to-machine interaction over a network.

Filter by
Sorted by
Tagged with
-1 votes
2 answers
50 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 ...
user avatar
0 votes
0 answers
24 views

Use orchestration or choreography when the 'oldest' system in a cluster needs to do something?

Imagine you have a cluster of server applications. All applications are identical. They get lots of data from a database or an external source, perform lengthy calculations, then offer the solution ...
user avatar
  • 561
-3 votes
4 answers
123 views

How to detect user location and divide your APP / website up by Country? [closed]

So here is the problem that I need to solve for my APP / website. It will be available for everyone on the planet. But Users will only interact with and see content from other Users of the same ...
user avatar
0 votes
0 answers
71 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 ...
user avatar
  • 1,401
0 votes
2 answers
55 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 ...
user avatar
  • 101
-1 votes
2 answers
152 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 ...
user avatar
1 vote
3 answers
199 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 ...
user avatar
0 votes
0 answers
24 views

Web API: Use proxy or auth

Meta Hi, I am a new developer and new to this stackexchange stuff. I dont have much experience but I read a lot. Introduction I am working on a monolithic web application and realized that it may be ...
user avatar
-1 votes
1 answer
59 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 ...
user avatar
1 vote
1 answer
550 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-...
user avatar
0 votes
2 answers
319 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 ...
user avatar
0 votes
1 answer
1k 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 ...
user avatar
0 votes
2 answers
203 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 ...
user avatar
0 votes
2 answers
68 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 ...
user avatar
  • 3
0 votes
1 answer
45 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 ...
user avatar
-1 votes
1 answer
678 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 ...
user avatar
  • 13
4 votes
2 answers
831 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) -> ...
user avatar
  • 145
0 votes
1 answer
137 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 ...
user avatar
  • 111
0 votes
1 answer
363 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, ...
user avatar
  • 111
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'...
user avatar
  • 421
8 votes
2 answers
793 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 ...
user avatar
  • 211
1 vote
1 answer
412 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 ...
user avatar
1 vote
1 answer
74 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 ...
user avatar
0 votes
1 answer
396 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 ...
user avatar
-2 votes
1 answer
164 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 ...
user avatar
1 vote
2 answers
382 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 ...
user avatar
1 vote
1 answer
111 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 ...
user avatar
1 vote
1 answer
182 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 ...
user avatar
  • 113
4 votes
3 answers
457 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 ...
user avatar
0 votes
4 answers
186 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. ...
user avatar
0 votes
1 answer
251 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 ...
user avatar
1 vote
1 answer
61 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 ...
user avatar
-1 votes
1 answer
148 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 ...
user avatar
  • 2,412
1 vote
1 answer
115 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 ...
user avatar
0 votes
2 answers
1k 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 ...
user avatar
4 votes
2 answers
2k 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 ...
user avatar
0 votes
2 answers
88 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 ...
user avatar
  • 161
-2 votes
1 answer
102 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 ...
user avatar
2 votes
2 answers
933 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 ...
user avatar
1 vote
2 answers
89 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 ...
user avatar
  • 31
1 vote
0 answers
42 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 ...
user avatar
  • 111
1 vote
1 answer
127 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, ...
user avatar
0 votes
2 answers
105 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 ...
user avatar
1 vote
1 answer
83 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 ...
user avatar
0 votes
3 answers
396 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 ...
user avatar
  • 479
0 votes
3 answers
389 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 ...
user avatar
  • 61
115 votes
17 answers
23k 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 ...
user avatar
  • 3,307
-3 votes
2 answers
156 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 ...
user avatar
3 votes
4 answers
676 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 ...
user avatar
1 vote
1 answer
129 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 ...
user avatar

1
2 3 4 5
13