0

Is this(below) a good web architecture?

  1. We have 2 services front-end service and back-end service.
  2. Back-end service only provide APIs not traditional MVC.
  3. The back-end service will structured as modules each module act as a small application with its own config, so each module may have a different database engine and dependencies.
  4. All communications with models are done via repositories.
  5. Trying to avoid any type of SQL joins and keep it simple by performing multi queries to get the result.
  6. Using an API gateway that's will be the entry point for all requests.

So by this we can move to SOA or Microservices easily in future.

What do you think about the above approach?

Thank you in advance.

  • I am asking about the approach is it good or not, why to put it on hold? –  Apr 03 '17 at 21:05

1 Answers1

1

It is hard to agree with such a statement:

Almost all the successful microservice stories have started with a monolith that got too big and was broken up Almost all the cases where I've heard of a system that was built as a microservice system from scratch, it has ended up in serious trouble.

There are microservice stories which did not started as monolith, and on other side there are microservice stories which is successful and which started from scratch.

From my point of view, it is hard to answer to your question, but when you are thinking about architectures you must be aware about pro/cons for different approaches and decide based on your needs.

For example with monolith approach, horizontal scalability is difficult(vertical is possible), but monitoring and deployment is easier.
On other side with microservice approach you can scale horizontally, but deployment and monitoring are more complex. Also with microservice approach you must see how microservices will communicate(e.g. broker with producer consumer pattern).

Hope that this helps.

dstar55
  • 938
  • 6
  • 11
  • but what do you think regarding to the above approach? is it good in general? –  Apr 03 '17 at 21:04
  • why communication goes via repositories("All communications with models are done via repositories") ? – dstar55 Apr 04 '17 at 05:48
  • I mean communication between controllers and models done via repositories –  Apr 04 '17 at 07:19
  • @justsomedev, looks like anti pattern to me, why not use broker e.g. ActiveMQ for communication between microservices, then you can apply Producer/Consumer, Request/Reply, Observer, EIP (via Camel), you can scale horizontally, etc. – dstar55 Apr 04 '17 at 07:27
  • I am planning to microservice ready design not microservice design, so when I see that's we should move to microservice I can migrate easily. so the above architecture is monolithic but ready for microservice. –  Apr 04 '17 at 07:41
  • @justsomedev, but you can use messaging for communication even with monolithic design, if you are using J2EE, then JMS can be used. – dstar55 Apr 04 '17 at 08:21
  • Actually I am using PHP, it seems also a great idea to use a messaging in monolithic app, so all the code and messaging engine will be on the same server? –  Apr 04 '17 at 09:48