Tag Info

New answers tagged

21

What is more important and significant about a microservice: its API or its database schema? The API, because that is its contract with the rest of the world. The database schema is simply a convenient way of storing the data managed by the service, hopefully organised in a way that optimises the microservice┬┤s performance. The development team should be ...


25

Databases are not very good at information hiding, which is quite plausible, because their job is to actually expose information. But this makes them a lousy tool when it comes to encapsulation. Why do you want encapsulation? Scenario: you tie a couple of components to an RDBMS directly, and you see one particular component becoming a performance ...


11

Microservice Architecture is hard to describe but the best way to think about it is a marriage between Component Oriented Architecture and Service Oriented Architecture. Software as a suite is composed of many small business components with a very specific business domain responsibility. Their interface to the outside world either in provided services or ...


3

Usually a single resource URI because you want separation of concerns between WHERE the resource lives and WHO accesses it. In your case, "WHO" accesses the resource is determined based on two parameters: Is the user authenticated? If so, what is the level of authorization? For the level of authorization, you may implement it using groups, and may add ...


0

I would try to avoid any solution which requires sharing a database between the front end and a back-end service, because my experience is that shared databases cause a lot more coupling that is much harder to detangle than a complex exchange format does. I presume the data is initially gathered by the front end and then passed to the service once the order ...


3

If the front end is made responsible for the 'large payload' for the processing by the Python back-end then you have a high degree of implementation coupling between the two systems that means maintenance, change management, or refactoring becomes more complex as both sides of the communication require significant interdependent re-engineeering in order to ...


1

... is it possible to implement a front end using common languages like html, css and javascript and then do server side processing using a language of your choice, say python or java? Yes, it is possible. It is standard, in fact. But I'm not sure how you would combine technologies of your choice. When an HTTP request is received by your web ...


1

Yes a rest api has a fixed set of verbs, but it doesn't have to be limited to (or include GET, POST, PUT, DELETE). I would look at the GET, POST, PUT, DELETE as a default implementation of REST that works for 80% of all the systems out there. Other systems that are implementing more than crud operations can (and do) implement their own verbs for their REST ...


1

Use a finite state machine for the "chain," where each step in the chain is a sub-state. For example, the states may be: Start Initial processing Adding to collection Fingerprinting Querying Ready Finite state machines are good for coordinating asynchronous operations. I would also add tracing or logging to indicate when a state transition occurs.


0

I'll note that I like email as an interesting example of a very successful asynchronous messaging system. That said, the primary means of data transfer isn't a suitable task for email for a number of reasons beyond "it feels dirty." In fact there are two good arguments against this: Delivery guarantees -- you can read the RFC for details but basically ...


1

You wouldn't want this. I can see a few reasons why this might be desirable, running a web query to fetch data in a trigger might be a nice idea, or returning data from a web service in response to a select call when reading data. But these are all flawed, mainly because they all block the state of the DB whilst they are running - if inserting data fetched ...


2

I assume this is an existing solution based on your last sentence, if so, and it works, then what is the problem? Sometimes the urge to rewrite is the wrong answer. (I say sometimes, I mean always). Its not the solution I would have come up with, but if it works, and I can't see why it wouldn't - email has mechanisms for delivery and retries, and if its ...


6

There are advantages to using email in this kind of scenario. Primarily, it allows the machine that hosts the service to be available only intermittently and still get the job done. You can think of it as a kind of poor-man's message queuing. Also, it allows the service host to sit behind a firewall and only pull in requests from a mailbox on a trusted ...


1

This kind of solution does not necessarily have any problems, and it could have been created in a robust manner. In fact, there may be indeed situations where this is a preferable solution. However, there are many situations where this has the risk of becoming overly complicated. Alternative solutions use Web Services. They work better for this purpose, ...


2

Deletion can be made idempotent by only allowing deletion based on IDs. You will need to have some way for IDs to remain "in use" and maybe expire. With such a reservation system; creating an object can be done by first reserving an ID and then a second call to create the object with that ID (essentially an update on the new empty object). When an ID is ...


1

firstly for multiple classes with the same name, I would suggest that you use namespaces to clear out what class in which namespace is supposed to handle it. most frameworks error handlers can be overwritten to achieve custom error handling , I'm using Yii and at least that is supporting it. and also you can use the old frameworks working parts and include ...


0

I'm assuming your security layer is wrapped within the Generic Data Access component. The first thought that came to my mind when I saw your design was "why are trusted systems accessing the data layer in the same manner that untrusted systems are?" The design you're laying out looks like something an insurance, financial, or even retail environment would ...


1

Maybe you can design your interface between business and data layer to be async? One component of the data layer would access the underlying 'asyncness' of MQ, the other component would be and async-over-sync accessing your Database through JDBC



Top 50 recent answers are included