Optional Modules

Scenario: Our products have a common code base plus localized resource-only DLLs. A given version of the software is always made in English first, then translated, and a localized version is then made for that given OEM market. As such, the two products (English and Spanish, e.g.) are nearly identical - only differ in Language\XXXX\* contents.

It would be nice to not have to put a separate update-sequence on our server for each localization (i.e. English 14.0 to English 14.0.1 separate from Spanish 14.0 to 14.0.1).

We don't treat these as the same product from a marketing perspective: they share a lot of common code and data, but the Spanish version should not suddenly pick up English, nor vice versa. Similarly, neither should suddenly pick up Japanese (or discard it) when a version update is posted.

So ideally, all of them would update from the common base sequence (14.0 to 14.0.1) plus update their localized bits from a separate, locale-only sequence (14.0 English to 14.0.1 English).

That way we massively reduce the file usage on our FTP server (99% of the two are in common).

Does that make sense to you? I'm happy to clarify 🙂

---

EDIT: I can almost see how I can make this work now, by using a second .wyp based in the Language\XXX folder. Then a given product has the base wyUpdate in it's install folder, plus a second one in it's Language\XXX folder.However, I'd need some way to exclude the Language\* from the base project for this to work...

The messy part of this is the interface for the end-user. I don't really want them to have to run two separate wyUpdate.exe processes (we're a C++ non-.net product). Synchronizing those two pieces could get really ugly (our product insists that the language resources match the version of the base product, or it refuses to start up).

, edited

Unfortunately the only way to do this as of wyBuild 2.6.x is to create separate wyBuild projects for each of your languages. That is you'll have a "YourApp English" and a "YourApp Spanish" project. The patches will be uploaded to different folders on your servers. For example:

yoursite.com/updates/yourapp.english/wyserver.wysyoursite.com/updates/yourapp.english/yourapp.1.0.to.all.wyu...


yoursite.com/updates/yourapp.spanish/wyserver.wysyoursite.com/updates/yourapp.spanish/yourapp.1.0.to.all.wyu...

Yes, this will increase the amount of data you upload to your servers, but the amount customers download will be identical.

I have 2 questions:

  1. Will customers ever have multiple languages installed? That is, English, Spanish, and Japanese all installed in the same folder?
  2. We've been working on update modularlization for a short while but a major stumbling block in our implementation is how modules are identified. That is how would wyUpdate know the Spanish version is installed versus the Japanese version is installed? Do you set a special bit in registry? Or, I suppose a better question would be: How do you imagine update modularlization would work?

I'll do a quick answer now, to the "how do we do it now", and I'll think about the deeper question, "how do I see this working for wyBuild ideally" and try to answer that tomorrow or next day after I've given more thought.

Our application distinguishes which modules are installed in two ways:

1. Either the Language\X folder (and contents) are present, or they're not. Example: Language\English, Language\Nipponese. One or more language folders (and contents) may exist. Yes, some customers have English + Spanish, others have Chinese Traditional + Chinese Modern, but most have just one language.

2. Our license file dictates what languages they've paid for. Hence, whether you've installed Japanese or not is irrelevant if your license file won't allow you to run it, and vice versa - we can't run it if it just isn't there.

I imagine that for patching purposes, #2 is not relevant. If the module is physically present, then updating it as part of auto-update would be fine. We could always give the user a way to delete a language module if needed.

At present we do not put any of this in the registry (other than the user's specified preference for what language to start up in). So there is nothing for wyBuild to look at there, and I wouldn't think that would be a good place to communicate (given the hassles that registry permissions engenders).

hopefully this answers the more immediate question anyway...

Having had a few days to think about it, here is how I would have it work for us:

You can mark a folder (recursively) as being "Optional".

wyBuild would create a separate extra .wyu file for every "optional" file/folder tree. (NOTE: This means that the wyBuild side of things needs all optional modules to be available in the source tree (and defined in the .wyp) for any given build)

If the folder is present on the client's machine, then the updater would download and apply the corresponding .wyu for that (optional) folder-tree. If not present on the client's machine, it would eschew the download/application of that .wyu.

That's it.

[I could conceivably see it being as granular as marking individual files as "Optional". That would be a nice enhancement for some of your customers, but makes the entire issue much more complex, and is not something we would need. Folder-level granularity would be fine for us (and I should imagine that for other customers, it might not be much of an issue to adopt that requirement for their modular products). The biggest issue with per-file is that each file would presumably need to be another .wyu - since your software would have a hard time distinguishing what goes with what. Which is why folder-modularity makes this a much simpler self-defining affair).

NOTE: I would expect that marking a folder as optional is a secondary step, so that the current -add .xml syntax would work as-is, but that a further statement in the .xml would say, essentially "mark the following folder (and its decedents) as optional". Otherwise you get into complex issues about how to filter the original add-this-folder-recursively command / syntax.

Thanks for taking the time to write that. We'll have to make it more robust to handle some more complicated component scenarios, but we'll definitely incorporate your ideas into the feature.

And, to anticipate your next question, I'm not sure when this feature will be done. It's near the top of the list because a lot of users stand to benefit from it.

Thanks again.

I imagine that this particular aspect has the potential (maybe unavoidably so) to bloom into a complex and time consuming piece.

I hate to sound any notes of concern, but that's what my gut tells me. E.g., my own description indicating that the .wyp must have access to all of the optional modules... is going to be problematical from our standpoint. It would be better if we could add the optional modules later, even for an existing version (i.e. they could be defined up-front [or not], but the modules themselves (in our case: translations) may not be available until sometime after the main components have been released for a given version).

Let me try to give you a concrete scenario, so it's not so hard to parse:

We build a version - say 1.1. This version initially is released in north America, in English only. Over the next few weeks, the Japanese and Spanish translations for 1.1 arrive. They're built. Now I can either have separate tracks (1.1 Japanese, 1.1 Spanish, and 1.1 English), or I could have a single track with three optional modules (1.1 core, 1.1 English-module, 1.1. Spanish-module, 1.1 Japanese-module).

From a hard drive space perspective, having it modularized makes the most sense.

From a work-flow perspective, I'm not sure how wyBuild's .wyp will be able to best handle the realities of optional modules being available later than the initial release (containing only a single optional: English). I can see manipulating the .wyp so that the extra optionals are added later, or better, having the .wyp know about the other optionals (as potentials) but not error if they don't exist at build time, with some easy-to-use ability to build the optionals later (or just rebuild the project at a later time).

Fundamentally, the issue is fairly trivial from the perspective of what actually is placed on the server, and how the client side need handle it. That side seems simple to me: it always updates the core and any client-side-existing optionals. The only possible gotcha is that it shouldn't update at all unless all of its optionals are available for that update delta (can't have the core updated but English unable to update; that wouldn't work for our software for certain).

Sorry to confuse the issue... but I'm sure you can see that just from our relatively simple (well organized) system of modules, quite a few questions arise, and flexibility is going to be required on the build side, while some of the rules need to be ironed out on the client side (i.e. for some customers updating the core might be fine even though some of the optionals aren't available for that delta yet; as opposed to ours where we would want them to be in lock-step from the client's perspective, but not from the server's perspective).

We can happily work with your tools w/o optional-module support. Using a separate update-track per language combo actually fits our workflow very well. It uses more disk space, for certain, but the above complexities disappear. So this is not holding us up, and we'd rather see a fairly well-thought-out and flexible system later than something that doesn't quite handle the complexities now.

Thanks again for your willingness to listen / think!

I imagine that this particular aspect has the potential (maybe unavoidably so) to bloom into a complex and time consuming piece.

Yes, it can become unwieldy, but it's our job to condense this into a simple interface.

Thanks for making these thorough comments we're going to incorporate a lot of these ideas into the final design.