FluidFramework icon indicating copy to clipboard operation
FluidFramework copied to clipboard

Restructuring routerlicious package dependencies for a better consumption model.

Open tanviraumi opened this issue 6 years ago • 6 comments

#3504

Need to figure out a better way to restructure r11s so that utilities can be consumed in a better way.

tanviraumi avatar Sep 04 '20 11:09 tanviraumi

I've got a working POC in my fork's repackage-r11s branch. At a directory level, the change hoists Riddler and Alfred source code out of routerlicious/packages/routerlicious/src and up to routerlicious/packages. At a dependency/package level,

  • Riddler and Alfred are published as @fluidframework/server-alfred and @fluidframework/server-riddler, respectively
  • @fluidframework/server-routerlicious depends on riddler and alfred packages to implement its alfred/www.ts and riddler/www.ts files
  • @fluidframework/server-riddler depends on @fluidframework/server-alfred for the utils getParam and getTenantIdFromRequest

@tanviraumi would you mind giving this a look when you get a chance? My off-the-bat questions are:

  1. Is this the correct directory level for Riddler and Alfred? Initially I thought I'd put them up by gateway, historian, and admin, but they seem to make more sense staying within routerlicious?
  2. Should the utils that are currently within Alfred move outside it? They don't seem to fit within services-utils since they are only used by Riddler and Alfred

Any feedback on this first iteration would be appreciated 🙂

znewton avatar Sep 09 '20 21:09 znewton

I was alternatively wondering if, instead of publishing Riddler and Alfred as their own packages, export them within a new package like @fluidframework/server-apis, following suit with @fluidframework/server-lambdas. Then, the current Alfred utils would/could be exported from there as API utils.

znewton avatar Sep 09 '20 22:09 znewton

I like your suggestion :) Rather than creating two separate packages, we should just create one. Let's call it @fluidframework/server-routerlicious-base. The directory structure will be the same as now.

Let me know when you update it and I will look into the detailed changes. You can also send a draft PR for easy collaboration.

tanviraumi avatar Sep 10 '20 13:09 tanviraumi

Thanks for the draft PR pointer! I moved Riddler and Alfred into @fluidframework/server-routerlicious-base and consumed that within @fluidframework/server-routerlicious. There are some more specific details in #3592

znewton avatar Sep 10 '20 17:09 znewton

@tanviraumi, @znewton wondering if there are addition work that needs to be done for this issue?

curtisman avatar Jan 12 '21 16:01 curtisman

We should be able to close it now. @znewton ?

tanviraumi avatar Jan 19 '21 19:01 tanviraumi