Please login or register.

Login with username, password and session length
Advanced search  

News:

You need/want an older version of sNews ? Download an older/unsupported version here.

Author Topic: Non functional system requirements.  (Read 2613 times)

Joost

  • Guest
Non functional system requirements.
« on: October 18, 2009, 04:33:31 PM »

Non functional system requirements.

This is not about features. Post feature requests elsewhere.
Ideas on non functional system requirements, you can post here.

Minimal system requirements:
Program language: PHP 5.1 (release date: 2005-11-24). To ensure sqlite 3 availability (PDO).
Http server: Focus on Apache.
Database: Sqlite 3, Mysql 4.1, possibly PostgreSQL
OS: Any OS that runs the above.

Database architecture: Adjacency list model.
Pros: Good performance (optimizable), simple and scalable.
Cons: Limited depth (3, 4 levels).
- Mysql specific features such as enum and default values, should be avoided.
- Transactions should be atomic.

Unobtrusive code: When possible, html (generated by php), should be separated from complex php.
Similar, javascript should be separated from html.

Function size: Should be kept small, preferably not larger than 2kb. Exception: When large strings (html) are included.

Lightweight: If we want sNews to run without problems on cheap hosting, it needs to run efficient,  resource consumption should be kept low.
- The number of queries should be kept as low as possible. 6 (SELECT) queries per page call is doable in a default setup.
- The most effective way of reducing memory usage, is lazy including. The idea is simple: If admin pages are called, admin related files are included. For processing (deletion, updates, inserts), only relevant files are included.
An efficient running system has a positive impact on performance as well; it cuts both ways.
The front page says "sNews is extremely lightweight". It would be nice if that was true. ::)

Error reporting: While developing error reporting should include e_notice.

Editors: sNews should be compatible with popular editors such as FCKeditor and TinyMCE.  Therefore, content should not be converted (ampersands), when processed.

« Last Edit: October 18, 2009, 05:20:22 PM by Joost »
Logged

centered

  • Guest
Re: Non functional system requirements.
« Reply #1 on: October 18, 2009, 04:57:06 PM »

Agreed. 

To add to that. SQLite version should have Versio 2 included as (If I recall) this ships default with PHP5.  In addition, most Windows setups do not have SQLite running by default.

Additionally, any Database specific functions should be avoided as well.
Logged

Joost

  • Guest
Re: Non functional system requirements.
« Reply #2 on: October 18, 2009, 05:35:27 PM »

Agreed. 

To add to that. SQLite version should have Versio 2 included as (If I recall) this ships default with PHP5.  In addition, most Windows setups do not have SQLite running by default.

Yes, it ships with php5 (release date: 2004-07-13).
I don't worry about Windows as (in most cases) it is owned by the user (they are "root"). They are able to enable sqlite.
PHP 5.1 (release date: 2005-11-24) is almost 5 years old. I think it is acceptable to start off with 5.1.

Question: Do we want sNews to run with safe_mode ON ? In that case, it requires shipping a prefab database.
Logged

Fred K

  • Still trying to learn stuff
  • ULTIMATE member
  • ******
  • Karma: 130
  • Posts: 2728
    • Personal
Re: Non functional system requirements.
« Reply #3 on: October 18, 2009, 06:03:10 PM »

Question: Do we want sNews to run with safe_mode ON ? In that case, it requires shipping a prefab database.

Is there a way to suss out what the majority of web hosts' default setting for safe_mode is? I know that my currently preferred domain host (Servage) has safe_mode set to on by default, for example.
Logged

Joost

  • Guest
Re: Non functional system requirements.
« Reply #4 on: October 18, 2009, 06:20:48 PM »

Question: Do we want sNews to run with safe_mode ON ? In that case, it requires shipping a prefab database.

Is there a way to suss out what the majority of web hosts' default setting for safe_mode is? I know that my currently preferred domain host (Servage) has safe_mode set to on by default, for example.

It is hard to tell. Even Servage might have a server where safe_mode is off. My strategy is to request safe_mode is off before doing business and I am sure I am not the only one. Not many hosters like to say "no".
Logged

Fred K

  • Still trying to learn stuff
  • ULTIMATE member
  • ******
  • Karma: 130
  • Posts: 2728
    • Personal
Re: Non functional system requirements.
« Reply #5 on: October 18, 2009, 09:14:25 PM »

It is hard to tell. Even Servage might have a server where safe_mode is off. My strategy is to request safe_mode is off before doing business and I am sure I am not the only one. Not many hosters like to say "no".

True. My reasoning is, if the "general" default among hosters is to have safe_mode off, then there shouldn't be a problem. If on the other hand the "general" default is safe_mode on, then we should consider it, for the sake of easiest possible deployment 'for the rest of us' so to speak. I know that I can switch safe_mode easily through a line or two in my htaccess, because I know that my host chooses to run with safe_mode on by default (and it's proved tricky to get them to do setup changes, honestly. It's a shared box.) Point is, it should be as simple as possible to run sNews on a "normal" environment, no? Question then is -- what is the norm.

I assume this is known already, I'm just playing the Devil's advocate here... ;)
Logged

centered

  • Guest
Re: Non functional system requirements.
« Reply #6 on: October 19, 2009, 12:14:21 AM »

http://php.net/manual/en/features.safe-mode.php

Quote
Safe Mode is deprecated in PHP 5.3.0 and is removed in PHP 6.0.0.
I don't know if that answers your question, but for future compatibility, I would not rely on it based on this - and yes I do understand the lowest level of PHP we are proposing is 5.1.
Logged

Joost

  • Guest
Re: Non functional system requirements.
« Reply #7 on: October 19, 2009, 12:23:45 AM »

I know that I can switch safe_mode easily through a line or two in my htaccess

I don't think so. It is not a htaccess thing.
Anyway, I don't think there is a way to find out which setting is most often used.

@Jason,

It is not a matter of relying upon safe_mode -  it doesn't do anything useful - but whether sNews should be able to run on systems that have safe_mode switched on. As said, the smoothest way to make it work, is to ship a sqlite databases with the package. If, on top of that, two sqlite versions are supported, two databases need to be shipped.
Logged

centered

  • Guest
Re: Non functional system requirements.
« Reply #8 on: October 19, 2009, 12:39:36 AM »

Quote
As said, the smoothest way to make it work, is to ship a sqlite databases with the package. If, on top of that, two sqlite versions are supported, two databases need to be shipped.
Perhaps I need to read more on this, but with safe mode on, the script couldn't allow a file (sqlite db for instance) to be created?

Logged

Joost

  • Guest
Re: Non functional system requirements.
« Reply #9 on: October 19, 2009, 12:59:40 AM »

Quote
As said, the smoothest way to make it work, is to ship a sqlite databases with the package. If, on top of that, two sqlite versions are supported, two databases need to be shipped.
Perhaps I need to read more on this, but with safe mode on, the script couldn't allow a file (sqlite db for instance) to be created?



It is possible to create a file. But it will have a different uid than the ftp uploaded files (index.php, snews.php). The easiest way to have the same uid, is by uploading the db as well.

ps: if anyone with more knowledge on permissions could post some sample code (sticky bits), I would appreciate it.
« Last Edit: October 19, 2009, 01:01:16 AM by Joost »
Logged