FORUMS
Remove All Ads from XDA

*** I WANT YOUR SERVICE initiative ***

2,487 posts
Thanks Meter: 62
 
By NLS, Senior Member on 22nd February 2009, 03:25 PM
Post Reply Email Thread


So you have a nice application that has to run all the time (because it detects a sensor, it reacts on something, whatever)... People love it and want to use it.

Then you have stupid WM limits. You can have only 32 processes mister (and 32MB for them)... Yeap that's all for you, even today and WM 6.5 (expected to change with WM7 but WM7 if it ever comes, is at least 18 months away)...

Then you have modern devices that from the factory come loaded with things you want to use and these 32 processes are already half "eaten"...

Then us geeky users, try to add more things and before you know it: "Cannot execute whatever.exe" (inc. even your sync subsystem... no discriminations here)... Then some of those nice programs those nice people in XDA devs made... have to go.

Microsoft HAS an workaround though. A workaround that is used in your desktop windows much more, even though desktop windows don't have this stupid limit: SERVICES.

It's even a philosophy thing: Something that has to run all the time, should be service! Something that you don't want the system to kill it for you, should be service! Something that runs in the background "invisible" SHOULD be service!

Here are some nice links for you:
http://bansky.net/blog/2008/04/servi...-managed-code/
http://msdn.microsoft.com/en-us/library/ms838599.aspx
http://www.pocketpcdn.com/articles/services.html
http://www.eggheadcafe.com/software/...ess-why-n.aspx
http://www.geekzone.co.nz/content.asp?contentid=2407
http://blogs.msdn.com/windowsmobile/...40.aspx#448385

Yes a service is a bit more complex thing to build and handle (for example you cannot just "quit" a service), but the results are there; and after all this is what some apps SHOULD be.

...So I am making this thread to have a nice AND ESP. FRUITFUL discussion about shifting your great creations to services (i.e. to whatever app this applies). The issue is there. The solution is there. Don't turn a blind eye to it.

Fire away...

(ps. I'd love if someone makes this sticky eventually)
 
 
22nd February 2009, 04:14 PM |#2  
danielherrero's Avatar
Senior Member
Flag Madrid
Thanks Meter: 245
 
Donate to Me
More
Yes, we can!
23rd February 2009, 12:41 AM |#3  
NLS's Avatar
OP Senior Member
Flag Piraeus
Thanks Meter: 62
 
More
Ok we have one recruit.

Let's hope for more.

(I esp. wait for mr. TouchLockPro guy - ...TLP as CMP ***SHOULD*** be service)
23rd February 2009, 02:23 AM |#4  
Senior Member
Flag Cali
Thanks Meter: 21
 
More
i have to say after reading this thread it does make really good sense especially if your like me who keeps a messanger running all the time be it beejive or im+ and also call firewall so getting those programs to run as a actual service that would be good so i know that there running all the time
nothin
23rd February 2009, 03:44 AM |#5  
Guest
Thanks Meter: 0
 
More
cooker point of view, with 64 mb mem device(max 33-34 mb mem free) - just thinking aloud..

Quote:

Something that has to run all the time, should be service!

..it may be just module cooked into rom, too, you know..no ram usage, still process though..
but - how many processes do you need at once, people...

btw,
Quote:

and 32MB for them

so we can load i.e. 50 mb of services maintaining 32 mb mem space for processes then?
just asking..

Quote:

"Cannot execute whatever.exe"

lol, but not beacuse of "32 processes at once" reason.
are there really users, that have 32 processes launched on their ppc's at once?

Quote:

cannot just "quit" a service

well, modules again..no mem footprint.

Quote:

Then you have modern devices that from the factory come loaded with things you want to use

lol, things i do not want to use - we are cookers because of that.
people are using custom roms because of that.

Quote:

and these 32 processes are already half "eaten"...

so 1/2 still left..

btw one more thing:
what about battery life time vs many services(lets say not especially good written ones)?
23rd February 2009, 06:30 PM |#6  
NLS's Avatar
OP Senior Member
Flag Piraeus
Thanks Meter: 62
 
More
All my devices hit the 32 process limit pretty soon.

I definitely welcome a cook's point of view, but this cannot apply to everybody.
Something that must run all the time, must run all the time. Be it a service or a process or a cooked module. In fact you can have a service as a cooked module. That's not the point.

The point is overcoming an issue that Windows Mobile has.
A real actual problem that all "more than basic" users face sooner all later.

We have devices with great potential (my TP certainly has) that are limited by stupid 10-15 years old limits.

Let's not take the side of young Bill "640Kb should be enough for everyone" Gates, or people that said some years ago that "IRQ is not a problem"... well history taught both of them otherwise.

Personally I strongly suggest devs that want to make something that must run all the time, to take a hard look on services.
23rd February 2009, 06:52 PM |#7  
ZuinigeRijder's Avatar
Retired Recognized Developer
Thanks Meter: 207
 
More
This is a very interesting topic, which I did not know of.

Why are the builtin programs of a phone not packaged as a service by the manifacturer?

Then the remainder programs can use the other 32 processes
If TouchLockPro is only packaged as a service, this will be only 1 process less.

I see also a lot of cons for services. Debugging/developing is much more difficult.

And I am also not sure, if there is a UI related to the service, if that is still a separate process (not background task). As I read the articles, the UI related applications use the service events for doing their job. So for TouchLockPro this would be a no-win, it still needs a separate process. So no gain from that perspective.
23rd February 2009, 07:05 PM |#8  
NLS's Avatar
OP Senior Member
Flag Piraeus
Thanks Meter: 62
 
More
Services, esp. for WM which are always dll, interact with their environment using various calls.

Having a front end, as long as it is used to set various bits and pieces (like in your TLP) that are then stored for the dll to use, is no problem. Your config front end will be a process of course, but not one that you keep in the background, will run only when needed.

If you talk about your popup window with the six buttons, I am sure you can do that too.

On purpose, one of the links I included above talks about SPB that has already moved all their "backbone" apps to services - and as you know SPB apps use everything... config screens, today items, pop-ups, you name it. Indeed everybody that has SPB software installed, will see in the proper task manager, just a few SPB services installed and no process, as many SPB products as you have. In fact I bet this has allowed them (or at least helped them) to have their famous integration between their products.
24th February 2009, 08:00 AM |#9  
danielherrero's Avatar
Senior Member
Flag Madrid
Thanks Meter: 245
 
Donate to Me
More
Hi.
Just a tip. Debug isnt complicated. Just attach the debugger(Visual Studio) to services.exe and you will be able to debug. Its a similar procedure to debug a today plugin (attaching to shell32.exe).....
Dani
28th February 2009, 01:06 AM |#10  
Soul_Est's Avatar
Senior Member
Flag Mississauga
Thanks Meter: 13
 
More
Quote:
Originally Posted by NLS

All my devices hit the 32 process limit pretty soon.

I definitely welcome a cook's point of view, but this cannot apply to everybody.
Something that must run all the time, must run all the time. Be it a service or a process or a cooked module. In fact you can have a service as a cooked module. That's not the point.

The point is overcoming an issue that Windows Mobile has.
A real actual problem that all "more than basic" users face sooner all later.

We have devices with great potential (my TP certainly has) that are limited by stupid 10-15 years old limits.

Let's not take the side of young Bill "640Kb should be enough for everyone" Gates, or people that said some years ago that "IRQ is not a problem"... well history taught both of them otherwise.

Personally I strongly suggest devs that want to make something that must run all the time, to take a hard look on services.

I have only done some ROM cooking (1 Pass/9 Fail) but I can say that this is a great topic especially once you deal with UI replacing or enhancing today plugins which consume memory like nothing else such as PointUI's Home 2 and HTC's Manila 2D. Software As A Service is the future!
28th February 2009, 07:03 AM |#11  
danielherrero's Avatar
Senior Member
Flag Madrid
Thanks Meter: 245
 
Donate to Me
More
Hi
After two days I managed to configure commmgrpro to run in dual mode, as a service or as a process. I thought It was going to much more difficult. If someone needs help please let me know.....
Dani
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes