sramakrishnan's blog

The answer is 42...

Dont Panic

This post outlines the progress my group ':(){ :|:& };:' (dangerous smileys, don't try them at home ;) has made in developing a design for the system.

Progress

  1. We have made some progress in coming up with a high level system design. We had quite a busy week, and were swamped with work. We have scheduled work for this project to commence on Thursday.
  2. We have a basic block diagram of main components in the system. A high level view is as follows

Click here to see the block diagram

Description of the blocks:

  1. Message Receiver: This block handles receipt of messages from different sources, say SMS, email, voice (if need be...), etc. The message received is logged (for tracing), as sent to the Action Generator.
  2. Web Service: This module handles handles web-based requests. These requests may be from the web-site, or third party sources, like industry-partners.
  3. Action Generator: Given a message, the action generator tries to impose certain grammar on this message. This block will also weed out faulty and erroneous requests based on syntax. This block deals with the syntax, and not semantics of the messages. The output of this block will be a string/structure that is of well known grammar.
  4. Business Logic: Given a sentence of particular grammar, it checks if all the constraints are satisfied. These constraints are imposed by the creator of the sweepstakes, prizes, and govern which user can participate in what events, and so on. The business logic will either log the outcome of the command/sentence it received, or make changes to other blocks, such as sweepstakes, users, etc and will generate notifications. These notifications will be sent out to the user, and is generally a response to the request sent by the user.
  5. Notification Engine: Given a command (a sentence of particular grammar), it will generate notifications. This will map certain actions to messages that are sent to the user. We would like to keep the messages the user will see separate from the business logic, and this module maps the action to a message the user sees. This message will be dispatched to the user via the Message Sender, or Web Response module. The notification engine might also pull ads from the ad manager
  6. Message Sender: Send the message via sms/carrier pigeons/dont care. Handles the sending abstraction. This module will decide how the user sees the ads (it may ignore the ads as well)
  7. Web Response: This is a response to a web-based request. Again, this module as well as the client will decide how to render the message and ads. This is just a data source, and has no presentation data.
  8. Ads Module : Ads Generator and Ads Database – The Ad generator will generate suitable context-specific ads. The ads will be populated from the ad database. The Ad generator is in charge of the life cycle of each ad, how frequently must it appear, and so on.
  9. User Manger: Manages each user object. Constraints that deal with users and their participation are here.
  10. Sweepstakes manager: Manages running sweepstakes. On the completion of a sweepstakes, this module will insert a message to notify the winners. This message will follow the normal flow (action generator – business logic – notification engine, etc) as described above. The sweepstakes manager will also map the users and the prizes. The constraint of users being allowed to participate in certain sweepstakes is checked when the user tries to enter the sweepstakes, and hence no constraint checking needs to be done. There will not be any error generated during this step.
  11. Logger: Self explanatory. Log the incoming and outgoing messages. Log the change in state of the internal system as well.
  12. Dashboard: One manager to govern them all... The ultimate tool to make changes to the sweepstakes, prizes, etc via the back-door....

Note that the Message Receiver and the Message sender will have logic that will handle splitting of text across multiple sms's and reading the same message from multiple incoming sms's

Challenges faced:

  1. Finding who the mentor is, and getting the email id :)
  2. Security of the system. All details about syntax of a message is present in the Action generator. The semantics are handled by the business logic. There is no way of detecting a message that is syntactically correct, but semantically incorrect, before it passes through the business logic.
  3. Really missing the wiki style of formatting. Putting li ol blah blah is quite painful

return 1;