2

I'm using Drupal 7, and I need to retrieve data from a web service. This data cannot be stored in the Drupal database due to regulations. What would be the best practice for retrieving this data: using Java, Drupal Entities, or storing in tokens?

We are currently making calls based on an ID stored in the database and displaying the data from the web service associated with that ID.

The problem with this is that it's all being done outside of Drupal, and we are unable to use Drupal to manage any of this content. So we have many modules with custom code to do everything from creating forms, pre-filling forms, tying into a users account on Drupal, etc.

We are at a point where we can totally refactor how this works.

Do you have any suggestion on how we can improve this?

1 Answer 1

2

It sounds like your question cannot be answered unless it is redefined. Drupal entities, views, and all of the other niceties that you would like to do involve storing information in the database.

You might look more closely at your regulations, and see what specifically they allow you to do. For example, sqlite stores its entire database in a file. If you used an sqlite database where the database file was stored in a volitile storage device (e.g. a RAM based filesystem), would you still meet regulations?

Even if this is possible, you might have performance problems if the amount of data you need to store is large, because sqlite was designed only for small databases, and is mostly used for testing. The same idea might work for mysql or postgres, though, as ultimately even these databases store their data in files.

If your data retention regulations are strict enough, you may find that the technique you are currently employing is the best you can do.

2
  • Thanks Greg. The amount of data we need to store will be large. I was thinking that maybe we could create an entity around the web service data and then show the data related to a field by adding tokens as the default value. The ID stored in the database would change what is shown through the tokens.
    – ellanab
    Commented Sep 27, 2012 at 20:59
  • I think your design problem is too large for my margin! If you are considering keeping your data outside of Drupal, but only moving an id that is currently in a custom module table to a Drupal entity, I do not see the value in doing that. Any improvement that I can think of that would be helpful would involve putting restricted data into a database, which it seems you are not allowed to do. Good luck. Commented Sep 27, 2012 at 21:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.