Sorry, I am rather new. Where can I get information on things like
commit rules, core devs, etc...
3) Commit rights are far too restrictive. This is probably partly due
to not having a release cycle and stable versions we can point people
to use. Let's fix that, and let's open things up. A smaller core
should help a ton there as well. But Malthe was right two months ago,
let the coders drive this and let's fight this out, the best ideas
will prevail. Let's default to granting commit rights and duke it
out, I'd rather see that than the current stagnation.
1) Core is far far too big, it should be tiny, and it should be 100%
django based. Backends should plug in via a simple HTTP API. Core
should provide the framework for taking an incoming message and
routing it to handlers reliably. That's it, period. Everything else
is add ons that can evolve and grow on their own timeline.
2) We should use Kannel as a backend by default, maintaining our own
GSM layer is insanity. I think that fact has been driven home in the
past few weeks as people struggle to get things working with an SMSC
or various GSM modem configurations.
3) We need far more decoupling. Message routing, parsing, and
handling should all be configurable and interchangeable, at each
individual level. This encourages reuse, and encourages new
approaches without affecting core. Django is a great model here.
4) We should do the hard stuff. We fail at providing the hardest
part, good and consistent parsing of the garbled messages which
invariably come in.
5) Treat things as life or death, because they might be. We fail far
too easily and don't audit the state of incoming and outgoing
messages. The core of RapidSMS should take every measure possible to
make sure messages aren't dropped on the ground from errors, whether
that be the backend failing or a server restart or whatnot. Let's
take this seriously, we aren't building casual systems here.
Persistence of incoming and outgoing messages (and their state) should
be a core competency.
6) Of course it is easy to pile on, but far more testing, far more documentation
On the community side:
1) There is no community. There are a lot of islands of RapidSMS, but
there seems to be no clear pull from the community in a particular
direction. NY has some idea as to where they want to head, but I
don't feel that the rest of the population is feeling included there.
This type of project cannot be built in an ivory tower, nor should it.
2) Release cycles. We should set a release cycle of every six (maybe
even three?) months, consistently.. aka, the Ubuntu model. At the
start of every cycle, a set of features or improvements should be
picked (new plugins to core), and a set of owners for those features
should be lined up. Those people do not need to be the same every
time, but they need to be dedicated to nailing that release. One
person should be appointed as the PM for that cycle and track and
drive the progress. Shit doesn't get done without deadlines, we know
this, let's make some deadlines and get on with it.
3) Commit rights are far too restrictive. This is probably partly due
to not having a release cycle and stable versions we can point people
to use. Let's fix that, and let's open things up. A smaller core
should help a ton there as well. But Malthe was right two months ago,
let the coders drive this and let's fight this out, the best ideas
will prevail. Let's default to granting commit rights and duke it
out, I'd rather see that than the current stagnation.
>> 3) We need far more decoupling.
>
> Adam has also developed a new mechanism called handlers which demystify andIs this different than what is living in Adam's
> simplify both routing and parsing. Each app may define handlers based on
> keywords or patterns.
'rapidsms-contrib-apps-dev' branch? Because if not, that isn't
decoupled.
Decoupling implies that routing is done in one place, parsing in
another, and handling in yet another.
I should be able to look at one file and see all the messages a system
supports. From there I should be able to see which parsers are used
for those messages, and where those parsed messages are sent.
As a use case I brought up long ago, suppose I want to use the
reporters app, but want a completely different set of keywords and
formats. This should be doable without writing any new Python code
and will encourage more reuse (instead of forking) going forward.
In that branch at least, that still seems to be tightly coupled:
<http://github.com/rapidsms/rapidsms-contrib-apps-dev/blob/master/reporters/handlers/register.py>
>> 4) We should do the hard stuff. We fail at providing the hardestI don't think stringcleaning goes far enough, especially because it
>> part, good and consistent parsing of the garbled messages which
>> invariably come in.
>
> I agree. The hardest part is very hard and varies widely. Good and
> consistent parsing often depends on what message content is expected and its
> order, etc. Even the stringcleaning app has to be customized depending on
> what data will be collected.
> I think continued work on stringcleaning and improving the handlers will get
> us a lot farther on this front. I also think it would be valuable to create
> a body of real world garbled messages and their intended formats that we can
> test our parsing against.
doesn't really help in the job of defining the format and parsing it
out, rather only taking care of common typos. We should be defining
arguments as logical units, and take care of the magic that is
deriving the user's intent within those.
>> Set release cycles:
> This is a noble idea. We tried to just this last summer and have a threeI think this is certainly a big challenge, especially for the release
> month release cycle. I was the first release manager and we had a set of
> features and corresponding owners. Unfortunately, our self-imposed deadlines
> were passed repeatedly and many features remain outstanding. Many feature
> owners were diverted to working on project deployments and our initial
> momentum evaporated.
> However, we are a much larger community today, so perhaps it could work if
> more than a few people can take part.
manager, but it is a challenge we have to take on, otherwise we won't
move forward. People either need to be honest about how much time
they can devote, or be gently nudged to bow out when they aren't
delivering. But yes, that is a tough problem, I understand that.
What is the release schedule for Adam's refactor?
I think my big concern is that my biggest pet peeves, decoupling and
parsing don't seem to be on the roadmap. Decoupling is a pretty big
architectural change, and one I think is a fundamental necessity, so
that's why I'm a bit concerned that there isn't more discussion going
on along those lines.
Our current goal is a django-based core (its a legit django project) with a rich api for interacting with apps and backends as well as a unified web interface. The core will accept incoming messages and route them appropriately. The core will include models for keeping track of the various backends so that app authors need not concern themselves with which backends are running, for example. The core will also include basic representation of the concept of people -- designed to be extensible via an api. We've examined all of the ways that users have had to hack and customize rapidsms for various deployments and tried to create proper, formalized ways of doing so that dont result in a proliferation of forks and bloat. Everything else, including the extensions to the core models, will be add ons or libraries that live elsewhere and grow at their own pace.
2) We should use Kannel as a backend by default, maintaining our own
GSM layer is insanity. I think that fact has been driven home in the
past few weeks as people struggle to get things working with an SMSC
or various GSM modem configurations.I disagree with you on this one. Yes it is insanity, but it is necessary insanity. In my experience, every mobile network is different and many possess odd quirks (their own interpretations of the gsm standard, use of odd character encodings, etc).Kannel is first and foremost a WAP gateway (that can also do SMS), and can be very difficult to configure properly -- especially if you only want to send and receive SMS. Kannel is fantastic if the network implements standards well and there are no surprises -- otherwise you are faced with debugging 200000 lines of opaque C code in order to get Kannel to work with a particular character encoding or unexpected network behavior.Sending and receiving SMS only requires issuing a few AT commands and a good queuing system. Kannel is massive overkill for doing so, and there arent really any alternatives other than developing our own lightweight, flexible, and transparent solution. Yes, pygsm is rough around the edges, but it has been used often enough in large-scale production that i see a lot of value in devoting more time and resources to make it more robust and stable.
3) We need far more decoupling. Message routing, parsing, and
handling should all be configurable and interchangeable, at each
individual level. This encourages reuse, and encourages new
approaches without affecting core. Django is a great model here.Absolutely. Adam has made a lot of progress on the decoupling front in the dev repositories. Contacts (core representation of people) and Locations have an extension API so that app authors may easily add fields to these models from the comfort of their own apps without having to get their hands dirty. This way many apps can extend core models without affecting the core itself -- and the extensions within an app are discrete so they too can be reused and shared.
Adam has also developed a new mechanism called handlers which demystify and simplify both routing and parsing. Each app may define handlers based on keywords or patterns.
5) Treat things as life or death, because they might be. We fail far
too easily and don't audit the state of incoming and outgoing
messages. The core of RapidSMS should take every measure possible to
make sure messages aren't dropped on the ground from errors, whether
that be the backend failing or a server restart or whatnot. Let's
take this seriously, we aren't building casual systems here.
Persistence of incoming and outgoing messages (and their state) should
be a core competency.We need a lot more QA and testing.
On Mon, May 10, 2010 at 5:37 PM, evan wheeler <evanmw...@gmail.com> wrote:Our current goal is a django-based core (its a legit django project) with a rich api for interacting with apps and backends as well as a unified web interface. The core will accept incoming messages and route them appropriately. The core will include models for keeping track of the various backends so that app authors need not concern themselves with which backends are running, for example. The core will also include basic representation of the concept of people -- designed to be extensible via an api. We've examined all of the ways that users have had to hack and customize rapidsms for various deployments and tried to create proper, formalized ways of doing so that dont result in a proliferation of forks and bloat. Everything else, including the extensions to the core models, will be add ons or libraries that live elsewhere and grow at their own pace.
Does this mean the method of adding fields to Django models will live externally to RapidSMS, and the core will not depend on it? If so, that's music to my ears. While the model extension stuff in the dev projects (rapidsms-core-dev, rapidsms-contrib-apps-dev) is cool and useful, it's certainly not impossible to write Django (or RapidSMS) apps without them.
One of my worries while working with this code has been that RapidSMS will become a repository of cool hacks that making writing Django apps easier. These currently include the model extensions, the magic that manifests your app at a URL (writing a urls.py is not that hard), the static media aggregator, and the tabs decorator code. The last of these we had to remove get RapidSMS to run under Apache in a production environment. IMHO, since these are not specific to RapidSMS, they don't really belong in RapidSMS core--and they make the learning curve steeper for existing Django developers.
I admit this may be a bit purist of me - but I do think that some of the magic is unnecessary and just leads to obfuscation of the way things work.
2) We should use Kannel as a backend by default, maintaining our own
GSM layer is insanity. I think that fact has been driven home in the
past few weeks as people struggle to get things working with an SMSC
or various GSM modem configurations.I disagree with you on this one. Yes it is insanity, but it is necessary insanity. In my experience, every mobile network is different and many possess odd quirks (their own interpretations of the gsm standard, use of odd character encodings, etc).Kannel is first and foremost a WAP gateway (that can also do SMS), and can be very difficult to configure properly -- especially if you only want to send and receive SMS. Kannel is fantastic if the network implements standards well and there are no surprises -- otherwise you are faced with debugging 200000 lines of opaque C code in order to get Kannel to work with a particular character encoding or unexpected network behavior.Sending and receiving SMS only requires issuing a few AT commands and a good queuing system. Kannel is massive overkill for doing so, and there arent really any alternatives other than developing our own lightweight, flexible, and transparent solution. Yes, pygsm is rough around the edges, but it has been used often enough in large-scale production that i see a lot of value in devoting more time and resources to make it more robust and stable.
PyGSM may be necessary, but I dislike that it's the de facto installation. I've spent too much time in the past few weeks trying to figure out why the route process was randomly dying or not recovering if the modem went down. In reality I don't understand how it's survived multiple large-scale installations given some of the bugs I discovered.
For the truly lean solution, I'd go one step further and say strike the "route" process altogether. What's wrong with parsing messages as as part of the standard HTTP request/response cycle? The fact that it runs as a separate process makes it difficult to debug and makes automated testing hard. How many times have you had to scroll up through your test output to see the exception raised in the route process, when you really wanted it nicely printed next to your test failure? This way, backends just become simple Django views that do some preliminary processing and pass the messages off to RapidSMS to be handled.
If one needs the flexibility of PyGSM, create a separate process/service (in an independent project) that can read messages and post them over HTTP. I don't really see a need for it to be part of the core at all.
Adam has also developed a new mechanism called handlers which demystify and simplify both routing and parsing. Each app may define handlers based on keywords or patterns.
I like the handlers and I think they offer an excellent pattern for segmenting business logic. One comment is that they don't currently tell you what keyword was chosen when parsing the messages, which you need to know in some cases. E.g., I tried to write a QuerySetHandler that extended KeywordHandler and based its keywords on a given model field, but hit a wall when I realized the keyword wasn't being passed to the handle method itself.
6) Dependencies. Another concern I have about the development branch of RapidSMS is its growing list of submodules and other dependencies. E.g., I don't really think django-tables is crucial enough that it merits manifesting itself as rapidsms.tables.
In a nutshell, I think RapidSMS should do what it can using pure Django (and pure HTTP), and leave the rest up to implementors on a case-by-case basis.
i'm not fundamentally _opposed_ to merging the two processes, but i
don't see a compelling reason to do so.
> 3) I actually really disagree that decoupling handling and web views
> into separate processes is a good thing. Yes, being able to have the
> actual GSM modem in one place and the server in another is a good
> thing, backends themselves should be separate. But if the handling
> and web views are separate processes then you need to keep them in
> sync. Having them be different places allows for crazy cases like
> your models being different in the two instances, requires you to have
> the DB accessible from both places, can cause really nuts problems
> when code is out of sync etc..
on the backends, actually, i agree. backends should probably be in
separate processes, and hand their messages to the router via HTTP or
DBUS or something. maybe the apps, too. i did some work on that idea a
while back, and it was pretty sweet. i'll see if i can dig it up.
and i shudder at the thought of a big list of regexen (like url.py)
containing every sms route that we've ever defined. we deliberately
abstract that stuff, because it's so gross.