Help with new project direction and architecture for speed

Hello everyone,

This is my first post to CakePHP forums. CPHP is a great framework and my company has been using it for the past 7+ years. Now I have to give my opinion on few key areas for one of our internal apps which we are in the process of productising.

The app is developed in 1.x. We plan to scale the app and offer it as SaaS so I am sure the design considerations for scalability comes into picture. First query is, is there a good documentation that can be referred on capacities and how to plan the architecture for parallel processing and consistent operation. At any given point in time we are talking about 100-200 users per instance running their tasks, updating content, generating reports, running AI algorithms etc.

We are extending the code base to add APIs for mobile app, As the original app is in 1.x, my suggestion is to use 3.x branch and develop these are micro services. Is this the best approach?

How long are we talking about the longevity of 3.x branch with the imminent launch of 4.x. Will we get approx 3/4 years with the new 4.0?

Where do I find best practices for code documentation and comments for CakePHP? Also is there a reference document that talks about best practices for dev environment, testing etc?

Lastly, is there an automated tool that can help assess the quality of current code? Please suggest if you can point in this direction.

Finally, I am entrusted with the task of ensuring that the investment is happening in the right direction and the work processes are set in such a way that its efficient.

Thanks again for all the support.

The answer is purely subjective.

First query is, is there a good documentation that can be referred on capacities and how to plan the architecture for parallel processing and consistent operation. At any given point in time we are talking about 100-200 users per instance running their tasks, updating content, generating reports, running AI algorithms etc.

What are the tasks? What additional layer of application is running under it. It depends on that. It is hard to tell what AI process takes up. For example, if the app is like egraphics[dot]plus (iOS), which captures the picture and sends to AI to figure out the person, it takes anywhere from 800ms to upto 10s, depending on the complexity, bandwidth available, garbage collector of previous process, etc. The word you are looking for is called ‘Profiling’.

We are extending the code base to add APIs for mobile app, As the original app is in 1.x, my suggestion is to use 3.x branch and develop these are micro services. Is this the best approach?
How long are we talking about the longevity of 3.x branch with the imminent launch of 4.x. Will we get approx 3/4 years with the new 4.0?

CakePHP in my opinion has a very slow release cycle. 3x to 4x is more of a clean up and less of a breaking change. It is a more destructured approach, where additional plugins require additional installation. Migrating from Cake 3x to 4x wouldn’t be a major challenge. Launch of 4x doesn’t mean support for 3x is abandoned, even today 2x is supported, infact an update for CakePHP2 was released just 7 days ago.

Where do I find best practices for code documentation and comments for CakePHP? Also is there a reference document that talks about best practices for dev environment, testing etc?
Lastly, is there an automated tool that can help assess the quality of current code? Please suggest if you can point in this direction.

Coding standard that CakePHP uses. For automation use codesniffer / phpcs.

Finally, I am entrusted with the task of ensuring that the investment is happening in the right direction and the work processes are set in such a way that its efficient.

Since you are using 1x, I presume your underlying software isn’t upgraded yet. PHP 7x has massive performance gain and has plenty of features. You should upgrade to php 7.4 (coming soon by end of year). Also, note that underlying php software has an EOL too.

Finally, I am entrusted with the task of ensuring that the investment is happening in the right direction and the work processes are set in such a way that its efficient.

Upgrade to latest and the greatest. Invest in the right people and you will have the best outcode.

Best of luck!

1 Like