Introducing XDA:DevCon – A Conference For Developers By Developers
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
NLS
Old
(Last edited by NLS; 22nd February 2009 at 03:29 PM.)
#1  
NLS's Avatar
Senior Member - OP
Thanks Meter 21
Posts: 2,271
Join Date: May 2005
Location: Piraeus
Exclamation *** I WANT YOUR SERVICE initiative ***



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)
NLS
*** I WANT YOUR SERVICE initiative ***
My Blog

Devices: (many in the past, still in possesion the following) HTC Touch Pro 6.5.3 NRG, HTC HD2 (RULEZ) 6.5.3 Artemis, Samsung Galaxy Note (magic).

USE FORUM SEARCH! USE GOOGLE SEARCH!

Also: THIS guy is unbelievable! (in a bad way)
 
danielherrero
Old
#2  
danielherrero's Avatar
Senior Member
Thanks Meter 37
Posts: 2,890
Join Date: Oct 2006
Location: Madrid
Yes, we can!
 
NLS
Old
#3  
NLS's Avatar
Senior Member - OP
Thanks Meter 21
Posts: 2,271
Join Date: May 2005
Location: Piraeus
Ok we have one recruit.

Let's hope for more.

(I esp. wait for mr. TouchLockPro guy - ...TLP as CMP ***SHOULD*** be service)
NLS
*** I WANT YOUR SERVICE initiative ***
My Blog

Devices: (many in the past, still in possesion the following) HTC Touch Pro 6.5.3 NRG, HTC HD2 (RULEZ) 6.5.3 Artemis, Samsung Galaxy Note (magic).

USE FORUM SEARCH! USE GOOGLE SEARCH!

Also: THIS guy is unbelievable! (in a bad way)
 
Keland44
Old
#4  
Senior Member
Thanks Meter 15
Posts: 765
Join Date: Jun 2006
Location: Cali
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 Old
(Last edited by nothin; 23rd February 2009 at 04:13 AM.)
#5  
Guest
Thanks Meter
Posts: n/a
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)?
 
NLS
Old
#6  
NLS's Avatar
Senior Member - OP
Thanks Meter 21
Posts: 2,271
Join Date: May 2005
Location: Piraeus
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.
NLS
*** I WANT YOUR SERVICE initiative ***
My Blog

Devices: (many in the past, still in possesion the following) HTC Touch Pro 6.5.3 NRG, HTC HD2 (RULEZ) 6.5.3 Artemis, Samsung Galaxy Note (magic).

USE FORUM SEARCH! USE GOOGLE SEARCH!

Also: THIS guy is unbelievable! (in a bad way)
 
ZuinigeRijder
Old
#7  
ZuinigeRijder's Avatar
Recognized Developer
Thanks Meter 204
Posts: 2,854
Join Date: Jun 2008
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.
 
NLS
Old
#8  
NLS's Avatar
Senior Member - OP
Thanks Meter 21
Posts: 2,271
Join Date: May 2005
Location: Piraeus
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.
NLS
*** I WANT YOUR SERVICE initiative ***
My Blog

Devices: (many in the past, still in possesion the following) HTC Touch Pro 6.5.3 NRG, HTC HD2 (RULEZ) 6.5.3 Artemis, Samsung Galaxy Note (magic).

USE FORUM SEARCH! USE GOOGLE SEARCH!

Also: THIS guy is unbelievable! (in a bad way)
 
danielherrero
Old
#9  
danielherrero's Avatar
Senior Member
Thanks Meter 37
Posts: 2,890
Join Date: Oct 2006
Location: Madrid
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
 
Soul_Est
Old
#10  
Soul_Est's Avatar
Senior Member
Thanks Meter 11
Posts: 155
Join Date: Dec 2007
Location: Mississauga
Quote:
Originally Posted by NLS View Post
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!
Phones: Touch (P3050) -> Milestone -> Xperia X10 -> Xperia Ray (ST18a) -> Desire HD -> Galaxy Nexus -> Xperia Ray (same one)
Tablet: Galaxy Note 10.1 (GT-N8010)

Various tweaks and programs found on XDA-Developers forums and elsewhere.

Thank you to all the developers who create the tools and programs that help many of us enlighten ourselves and become experts.

Thank you to all the experts who enlighten us on the ways of enhancing our phones beyond the norm.

 
Post Reply+
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Go to top of page...

XDA PORTAL POSTS

Side-Swiping Multitasking with Kakudo

Recovering iPad users may still remember the multitasking function where you can swipe left or right to … more

Learn to Edit Graphics for your Development Work

The importance of good and appropriate graphics for your development work is undeniable. Be … more

Tasker Alternative: AutomateIt, Automates Your Device Tasks – XDA Developer TV

XDA Developer TV Producer Kevin wants to help make your … more

Preventing App Piracy: Join the Discussion

The topic of piracy is always a touchy subject, but I feel that the grass roots style of Android … more