Jump to content

ProcessWire work with SMS Gateway


dreerr
 Share

Recommended Posts

My next project is to develop is an SMS (text message) auction tool. So users can send a text to a gateway number and the gateway is fowarding all texts to a callback URL on my server. I want to manage all of this data in PW, so all of the incoming messages should be saved in PW, the approximative usage will peak at about 3-4 texts per second. Each text has to be processed, so DB queries have to be made (article, current highest bid, confirmation texts, etc.) My questions:

* Is it wise to use the PW API for this? As there are only pages in PW, I would have to create a lot of pages with my type 'message'.

* Will this use a lot of memory on the server? Would I need an above average web hoster for this?

* Is a different approach better using the API of PW? Or maybe something totally different but as simple as PW?

Thanks, all the best, Julian.

Link to comment
Share on other sites

If you do a rough calculation (4 msg / second) for one year, you'll end up with over 3 million entries. Although I'm sure PW could handle that fine, I guess you'll be better off with a custom DB-table. otoh, creating PW pages with the excellent API is a breeze. Depending on the whole workflow, I'd consider some type of cronjob for archiving inactive auctions (set a flag in the custom DB, or use a checkbox inputfield in PW). Also, ask yourself what exactly do you need to do with all these messages. Perhaps a bit more background infos about the site functionality would be good.

  • Like 2
Link to comment
Share on other sites

Pages in processwire should not be confused with Pages in anything else. 

In ProcessWire a page is purely a grouping of one or more single rows of data. Thus a page can be used (via a template) to output the data necessary for an entire web page, or it could be used for just one line of data - it is perfectly proper and economical to use pages for a country select, for instance. Although it sounds like complete overkill, it is not - just sounds like it!

For even more on the relationship between processwire and pages, see this important post ...

http://processwire.com/talk/topic/2296-confused-by-pages/?hl=%2Bpages+%2Bjoss

By the way, yes pages are fine for what you want - it is possibly more about how robust your server is.

Link to comment
Share on other sites

I'm not sure if anyone has (yet) tried building such a construct with PW. Personally I'd be very interested in hearing how it goes, so please do keep us posted if that happens -- but still, if I had to do this for a client, I'd consider what @dragan said above, i.e. using custom database table for this data.

ProcessWire is efficient, but when dealing with simple, fixed-form data (and huge amounts of it) custom database table is going to have performance benefits. This, in turn, translates to cost savings, which probably neither you or the client would be against :)

Dragan's point about archiving old data is very important too.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...