Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 2 years ago.
Improve this question
In our company 2 development teams:
Web team developing online store
java team developing CRM application
Online store send REST requests to CRM. And Java team lead asked web team lead to restrict RPS from online store to CRM, because CRM receive too many requests and periodically goes down. The web team doesn't like it, they think that it is CRM side issue.
What is best practice for this kind of situation?
Can you provide me reference to some authoritative knowledge base?
Thank you.
There is no best practice for that kind of situation because everything depends on specific circumstances. If the store generates more requests than it is necessary, it should be reduced. If the CRM app cannot handle the required number of requests, it should be optimized (or resources increased). You provided too few details to give you a clear answer.
From the technical side, I can only give you 2 overall suggestions:
If query requests (GET) cause the problem, you should think of a better data caching on the store side to reduce the number of requests.
If command requests (POST, PUT etc.) cause the problem, you may consider how many of your requests have to be handled synchronously. Maybe queuing commands instead of processing them right away would help you to better utilize resources of the CRM app and reduce downtime.
I highly doubt if anyone will be able to give you a more concrete answer basing on so limited data.
Related
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 4 months ago.
Improve this question
All of the tutorials suggest, that we should use async communication using something like kafka over direct sync http based communication, when it comes to communication between micro-services.
Can somebody explain why, and how will async communication happen using kafka?
The question is very broad. I would argue that the main aim of using async communication is to separate domain boundaries, but there are other benefits of doing this: Partition failures and the ability to support spikes without bringing down a system.
Imagine a purchase on an online shop:
Payments needs to be processed.
Check for fraudulent operations.
A invoice needs to be created.
A fulfillment order needs to be created in the warehouse.
Purchase information has to be sent to analytics.
Update tailored product suggestions.
And probably a few tens more of things have to happen after an order is placed.
Some of these, the critical path, might need to happen synchronously (e.g. taken a payment) but all of the other ones can happen asyncronously. Kafka is just a message broker (check the docs or the free book Kafka: The Definitive Guide to know how it works)
It's also possible to build a platform that is fully asynchronous (e.g. using request-reply pattern).
An incredible good explanation of using messaging and examples are in the book Enterprise Integration Patterns. It's almost 20 years since it has been published, but everything in there is still current.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 5 months ago.
Improve this question
I'm currently developing a micro service that basically provides calculation services to other micro services. It does not store data or have any resources like a sales order. It only calls other micro services and then calculates metrics and prices to return a result.
I'm kind of struggling trying to make a rest API with resources names that are nouns when all I do is calculate stuff and return results (more like an action).
So can we have a micro services that behaves more like an HTTP API than a Restful service (is it a bad practice, an anti pattern , an architecture smell, ....)
Regards
You can use whatever you want and in your particular case I am pretty sure you won't see any drawbacks. From my point of view only difference with rest is mostly semantic -some people may also argue about cacheability but I don't think so-
Apart from rest/rpc creating microservices without any actual domain could cause a maintenance issue in the long run as you totally depend on some other microservices data whenever a change required in their side you may also need change this microservice. That is why I don't recommend those kind of calculation services unless you have a valid scalability requirement.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 6 years ago.
Improve this question
Did someone try developing a GraphQL instead of RESTful API? Can someone give real life (not only theoretical) pros and cons. Basically from my research I found that the GraphQL power is to get exactly what you need nothing more. Where with REST APIs, you often have to make a series of requests and you can easily get back more information than you really needed.
Is it worth the time spent on researching and learning GraphQL? Any bugs or showstoppers that get your attention?
This question is primarily opinion-based.
But from my experience:
Multiple requests on a RESTful-API for just one thing often indicates a lack in the API design, namely the needed resource was not available and therefore stuff needs to be gathered from different resources to compensate for this.
A REST-API that could be easily replaced by GraphQL indicates, that the API was in fact a CRUD-HTTP-API, what is considered an Anti-Pattern among REST-Evangelists.
Also worth noting is, that GraphQL puts responsibilty on the client, because the backing API is reduced to be a datastore that just needs to be queried. REST on the other hand enforces the behaviour of the client and therefore reduces responsibility on it. The client gets reduced to be something similar to a browser.
There are cases the one or the other approach would yield better results, but that greatly depends on your situation.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
Our company is considering connecting Ceridian Dayforce HR management system with our product.
Now I was asked to estimate required time and effort it would require to do so. The problem is, I can't find documentation source for the API. Dayforce seem to provide an API, for example they have this article that seem to state they support API integration, but data sheet itself is one page size and written in purely non-technical way.
I am wondering: is there any public source of such documentation? If there is none, does this mean that there is no API available or that documentation is only provided to developer once they finish approvement process of some kind?
There is indeed an API. Integration can be performed using SOAP or REST.
You will need to request from Ceridian that they create a test instance for you. After this, it's a good idea to ask for assistance in creating a user role for the purposes of accessing web services. I had some serious pitfalls in this process since it is not reasonable to ask your own HR staff (who likely only use the front end) to know how to do this for you. Ask Ceridian's support team instead.
I have been working on this for about two weeks. I have successfully performed GET and PATCH requests (both using Postman and in code) but creating a new employee with POST is not as straightforward as the documentation makes it out to be. There seem to be many snags along the way and Ceridian is not very cooperative in providing clear explanations when problems occur (they don't really provide any support on these things, and they make this fairly clear in their documentation). Their support staff are not really development people, so their knowledge in this domain is likely limited as can be expected.
With that said, I can say that the documentation may seem to be detailed, but be aware that the detail ends after the 'happy path' cases are outlined.
You need to contact your account manager at Ceridian to get details. They do have detailed documentation, just not freely available.
Dayforce is introducing Restful web services in their new realease 53. If that helps.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I am looking for some tool or service that can be used to track arbitrary events in web based software, for the purpose of running A/B tests and measuring various other things. I am aware of Optimizely, but that seems only suitable for testing simple things in normal websites and Google Analytics is not really suitable for this type of things and there is a lot of hassle when you want to track events from the backend and link them with a user's session in GA.
An ideal solution would be some service accepting HTTP GET requests with arbitrary parameters and then letting users do queries in an SQL-like language. I have many times put together some less scalable solution with MySQL or a less flexible one that stores everything in text files and processed and aggregated them separately into desired format. But building a both flexible and scalable version would require a lot more time and I guess there are already good solutions out there. Does anyone know of any?
Other requirements are:
It must be possible to do both back-end and front-end requests.
It must be possible to do use it in widgets, running on other peoples' websites
It would be nice if it could automatically create readable reports with maybe some diagrams, etc.
If anyone has any experience with this kind of tools, I would be very glad to hear your thoughts.
Thanks for your help.
Have you tried mixpanel? We've found it quite flexible and powerful.
https://mixpanel.com/