architecture – Using Proxy to connect to Database servers

I have a Spring based app, that uses Hickari connection pool to connect to Oracle Database 12c. The app is capable to Autoscale and in peak it will running in more than 3K containers. Each container will have say 5 connections in pool (App is not very heavy on DB its CPU Bound). As per Oracle Real World Performance Group having many sessions open can be very detrimental to the database. The other alternate architecture I had was to built proxy database service. All apps call the proxy service and the proxy service connects to the DB, since the proxy is just calling DB, I assume number of containers running the service will be lower. Is there an alternate architecture being used in the industry and are there existing products/libraries that will be good starting point to look at.

spring – Layered architecture horizontal dependencies

I’m working on a spring boot REST service.

It’s divided into three layers: REST controllers, services, persistence/DAO.

We have multiple services and persistence repositories. We have the following situation:
Service-1 needs to access the persistence layer under Service-2. One of our colleagues added a direct dependency from Service-1 to the persistence layer of Service-2 (red arrow).

I would have added the dependency so that Service-1 depends on Service-2, and not the persistence layer under Service-2 (green arrow). I cannot really explain the reasoning, but it I feel like it’s a more “proper” way to introduce a dependency (to depend on higher level component in essence).

Can you give some input on the subject, and provide a good explanation in terms of software design.

enter image description here

information architecture – UX Approaches to Competitive Analysis for a University Branding/Communications Toolkit Website?

I’m being asked to do a “competitive analysis” for a university website that has communications and brand guidelines/resources. This is meant at as a solo project done in a few days, I don’t have many resources at hand at the moment so user testing is out of the question.

The request was very broad and I was thinking of comparing our toolkit against other university’s brand toolkits. Taking an initial look, the information architecture & site map could use some work…

What are some UX approaches/considerations I should take into account when reviewing our website and comparing it against other universities?

architecture – Is shared message types a design smell?

Yes I think it can be a design smell. For example:

I think the issue your example displays is a faulty separation of concerns. For example, when looking at your example, I have to ask some questions:

  • Does the Shelf Service only shelve books that are owned by the Owner Service?
  • Does it make sense for the Shelf Service to try to shelve books that were just released by the Publisher Service?

and more along those lines.

As I look at what you described, there are multiple services that deal with “Books”. However, what might be really at issue is PurchasedBook, PublishedBook, etc.

Sometimes that separation of concerns can simply be managed by having separate queues. The “Book” message on the Purchased queue is inherently different than the “Book” message on the Published queue. You can route those queues between services and keep them as separate things.

Design Smell doesn’t always mean Design Problem

A design smell isn’t always indicative of a bad (i.e. failed) design. You have to go through and vet the design and make sure there are real problems that should be solved. For example:

  • Asynchronous systems cannot guarantee message order unless the same producer generates both messages. As long as two autonomous services generate the messages you cannot guarantee message order.
  • Is it clear where failures can be introduced, and are those failures by choice (i.e. design), or is it just something that happens sporadically.

If everything checks out, it isn’t necessarily bad design, but at the very least a confusing one. If things are working, you might find that “fixing” the design will lead to system instability until you resolve all the edge cases.

computer architecture – Computing average access time

A computer has a cache memory and a main memory with the following features:

– Memory cache access time: 4 ns
– Main memory access time: 80 ns
– The time needed to load a line in cache is 120 ns.
– Write-through policy.
If the hit ratio in this computer is 95 % and the 90% of the memory accesses are read operations, what is the average access time?

It seems a bit weird to me since I have read through this site calculate the effective (average) access time (E AT) of this system but I still do not know how to do it.
I would appreciate any help. Thanks!

architecture – Resources for designing a private, web-based cloud console

Imagine designing a scalable web-based application to manage a Fortune 500 company’s internal, on-prem cloud resources. These resources might be comprised of various underlying infrastructure, some virtual and some physical, mostly managed by software.

  • What would be some things to consider when designing such a system?
  • How would you orchestrate a significant number of asynchronous requests to read or modify underlying resources?
  • How would you design a system to offer up-to-date observability of a huge number of resources?
  • How to handle concurrent modifications and unreliable change requests to such a system?
  • How to handle failed resource modifications?

computer architecture – Procedure for finding if Overflow occurs on addition

I have two 4-bit 2’s complement numbers a,b, and their sum in s (Also a 4-bit 2’s complement number). Using only the basic logical operations, I need to write a procedure to find if an overflow occurs. If there is an overflow, the output needs to be 1000 otherwise it is 0000.

The inputs in this procedure are a, b, s, and output is 1000 or 0000 depending on the inputs. I am allowed to use AND, OR and NOT operators

I know that there is an overflow if a and b have the same most significant bit and c has a different most significant bit but can’t seem to figure out what the expression should be except that whatever the result is, needs to be ANDed with 1000 for the final result. How do I solve this?

node.js – Architecture custom domain Saas

I have to build an application which allows my customers to create a new store(shop) and under a custom subdomain.

like Shopify/wix does. (Sure I don’t want to implement all of Shopify/wix functionality)

I thought to create api service/Nodejs app. To answer all crud operation. So, To solve the custom subdomain issue, i’ll create store model inside the DB for each customer (name: string, is: Guid, subdomain: string) so I can create relation with all customer/store data(like product, configurations, etcetra)

For the client side(store), I thought to use SSR application. So, when browsing: customer1.myshop.com
My SSR application will look inside DB and grab data to expected store by subdomain(host). And render the proper store.

What do you think? Any thoughts? Is there any more proper way to architecture it?

message queue – Architecture suggestion for designing realtime video transformation platform

I have a requirement where user’s video stream should be captured, transformed and this transformed stream should be returned back to user in real time.

Here is a oversimplified (in context of transformation) example:

  1. User turn on the portal and user’s video stream start.

  2. Video stream should go to server.

  3. Server should transform (let’s say turn colored images in stream to black and white) and return back to user.

  4. User sees the transformed stream in UI.

I have tried to build a design which is here. Problem I can see with this design is:

  1. Creation of per user topic in outgoing Kinesis/Kafka stream.

  2. User need to directly access the stream infrastructure which I believe should not be exposed.

architecture – How to do background sync instead of fetch requests on UI changes?

For example, let’s take a simple web application with comments feature. In my understanding, when a user posts a new comment, the following would occur:

  1. display UI loader;
  2. update the front-end state;
  3. send a fetch request to the API to post a new comment;
  4. Wait for the response;
  5. send another fetch request to the API to request the new list of comments;
  6. waiting;
  7. update the front-end state with new comments;
  8. update UI to reflect the new state with a new comment;

And the user needs to wait while front-end app interacts with back-end on almost every data change. The same way we did it earlier with PHP/Python/Ruby, ajax, server-side rendering and templates.

That makes me think what’s the point of adding so much front-end complexity with something like react, when the result is basically the same.

My question is: are there any alternative approaches to this? Is it possible instead to do the above case the following way:

  1. user clicks to post a comment;
  2. update the front-end state;
  3. update UI to reflect the new state with a new comment;
  4. sync front-end state with API DB in the background;