Skip to content

Isolating data: Multiple TaskMapper instances per user in the same ruby process #23

@fullofcaffeine

Description

@fullofcaffeine

Hey guys,

Thank you for taskmapper and the whole set of extensions for the different cloud services. It's really useful.

However, I've noticed that while the architecture of taskmapper is modular and easy to modify, it heavily relies on singletons objects, making it hard to isolate information on a per user basis in the same Ruby process. if we were to create a TaskMapper instance for multiple users in an hypothetical Rails application, the credential data would conflict, and the last used data would be used for the next instance of TaskMapper.

I see that you don't instantiate the instance of the API classes (the API constant, you just send a find to it, instead of instantiating it first), but instead rely on singleton objects (for example, in ticketmaster-pivotal, the token is kept in the singleton method "token" of the PivotalAPI class. That would obviously cause problems in a multi-tenant app, even if I create multiple instances of TaskMapper). Was that on purpose?

Regards,

Marcelo.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions